You are not logged in.

#1 2009-02-20 21:49:09

The_Baron
Member
Registered: 2009-01-10
Posts: 23

Help with Openbox per-app settings

Hello, this is what I want to happen when I login:

On desktop 1 (named: 1) I want pypanel to load
On desktop 2 (named: Music) I want ncmpcpp to load full screen with no decor, full screen
On desktop 3 (named: rTorrent) I want rTorrent to load in the same way as ncmpcpp

<!-- This will load ncmpcpp on desktop 2 (Music) -->
    <application name="ncmpcpp">
      <desktop>2</desktop>
      <fullscreen>yes</fullscreen>
      <maximized>yes</maximized>
      <layer>above</layer>
      <decor>no</decor>
    </application>
    <!-- This will load Screen on desktop 3 (rTorrent) -->
    <application name="screen">
      <desktop>3</desktop>
      <fullscreen>yes</fullscreen>
      <maximized>yes</maximized>
      <layer>above</layer>
      <decor>no</decor>
    </application>

I've tried loading pypanel on desktop 1 so far with no luck so I removed it. I've tried a couple of things but dont know what to do.
Though I do think it might be something to do with the fact that both ncmpcpp & screen need terminal, which I dont know how to put into the name field

Any help would be great!
Thanks

Offline

#2 2009-02-20 21:51:03

Inxsible
Forum Fellow
From: Chicago
Registered: 2008-06-09
Posts: 9,183

Re: Help with Openbox per-app settings

Have you checked the application names to be in accordance with the WM_CLASS attribute of the said app? Use xprop to get them.

xprop

and then click on the running app.

Here's more info

Last edited by Inxsible (2009-02-20 22:45:14)


Forum Rules

There's no such thing as a stupid question, but there sure are a lot of inquisitive idiots !

Offline

#3 2009-02-20 22:03:05

The_Baron
Member
Registered: 2009-01-10
Posts: 23

Re: Help with Openbox per-app settings

Ok, so how would a make ncmpcpp and screen automatically load into the terminals loaded?

Thanks

Offline

#4 2009-02-20 22:08:39

chilebiker
Member
From: Zurich, Switzerland
Registered: 2006-07-18
Posts: 161

Re: Help with Openbox per-app settings

Unfortunately not all programs can be loaded like that in Openbox, some do work, other simply refuse to load correctly. In my case, I wasn't able to automa(g)ically put Firefox on Desktop 2, while Tunderbird starts on the correct desktop. I have played around with it for quite some time but couldn't find a solution. Some apps work, some don't.


Don't panic!

Offline

#5 2009-02-20 22:49:15

Inxsible
Forum Fellow
From: Chicago
Registered: 2008-06-09
Posts: 9,183

Re: Help with Openbox per-app settings

The_Baron wrote:

Ok, so how would a make ncmpcpp and screen automatically load into the terminals loaded?

Thanks

I just tried getting the xprop values for rTorrent and this is what I got

WM_CLASS(STRING) = "urxvt", "URxvt"
WM_HINTS(WM_HINTS):
        Client accepts input or input focus: True
        Initial state is Normal State.
        window id # of group leader: 0x1600007
WM_NORMAL_HINTS(WM_SIZE_HINTS):
        user specified size: 676 by 316
        program specified minimum size: 22 by 17
        program specified resize increment: 6 by 13
        program specified base size: 16 by 4
        window gravity: NorthWest
WM_CLIENT_MACHINE(STRING) = "arch"
WM_COMMAND(STRING) = { "urxvt", "-bg", "black", "-fg", "white", "-g", "110x24", "-T", "rTorrent", "-e", "screen", "-S", "rtorrent", "rtorrent" }
_NET_WM_ICON_NAME(UTF8_STRING) = 0x72, 0x54, 0x6f, 0x72, 0x72, 0x65, 0x6e, 0x74
WM_ICON_NAME(STRING) = "rTorrent"
_NET_WM_NAME(UTF8_STRING) = 0x72, 0x54, 0x6f, 0x72, 0x72, 0x65, 0x6e, 0x74
WM_NAME(STRING) = "rTorrent"

So the class name is urxvt, but the WM_NAME is rTorrent. My exact command to start rTorrent is listed in WM_COMMAND. So you will probably have to specify the class and the name if you want rTorrent to go on a particular desktop. Try this

<application name="rTorrent" class="URxvt">
      <desktop>2</desktop>
      <fullscreen>yes</fullscreen>
      <maximized>yes</maximized>
      <layer>above</layer>
      <decor>no</decor>
</application>

Last edited by Inxsible (2009-02-20 22:51:33)


Forum Rules

There's no such thing as a stupid question, but there sure are a lot of inquisitive idiots !

Offline

#6 2009-02-20 22:52:51

Inxsible
Forum Fellow
From: Chicago
Registered: 2008-06-09
Posts: 9,183

Re: Help with Openbox per-app settings

chilebiker wrote:

Unfortunately not all programs can be loaded like that in Openbox, some do work, other simply refuse to load correctly. In my case, I wasn't able to automa(g)ically put Firefox on Desktop 2, while Tunderbird starts on the correct desktop. I have played around with it for quite some time but couldn't find a solution. Some apps work, some don't.

Quote from the wiki page that i linked to earlier

Firefox/Gran Paradiso application rules

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 actual WM_CLASS values.

Last edited by Inxsible (2009-02-20 22:54:34)


Forum Rules

There's no such thing as a stupid question, but there sure are a lot of inquisitive idiots !

Offline

#7 2009-02-20 23:04:54

Inxsible
Forum Fellow
From: Chicago
Registered: 2008-06-09
Posts: 9,183

Re: Help with Openbox per-app settings

Update :

I just checked this myself and

<application name="rTorrent" class="URxvt">
      <desktop>2</desktop>
      <fullscreen>yes</fullscreen>
      <maximized>yes</maximized>
      <layer>above</layer>
      <decor>no</decor>
</application>

doesn't work. However, if I make the following change, rTorrent does obey the application rules...but so does every other app that uses urxvt

<application name="urxvt" class="URxvt">
      <desktop>2</desktop>
      <fullscreen>yes</fullscreen>
      <maximized>yes</maximized>
      <layer>above</layer>
      <decor>no</decor>
</application>

One thing you could do, is install another terminal like xterm or any other that you like and use that for running screen and apps like rTorrent and ncmpcpp etc. That way you can set that value correctly and still have your regular terminal open up normally on whatever desktop you are on currently.


Forum Rules

There's no such thing as a stupid question, but there sure are a lot of inquisitive idiots !

Offline

#8 2009-02-20 23:16:24

SamC
Member
From: Calgary
Registered: 2008-05-13
Posts: 611
Website

Re: Help with Openbox per-app settings

man urxvt

In specific, the -name option.

Offline

#9 2009-02-20 23:20:03

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

Re: Help with Openbox per-app settings

The_Baron wrote:

Ok, so how would a make ncmpcpp and screen automatically load into the terminals loaded?

Thanks

You need to keep in mind all those programs get launched within a terminal. Openbox will recognise the terminal but disregard the app running inside it. So it will do whatever actions you defined for your terminal emulator. No more, no less.

As for pypanel, I can't tell. But you should check xprop|grep WM_CLASS for it and see if that helps you defining the settings in Openbox.

chilebiker wrote:

Unfortunately not all programs can be loaded like that in Openbox, some do work, other simply refuse to load correctly. In my case, I wasn't able to automa(g)ically put Firefox on Desktop 2.

Firefox is pesky like that, unfortunately. It seems it does work in PekWM though, so maybe you should look into PekWM if it's a real showstopper. I know I have a PekWM excursion in my todo list tongue.


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

Offline

#10 2009-02-20 23:28:36

Inxsible
Forum Fellow
From: Chicago
Registered: 2008-06-09
Posts: 9,183

Re: Help with Openbox per-app settings

SamC wrote:
man urxvt

In specific, the -name option.

Thanks SamC. The -name attribute in conjunction with

<application name="rTorrent" class="URxvt">
      <desktop>4</desktop>
      <maximized>yes</maximized>
      <layer>above</layer>
</application>

works perfectly. Of course you will have to make sure to use the same name in both places - i.e. rTorrent

My command to start rTorrent now is

urxvt -bg black -fg white -T "rTorrent" -name rTorrent -e screen -S rtorrent rtorrent

Last edited by Inxsible (2009-02-20 23:40:47)


Forum Rules

There's no such thing as a stupid question, but there sure are a lot of inquisitive idiots !

Offline

#11 2009-02-25 22:49:03

jacko
Member
Registered: 2007-11-23
Posts: 840

Re: Help with Openbox per-app settings

chilebiker wrote:

Unfortunately not all programs can be loaded like that in Openbox, some do work, other simply refuse to load correctly. In my case, I wasn't able to automa(g)ically put Firefox on Desktop 2, while Tunderbird starts on the correct desktop. I have played around with it for quite some time but couldn't find a solution. Some apps work, some don't.

I read the solution to this somewhere. It had to do with the fact that no matter what name a mozilla based browser has it always is mozilla. So even if it comes back as firefox or even grandparadiso. it's still considered mozilla.

I really wish I could remember where I read that at. Link explained it very clearly.

Offline

Board footer

Powered by FluxBB