nixCraft Poll

Topics

xrandr: Linux resize screen size quickly

Posted by Vivek Gite [Last updated: March 1, 2007]

Usually I need to switch my Gnome screen size to 800x600 if I would like to watch TV via TV-Tunner card (because card supports max 800x600). For rest of my work I prefer to use 1024x768 pixels. instead of keep switching between these two screen size via GUI (Application > Desktop Preference > Screen Resolution i.e. gnome-display-properties) I have created two shortcuts on my desktop :)

A) Right click on desktop > Select Create Launcher
B) Setup Launcher properties as follows (click on figure A to see dialog box):
Setup Name to 1024x763
Setup Generic name to Resize
Setup Command to xrandr -s 0
Click on Close to save changes.


Fig. A

C) Xrandr is uses to set the screen size, orientation and/or reflection. It is cool command line based tool. The xrandr -s 0 command will setup screen size to 1024x763 pixels. You can get list of supported screen size along with number using xrandr command:
$ xrandr -q

SZ:    Pixels          Physical       Refresh
*0   1024 x 768    ( 283mm x 212mm )  *61
 1    800 x 600    ( 283mm x 212mm )   73
 2    640 x 480    ( 283mm x 212mm )   73
Current rotation - normal
Current reflection - none
Rotations possible - normal
Reflections possible – none

D) SZ number can be passed to xrandr -s <SZ> to setup desire screen size in pixels.

Setup one more Launcher for 800x600 screen size. And you are done just click on these ICONS to setup desired screen size. This will save lots of time :D Here is my desktop image along with these and others ICONS.

Want to stay up to date with the latest Linux tips, news and announcements? Subscribe to our free e-mail newsletter or RSS feed to get all updates. You can Email this page to a friend.

You may also be interested in other helpful articles:

Discussion on This Article:

  1. Anonymous Says:

    Never knew xrandr command ever exists

  2. Anonymous Says:

    On Fedora(and Redhat) you can also use [ctl]+[alt] + number pad +/- to cycle though the screen res.

  3. cyberciti Says:

    That’s not correct.

    xrandr changes the physical/real resolution.

    Xrandr can switch the video mode along with the dimensions of the root window. ctrl+alt +/- uses the VidMode extension to switch the video mode, but it can’t change the dimension of the root window.

  4. eddie Says:

    Is it possible to use this feature with an indvidual window within your whole resolution?

    For example:

    I have 1280×1024 screen resolution and I want to resize Firefox to 1024×768 within my resolution.

Leave a Reply

We encourage your comments, and suggestions. But please stay on topic, be polite, and avoid spam. Thank you very much for stopping by our site!

XHTML: You can use these tags: <a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <strike> <strong>

*
To prove you're a person (not a spam script), type the security word shown in the picture. Click on the picture to hear an audio file of the word.
Click to hear an audio file of the anti-spam word

Copyright © 2004-2008 nixCraft. All rights reserved - TOS/Disclaimer - Privacy policy - Sitemap - Powered by Open source software.