Sunday, July 27, 2008

Howto: Get the touchscreen working in Ubuntu on a Fujitsu Lifebook P1510D Tablet including rotation and hotkeys


I've been on a new quest-- I've been acquiring tablet laptops and working diligently to find the best, easiest, and most productive methods of getting touchscreens working on them in Ubuntu. As anyone who has owned a tablet knows, linux is *not quite* ready for them yet, but with enough tweaks and knowledge of the system, a touchscreen tablet can be quite enjoyable even without an MS operating system.

My first target: The Fujitsu Lifebook P1510D

This is an ultraportable laptop, with a screen measuring 8.9" diagonal, and a maximum resolution of 1024x600. It only weighs 2.2lbs with the extended battery, so it was really enjoyable to tote this laptop around during my quest to learn how to best get the touchscreen working.

I started with a freshly installed version of Ubuntu 8.04.1.

I wanted to use the touchscreen method developed by Sam Engstrom, so first I had to install CPAN. Here's my install and configuration:

sudo perl -e shell -MCPAN

Answer all the prompts, if you get confused just hit for the default setting. At the end of the setup, you should be sitting at a CPAN prompt. Now we need to install a perl app called "X11::GUITest":
cpan> install X11::GUITest
This shouldn't take long. After it is
done, we need to install some drivers:
sudo apt-get install setserial xorg-dev xserver-xorg-input-wacom wacom-tools xbindkeys xbindkeys-config
Now let's set up the serial port:
sudo setserial /dev/ttyS0 port 0x0220 irq 4 autoconfig
chmod a+rwx /dev/ttyS0
We need a place to put our files, and although the
"home" folder works decently, for the sake of this guide I've placed them at a more 'static' location: /opt/touchscreen. To set that up, type:
sudo mkdir /opt/touchscreen
sudo chmod o+wx /opt/touchscreen
I've placed a file made by Miquel van Smoorenburg here. This script will perform the setserial command during every
startup. Place it at /opt/touchscreen/, then perform the following command to place it in your init folders:
sudo update-rc.d /opt/touchscreen/stylus defaults 90
Now let's download Sam Engstrom's
perl script for the stylus management:
wget -P /opt/touchscreen/
To start using your touchscreen now, simply type:
perl /opt/touchscreen/
Test it out. Your touchscreen should
be fully responsive to the tablet now!!!

Now that we have the touchscreen working, we need to set up a 'session' to start it every time we boot up. Easy enough, click System > Preferences > Sessions > Add, and add a session:

Click OK and reboot to give it a test.

To get rotation to work, I modified a script created by Brad Midgley. In my tests, the only three rotations that are supported by the tablet6 driver are normal, left, and right. I've yet to figure out how to get the inverted rotation to work, but if anyone figures it out please let me know.

Grab this script
and place it at /opt/touchscreen.

Give it execute permissions and test it out by typing
chmod u+x /opt/touchscreen
sh /opt/touchscreen
Now we'll use xbindkeys to configure the hotkey on the LCD panel to work with the rotate script:
xbindkeys --defaults > $HOME/.xbindkeysrc

Click New and then create the following keybinding:

Name= Rotate
Key= m:0x0 + c:203
Action= sh /home/eyes/download/

Once you're done with that, click Save & Apply & Exit.

To restart xbindkeys and use your new entry type:
kill -HUP xbindkeys
And there you have it. You should now have a fully working tablet touchscreen, complete with rotation function bound to the correct hotkey!

Like this post? Have a suggestion or correction? Please comment and subscribe!

DiggIt!Add to del.icio.usAdd to Technorati Faves

What next?

You can also bookmark this post using your favorite bookmarking service:

Related Posts by Categories

2 comments: to “ Howto: Get the touchscreen working in Ubuntu on a Fujitsu Lifebook P1510D Tablet including rotation and hotkeys

  • February 16, 2009 at 5:04 PM  


    Thank you for guide how to setup touchscreen on P1510 but can you tell me please is it working on Ubuntu 8.10?


  • February 20, 2010 at 10:08 PM  

    Hey, great guide, but it doesn't work in Ubuntu Netbook Remix, 9.1x. Can you update or write one out for the netbook remix?