2

I'm using Openbox (ubuntu 14.04 LTS, with compton). I've configured all apps to start at specific desktops, with terminals at desktop 1, Spacefm at desktop 2, and then finally, Google Chrome at desktop 4.

All of the programs start at the correct desktop, other than Google Chrome. Can't seem to get it to start at desktop 4. When starting Chrome, it will start at the current desktop, not at desktop 4. Excerpt from my rc.xml file:

    <application name="/usr/bin/google-chrome">
  <desktop>4</desktop>
  <layer>normal</layer>
  <decor>no</decor>
  <maximized>no</maximized>
</application>

I know that Chrome is originally installed to /opt/google/chrome/chrome, I've tried using that path, aswell as the /opt/google/chrome/google-chrome wrapper script. Finally I symlinked /usr/bin/google-chrome to /opt/google/chrome/chrome, without any success. I have also tried having multiple entries in the rc.xml, in total 3 entries, the with the before mentioned binary locations.

How do I get Chrome to start at desktop 4?

1 Answer 1

1

The problem lies with your window matching rules. You have to set the application name to the window name as reported by xprop. This is the relevant xprop output for a Chrome window:

_OB_APP_TYPE(UTF8_STRING) = "normal"
_OB_APP_TITLE(UTF8_STRING) = "Untitled - Google Chrome"
_OB_APP_GROUP_CLASS(UTF8_STRING) = 
_OB_APP_GROUP_NAME(UTF8_STRING) = 
_OB_APP_CLASS(UTF8_STRING) = "Google-chrome"
_OB_APP_NAME(UTF8_STRING) = "Google-chrome"
_OB_APP_ROLE(UTF8_STRING) = "browser"

So to match all Google chrome windows you would have to write a rule like this:

<application name="Google-chrome" class="Google-chrome" type="normal">
  <desktop>4</desktop>
  <layer>normal</layer>
  <decor>no</decor>
  <maximized>no</maximized>
</application>

The class and type attributes are optional, but it's always good to be more specific so that other windows don't get falsely matched.

Make sure to insert your new rule in the <applications>..</applications> section and refresh openbox (openbox --reconfigure) to apply the changes.

2
  • Thank you! I tried <application role="browser">, and it works.
    – user224674
    Aug 30, 2014 at 6:31
  • 1
    @user224674 Glad I could help! Please don't forget to mark your question as answered. It helps keep things organized and makes it easier for future users to find the right solution. Aug 30, 2014 at 7:13

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .