Starting applications on specific desktop

Hi guys!

This is something I had heard you could do with openbox but did not know how to do it.

Well, now I do, and you will too, if you don’t already know :wink:

Let’s suppose you want viber to always start on desktop 4. Here’s what you do:

  1. Execute viber
  2. Open a termminal and run
xprop | grep WM_CLASS | awk '{print $4}'
  1. The cursor will change to a cross :heavy_plus_sign:
  2. Click anywhere within viber's window
  3. The terminal will display:
"ViberPC"
  1. Open your RC file. Press W-S and select RC - configuration file
  2. In the ediror search for </applications>
  3. Insert this code right above
    <application class="ViberPC">
        <desktop>4</desktop>
        <maximized>yes</maximized>
    </application>
  1. Restart openbox and you are good to go!

You can do this with any application you have running, so the possibilities are endless!

BTW, the <applications> section in the RC file is heavily commented, so you can read what different thing you can do with your apps.

Cheers!
S.

2 Likes

very good , and it wil be better and faster , if you have for ever app the short keys to load them up it wil open always in desktop 4 , and there is no faster way the loading up , i have i3 running from the project hashlinux , that i like two , i run on my pc’s only i3 tilling manager and mabox , and i dont want any other anymore , i you dont know hashlinux project , it is the fastest linux tiling manager on arch and very very fast , i run it on predator pc with 4 screens , it have themes switcher automatic, conkys all the bells are all ready done … :wink: https://hashproject.org/ very easy to have a powerfull and strong i3 with this one .

1 Like

Hi @sng,
Thanks for writing this very useful howto, I usually configure this exactly the same way.

But… there is also fully functional Python3 GUI for this kind of configuration.

obapps3 project on GitHub

It is also available in Arch User Repository (AUR). So you can install it by command:

yay obapps3

To start program:

obapps

2 Likes

This is an interesting project, thanks for sharing!

I am not so into tilling managers myself, though, but it’s good to know :grinning:

1 Like

This is a great app!
I will be using it!

But I also prefer to know the manual way, no third-patry apps needed, just because thay may not be available when needed (murphy’s law :wink:).

2 Likes

i will test this out today , thanks for sharing it , that makes it easy the under buttons are poland text i see . however i try thanks :love_you_gesture:

i have allready try this out , however on github page there saying , (find) where is the find ? there is none.
but i have make all different settings made with this program, but it turns out it does not work, if you are on desktop 8 it will not open in nr4, by the way try to apply the settings and then close the program and open it again all settings are lost, so the alpha it still is at the moment is not ready for that.

and the big question is can it work after the settings have been saved if you close it then the answer is no, your settings are not even saved :face_with_monocle:

mayby it works on a normal desktop like xfce and 4 desktops , but not in mabox , it dont save the settings haha

ok , i have try things out to the bone , but still not open in the desktop bar that i want to open , you see the example on the screenshot .
the class * → dont work ,or you settings wil not saved , but if you click the search button , it wil set the class in obapps and you see the terminator do his work .
if you close up obapps is saved , very rare .
but i have test with clipgrab all settings and still dont open in desktop 4 if i running desktop 8 , however you see in terminator that the obapp making the enter in that script for desktop 4 , dont work for me yet. keep searching :rofl:

i got it working haha.
when you open this program for the first time, remove the first class with *
keep all settings to the right
click on search below and place your mouse on the first settings on space, you will see that obpass will appear, what you do then is simple
you place in the first box for example nemo and you stay away from all other boxes, the only thing you can do in the right menu is to open it in desktop 5 for example, if you close obpass and open it again, you will see that the settings saved so it works.
with a bit of searching anyway

obpass must be always running in the background or it wil not work , so there must be autostart for obpass in maybox than it always work if you restart mabox

I think I found a source of that issue. Obapps conflicts with an application entry shipped by default with mabox in ~/.config/openbox/rc.xml

Can you try remove some lines from it and then test obapps?

Works fine for me after removing those lines. No need to keep obapps running… it writes changes to rc.xml and reloads openbox config.

2 Likes