You can use xprop
to find a suitable way to refer to windows.
Open a terminal and the window of interest so that both are visible.
In the terminal, run
xprop | grep "^_OB_APP"
Your mouse cursor changes appearance into crosshairs
. Move the cursor over to the window of interest and click within that window. The cursor reverts to its regular appearance and output appears in the terminal window. For example, suppose you clicked on a Firefox browser window, you'd see:
_OB_APP_TYPE(UTF8_STRING) = "normal"
_OB_APP_TITLE(UTF8_STRING) = "Mozilla Firefox"
_OB_APP_GROUP_CLASS(UTF8_STRING) = "Firefox"
_OB_APP_GROUP_NAME(UTF8_STRING) = "firefox"
_OB_APP_CLASS(UTF8_STRING) = "Firefox"
_OB_APP_NAME(UTF8_STRING) = "Navigator"
_OB_APP_ROLE(UTF8_STRING) = "browser"
You then use the appropriate string in your application rule.
(Note that you can use xprop
to also identify dialog windows to ensure that rules do or don't apply to them.)
I use:
<application role="browser">
<maximized>true</maximized>
<decor>no</decor>
</application>
to have all browsers open maximized and without decoration.
The other precaution to take is that the code is located appropriately. In other words, these lines should be in the "applications" section of rc.xml
and should be within <applications>
and </applications>
and above the final line which should contain just </openbox_config>
.
The other important thing is to run openbox --reconfigure
to get the changes to be effected immediately. Running openbox --reconfigure
also does a scan for xml
errors and so is worth running after any edits to rc.xml
.
ps -A | less
while it's running and have a look through the list for the correct executable name.Iceweasel*
) great, otherwise you need some other characteristic. I notice there is aWM_WINDOW_ROLE(STRING) = "browser"
in thexprop
output.