I am trying to configure my openbox's menu.xml, and I would like to define a menu entry which launch a maximize application, for example firefox.
<menu id="root-menu" label="OpenBox 3">
<item label="firefox">
<action name="Execute">
<execute>firefox</execute>
</action>
<action name="Maximize" />
</item>
</menu>
But it doesn't work. After some test, I think that only the first action is execute.
Someone have a solution ?
Here is a way to open all applications maximized when using the Openbox window manager. (I do not know which distro OP is using and so two slightly different routes are suggested.)
For distros other than Lubuntu:
Make a backup of
/etc/xdg/openbox/rc.xml
for safetyOpen
/etc/xdg/openbox/rc.xml
with a text editorGo to the bottom of the file. You should see:
</applications>
</openbox_config>
Just above the line with
</applications>
, paste the following:<application class="*">
<maximized>yes</maximized>
</application>
Save
rc.xml
Open a terminal and run
openbox --reconfigure
. This will make Openbox aware of the changes. If not effective, log out and back in. From now on, all applications will open maximized.(Source)
For Lubuntu 12.10 users, edit
~/.config/openbox/lubuntu-rc.xml
instead of /etc/xdg/openbox/rc.xml. (I verified this because I'm using Lubuntu 12.10.)If you decide you don't want all applications to open maximized, but just some specific ones, you will need the following code instead of the one above for each application that you want maximized:
<application class="......">
(See below)<maximized>yes</maximized>
</application>
application class
is viaxprop
.xprop _OB_APP_CLASS
in the terminal window and press Enter.xprop _OB_APP_CLASS
and click on a window belonging to Google Chrome, I see:_OB_APP_CLASS(UTF8_STRING) = "Google-chrome"
and "Google-chrome", including the quotes, is exactly what should be typed as the application class.One side-effect of
<maximized>yes</maximized>
is that not just the primary window but other windows open maximized. For example, in Firefox, pressing Alt > Edit > Preferences or Alt > Help > About will result in maximized panes. The same happens in Chrome's Task Manager (Shift+Esc).If such behavior is undesirable,
xprop
will need to be run for both primary and secondary windows to see if they can be distinguished.For the Chrome, Firefox, Opera and Seamonkey browsers, the following code maximizes only the browser window proper and not "internal" windows:
<application role="browser">
<maximized>yes</maximized>
</application>