Take the 2-minute tour ×
Ask Ubuntu is a question and answer site for Ubuntu users and developers. It's 100% free, no registration required.

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

share|improve this question
add comment

6 Answers 6

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.

screenshot

share|improve this answer
add comment

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:

firesizer

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

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
3  
This depends on compiz running and the "Resize Info" plugin running, no? –  Oli Aug 19 '10 at 9:24
add comment

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
add comment

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
add comment

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
add comment

Your Answer

 
discard

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.