28.08.2010

Ubuntu on a tablet computer

I installed Ubuntu on my new HP TouchSmart tm2-1090eg laptop. It has a cool tablet function (including a pen). Using the pen works out-of-the-box with Ubuntu 10.04. However, using the thumb-button as a right mouse click, does not. Another flaw is that the pressure curve of the pen (the curve which describes the way the default pressure on the tablet is translated into pressure of brushes in the gimp or whatever) sucks really hard. It's like an on-off-switch, but has nothing to do with pressure. Here is how to fix both things:
  1. Fix the thumb button: Edit the file /usr/lib/X11/xorg.conf.d/10-wacom.conf and in the first InputClass-Section, add the Option:
    Code:
    Option "Button2" "3"
  2. For the pressure curve, edit the same file and add something to the same section. Try out the following options (restarting X every time to see the effect) and choose the one You like the most:
    Code:
    Option "PressCurve" "0,75,25,100" # softest
    Option "PressCurve" "0,50,50,100"
    Option "PressCurve" "0,25,75,100"
    Option "PressCurve" "0,0,100,100 # linear (default)"
    Option "PressCurve" "25,0,100,75"
    Option "PressCurve" "50,0,100,50"
    Option "PressCurve" "75,0,100,25 # firmest"
    For interested users: The numbers describe a bezier curve and You can also change the values of the options via the command-line-tool xsetwacom. By using xsetwacom, the changes take effect immediately, but will be reset upon machine reboot (or driver reload).
Another side note: I managed to get the thumb button working like in Windows (only acts as right click if held down and then pressing the pen on the screen), but I don't know how and I didn't manage to save that behavior. If You know how to do this, tell me!
That's it! You're done!

No ttys after update

I installed ubuntu on a brand new laptop. I got it to work. I downloaded updates. My ttys (Ctrl-Alt-F[1-6]) were gone. Wtf? Now guess why. No, it had nothing to do with the new video card driver I installed. It didn't have anything to do with kernel modules at all.
I found the solution in some forum. I'm glad I tested it, because from what the text said, the problem that guy had fixed was something else than what I had experienced.

  1. Update the configuration for Your initrd. Edit (create if it doesn't exist) the file /etc/initramfs-tools/conf.d/splash and insert (or change if the key already exists): FRAMEBUFFER=y. Quick'n'Dirty:
    Code:
    $ echo "FRAMEBUFFER=y" >> /etc/initramfs-tools/conf.d/splash
  2. Rebuild your initrd with the new configuration:
    Code:
    $ update-initramfs -u
  3. Reboot.
  4. Look at the beautiful ttys in awe.

That's it! You're done!

UPDATE: It seems like You have to run update-initramfs every time You update Your kernel, since the initrd from the package is prebuilt without the FRAMEBUFFER=y option.
UPDATE 2: I sometimes lose my ttys even though I rebuild the initrd. No idea why.

gnome-terminal background transparency

When using gnome-terminal with unmodified settings (which means unmodified terminal profile, unmodified gnome theme and compiz activated), You might notice that the background of the terminal is slightly transparent. This is the case even if though "Solid background" is selected in the profile preferences. Wonder why? gconf is at it again! Want the background to be really solid?
/apps/gnome-terminal/profiles/Default/use_theme_background must be set to false:
Code:
$ gconftool-2 -t bool -s /apps/gnome-terminal/profiles/Default/use_theme_background false
That's it! You're done!