You are not logged in.

#1 2008-11-25 03:17:19

ralvez
Member
From: Canada
Registered: 2005-12-06
Posts: 1,694
Website

Openbox :: linking an application to a desktop [SOLVED]

I'm trying to get Openbox to open certain applications in certain desktops, like Firefox in desktop 3 and Quanta in desktop 1 etc.
I've followed the instructions in the Openbox web site and created the following in ~/.config/openbox/rc.xml

<openbox_config>

<applications>

  <application name="firefox">
      <desktop>3</desktop>
      <maximized>yes</maximized>
      <layer>normal</layer>
  </application>

  <application name="quanta">
      <desktop>1</desktop>
      <maximized>yes</maximized>
      <layer>normal</layer>
  </application>

  </applications>
</openbox_config>

Now, if I understand correctly, when I open firefox (regardless of the desk I'm in at the time) it should open in desktop 3 ... but it does not sad
Instead it opens in whatever desktop I'm in at the time.

I've run the Reconfigure Openbox command after my changes and I've also tried using the desktop names (eg: desktop 1 is 'Apps', desktop 3 is 'Web') in the configuration file but not joy.

I'm I doing something wrong? Can anyone tell me if I'm missing something?


Thanks in advance.

R.

Last edited by ralvez (2008-11-25 04:29:14)

Offline

#2 2008-11-25 03:48:02

moljac024
Member
From: Serbia
Registered: 2008-01-29
Posts: 2,676

Re: Openbox :: linking an application to a desktop [SOLVED]

You should put this:
<application class="Firefox*">
In general, always try to put application class instead of name.
Oh, and you might want to leave the maximized part out of it, since it applies to the class it means every window firefox spawns will be maximized.

Maybe you could also do away with the name (not sure if it will work),
but remember to put the asterik, so instead of "firefox" it should be "firefox*".
Not sure about quanta, maybe try with the window class instead of name ?

Last edited by moljac024 (2008-11-25 03:49:23)


The day Microsoft makes a product that doesn't suck, is the day they make a vacuum cleaner.
--------------------------------------------------------------------------------------------------------------
But if they tell you that I've lost my mind, maybe it's not gone just a little hard to find...

Offline

#3 2008-11-25 03:52:33

.:B:.
Forum Fellow
Registered: 2006-11-26
Posts: 5,819
Website

Re: Openbox :: linking an application to a desktop [SOLVED]

I suppose you are referring to the Firefox built by Arch and not the one by Mozilla themselves? If so:

[stijn@hermes]$ xprop |grep WM_CLASS
WM_CLASS(STRING) = "Navigator", "Gran Paradiso"

That is what you need to put in openboxrc:

    <application name="Navigator" class="Gran Paradiso">
      <desktop>1</desktop>
    </application>

However, I did not get Firefox to cooperate either with those settings. I've seen reports from other people like that too, maybe some further hacking is needed. The application name and class are specified by the Openbox documentation though, so that's how it works usually (that's how it works for the other apps on my system...)


Got Leenucks? :: Arch: Power in simplicity :: Get Counted! Registered Linux User #392717 :: Blog thingy

Offline

#4 2008-11-25 04:04:17

ralvez
Member
From: Canada
Registered: 2005-12-06
Posts: 1,694
Website

Re: Openbox :: linking an application to a desktop [SOLVED]

@moljac024,

Thanks for the reply.
I've got some applications running, namely gvim, quanta, cssed. I noticed that all of them are in /usr/bin.
The applications not cooperating are Firefox and Thunderbird and using the class="Firefox*" goes very much ignored sad

@B,

Thank for your reply too.
You are correct. I'm running the Mozilla version of FF. It is in my ~/Apps/firefox directoty and has an simlink in /usr/bin but ... does not seem to like it neither.
I did try your approach but the apps refuse to cooperate. Perhaps, some more hacking is required as you pointed out.

Thanks guys!!

R.

Offline

#5 2008-11-25 04:28:44

ralvez
Member
From: Canada
Registered: 2005-12-06
Posts: 1,694
Website

Re: Openbox :: linking an application to a desktop [SOLVED]

Hey guys,  all of the sudden the  <application class="Firefox*"> kicked in and now it is working just fine!!
I'm a happy camper wink Thanks moljac024!!

and using B's tip to get an application's class (xprop |grep WM_CLASS) I got the class of Thunderbird (which is 'Thunderbird-bin') and got both of them working.
Just for reference, in case it may help someone else, here is the code:

  <application class="Firefox*">
      <desktop>3</desktop>
      <layer>normal</layer>
  </application>

<application class="Thunderbird-bin*">
    <desktop>4</desktop>      
    <maximized>yes</maximized>
    <layer>normal</layer>
</application>

Thank you both !!

R.

Offline

Board footer

Powered by FluxBB