I am attempting to create a script that runs automatically upon logging in and opens and places windows in appropriate places. I have the script running such that it starts during login, but I cannot get things how and where I want them. This should be relatively simple, I just can't figure it out for some reason.
I have a dual monitor setup, creating a total resolution of 2560x1024 (Two 1280x1024 monitors side by side).
I basically need to open up two separate firefox windows side by side, one filling up one monitor and the other filling up the other. I can get the firefox windows running
using
but I cannot get them placed side by side and each filling up one monitor. I used the -height and -width options to no avail. They do not appear to do anything. Nor do I know how to place firefox at a certain point on the the screen even if I could get them sized correctly. The script also opens some other things in the background but all that is working fine.
Sounds like a familiar problem, I think there's an open bug in the Firefox bugzilla (no doubt open since 1994 and with fifty-eleven bajillion comments suggesting how to fix it, but no approved patch) about the -height and -width options are documented but not implemented.
Maybe you could run a simple Javascript to resize those windows.
I would have used javascript, but this is for like a demo display thing and they require javascript turned off on their FF for security reasons. Thanks for the response and the heads up on the bug. I feel a lot less like an idiot now. Any other suggestions about resizing or placing the windows is more then welcome.
At least with Firefox 3 it seems to remember its window positions between runs, at least approximately. I think it used to work appreciably in Firefox 2 as well, you just have to enable it (I think it was in the "start page" preference, select "same windows and tabs as when Firefox quit" or whatever it's called).
If that doesn't work well enough, maybe you can run two instances with different preferences.
Some window managers also offer control over where windows are placed based on window name, window type, etc.
Unfortunately once again that is impossible due to security issues. It loads on its own profile that I am unable to touch that controls all preferences and such things like that. So every time a new instance is run, it is run with a brand new set of preferences that inhibits it from inheriting previous settings.
About the only way I can hope to do this is externally, and maybe thats just not a possibility, I don't know.
The Devils Pie looks promising. I'm not using metacity, but I will parse through the code and see if I can glean a way to mirror what they are doing on my system.