The most annoying Firefox thing

If you can get this to work on your system, you’re a better person than I.

firefox -width 800 -height 600

I can’t remember the last time the command line height and width flags worked in Firefox. I don’t know why those flags are there, or if they’re broken, or if they’re deprecated, or if they’re a huge joke the Firefox brainiacs like to play on us normal people. Maybe I’m just using them wrong, or maybe it’s annoying regardless.

But I got tired of resizing the windows every time I moved a profile or changed a screen dimension. So I found two ways to convince Firefox that “me-Tarzan-you-Jane,” and start at the size I want.

The first is to manually edit the localstore.rdf file in your profile, and set the desired size. Of course, that file can be overwritten in the course of using Firefox, so unless you employ a script to open the browser and then restore your preferred sizes after Firefox closes, it might not work on a permanent basis.

Instead, what I’ve been doing is to change the prompt from Openbox or wbar to this:

firefox javascript:%20resizeTo\(800,600\)

Note the two backslashes in that line, to escape the parentheses. No matter what your last dimensions were, the screen should bounce back to 800×600. You could conceivably set your home page to that too, if you don’t mind opening Firefox to a blank page, or if you want a one-button size fixer.

Personally I prefer to keep that at the command line, because I can trigger different sizes depending on the situation. In any case, it always feels good to remind Firefox that I’m the boss, no matter how popular and big-headed it has become.

About these ads

9 Responses to “The most annoying Firefox thing”

  1. 1 eksith 2009/01/27 at 2:58 PM

    Those are the correct, and presumably current, arguments according to the command line KB, but it doesn’t seem to work in Windows either.

    There is an extension available to set specific window sizes. I don’t know that might be worth it though, since it’s more bloat.

    You could write up a little script to copy a profile file from a different location, overwrite the existing one and command FF to use that using the -profile argument.

    • 2 K.Mandla 2009/01/27 at 5:39 PM

      Yes, I spotted the extension before I found the javascript trick. But since I generally eschew extensions and because I usually open Firefox to a blank page and because I use a bash script to trigger the program anyway … this is convenient. To each his own, of course. Funny how something like that doesn’t work, and yet is listed as a command-line option. :)

  2. 3 lordalan 2009/01/27 at 6:57 PM

    The most excellent Web Developer plugin allows you to change Firefox’s resolution on-the-fly to whatever you want.



    • 4 K.Mandla 2009/01/28 at 5:44 AM

      I remember using that plugin a few years ago, when I did a little web page design work. You’re right, it is convenient. It’s useful for previewing pages and the effect a window size has on the design.

      It would be a little too much to install, for me that is, when all I want is the same size window each time.

  3. 5 Ted 2009/01/28 at 12:26 AM

    Thanks for the tip. This used to really annoy me.
    I also found this works even better. Type


    in the location box. These can be saved as bookmarks with different sizes & window positions to suit your needs/mood.

    This can also be embedded into a web page (like a browser start page) to automatically do this on Firefox startup.

    // Get the firefox window to behave nicely

  4. 6 Binny V A 2009/01/28 at 3:21 AM

    If you want to do it in Konqueror, this will work…
    konqueror –geometry=800×600+0+0

  5. 7 George Mandis 2009/05/01 at 5:09 PM

    Oh my god, I thought I was going crazy. I’m so glad someone else has found this problem. The JavaScript work-around is clever.

  6. 8 M Belsky 2009/06/19 at 4:28 PM

    I am trying to specify Firefox’s height and width for a batch file I’m making for myself to start a few apps at the same time.

    This is what I’ve gotten so far.

    @rem Open Some Firefox Windows With Settings & Sizes Remembered
    Start “” firefox.exe -no-remote -new-window -p “FirefoxProfileNameYouCreate1″ -width 585 -height 520
    Start “” firefox.exe -no-remote -new-window -p “FirefoxProfileNameYouCreate2″ -width 585 -height 520

    @rem Start 1st Program (Minimized option used. /min)
    cd “C:\Program Files\1st Program”
    Start /min “” 1stProgram.exe

    @rem Start Last Program
    cd “C:\Program Files\Last Program”
    Start “” LastProgram.exe

    Initially, I believe I was able to get the window sizes to stick using this command:
    Start “” firefox.exe -cache -p “FirefoxProfileNameYouCreate1″ -width 585 -height 520

    the problem was that if i had a firefox window open before running the command, the profile (-p) would be ignored and firefox would use the current profiles settings. So I found the -no-remote switch to force firefox to use the specified profile but that caused the height and width to be ignored. For my uses this is okay because it is just for my convenience and each time I run my batch file, the windows open is the previous toolbar setup and window size and position.

    Basically, I was able to get multiple window sizes and positions remembered ance set up, but am still not able to specify that info in the command line format.

    If anyone who is better than me at batch files can play around with the switches ive mentioned in a way that will allow the windows sizes to be specified from the command line that works when an existing instance of firefox is already open, I would be very grateful.


    M Belsky

  1. 1 Cleaning up is hard to do « Motho ke motho ka botho Trackback on 2009/07/24 at 9:27 AM

Leave a Reply

Fill in your details below or click an icon to log in: Logo

You are commenting using your account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s


Visit the Wiki!

Some recent desktops

May 6, 2011
Musca 0.9.24 on Crux Linux
150Mhz Pentium 96Mb 8Gb CF

May 14, 2011
IceWM 1.2.37 and Arch Linux
L2300 core duo 3Gb 320Gb

Some recent games

Apr. 21, 2011
Oolite on Xubuntu 11.04
L2300 core duo 3Gb 320Gb

Enter your email address to subscribe to this blog and receive notifications of new posts.

Join 405 other followers


This work is licensed under the GNU Free Documentation License. Please see the About page for details.

Blog Stats

  • 3,963,425 hits



Get every new post delivered to your Inbox.

Join 405 other followers

%d bloggers like this: