PageUp to irssi in Terminal (OSX)

 Note to self: sending a PageUp to irssi running in an SSH session in Terminal on OSX Snow Leopard (as opposed to sending it to Terminal itself) is done via fn+shift+up.

That is all.

 Permalink

Mojo SDK getting up and running

Palm finally released their WebOS SDK to the public (to be found on http://developer.palm.com ).  Here's what I did to get things up and running on my Gentoo laptop:

  • Download the .deb file
  • Convert the .deb file to a tarball ( deb2targz )
  • Extract the thing to /
  • Try `palm-emulator` and swear some because "Palm Emulator requires that VirtualBox 2.2.0 or greater is installed."  2.2.4 > 2.2.0, right?
  • Some decompiling of the jar files reveals that on Linux, the virtualbox classes simply search for /usr/bin/VBoxManage.  If it's installed somewhere else, tough luck, you don't have virtualbox.  A symlink fixes this.
    Note: on Windows, `reg query HKLM\SOFTWARE\Sun\xVM VirtualBox /v InstallDir` is used to determine the installation directory.  On my Vista x64 box I can execute this query in a DOS prompt and get the correct result, even though the emulator complains.
  • Ignore the novacom warning for now and presto, one booting WebOS VBox machine.

The novacom warning : 

In order to install or debug applications in the Palm Emulator, the novacom 
service must be running on your desktop.

Please verify that you have the latest Palm SDK installed correctly.
`sudo /opt/Palm/novacom/novacomd` fixes this.  There's a /etc/event.d/palm-novacomd script which makes the novacom service start on rulevels 2, 3, 4 and 5.  This is probably a very debian-ish way to do things, but won't quite work for me ;-)
Anyway, I have a running virtual machine and I should be able to install and debug applications from Eclipse.  I'm happy.  For now :-)
 Permalink

Opera Unite

I'm giving Opera Unite a try and so far it looks cool.  Hosting a chatroom or a fridge to put notes on your own laptop and having users all over the internet access it (whether you're behind the corporate firewall or not) just seems cool.  I wonder what else it can do ...

 Permalink

Mutt sidebar configuration generator

 So I had some fun with Python last weekend.  The result is a tiny project on kenai.com called Sidebar Config.  It doesn't do much more than generate a configuration file for the Mutt sidebar.  But it does so based on folders in either one or more Maildirs, or on your IMAP server.

Here it is : kenai.com/projects/sidebar-config

 Permalink

Mutt configuration

 I've commented and cleaned up my Mutt configuration files.  While I feel you can get the most out of Mutt by writing your own config, these might be helpful in getting someone started.  They should also be a pretty good example for usage of the account_hook and folder_hook.

Since it seems that I can't link to tarballs or folders on this server, here are links to the individual files :

muttrc

account_hooks

colors

folder_hooks

gpg

lists

macros

sidebar

 Permalink

OpenSolaris experiments

 I'm experimenting with OpenSolaris in a virtual machine in order to get some more hands-on experience with Crossbow, Containers, ...

Just to make sure : this is not a guide / how-to.  These are notes to remind myself of what I did.  If you mess up your system by doing anything described here, that's your problem.  If I mess up my system ... well ... I have a backup ;-)

First of all : BFU (aka Blindingly Fast Upgrade)

  1. I got BFU from here : dlc.sun.com/osol/on/downloads/current/ (it's the SUNWonbld.i386.tar.bz2 file, for i386 in my case)
  2. Then download the Crossbow bits from here : www.opensolaris.org/os/project/crossbow/snapshots/
  3. Extract the BFU archive and install it (after removing any possible older version via pkgrm) : 
    pkgadd -d . SUNWonbld
  4. Add BFU to the path via ~/.profile :
    export PATH=/opt/onbld/bin:/opt/onbld/bin/i386:$PATH
    export FASTFS=/opt/onbld/bin/i386/fastfs
    export BFULD=/opt/onbld/bin/i386/bfuld
    export GZIPBIN=/usr/bin/gzip

  5. Source your .profile again or re-login, extract the crossbow bits and get bfu running:
    bfu /rpool/crossbow/nightly-nd
  6. When all is done and you end up in ksh, don't forget to run the Automatic Conflict Resolution script :
    /opt/onbld/bin/acr
  7. There you go ... reboot, admire your new GRUB entry and enjoy Crossbow!
 Permalink

Comparing two directories

Sometimes it's useful to check whether two directories contain the same files, and whether the files that match are exactly the same.

Assume you have two directories: dir1 and dir2

First, compare the listing of files in the dirs:

find dir1 |sort > contents_dir1.txt
find dir2 |sort > contents_dir2.txt

(I'm sure there are ways to exclude certain patterns, but I can't be bothered because I don't need it at this point.)

Next, compare the two listings using diff ( piping it to colordiff gives pretty colours, using less enables you to actually see what is different if the list is very long).

diff -u contents_dir1.txt contents_dir2.txt |colordiff |less

If you see files here for which you don't care about whether they are identical, remove them.  Sed is your friend if there are many of them.

sed -i '/<pattern>/d' contents_dir1.txt
sed -i '/<pattern>/d' contents_dir2.txt

Now make md5sums of all files listed in contents_dir1.txt and contents_dir2.txt.  Redirecting stderr to /dev/null suppresses "<blabla> is a directory" warnings from the md5sum command

cat contents_dir1.txt |xargs md5sum > md5sums_dir1.txt 2> /dev/null
cat contents_dir2.txt |xargs md5sum > md5sums_dir2.txt 2> /dev/null

And once again, use diff to compare the md5sums.  From here, it's up to you to decide what to do with files that are different :-)

diff -u md5sums_dir1.txt md5sums_dir2.txt |colordiff |less

 Permalink

Matrox Triplehead2Go and linux

I am the happy owner of a Matrox TripleHead2Go and three 19" TFT screens. Needless to say this makes for some pretty cool gaming moments (see the Dead Space gallery for some, much too small, screenshots to get an idea of the view you get).

Installation under Windows was fairly easy with the included software.  Getting the thing to work under Linux was ... also fairly easy.

All that was required was a small edit of xorg.conf :setting the Modes parameter under the Screen section (subsection Display) to "3840x1024" was enough.

The one other thing I did in order to be able to maximize windows to just one screen instead of having them span all three, was add the following line to the Device section : 

Option "TwinViewXineramaInfoOverride"   "1280x1024+1280+0, 1280x1024+0+0, 1280x1024+2560+0"

Notice that I start with the middle screen (+1280+0), then put the left one (+0+0), and then the right one (+2560+0).  This is to ensure that the middle screen is used as the "main" screen (e.g. to decide where to display GDM).

More screenshots and possibly some pictures will follow, eventually.  For now, here's my xorg.conf.

Related Entries:
Importing ical to J-Pilot
 Permalink

Importing ical to J-Pilot

 I use Sunbird if I want to subscribe to an online calendar (mostly via ical), but sometimes I want to import some events into my Palm.  Since I use J-Pilot to sync my Palm, this translated into the need to move events from Sunbird to J-Pilot.

Attempt 1 : export events into a CSV file and import that into J-Pilot (which, by default, only supports importing from CSV and DAT/DBA)

FAIL.  The CSV format is different.

Attempt 2 : Google and The CompuTech Group to the rescue with this article : http://www.computechgroup.com/?p=381

It boils down to this : 

  1. Checkout, compile and install jp-icalendar ( http://sourceforge.net/svn/?group_id=61960 ).
    1. svn co https://jp-icalendar.svn.sourceforge.net/svnroot/jp-icalendar/trunk jp-icalendar
    2. cd jp-calendar
    3. ./autogen.sh
      1. If this fails with errors like the following, skip this step and run autoreconf --force --install --symlink instead.
      2. configure: error:

        *** [Gentoo] sanity check failed! ***
        *** libtool.m4 and ltmain.sh have a version mismatch! ***
        *** (libtool.m4 = 1.5.26, ltmain.sh = "1.5.24 Debian 1.5.24-1ubuntu1") ***

        Please run:

          libtoolize --copy --force

    4. ./configure
    5. make
    6. make check
    7. sudo make install

Now when you have an ics file, you can simply import it into J-Pilot via icalendar-import calendarfile.ics

If you're a GUI user and would like these files to be imported automatically when you double-click them, configure .ics files to be opened with `/usr/local/bin/icalendar-import' (or wherever your icalendar-import is installed).  Keep in mind that if you import it twice, all events will show up twice as well!  It's logical, but worth mentioning ;-)

Note: after syncing with my palm, the poor thing crashed every time I tried to open the calendar.  Quickly solved by restoring a backup, but nevertheless annoying.  I think the descriptions for some of the imported calendar entries were too long or so ...

Related Entries:
Matrox Triplehead2Go and linux
 Permalink

Gentoo: com_err and ss blocking e2fsprogs

After running into this on three computers, I figured I'd mention it here as well.  It's a rather old issue by now, but at a certain point com_err and ss were moved to e2fsprogs on Gentoo.  I found my workaround here : www.odi.ch/weblog/posting.php

Make sure not to unmerge com_err and ss before doing emerge -fuD world first!

Also, I had my "emerge" aliased to "sudo emerge".  That won't work, because sudo also relies on com_err, which is unmerged at a certain point.  Make sure you're logged in as root for this procedure.

 Permalink
Next1-10/14