Page 1 of 1

how to start programs maximised

Posted: Fri 18 Feb 2011, 18:59
by Marek M.
I'd like to do that via startup options, script, or init file, as my mom (70) might get confused when windows start minimised, too small or partially off-screen. I'm not around to help her hitting the button for maximising or telling her how to use the right-click menue, so starting maximised would be ideal, she is not likely to use more than one program simultaneously anyway. Programs she uses: Thunderbird, Firefox, and Abiword.

Posted: Sat 19 Feb 2011, 04:36
by GustavoYz
Hi...
Did you try to use a 'geometry' parameter?
I don't use Firefox or Thunderbird so I can't test it, but Abiword understand this command, 'X' and 'Y' its the screen size:

Code: Select all

abiword --geometry=XxY
.
Change X and Y for your resolution numbers (like 800x600, 1024x768 and so on).
Change thoses numbers until you found the launched Abiword window good enought.
Regards.

Posted: Sat 19 Feb 2011, 06:05
by disciple
How about using a tiling window manager? ;)

You can specify for particular programs to be started maximised using the group settings in your JWM configuration.
http://joewing.net/programs/jwm/config.shtml
But the biggest problem with JWM is that you'll probably want to hack it to disable window shading.

Posted: Mon 21 Feb 2011, 15:19
by Marek M.
> abiword --geometry=XxY
That works well for abiword, thank you (though not for FF and TB).


> group settings in your JWM configuration
I forgot to mention that it's about desktop icons (I cleared the desktop except for three icons, to keep it as simple as possible). Do changes in the JWM config influence the behaviour of windows launched by desktop icons, too?

Posted: Tue 22 Feb 2011, 05:54
by disciple
Yes.

problems using groups

Posted: Tue 22 Feb 2011, 22:29
by Marek M.
I used

Code: Select all

exec firefox -height 768 -width 1024 "$@" 
in the desktop icon's file. This won't work for Thunderbird, though.

I added

Code: Select all

 	<Group>
		<Class>*</Class>
		<Name>Thunderbird Email Client</Name>
		<Option>maximized</Option>
	</Group>
to
/etc/xdg/templates/_root_.jwmrc, running fixmenus and "jwm -restart" afterward--didn't have any effect (I also tried "Thunderbird" and "thunderbird" as name).
In usr/share/applications/thunderbird.desktop both "Name" and "GenericName" is "Thunderbird Email Client". Besides, I don't know what to use as class. Any idea?

Posted: Tue 22 Feb 2011, 22:47
by technosaurus
try running xwininfo in rxvt and clicking on the window of whatever app you are wanting info on (class, name ...) I forget what info it gives, but I cna't think of anything better at the moment other than easter egging the name/class

xwininfo/group

Posted: Wed 23 Feb 2011, 15:49
by Marek M.
> xwininfo

I didn't know that one, quite handy, thx, it says:

Code: Select all

Window id: 0x1e00081 "Inbox - Mozilla Thunderbird"
...
Class: InputOutput
...
No entry for "Name", so I tested:

Code: Select all

<Group>
<Class>InputOutput</Class>
<Option>maximized</Option>
</Group>
and

Code: Select all

<Group>
<Class>*</Class>
<Option>maximized</Option>
</Group>
Unfortunately no effect on any window, though after calling fixmenus this group does appear in .jwmrc.

Posted: Wed 23 Feb 2011, 16:58
by technosaurus
while you are working on this you may want to add the groups to /root/.jwmrc-tray instead, so all you have to do is jwm -restart (no fixmenus required)

for the name try looking in the .desktop file or running top to see the actual command that is running (mozilla apps usually have 2-3 scripts that wrap the actual binary) ... for instance seamonkey-bin is the name for seamonkey - check in the thunderbird directory for the matching actual binary file