rotate the screen

Well I said I could rotate my LCD after upgrade my box, it turns to be really handy.

To get benefit from that, the first thing you’ll need is a monitor that supports rotate. I’m using a Dell 1905FP, and there is a lot of others that could do this.

Then you’ll need a good video card and the driver to support it. My old 82845 based intergrated video card doesn’t pivot. But my new Gigabyte 7300GS card with the nvidia driver support pivot well.

There are 2 ways to rotate the screen for xorg: using the “Rotate” option or the xrandr extension.

By using the “Rotate” option, we could define which way we want the screen to rotate in the xorg.conf file. The benifit is that the screen starts with the way you want, but you can’t change the rotation on the fly.

By using the xrandr extension, we first need to enable it in the xorg.conf file, as for my nvidia driver, it’s

Option     "RandRRotation"              "True"

Then restart your X server, open up a terminal, and run the command xrandr. On my box, the output looks like this:

/etc/X11 $ xrandr
SZ:    Pixels          Physical       Refresh
*0   1280 x 1024   ( 382mm x 313mm )  *75   60
1   1280 x 960    ( 382mm x 313mm )   60
2   1152 x 864    ( 382mm x 313mm )   75
3   1024 x 768    ( 382mm x 313mm )   75   70   60
4    832 x 624    ( 382mm x 313mm )   75
5    800 x 600    ( 382mm x 313mm )   75   72   60   56
6    640 x 512    ( 382mm x 313mm )   75   60
7    640 x 480    ( 382mm x 313mm )   75   73   60
8    576 x 432    ( 382mm x 313mm )   75
9    512 x 384    ( 382mm x 313mm )   75   70   60
10   416 x 312    ( 382mm x 313mm )   75
11   400 x 300    ( 382mm x 313mm )   75   72   60   56
12   320 x 240    ( 382mm x 313mm )   75   73   60
Current rotation - left
Current reflection - none
Rotations possible - normal left inverted right
Reflections possible - none

The thing we care about is the “Rotations possible” line. It show the possibilities of which way we can rotate.

And the rest is simple, just run “xrandr -o left” to rotate the screen 90 degree, and so on.

However my Fvwm won’t recognize the new resolution. Say after I rotate the scrren from 1280×1024 to 1024×1280, if I try to Maximize one window, Fvwm still think the resolution is 1280×1024 and becomes ugly. So it needs a restart. For convience, I have these 2 fvwm functions:

DestroyFunc GoVertical
AddToFunc GoVertical
+ I Exec xrandr -o left
+ I Restart

DestroyFunc GoHorizonal
AddToFunc GoHorizonal
+ I Exec xrandr -o normal
+ I Restart
And bind keys for them. And now, enjoy the much more space for writing code! :)

Tags: , , , , ,

Post a Comment

You could use <code type="name"> to get your code colorized

Your email is never published nor shared. Required fields are marked *

Close
E-mail It