The UNIX and Linux Forums  
Hello and Welcome from United States to the UNIX and Linux Forums! Thank You for Visiting and Joining Our Global Community.

Go Back   The UNIX and Linux Forums > Top Forums > Shell Programming and Scripting
.
google unix.com



Shell Programming and Scripting Post questions about KSH, CSH, SH, BASH, PERL, PHP, SED, AWK and OTHER shell scripts and shell scripting languages here.

More UNIX and Linux Forum Topics You Might Find Helpful
Thread Thread Starter Forum Replies Last Post
Sizing Mouse Pointer farl AIX 2 11-21-2007 10:44 PM
Properly Sizing an x86 Server for Internet DNS? deckard Gentoo 3 04-12-2007 07:23 AM
Aixterm icon placement? cunningdavid AIX 1 12-18-2006 11:54 PM
kinda big problem Mudrack UNIX for Dummies Questions & Answers 4 04-10-2005 07:19 AM
code placement scott78 Shell Programming and Scripting 16 01-21-2004 12:01 PM

Closed Thread
English Japanese Spanish French German Portuguese Italian Dutch Swedish Russian Norwegian Hungarian Hebrew Danish Powered by Powered by Google
 
LinkBack Thread Tools Search this Thread Rate Thread Display Modes
  #1 (permalink)  
Old 08-28-2008
wydileie wydileie is offline
Registered User
  
 

Join Date: Aug 2008
Posts: 4
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 (permalink)  
Old 08-28-2008
era era is offline Forum Advisor  
Herder of Useless Cats (On Sabbatical)
  
 

Join Date: Mar 2008
Location: /there/is/only/bin/sh
Posts: 3,652
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 (permalink)  
Old 08-28-2008
wydileie wydileie is offline
Registered User
  
 

Join Date: Aug 2008
Posts: 4
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 (permalink)  
Old 08-28-2008
era era is offline Forum Advisor  
Herder of Useless Cats (On Sabbatical)
  
 

Join Date: Mar 2008
Location: /there/is/only/bin/sh
Posts: 3,652
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 (permalink)  
Old 08-28-2008
wydileie wydileie is offline
Registered User
  
 

Join Date: Aug 2008
Posts: 4
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 (permalink)  
Old 08-28-2008
era era is offline Forum Advisor  
Herder of Useless Cats (On Sabbatical)
  
 

Join Date: Mar 2008
Location: /there/is/only/bin/sh
Posts: 3,652
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 (permalink)  
Old 08-28-2008
wydileie wydileie is offline
Registered User
  
 

Join Date: Aug 2008
Posts: 4
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.
Closed Thread

Bookmarks

Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes Rate This Thread
Rate This Thread:

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On




All times are GMT -4. The time now is 04:53 AM.


Powered by: vBulletin, Copyright ©2000 - 2006, Jelsoft Enterprises Limited. Language Translations Powered by .
vBCredits v1.4 Copyright ©2007 - 2008, PixelFX Studios
The UNIX and Linux Forums Content Copyright ©1993-2009. All Rights Reserved.Ad Management by RedTyger

Content Relevant URLs by vBSEO 3.2.0