OK now this is where it gets good. This is in order of importance and efficiency, and I tried to highlight the important stuff for you impatient people.
Install Xournal:
sudo apt-get install xournal
Install CellWriter:
sudo apt-get install cellwriter
CellWriter is kind of lame at first, and very personalized to your handwriting so if you’re sharing the computer be sure to set up another user account for whomever you’re sharing with. However, Cellwriter gets better and better as time goes on, and I have gotten quite fast on it. Not quite typing speed, but I don’t get frustrated with it for misunderstanding (often).
As soon as you open Cellwriter, go to Setup and check “Enable extended input events,” or your eraser won’t work. Then proceed with Training Mode, and the pen eraser will work. After Training mode, disable this option if you wish to be able to correct CellWriter when it is unsure (when the character shows up red) or when it chooses the wrong character. You can erase by drawing a slash across more than one cell.
My hint: draw your 1 with a hook at the top, make your | really long, give that lowercase L a slant or a little curl at the end or something, and put a slash through 0 and everything will be a lot easier. Seriously. This is one place where CellWriter could improve: context clues. I am not trying to write Ce||Writer or c0ntext c1ues. But I digress. If you are using your tablet often, put CellWriter in your session in Gnome so it starts automatically. It’s your best friend in tablet mode.
For best results in Xournal:
Under Options be sure that Use XInput, Discard Core Events, Eraser Tip, and Auto-Save Preferences are checked.
If you choose Options->Button 2 Mapping->Highlighter, you’ll get a Highlighter when you press the button on your stylus. Also note that under Tools->Eraser Options you can change your eraser to “Delete Strokes” which allows for Windows Journal-style quick erasing.
In GIMP:
Open a new drawing. In the drawing window choose Edit->Preferences. In the sidebar choose Input Devices and click “Configure Extended Input Devices.” Set “stylus,” “eraser,” and “cursor” to “Screen.” Save. The pen tip is now one tool, the eraser is another (both your choice, and both will default to brush so it might not be brutally obvious at first that this is working), and the side button is right-click.
Great so now tablet mode works. But it’s uncomfortable to hold like this! Let’s flip it to portrait mode. Automatic flipping is fancy and all, but I don’t care if I have to press the little “change to portrait” button on the screen, and you shouldn’t either. This way it also won’t randomly flip when you hit a bump on the bus or something.
The only hitch I found is that the x61 works with Compiz out of the box. And I’m not going to take away my wobbly windows, at least not in laptop mode! However, xrandr doesn’t work with Compiz, and the Compiz developers haven’t released any substitute, so we’re stuck switching to Metacity when we switch to tablet mode. No biggy. Open your terminal.
Install Ruby: sudo apt-get install ruby
Make a new file, in your home folder, and name it tablet.rb
Open tablet.rb and dump the following inside:
#!/usr/bin/ruby $orientation = `xrandr -q | grep "1400 x 1050"` if ($orientation.length != 0 ) puts "Landscape to Portrait" `/home/yourusername/xrotate 3 && metacity --replace` else puts "Portrait" `/home/yourusername/xrotate 0 && compiz --replace` end
OK this script is RIDICULOUSLY HACKISH so don’t use it if you’re not using an x61. As you can see, all the script does is check if we’re in landscape mode (is resolution 1400 x 1050 or 1050 x 1400) and call another script (coming up here in a second) to do the real work, and switch us to/from compiz/metacity. Save the file. If you’re not using 1400 x 1050, change “1400 x 1050″ to your resolution, and also make sure you change ‘yourusername’ to your username. And if you didn’t, and you already tried to run it, smack yourself in the forehead.
Run chmod +x tablet.rb
OK the subsidiary script I snagged off of the interwebs, and thank you to the anonymous author who didn’t put his name in the file, and I don’t remember where I got it anymore, it’s been living in my home folder for too long. This is a heavy-duty bash script and it rotates your screen and the orientation of the wacom tablet behind your screen.
Copy and paste this into a file named xrotate:
#!/bin/sh
output="(normal left inverted right)" #LVDS
# if [ "$XROT_OUTPUT" ]
# then
# output=$XROT_OUTPUT;
# fi
devices="stylus cursor"
geomnbr=0
xrandr=normal
wacom=normal
if [ "$1" == "-" ] || [ "$1" == "+" ] || ! [ "$1" ];
then
operator="$1";
[ "$1" ] || operator='+';
case `xrandr --verbose | grep "$output" | sed "s/^[^ ]* [^ ]* [^ ]* ([^(]*) \([a-z]*\).*/\1/"` in
normal) geom=0;;
left) geom=1;;
inverted) geom=2;;
right) geom=3;;
esac
let geom=${geom}${operator}1+4
let geom=${geom}%4
else
geom="$1"
fi
case $geom in
1) wacom=2; xrandr=left ;;
2) wacom=3; xrandr=inverted ;;
3) wacom=1; xrandr=right ;;
*) wacom=0; xrandr=normal ;;
esac
echo "xrandr to $xrandr, xsetwacom to $wacom" >&2
if xrandr -o "$xrandr"; then
for d in $devices
do
xsetwacom set "stylus" Rotate "$wacom"
done
fi
#workaround for linuxwacom bug
if [ "`xsetwacom get stylus Mode`" == '1' ]; then
for d in $devices
do
xsetwacom set stylus CoreEvent "off"
xsetwacom set stylus Mode "off"
done
{ sleep 1;
for d in $devices
do
xsetwacom set stylus Mode "on"
xsetwacom set stylus CoreEvent "on"
done; } &
fi
Now run chmod +x xrotate.
OK, now running ./tablet.rb & should switch your tablet to/from tablet mode. No arguments, nothing, it figures it out on its own. If you like a different mode for tablet mode, change the 3 in `/home/yourusername/xrotate 3 && metacity --replace` in tablet.rb to 1. Don’t use 2, however, because it’ll break my hackish script. If you just like your tablet upside down, you weird non-portrait person, write your own stupid hackish script.
Now let’s map it to the little button on your screen. There’s probably a cleaner way to do this, but the way I know is with xbindkeys.
sudo apt-get install xbindkeys
Run xev | grep keycode, make sure the window that pops up is selected, and press the button you are going to map. Remember the keycode that appears when you press the button. xev will record everything, so press it a couple times to make sure that’s what you’re seeing, and not the mouse moving in and out of the window or some crap. My keycode is 219. Yours probably is too.
Close the xev window.
Create a file named .xbindkeysrc in your home directory
Put this in it:
I made a mistake here, and I apologize to anyone who it gave trouble to. I just noticed it; the first line below was wrong, but has been changed to the correct value.
"./tablet.rb"
m:0x0 + c:219
NoSymbol
Change your keycode to whatever it was, if it wasn’t 219. Run xbindkeys. Press the button. If it works, there’s just one more step, and if it doesn’t, something else is wrong.
Assuming it works, we just need to add xbindkeys to the current session so that it binds our new custom “keyboard” shortcut at login.
Click on the MintMenu->Preferences->Sessions. Click “Add.” Name: xbindkeys. Command: xbindkeys. Comment: whatever.
OK now the last two things remove the ‘oh I forgot to do x that I have to use my keyboard for’ situations that arise when you can’t use CellWriter for input for some reason. This only occurs 1) When you’ve locked your screen/you’re coming back from standby and it wants your password 2) at the GDM screen, and 3) if you decide you want to do updates without switching back to laptop mode.
For most of this, you just need to enable your fingerprint scanner. There’s no need to paraphrase ThinkWiki’s guide. It works, it’s easy, just make sure you’re looking at the Hardy section.
Finally there’s GDM. Once you have the fingerprint working that takes care of your password, but if you want to also choose a username with your stylus, go choose a GDM theme with a face browser. This one was the one I chose. If you’ve never changed your GDM theme before, it’s MintMenu->Administration->Login Window go to the “Local” tab and choose “Add,” and then point it to the .tar.gz you downloaded from the link above.
Done. Now, I usually just stop here. Your tablet is going to be pretty excellent at this point. You may want to remap the arrow pad on your screen so down is down when in portrait mode, but I never use it so unless I suddenly remember the name of the tool you use to do that, I’m not going to sit here and rack my brain.
Personally, I find NetworkManager to be a big heaping pile of shit, and I replace it with wicd the very first chance that I get. It’s not hard, just add their repo to your sources.list and sudo apt-get install, and then reboot. Knock yourself out. For me, this solved the ‘really flaky wireless on campus’ problem.
Also, remember to change your desktop wallpaper to “Zoom” and not “Stretch” or it’ll look like crap in portrait mode. No big deal, just one more thing.
Have fun.


2 comments
Comments feed for this article
May 7, 2009 at 8:36 am
hello
After rotating you can run compiz –replace to get compiz back.
May 7, 2009 at 3:39 pm
unknownmosquito
That never worked for me, but of course if it works for you, you should be able to change
`/home/yourusername/xrotate 3 && metacity –replace`
to
`/home/yourusername/xrotate 3 && metacity –replace && compiz –replace`
to automate it.