Archive for the 'Linux, etc.' Category

How to Optimize Gestures in Firefox

Why Bother?

It is nice to be able to flick your wrist to do all the common tasks in a browser without touching menus, reaching for toolbars, or the keyboard. Personally, I’ve got a tablet so the pen is often the most convenient interface. Back, Forward, Next (in series), Previous (in series), new tab, close tab, minimize and maximize all in two mouse moves or less.

I used to use “All-In-One Gestures”:http://perso.wanadoo.fr/marc.boullet/index.html which is a fork of the “Optimoz Mouse Gestures” extension. It was forked before reliable diagonal gestures were implemented though and it has stayed san diagonals for years. Optimoz was broken in Firefox for a time with no maintainers so I had to move to All-in-One, I got used to a few of the bit features and didn’t check back on Optimoz.

I sorely missed diagonal gestures, instead of 4 gestures with one move (Up, Down, Left, Right) I could do eight!, but I tolerated AIO. Two gestures which were especially handy as one move-gestures but don’t fit into the UDLR orientations were Grow Image and Shrink Image. Did I mention the loss was a tad annoying?

A new extension has come about though which adds two more amazingly useful one move gestures into the mixin’s though–”NextPlease”:https://addons.mozilla.org/extensions/moreinfo.php?id=390 . This extension adds interfaces for Next and Previous page, filling out and in my opinion, fully justifying the diagonals as legit gestures, if there was any question. All-In-One supports these gestures but only for the non-diagonal gestures–Up (Link-in-new-tab), Down (Link-in-new-window or Scroll Down) , Left (back), Right (forward) are already taken with important moves. No flick to next page for you there.

So, how can you flick to the next page?

  1. Install the “Optimoz Mouse Gestures extension”:http://optimoz.mozdev.org/gestures/installation.html
  2. After you restart firefox, click the links below to add the NextPlease gestures to Optimoz:

The other two classic diagonals are all enabled by default–Grow Image is Down and Right, Shrink Image is Up and Left.

Gimp, Wine & Mono for RSSBandit

Wonderfully, the Gimp devs have fixed the b0rked Wacom Tablet support under Windows. Now it can be recommended much more easily and when I’m in Windows on the tablet pc I can use it.

I found a post which suggests a fix for the unstable debian libwine-cil package to get .Net/Windows software running (or closer to running) on Mono. I’ve installed the packages from the mono-for-debian site too.

+4. When trying to run a SWF application I get the
+System.DllNotFoundException:user32.dll exception. What's wrong?
+
+In order for SWF and winelib to operate properly you need to have
+symbolic links for the wine dlls in the <prefix>/lib directory. While
+the rpm should install those automatically as part of the postinstall
+script you can also manually create those with the following command:
+
+cd <prefix>/lib
+for i in <wine_dll_dir>/*dll.so; do ln -s $i lib`basename $i`; done
+
+<prefix> is the base directory where mono is installed under (ie. /usr
+or /usr/local) and <wine_dll_dir> is the directory where the wine dlls
+(user32.dll.so, gdi32.dll.so, etc) can be found (ie. /usr/lib/wine or
+/usr/local/lib/wine)

In my case I’m trying to get RssBandit running as a curiousity and due to the fact I haven’t found a comperable RSS reader for Linux yet–and I’d like to use the session syncing capabilites of RssBandit which are currently unstandard. (It appears that they’re cooking something on the back burner in the way of standards though, which is laudable. IMAP&Webmail combo is wonderous, I’d love to duplicate it in my agreggator.)

You also have to run the wineserver manually. Of course to get that error you’d have already of had to know that. So /usr/lib/wine/wineserver.

I get an error right away:
Unhandled Exception: System.IndexOutOfRangeException: Array index is out of range.
in <0×001e9> System.Resources.ResourceReader:ResourceValue (int)
in <0×00076> ResourceEnumerator:get_Value ()
in <0×000da> System.Resources.ResourceSet:ReadResources ()
in <0×00088> System.Resources.ResourceSet:GetObject (string,bool)
in <0×0001f> System.Resources.ResourceSet:GetString (string,bool)
in <0×00125> System.Resources.ResourceManager:GetString (string,System.Globalization.CultureInfo)
in <0×00014> System.Resources.ResourceManager:GetString (string)
in <0×00047> RssBandit.WinGui.Forms.SplashScreen:InitializeComponent ()
in <0×000f7> RssBandit.WinGui.Forms.SplashScreen:.ctor ()
in <0×0004f> (wrapper remoting-invoke-with-check) RssBandit.WinGui.Forms.SplashScreen:.ctor ()
in <0×0001e> RssBandit.WinGui.Forms.Splash:ShowThread ()
in <0×0005f> (wrapper delegate-invoke) System.MulticastDelegate:invoke_void ()

The K5Diary2RSS screen scraper app I mentioned in an earlier post creates very mangled output. I’m not sure what to think of this with respect to Mono. Shouldn’t it run identially? It seems the compilers generate the same output, or at least generate the same output on either platform which they are run on (.NET CLR or Mono CLR) respectfully.

RSSBandit is Open Source so theoretically I could go in there and bugger around with it. Hmm.

Edit: I take back the not having a linux feedreader app statement. Liferea is nice and very fast compared to RSS Bandit’s weighty .NET baggage. The typically underpowered gtkhtml is a perfect fit for a RSS newsreader and tabs are probably overkill in Bandit as I use Firefox’s tabs & gestures to navigate the sites anyway. I would love to see syncronization added though.

Victory: Topologilinux/Debian Hybrid on the M200

I just finished installing Debian GNU/Linux (as much as one can finish installing Linux) on my Toshiba M200 Tablet (thanks to these linux links for smoothing the stumbling toward the end). More or less everything is functioning as it should. The install was special because I started with Topologilinux’s installer, a slackware based distro which features support for NTFS loopback image install. In other words I didn’t have to repartition or even change from NTFS on the tablet. I’d had enough low-level futzing with all the buggy custom XP Tablet PC edition CD and SP2 installer debacles I’ve run though.

A portion of the Topologilinux installer runs in windows and generates the blank voids (aka swap-like files) for Linux to use safely. One for the base and one for the swap. It also sets up a new version of the Grub bootloader, w32grub, which runs cleanly and kindly underneith the windows default NTDLR. The installer, in the wonderful tradition of windows installer is as simple as few textboxes and next-next-next. So I potentially have a Linux install that I can scoot around or easily backup should I run out of disk space on the small 40gb drive. Or delete/restore with a simple edit of the boot.ini.

Anyway, back to how I installed. I edited the C:/boot/menu.lst grub menu file to have another entry which used the topologilinux kernel with the debian initial root directory (initrd) called root.bin,which you might extract from the debian bootcd’s rescue.bin boot floppy image, with an app like WinImage (I mounted it under linux while I was trying to get all this figured out). Drop that in the C:/boot directory, edit the file, and reboot picking your new entry. I mounted the NTFS drive rw (so I can make a mess inside the swappish file). I set up the loopback with:

mkdir /mnt/ntfs
mount -t ntfs -o rw /dev/hda1 /mnt/ntfs
losetup /dev/loop0 /mnt/ntfs/tlinux4/base.img
losetup /dev/loop1 /mnt/ntfs/tlinux4/swap.img
mkswap /dev/loop1 (CAREFUL!)
(format /dev/loop0 with the fs of choice)
swapon /dev/loop1
mount /dev/loop0 /target/

Then I simply proceeded with the debian base install with their utility. After that I had to dig in the CD image for Topologilinux to get the kernel-modules package (which since it’s slackware is simply tgz) and wade through it to find the e100 ethernet module. Debian is amazing once you have ethernet. You just `apt-get install` to your heart’s content.

I compiled the 2.6 kernel with debian’s kernel package and ran across another large bump. This took me ages to figure out. Not only do you have to explicitly complile initrd, loopback and ram disk support (in block devices) for all this to work but for Kernel 2.6 you need to add ramdisk_size=10000 to your grub configuration otherwise the kernel panics on boot RAMDISK: incomplete write (-28 != 32768) You also can’t have “devfs mounting on boot” in the kernel for the Topologilinux initrd’s linuxrc script to run properly.

I have an Atheros card in my tablet so I grabbed the cvs of the madwifi drivers from sourceforge (see cvs tab) and compiled them into my 2.6 kernel with the kernel-sources I’d downloaded. (after apt-getting cvs and sharutils)

After getting all the software online with my nice XFCE desktop using the instructions provided at those linux links provided earlier (also, for alsa–add your users to the audio group). I tried out xstroke, gok, xkbd. xstroke is okay, but I don’t particularly want to learn scribbles or any pda scribble techniques. I’m kind of partial to the Windows TIP way. Maybe the Mono team can get the Ink stuff to run in Linux some day. Gok is nice but so many features I couldn’t figure out how to get it totally set up in my time available. xkbd is plain and simple, no preference window so I had to look up fonts manually and flag them in, meh.

Wow, 20 hours of mussing round it all boils to a page of solutions. Linux is such a frelling timesink when you run into the odd corner. Hope this helps someone. At least I’m not running gentoo anymore, this same system would’ve likely taken 10x as long with extra maintenance over there and I’m more familiar with that distro (sadly). It sucked up thousands of hours in 2003 when I managed to go a full year with the dubious Linux Only title until I got this tablet on Dec 31 (coincidentally exactly a year from when I installed it to a few hours). That and people started playing addictive FPS games in the dorms and managed to drag me into them, which required having Windows running and dual-booting like crazy.

Now that I have this crazy setup running I wonder if I could rig it to something even crazier…use coLinux to optionally use my linux INSIDE windows or booted on the hardware. The excitement never ends! I’d also be interested in setting up a mini NETBSD install on the SD card similiar in function to the HP/Compaq tablet’s QuickInfo (err?) feature. I could hibernate windows then reboot and pick the SD card on the BIOS screen. It wouldn’t mount the hard drive and only light the screen. Wonder how much battery this would save, if any…