Saturday, February 19, 2011

Resizing a window to a set size in Linux

Hi

Anyone knows a good way to resize any window to for example 640x480?

Reason is, of course, screencasting.

Under windows I've used ZoneSize from donationcoder. (Btw: For Firefox it's easy, just use the web developer toolbar.)

From stackoverflow
  • Use the wmctrl command:

    To list the windows:

    $ wmctrl -l
    0x00c00003 -1 rgamble-desktop Bottom Expanded Edge Panel
    0x00c00031 -1 rgamble-desktop Top Expanded Edge Panel
    0x00e00022 -1 rgamble-desktop Desktop
    0x0260007c  0 rgamble-desktop Google - Mozilla Firefox
    

    To resize a window based on its title:

    wmctrl -r Firefox -e 0,0,0,640,480
    

    The arguments to the resize option are gravity,X,Y,width,height so this will place the window at the top-left corner of the screen and resize it to 640X480.

    Ali A : Thats great stuff!
    Erik Itland : Thanks! Solved my problem!

0 comments:

Post a Comment