Ask Ubuntu is a question and answer site for Ubuntu users and developers. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

Is it possible set the size of a navigator or web browser window to exact pixel dimensions in Ubuntu?

share|improve this question
up vote 9 down vote accepted

If you're using Compiz (installed by default) there is a Window Rules plugin that can do this. If you need this for web development, then you will be better off with various plugins specific to each browser; otherwise you may find this helpful.

Open CompizConfig Settings Manager (not installed by default, install the compizconfig-settings-manager package) from System > Preferences. Navigate to the Window Rules plugin in the Window Management category (you'll see #1 below). In the "Size rules" tab, add a new rule (#2), grab the criteria by clicking on the window (#3, #4). Enter the size (you can see I previously added an example rule for Opera at 800x600), and this size will be used when matching windows are created. You can prevent resizing in the Matches tab ("Non resizable windows" option) of the same plugin with similar matching rules (i.e. class=whatever).

The related and handy Place Windows plugin can be used to specify initial locations for windows.


share|improve this answer

If you use Mozilla Firefox, you can also use the addon Firesizer. It has a small menu where you can select the size or customize your settings:


share|improve this answer
I didn't know I wanted it. – bohdan_trotsenko Aug 3 '11 at 15:44

You can right click on the lower right corner of your window and drag it. While you do this the dimension is shown and you can choose the exact size in pixels.

share|improve this answer
This depends on compiz running and the "Resize Info" plugin running, no? – Oli Aug 19 '10 at 9:24

No there isn't.

However for FireFox as part of the Web Developer add on there is a window resize menu item for testing pages on different screen resolutions.

That resizes the FireFox window to an exact pixel size.

share|improve this answer

For Nautilus you can also change the settings with gconf-editor. Go to apps -> nautilus -> preferences. On the right side there is an entry navigation_window_saved_geometry. Double-click on it and enter a number which fits you most.

share|improve this answer

Many X applications also have a --geometry option that lets you specify the height/width and x/y position. For instance:

gnome-terminal --geometry=114x40+1920+547

Another tool that can be used is 'wmctrl'. This allows you to alter properties of already running windows, including position and size. For instance:

chideok:~$ wmctrl -l -G | grep Possible

0x02339ca2 0 558 111 1216 1006 chideok Possible to limit the size of a window (such as a browser window) to exact pixel dimensions? - Ubuntu - Stack Exchange - Mozilla Firefox

chideok:~$ wmctrl -i -r 0x02339ca2 -e 0,100,100,100,100

chideok:~$ wmctrl -lG | grep Possible

0x02339ca2 0 110 146 100 100 chideok Possible to limit the size of a window (such as a browser window) to exact pixel dimensions? - Ubuntu - Stack Exchange - Mozilla Firefox

share|improve this answer

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.