2010/04/27

vmware through a keyhole

Finding all your vm's mice borked? (restricted to the top right hand area of the screen - broken everywhere else)

Try putting this into your environment:

VMWARE_USE_SHIPPED_GTK=yes

And ignore startup theme errors.

Thanks to forums.gentoo.org

2009/06/15

One mbox to hold 'em all

Roll your own IMAP mailbox into gmail:
  1. git clone git://github.com/rgrove/larch.git
  2. git clone git://gitorious.org/trollop/mainline.git
  3. emerge -av highline
The larch Copy all folders recursively option gave me some problems, and since I wanted to do some mapping of folder names to different labels on gmail:
  1. Make a list of folders on the from server - I used the contents of my thunderbird directory. E.g. something like:
    find . -name '*.msf' | sed -e 's/.msf//' -e's/.sbd//g' -e 's/-1//' -e 's/.\///'|sort|uniq
  2. xemacs above to create a file, with one line for each folder with a simple format: from_format to_label
  3. Feed into a script something like:
while read from to ; do
ruby -Imainline/lib:larch/lib \
larch/bin/larch \
--from imap://imap.example.foo --from-user XYZ --from-pass OPW \
--to imaps://imap.gmail.com --to-user ABC --to-pass DEF \
--from-folder $from --to-folder $to
done


2009/04/28

push the button Max, err Gunther

Why did I want this in the first case? - but anyway, it seems to work by:

1. Following the tip

2. Download tweetdeck or just:
wget http://www.tweetdeck.com/beta/TweetDeck_0_25.air

For 26.4 (8 July 2009) this changed to:

http://downloads.tweetdeck.com/TweetDeck_0_26.air
3. Running the app with (note slight typo fix for app directory to tip in #1):
/opt/AIR-SDK/bin/adl -nodebug /opt/AIR-apps/TweetDeck_0_25/META-INF/AIR/application.xml /opt/AIR-apps/TweetDeck_0_25
It complains about:
I/O warning : failed to load external entity "/etc/opt/Adobe/certificates/crypt//config.xml"
Unable to parse Document: /etc/opt/Adobe/certificates/crypt//config.xml.
But otherwise appears to run, just with lots of warnings like:
warning: unable to bind to property 'tTextHTML' on class 'Object' (class is not an IEventDispatcher)
warning: unable to bind to property 'tSource' on class 'Object' (class is not an IEventDispatcher)
warning: unable to bind to property 'tUserID' on class 'Object' (class is not an IEventDispatcher)

2009/02/12

Wait Up

If you find service startup (e.g. samba) failing because an interface started in the background isn't up in time, then waitup may be an answer:

#!/bin/bash

IFACE=$1
count=0
echo -n "Wait for ${IFACE}"

while ! /sbin/ifconfig ${IFACE} 2>/dev/null | grep -q "UP" ; do
echo -n "."
sleep 1
count=`expr $count + 1`
if [ $count -gt 10 ] ; then
echo "not found in 15sec - bailing"
exit 1
fi
done

echo ". ($count)"

exit 0

2008/12/14

Trust in Alsa

The Trust SC-5500p usb sound box isn't picked up by ALSA directly (audacious seems to work?) - the result is bad distorted/garbled sound. ALSA configuration is more complicated than most need.

Adding an asoundrc with channels 6 seems to get sound out at least (no dmix/mixing yet):

pcm.!default complex_convert

pcm_slave.sl3 {
pcm "hw:0,0"
channels 6
}
pcm.complex_convert {
type plug
slave sl3
}

2008/06/08

Get Smart

smartmontools is a good thing -
  • smartctl -a /dev/sda (dump all the SMART info on the disk)
  • smartctl -t short /dev/sda (run a short self test)
  • smartctl -t long /dev/sda (run a long self test)
  • smartctl -l selftest /dev/sda (list the available self test results)
  • smartctl -s on /dev/sda (to turn on SMART if its not on by default)
Running one long test a week is the suggestion here:
0     8      *   *     0     smartctl -t long /dev/sda >>/var/log/smart.log 2>&1
0 9 * * 0 smartctl -l selftest /dev/sda >>/var/log/smart.log 2>&1
Setting:

SMARTD_OPTS="--interval=3600"

in /etc/conf.d/smartd is the only non default setting I made (for a laptop).

Funnies:
  • One disk didn't have SMART enabled (all the rest did...)
  • One (other) disk didn't list self tests in progress
  • RAID confuses SMART on two servers I tried it on (a test started on one side of a mirror showed up on both

2008/03/20

virtual runabout

To move a vm (on vmare 5.5.5) from

kernel 2.6.18-gentoo-r6 (old tools from the iso image)

to

kernel 2.6.24-gentoo-r3 and open-vm-tools (keyworded in portage)

  1. the kernel LSI scsi driver is borked - resulting in the kernel panicing when it can't find the root device. Fix that by hand applying this patch.
  2. the pcnet32 driver loads, but its interrupt is immediately disabled and no interface is created- so switch to the e1000 driver and be happy.
The vmx incantation to get an e1000 is:

ethernet0.virtualDev = "e1000"

And an updated patch:

--- mptbase.c_orig 2008-03-20 21:15:32.000000000 +0000
+++ mptbase.c 2008-03-20 21:17:46.000000000 +0000
@@ -2844,6 +2844,18 @@
pfacts->IOCStatus = le16_to_cpu(pfacts->IOCStatus);
pfacts->IOCLogInfo = le32_to_cpu(pfacts->IOCLogInfo);
pfacts->MaxDevices = le16_to_cpu(pfacts->MaxDevices);
+
+ /*
+ * VMware emulation is broken, its PortFact's MaxDevices reports value
+ * programmed by IOC Init, so if you program IOC Init to 256 (which is 0,
+ * as that field is only 8 bit), it reports back 0 in port facts, instead
+ * of 256... And unfortunately using 256 triggers another bug in the
+ * code (parallel SCSI can have only 16 devices).
+ */
+ if (pfacts->MaxDevices == 0) {
+ pfacts->MaxDevices = 16;
+ }
+
pfacts->PortSCSIID = le16_to_cpu(pfacts->PortSCSIID);
pfacts->ProtocolFlags = le16_to_cpu(pfacts->ProtocolFlags);
pfacts->MaxPostedCmdBuffers = le16_to_cpu(pfacts->MaxPostedCmdBuffers);


Switching to the buslogic driver (especially for new systems) would seem to be a better medium term solution.

The e1000 needs to be blacklisted to allow vmxnet grab the virtual ethernet dev - but a job for another day.