You are not logged in.

#1 2009-01-16 14:36:37

finferflu
Forum Fellow
From: Manchester, UK
Registered: 2007-06-21
Posts: 1,899
Website

Openbox per-application settings

I have read the documentation, and tried to look for an answer all over the web, but perhaps I don't know what are the right keywords, being a newbie to Openbox.

I am having issues with per-application settings, namely I am unable to get the apps to show on the desktops I define, the way I want. For example, I have bound Firefox to show up on the first desktop, like this:

    <application class="Firefox*">
      <desktop>1</desktop>
      <focus>no</focus>
    </application>

But, for example, if I start Firefox from desktop 2, the window appears on desktop 1 for a second, and then appears on desktop 2. Or, if I click on a link in a Pidgin window, Firefox leaves its current desktop to be displayed on my working desktop.
All in all, for all the apps I have defined, the rules do not seem to work the way I expect, and this makes me wonder if I have misunderstood something, or something is simply not working. For completeness, here are the rest of my rules:

    <application class="Empathy">
      <desktop>2</desktop>
      <focus>no</focus>
    </application>
    <application name="Buddy List" class="Pidgin" role="buddy_list">
      <desktop>2</desktop>
      <position force="yes">
        <x>75</x>
        <y>-0</y>
      </position>
      <focus>no</focus>
    </application>
    <application class="Pidgin">
      <desktop>2</desktop>
      <position force="yes">
        <x>-0</x>
        <y>0</y>
      </position>
      <focus>no</focus>
    </application>

(Another example is Pidgin's buddy list, not sticking to its desktop, nor to the defined position).

Thanks for your time smile


Have you Syued today?
Free music for free people! | Earthlings

"Perfection is achieved, not when there is nothing more to add, but when there is nothing left to take away." -- A. de Saint-Exupery

Offline

#2 2009-01-16 16:00:33

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

Re: Openbox per-application settings

I have firefox set to open on desktop 1 as well, except I don't have the focus part. Try clearing that and see if it behaves the way it should. For me it opens on desktop 1 no matter where I'm at, but it still gets dragged to the working desktop whenever a link is clicked. I believe this is just the way openbox operates. Maybe it only matches those application settings upon window creation.


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 2009-01-16 16:19:57

Mr Green
Forum Fellow
From: U.K.
Registered: 2003-12-21
Posts: 5,896
Website

Re: Openbox per-application settings

http://icculus.org/openbox/index.php/Help:Applications

There are guides out there, not used Openbox for a while [was using Devils pie!]

HTH


Mr Green

Offline

#4 2009-01-16 16:48:36

fwojciec
Member
Registered: 2007-05-20
Posts: 1,411

Re: Openbox per-application settings

Firefox is quirky, because what is returned by xprop | grep CLASS doesn't seem to work very well to identify it for openbox.  Something like this works for me, though:

    <application name="firefox-bin">
      <desktop>2</desktop>
    </application>

As for the other ones I'm not sure, but in my experience it's always the matter of defining name/class correctly.

Last edited by fwojciec (2009-01-16 16:49:08)

Offline

#5 2009-01-16 16:53:01

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

Re: Openbox per-application settings

moljac024 wrote:

I have firefox set to open on desktop 1 as well, except I don't have the focus part. Try clearing that and see if it behaves the way it should. For me it opens on desktop 1 no matter where I'm at, but it still gets dragged to the working desktop whenever a link is clicked. I believe this is just the way openbox operates. Maybe it only matches those application settings upon window creation.

Exactly the same here. I think that is the "normal" behaviour.
Here is my settings for Firefox, and works fine... well as per the above description at least ;-)


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


Edit: fwojciec bit me to the punch lol

Last edited by ralvez (2009-01-16 16:55:53)

Offline

#6 2009-01-16 18:33:00

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

Re: Openbox per-application settings

I have this problem on Openbox too - I'll take out the focus setting and see what it does... Kind of annoying tongue.


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

Offline

#7 2009-01-16 20:57:52

finferflu
Forum Fellow
From: Manchester, UK
Registered: 2007-06-21
Posts: 1,899
Website

Re: Openbox per-application settings

Thanks for all your replies smile

The focus option is something I have added later, trying to prevent Firefox from popping up on the desktop when I clicked the links.
I think that the impossibility to prevent such a behaviour is a show-stopper for me.

As for the class definition, I have followed the advice I found in the wiki:

For whatever reason, Firefox and its open source equivalents will ignore application rules (e.g. <desktop>) unless class="Firefox*" is used, regardless of what xprop reports as the actually WM_CLASS values.


Have you Syued today?
Free music for free people! | Earthlings

"Perfection is achieved, not when there is nothing more to add, but when there is nothing left to take away." -- A. de Saint-Exupery

Offline

#8 2009-01-16 22:15:43

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

Re: Openbox per-application settings

I found taking out the focus setting (or setting it to no) does not help a bit here...

Snippet:

    <application class="Firefox*">
      <desktop>1</desktop>
      <!--focus>no</focus-->
      <decor>no</decor>
    </application>

Changing Firefox* to firefox-bin (it has always been Firefox*) only causes Openbox not to recognise Firefox (I get the window decoration back).


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

Offline

#9 2009-01-16 22:27:05

fwojciec
Member
Registered: 2007-05-20
Posts: 1,411

Re: Openbox per-application settings

B wrote:

Changing Firefox* to firefox-bin (it has always been Firefox*) only causes Openbox not to recognise Firefox (I get the window decoration back).

name=firefox-bin or class=Firefox* -- either works for me.  I'm using a custom build of firefox, but I don't think it should make a difference.

Offline

#10 2009-01-17 00:40:50

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

Re: Openbox per-application settings

    <application name="firefox-bin">
      <desktop>1</desktop>
      <!--focus>no</focus-->
      <decor>no</decor>
    </application>

Tried that, doesn't work either. Window gets decorated and Firefox still pops up where it pleases... Frankly, it's nice if it can be sorted out, but I've spent some time on that already back in the day when I switched to Openbox. As you say the custom build should not matter... it's puzzling, but not that critical I am gonna investigate tongue. Maybe I should take out the decor option too, but that's not worth it to me.

Finferflu: does it work for you?


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

Offline

#11 2009-01-17 00:47:22

finferflu
Forum Fellow
From: Manchester, UK
Registered: 2007-06-21
Posts: 1,899
Website

Re: Openbox per-application settings

B wrote:

Finferflu: does it work for you?

roll huh? I think I just switched to PekWM... The impossibility to change the focus behaviour was the Real Show Stopper™ for me, don't mess with my windows layout tongue
Anyway, I might try again later, if I get bored of PekWM, which is very unlikely. I'm happy I brought up an issue which is useful to other people too smile


Have you Syued today?
Free music for free people! | Earthlings

"Perfection is achieved, not when there is nothing more to add, but when there is nothing left to take away." -- A. de Saint-Exupery

Offline

#12 2009-01-17 01:35:22

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

Re: Openbox per-application settings

Maybe I should give PekWM a try tongue. I like Openbox a lot though... And I tend to be a bit lazy once I get comfortable with things.


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

Offline

#13 2009-01-17 01:43:11

fwojciec
Member
Registered: 2007-05-20
Posts: 1,411

Re: Openbox per-application settings

B wrote:
    <application name="firefox-bin">
      <desktop>1</desktop>
      <!--focus>no</focus-->
      <decor>no</decor>
    </application>

This works for me -- copied and pasted verbatim; it also works if I uncomment the focus setting.  You're right, it's puzzling.

Offline

Board footer

Powered by FluxBB