2

Is it possible to open a browser window at a given size/location on screen via a shell script ?

I've seen examples of launching Firefox, setting the window size via command line. I've also seen it written up as non working as a Firefox bug. Are there any alternative browsers that will do this that run on 10.04?

2

Yes, this is possible with devilspie (As I am using this myself now). Except, this program runs as daemon and do not require shell script.

It handles application windows' border decoration, behaviour (sticky, always on top), window geometry, position and states (maximize, fullscreen) based on matched traits. It can control not only Firefox, but almost any graphical applications at launch.

To use this, you will have to create the configuration files for each application you want to control. You can find practical examples in this fullest documentation.

If you need GUI to write the configuration files, there's gDevilspie. Newer releases of Ubuntu includes this in Software Center, but you can download directly from its project page.

On second thought, perhaps you are actually looking into "tiling window manager"--which is another different approach.

1

On Ubuntu, I believe Firefox makes use of GTK+, which has options for setting the window metrics. Whether you can do this from another program (e.g. after Firefox loads) is another question, as it has security implications.

This is not really a (simple) answer, but a research direction: you'd have to read the GTK+ documentation, and maybe write up a program using their API in C, Python, or whatever.

Your Answer

By clicking "Post Your Answer", you acknowledge that you have read our updated terms of service, privacy policy and cookie policy, and that your continued use of the website is subject to these policies.

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