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.

I can start the xvfb instance just fine

Xvfb :1 -screen 0 800x600x24

I can then launch firefox and have it load correctly but the window is always smaller than the resolution I set during the xvfb command.

firefox http://www.ebay.com --display=:1

enter image description here

You can see the black bar, that's the full resolution. It appears it's sizing to what the page wants but it will never fill it out completely.

share|improve this question
    
What is your goal? –  izx Jun 26 '12 at 14:53
    
I want to get an accurate screenshot at different resolutions. Since this is not the exact resolution it messes up my tests. –  Ryan Detzel Jun 26 '12 at 15:01

1 Answer 1

Here is a solution, not pretty but works. Uses xdotool to set size after Firefox is running.

First:

xdotool search --onlyvisible firefox

This will display a single window ID, windowid. Then:

xdotool windowmove windowid 0 0
xdotool windowsize windowid 1280 720

You must first do the windowmove and follow it by the windowsize.

In some cases once I did this, the size and position were correct forever more, in other cases had to run again each time I ran Firefox.

share|improve this answer

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.