Results 1 to 10 of 20

Thread: [HOW TO] Lenovo X201 tablet. Enable your Tablet buttons!

Threaded View

  1. #1
    Join Date
    Oct 2007
    Location
    Germany
    Beans
    96
    Distro
    Ubuntu 10.10 Maverick Meerkat

    [HOW TO] Lenovo X201 tablet. Enable your Tablet buttons and some little surprises

    For the sake of completenes i reedited this post:

    I present you the scripts i use to make my X201 a nicer place to live. I got these on the net and modified them to work on the 201 or by the awesome help from fellow users in this forum. Enjoy!






    setX201tKeys.sh

    i present you a script to enable your tablet buttons( Based on this).
    Run this script to enable your Tablet buttons on the Lenovo X201 Tablet.
    even better set it to autostart with the system (System->Preferences->Startup Applications)

    On my system (Maverick 64) somehow the usage of setkeycodes sets the keycode by 8 values above the intended keycode:
    For example: you write "sudo setkeycodes 0x67 148" then the keycode will be actually set to "156"... dunno why. So if in your system its different (test with the xev command) you can change it accordingly below

    i mapped the toolbarbutton to XF86LaunchB, because i set it to toggle the unhide option for the ubuntu panel using a script see below.

    you can actually map to the existing button XF86RotateWindows, which rotates the screen out of the box, but the pen and finger input will not be "rotated"... Instead i use a custom script i found on the net. Thus you have the "unlabeled" (XF86Launch1) and the padlock (XF86Launch2) to set to something you like (on System->Preferences->Keyboard Shortcuts).
    for writing recognition im using cellwriter (awesome handwriting recognition program for any language ever)




    hideUnhidePanel.sh

    To maximize my viewing area i hide the task bar/task panel. In order to show it you'd normally hover the mouse to the lower part of the screen (or the side where its hidden). in tablet mode i just press the toolbox button instead:

    I mapped the Toolboxbutton to hide and unhide the panel... since the panel is hidden anyway i made it also bigger so its touch-friendly (right click on it and set the size to 45 pixels).

    so when im in tablet mode and need to switch programs or access the program menu i unhide the panel, click on a program on the task bar and hit the button to rehide it.. nifty!

    (on System->Preferences->Keyboard Shortcuts)






    rotateX201.sh

    This rotates the display. Its needed since the built in rotation does not rotate the touch and pen drivers.. a mess i tell you. This script will rotate the display clockwise everytime you hit it...
    I made it back then when computers were steam powered and internet was based on pidgeon-over-IP... there was no option. Nowadays you can and probably should use the uber excellent program: Magick Rotation from Favux. it can rotate your display automatically when you switch to tablet mode!! it also lets you deactivate touch and much more.. to rotate use the provided file "xrotate.py" in the install dir.

    https://launchpad.net/magick-rotation

    It explicitly supports the Lenovo X201!!!







    mountTruecryptFavorites.sh

    This script i use to mount my private data on startup. just put it to your autostarts (Preferences->Startup Applications). The problem is that it will always ask you for your admin pass and THEN for your volume pass.. the solution is ( based on this):
    basically you have to add an exception that allows to run truecrypt without password. So add this line to /etc/sudoers using the command "sudo visudo":
    Code:
    username ALL=(root) NOPASSWD:/usr/bin/truecrypt
    replacing "username" with... well your username, then you can place the truecrypt mount command in your autostart options











    Setting up the trackpoint

    To set up the trackpoint speed and sensitivity. you need to run these lines in super user mode (run this command in a terminal: "sudo su"), a simple sudo wont work.
    echo -n 1 > /sys/devices/platform/i8042/serio1/serio2/press_to_select
    echo -n 125 > /sys/devices/platform/i8042/serio1/serio2/speed
    echo -n 254 > /sys/devices/platform/i8042/serio1/serio2/sensitivity
    yet putting this at system start doesnt seem to work always..

    its kind of broken. search the forum for "i8042 serio1 press_to_select": it seems to be a bug where the files that the driver use(the serio1, serio2 bit) are created with different names at every boot... so the script wouldnt quite work.. i got frustrated and actually didnt bother looking further into it. i put the needed lines in the script for anybody wanting to look for a solution. If i find any ill update the post once more.




    have fun!
    Attached Files Attached Files
    Last edited by linuxd00; February 10th, 2011 at 03:15 PM.

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •