xrandr: Linux Resize / Set The Screen Size Quickly Via Command Line Options

Posted on in Categories Debian Linux, Howto, Linux, Linux desktop, RedHat/Fedora Linux, Tips, Troubleshooting, Tuning, Ubuntu Linux, UNIX, X server last updated August 27, 2005

Generally, I need to switch my Gnome screen size to 800×600 to watch TV via TV-Tunner card as my card supports max 800×600 resolution. For rest of my work I prefer to use 1024×768 pixels. You can create a shortcuts on the desktop to resize screen quickly:

Right click on desktop > Select Create Launcher

Setup Launcher properties as follows

Setup Name to 1024×763

Setup Generic name to Resize

Setup Command to xrandr -s 0

Click on the “Close” button to save the changes.

The xrandr command is used to set the screen size, orientation and/or reflection. It can also set the screen size. The xrandr -s 0 command will setup screen size to 1024×763 pixels. You can get list of supported screen size along with number using xrandr command:
$ xrandr -q
Sample outputs:

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

The SZ number can be passed to xrandr -s <SZ> to setup desire screen size in pixels. Create one more Launcher for 800×600 screen size. And you are done just click on ICONS to setup desired screen size. This will save lots of time 😀 Here is my desktop image along with these and others shortcuts:

xrandr - primitive command line interface to RandR extension

Posted by: Vivek Gite

The author is the creator of nixCraft and a seasoned sysadmin and a trainer for the Linux operating system/Unix shell scripting. He has worked with global clients and in various industries, including IT, education, defense and space research, and the nonprofit sector. Follow him on Twitter, Facebook, Google+.

11 comment

  1. 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.

  2. I haven’t yet seen a comment like my difficulty. I have used xrandr with my Ubuntu machine. It rotates the display 90 deg. (to fit my rotatable flat screen) but it doesn’t fill the portrait mode position so I’m still left with a landscape ‘view’ and a blank portion at the bottom of the screen. Any ideas ?

    1. “I haven’t yet seen a comment like my difficulty. I have used xrandr with my Ubuntu machine. It rotates the display 90 deg. (to fit my rotatable flat screen) but it doesn’t fill the portrait mode position so I’m still left with a landscape ‘view’ and a blank portion at the bottom of the screen. Any ideas ?”

      same thing here ; have you found solutions?
      thanks

  3. This is wonderful. I’m now using this command (and launchers) to rotate the screen on my Asus EeePC to read ebooks, doc files and PDFs with greater ease, not to mention long web pages. The netbook’s shallow 600 px screen was making me wear out the page down button! OpenOffice files were a bit too wide, but I set the View>zoom to “optimal” and that took care of it. The built-in trackpad seems to be confused by the switch, but a USB/wireless mouse handles cursor movement perfectly. Thanks for the tips.

  4. hi
    now my scree resolution is 800*600.
    i want improve my screen resolution . i tried from display settings ,there is max.resolution is 800*600.
    ………………………………………………
    [[email protected] ~]$ xrandr -q
    Screen 0: minimum 320 x 200, current 800 x 600, maximum 4096 x 4096
    VGA1 connected 800×600+0+0 (normal left inverted right x axis y axis) 0mm x 0mm
    800×600 60.3*
    640×480 59.9
    ………………………………………………..

    how can i improve my screen resolution.
    helpme
    thanks,
    srinu

Leave a Comment