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

by on August 27, 2005 · 10 comments· LAST UPDATED February 23, 2014

in , ,

Generally, I need to switch my Gnome screen size to 800x600 to watch TV via TV-Tunner card as my card supports max 800x600 resolution. For rest of my work I prefer to use 1024x768 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 1024x763

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 1024x763 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 800x600 screen size. And you are done just click on ICONS to setup desired screen size. This will save lots of time :D Here is my desktop image along with these and others shortcuts:

xrandr - primitive command line interface to RandR extension

TwitterFacebookGoogle+PDF versionFound an error/typo on this page? Help us!

{ 10 comments… read them below or add one }

1 Anonymous August 28, 2005 at 3:21 pm

Never knew xrandr command ever exists

Reply

2 Anonymous September 14, 2005 at 2:38 am

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

Reply

3 cyberciti September 14, 2005 at 12:11 pm

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.

Reply

4 eddie October 26, 2007 at 8:07 am

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.

Reply

5 Jon December 24, 2008 at 9:52 am

Very CoooooooL
Thank You :) !!

Reply

6 B J Russ March 4, 2009 at 7:51 pm

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 ?

Reply

7 Guillaume November 12, 2010 at 6:40 pm

“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

Reply

8 Kat February 16, 2010 at 2:48 am

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.

Reply

9 rajesh February 20, 2010 at 1:20 pm

but can it change resolution of external hardware attached to it such as Set Top box ………..

Reply

10 srinu November 23, 2010 at 6:13 am

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.
………………………………………………
[wtcs@localhost ~]$ 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

Reply

Leave a Comment

Tagged as: , , , , , , , , , , , , , , , , , , , , , , , ,

Previous post:

Next post: