Kinda a noob: Automatic window sizing and placement


 
Thread Tools Search this Thread
Top Forums Shell Programming and Scripting Kinda a noob: Automatic window sizing and placement
# 1  
Old 08-28-2008
Kinda a noob: Automatic window sizing and placement

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

Code:
/opt/csw/bin/firefox -new-window <url here>
/opt/csw/bin/firefox -new-window <url here>

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.
# 2  
Old 08-28-2008
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.
# 3  
Old 08-28-2008
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.
# 4  
Old 08-28-2008
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.
# 5  
Old 08-28-2008
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.
# 6  
Old 08-28-2008
If you are using Metacity I stumbled over a Devils Pie recipe for this while googling a bit.

Devilspie (version 0.13 and greater) s-expressions examples - Page 3 - Ubuntu Forums

https://addons.mozilla.org/en-US/firefox/addon/4073 also looks interesting although I guess you can't use that either.
# 7  
Old 08-28-2008
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.
Login or Register to Ask a Question

Previous Thread | Next Thread

9 More Discussions You Might Find Interesting

1. Shell Programming and Scripting

pls help kinda difficult question for a beginner

1. Create a directory script (project_dir.sh) · Write a script in your home directory to create a subdirectory called “PROJECT<99>” within your home directory on the Ubantu/Linux server. <99> is your project number (e.g. 01,02,03, ... 15). · The script must test whether... (1 Reply)
Discussion started by: bugenhagen_
1 Replies

2. AIX

Sizing p7 systems

Hi, I am currently given the dubious task ;) to make an assumption on sizing our current p5 environment in relation to new p7 machines. Is there any kind of a vague factor how to calculate this? I found some official IBM benchmark results with long lists of different Power machines and their... (9 Replies)
Discussion started by: zaxxon
9 Replies

3. Linux

System sizing for X sessions

Hello all. I've been tasked with building a system that will have up to 50 concurrent users connected and using an X session running firefox. Is there some kind of standard sizing model available that will tell me what kind of network/CPU utilization I will be looking at? Or even better some... (1 Reply)
Discussion started by: ZekesGarage
1 Replies

4. Programming

How to override Window Manager placement of windows.

Hello, everyone! Is it possible to create a window in X11/WM, but override the position Window Manager sets for the window. I'm not sure how to use 'override_redirect' flag, and what to do in order to use it. But the problem with the flag is also that it probably will disable all decorations... (2 Replies)
Discussion started by: AOne
2 Replies

5. Solaris

Configuring xSun for automatic remote login window

Hey folks, I wish every one is just great. I got to do this: I'm trying to configure my Solaris 10 clients to Automatically Show the login windows of the Main Server whenever the Client restarts or a user logs out. By other means, the Client user don't have to Go to Options->Remote-Login->... (5 Replies)
Discussion started by: ua-agent
5 Replies

6. Shell Programming and Scripting

how to modify ramdisk size,kinda urgent !!!

Hi all, I wanted to know how to modify the size of the ramdisk? I mean am manipulating a live cd ,for which the file am manipulating is within a ramdisk now due to size constraints i am unable to play around with some stuff.... currently the size of the ram disk is 64M... I would like to... (1 Reply)
Discussion started by: wrapster
1 Replies

7. UNIX for Dummies Questions & Answers

kinda big problem

Hi again! I finally managed to image the 3 floppies for installing freeBSD but I simply can't boot! I've selected floppy for first boot device and it even starts to readf the boot floppy and the hard drive light is continuously flashing but it doesn't stop even after half an hour and doesn't do a... (4 Replies)
Discussion started by: Mudrack
4 Replies

8. Linux

How do i download java 1.3 on linux(kinda have this old version)

i wish to run java files on inux but while downloading it into linux there is no problem but when i r try to execute a java file it says javac not found. help pleas (5 Replies)
Discussion started by: wojtyla
5 Replies

9. Linux

Kinda OT: USENET Linux Groups

First, Please feel free to move or delete this thread if you do not feel it's appropriate. I used to be a regular user of Linux USENET groups such as alt.linux, alt.os.linux, and others. I haven't used the said groups for a couple of months now, but imagine my HORROR when I thought I'd drop by... (2 Replies)
Discussion started by: zazzybob
2 Replies
Login or Register to Ask a Question