If you read my comments on my own post on screen rotation on my thinkpad tablet you’ll read that I was having problems rotating my screen on my X61T tablet (1400×1050 resolution). I didn’t have any luck with that until this week, when I had some time to do some research again.
Thanks to this site, I am now able to do it:
http://www.shrapnull.com/v1/node/22
Basically, the scripts here are much simpler and cleaner.
Below is the code to rotate the screen :
#!/bin/sh
#/etc/acpi/x200tsdown.sh
echo ‘Rotating screen…’
if [ "`/usr/bin/xrandr -o right -v | grep -i 'randr' | wc -l`" -ne "1" ]
then
echo ‘!! Something went wrong…’
export DISPLAY=”:0.0″
export XAUTHORITY=/var/lib/gdm/\:0.Xauth
/bin/xset -display $DISPLAY dpms
echo ‘Trying to rotate again…’
/usr/bin/xrandr -o right
fi
echo ‘Rotating stylus…’
/usr/bin/xsetwacom set stylus rotate cw
echo ‘Starting keyboard…’
/usr/bin/onboard&
Now, this code doesn’t *quite* work 100%. Somehow on the x61t, the wacom digitiser is not listed as “stylus”. Instead, running the command
xsetwacom list
shows me that it is listed as “eraser”. So the script works perfectly when you replace “/usr/bin/xsetwacom set stylus rotate cw” with “/usr/bin/xsetwacom set eraser rotate cw”
What I couldn’t get working was the acpi events. It basically means that I can’t get the tablet to rotate automatically when I flipped it to tablet mode, and revert to normal orientation when I flipped it back to laptop mode.
Instead, I used Gnome’s System-> Preferences -> Keyboard Shortcuts to map the tablet rotation key to launch the rotation script, and the Thinkvantage key to launch the back-to-normal script.
I couldn’t find a way to override the Tablet “Toolbox” key NOT to go into screensaver mode… something for me to do in future I guess.
Oh yes, and the instructions here http://liken.otsoa.net/blog/index.php?entry=entry080617-120522 on Keyboard in GDM and Screen Lock
GDM
In /etc/gdm/Init/Default, before exit 0, add:
/usr/bin/cellwriter –keyboard-only –read-only –window-y=600 –window-x=200 &
In /etc/gdm/PostLogin/Default, add:
killall -u root cellwriter &
In /etc/gdm/PostSession/Default, before exit 0, add:
sudo killall -u $USER cellwriter
SCREEN LOCK
Edit Gnome Registry with gconf-editor. In apps/gnome-screensaver
embedded_keyboard_command cellwriter –keyboard-only –xid
embedded_keyboard_enabled [TRUE]
works very well.
I am happy.