cupuh com
sahabat-keyboard.web.id
Semarak 4 Tahun HN Community
Semarak 4 tahun HN Community
Semarak 4 Tahun HN Community Ubuntu 10.04 thinkpad x201t 旋转按钮的安装 | welcome to shoping news | simple shoping

Ubuntu 10.04 thinkpad x201t 旋转按钮的安装

Bookmark and Share
现安装wabcomrotate,否则只能旋转控制面板,手写笔不能旋转。
地址如下:https://launchpad.net/~thjaeger/+archive/tabletpc

This PPA can be added to your system manually by copying the lines below and adding them to your system's software sources.

Display sources.list entries for:
deb http://ppa.launchpad.net/thjaeger/tabletpc/ubuntu lucid main
deb-src http://ppa.launchpad.net/thjaeger/tabletpc/ubuntu lucid main
Signing key:
1024R/9E691625 (What is this?)
Fingerprint:
8197E7DD43CE7D385D3CB538D24C9B879E691625
=====================================================
完毕后安装 脚本。
地址如下:http://ubuntuforums.org/showthread.php?t=1460380&page=2/

Hi my friend,
here is what I did on my X61 tablet:

First create a file to store the current rotation data

Code:
sudo gedit /usr/bin/rotationmode
fill this file with:

Code:
0
and make it editable, but not executable

Code:
sudo chmod 666 /usr/bin/rotationmode
Now we will write the script to rotate the screen

Code:
sudo gedit /usr/bin/rotatebutton
And fill it with:



Code:
mode=`cat /usr/bin/rotationmode`
if test 0 = $mode
then
echo 1 > /usr/bin/rotationmode
xrandr -o right
fi
if test 1 = $mode
then
echo 2 > /usr/bin/rotationmode
xrandr -o inverted
fi
if test 2 = $mode
then
echo 3 > /usr/bin/rotationmode
xrandr -o left
fi
if test 3 = $mode
then
echo 0 > /usr/bin/rotationmode
xrandr -o normal
fi
Make it executable:
Code:
sudo chmod +x /usr/bin/rotatebutton
Now typing rotatebutton in terminal should go through all of the rotations
To map the command to the button go to System>Preferences>Keyboard Shortcuts, click the Add button at the bottom, name it whatever you want and use the command rotatebutton. Then bind the key by clicking in the shortcut column and pressing the tablet rotate key.

PS: I prefer only to have normal and inverted rotation in my button,
in which occasion you can modify the script to something like:

Code:
mode=`cat /usr/bin/rotationmode`
if test 0 = $mode
then
echo 1 > /usr/bin/rotationmode
xrandr -o inverted
fi
if test 1 = $mode
then
echo 0 > /usr/bin/rotationmode
xrandr -o normal
fi
Hope you'll be fine with that...

=====================================
搞定,就是这么简单.

baca juga artikel terkait dibawah ini

{ 0 komentar... Views All / Send Comment! }