You are not logged in.
Hi,
I'm new around here.
Is there a way I can force an application to always start on a certain workspace?
I've noticed the 'send to desktop n' options, and 'pin' options, but the latter just pins an application to all desktops, and I want say, Opera, to always open on workspace / desktop-view 3, for example.
Thanks.
Last edited by tedrogers (2017-09-11 11:01:14)
Offline
Not sure if there are more elegant ways, but an option is to write a script that switches the current desktop to the 3Rd, then launches opera.
You can change the desktop with
xprop -root -f _NET_CURRENT_DESKTOP 32c -set _NET_CURRENT_DESKTOP 2
2 means 3rd since the first is zero.
Offline
Is there a way I can force an application to always start on a certain workspace?
I think openbox can do that:
http://openbox.org/wiki/Help:Applications
For example:
# ~/.config/openbox/rc.xml
<applications>
<!-- i want firefox on desktop 3 and maximized -->
<application name="Firefox*">
<desktop>3</desktop>
<maximized>yes</maximized>
</application
</applications>
Offline
openbox can definitely do that.
my rc.xml snippet for thunderbird:
<applications>
...snip...
<application class="Thunderbird" role="3pane">
<decor>no</decor>
<desktop>6</desktop>
<maximized>yes</maximized>
<fullscreen>no</fullscreen>
</application>
...snip...
</applications>
edit: oops, that's virtually identical to the previous answer. nm.
Last edited by ohnonot (2017-09-10 06:27:08)
Offline
openbox can definitely do that.
Thanks! It works great...mostly.
Here is my rc.xml file for the Applications section:
<applications>
<application class="Atom">
<decor>yes</decor>
<desktop>1</desktop>
<maximized>yes</maximized>
<fullscreen>no</fullscreen>
</application>
<application class="sublime-text">
<decor>yes</decor>
<desktop>1</desktop>
<maximized>yes</maximized>
<fullscreen>no</fullscreen>
</application>
<application class="Terminator">
<decor>yes</decor>
<desktop>2</desktop>
<maximized>yes</maximized>
<fullscreen>no</fullscreen>
</application>
<application class="x-terminal-emulator">
<decor>yes</decor>
<desktop>2</desktop>
<maximized>yes</maximized>
<fullscreen>no</fullscreen>
</application>
<application class="File Manager">
<decor>yes</decor>
<desktop>3</desktop>
<maximized>yes</maximized>
<fullscreen>no</fullscreen>
</application>
<application class="Geany">
<decor>yes</decor>
<desktop>4</desktop>
<maximized>yes</maximized>
<fullscreen>no</fullscreen>
</application>
<application class="Opera">
<decor>yes</decor>
<desktop>5</desktop>
<maximized>yes</maximized>
<fullscreen>no</fullscreen>
</application>
<applications>
Atom, Terminator, Geany and Opera all work flawlessly from Kupfer-launcher. Strangely, they don't work if I don't capitalise the first letter, so they must be shortcut names (I guess?).
The others (File Manager, x-terminal-emulator, sublime-text) load to whatever desktop-view is currently in focus.
I paid close attention to getting the right names, and can launch from terminal no problems, so I don't understand why they aren't working.
I even did dpkg -l to check the launch name of the applications.
Can anyone advise?
Thanks.
Last edited by tedrogers (2017-09-10 09:06:50)
Offline
I paid close attention to getting the right names, and can launch from terminal no problems, so I don't understand why they aren't working.
did you use the instructions found inside the rc.xml?
Last edited by ohnonot (2017-09-10 09:07:26)
Offline
<application class="foo">
Have you tried using <application name="foo"> instead?
Offline
You can get names, classes etc using xprop (or obxprop if you don't have x11-utils installed). For example...
xprop | grep WM_CLASS
...then use the xprop cursor to click on the application window.
Be Excellent to Each Other...
The Bunsenlabs Lithium Desktop » Here
FORUM RULES and posting guidelines «» Help page for forum post formatting
Artwork on DeviantArt «» BunsenLabs on DeviantArt
Offline
You can get names, classes etc using xprop (or obxprop if you don't have x11-utils installed). For example...
xprop | grep WM_CLASS
...then use the xprop cursor to click on the application window.
you can also use openbox utility -
to get everything you might need.
@tedrogers -
"x-terminal-emulator" and "File Manager" probably aren't being recognized as class names, try the actual name or class of the application your're launching.
You must unlearn what you have learned.
-- yoda
Offline
tedrogers wrote:<application class="foo">
Have you tried using <application name="foo"> instead?
Unfortunately this method appears to be even less reliable. 'Opera' or 'opera' works, 'Atom' and 'atom' work, but using name rather than class doesn't work with 'Terminator' or 'terminator', whereas the same used to under class.
It all seems rather inconsistent, and strangely I'm having the most difficulty with build-in applications, rather than those I've installed myself.
Can't get 'sublime_text' to work at all though. It's in /opt, and is a script as it requires ./ to execute from the terminal, but it always opens on the desktop-view that is currently in focus, rather than the one I want to force it onto.
Offline
@damo and @PackRat...the xprop and obxprop lines suggested aren't much use at present, as they list a load of Kupfer content, since this is my launcher, and I can't find another useful way to obtain the information on the target applications using xprop and / or obxprop.
EDIT: >> I've now managed to find a good way to get the info I need from xprop and obxprop, so thanks.
Last edited by tedrogers (2017-09-11 06:55:19)
Offline
Nearly got it all working using a variety of 'class' and 'name' types.
<application class="Atom">
<decor>yes</decor>
<desktop>1</desktop>
<maximized>yes</maximized>
<fullscreen>no</fullscreen>
</application>
<application name="x-terminal-emulator">
<decor>yes</decor>
<desktop>2</desktop>
<maximized>yes</maximized>
<fullscreen>no</fullscreen>
</application>
<application class="Terminator">
<decor>yes</decor>
<desktop>2</desktop>
<maximized>yes</maximized>
<fullscreen>no</fullscreen>
</application>
<application name="bl-file-manager">
<decor>yes</decor>
<desktop>3</desktop>
<maximized>yes</maximized>
<fullscreen>no</fullscreen>
</application>
<application class="Catfish">
<decor>yes</decor>
<desktop>3</desktop>
<maximized>yes</maximized>
<fullscreen>no</fullscreen>
</application>
<application class="Geany">
<decor>yes</decor>
<desktop>4</desktop>
<maximized>yes</maximized>
<fullscreen>no</fullscreen>
<application name="bl-text-editor">
<decor>yes</decor>
<desktop>3</desktop>
<maximized>yes</maximized>
<fullscreen>no</fullscreen>
</application>
</application>
<application class="Opera">
<decor>yes</decor>
<desktop>5</desktop>
<maximized>yes</maximized>
<fullscreen>no</fullscreen>
</application>
The only one I can't get to work consistently is bl-text-editor.
The 'Geany' entry catches it fine from Kupfer or the console using 'geany', and the others all work whether I use Kupfer, the console or Openbox menu.
bl-text-editor however, just will not play nicely, and always opens on the desktop that has focus, meaning that I probably wouldn't choose to start it from the menu, and I must choose 'Geany' in Kupfer or type 'geany' in the console if I want the text editor to open on my preferred screen.
I've tried changing it to 'class' and 'name', tried 'BL Text Editor' as class, tried 'bl-text-editor' as name, tried supplementing class/name with 'path' and /the/path...just not having it.
Any ideas anyone?
I'd also like to be able to add Sublime Text to the rc.xml entries, but this is giving me lots of trouble too. It's installed under /opt, I can execute from Kupfer launcher, and from console using:
./sublime_text
It must be a script as it requires ./ to execute, so all my efforts to add a class / name to the rc.xml have failed to work out fruitfully.
Otherwise this is working quite well, although I'm not entirely sure it's been worth the time invested! In for a penny, as the saying goes...
Last edited by tedrogers (2017-09-10 19:54:29)
Offline
I'd also like to be able to add Sublime Text to the rc.xml entries, but this is giving me lots of trouble too. It's installed under /opt, I can execute from Kupfer launcher, and from console using:
./sublime_text
It must be a script as it requires ./ to execute, so all my efforts to add a class / name to the rc.xml have failed to work out fruitfully.
Have you tried:
<action name="Execute">
<command>bash -c '. /full/path/to/sublime_text'</command>
</action>
(Untested)
Offline
tedrogers wrote:I'd also like to be able to add Sublime Text to the rc.xml entries, but this is giving me lots of trouble too. It's installed under /opt, I can execute from Kupfer launcher, and from console using:
./sublime_text
It must be a script as it requires ./ to execute, so all my efforts to add a class / name to the rc.xml have failed to work out fruitfully.
Have you tried:
<action name="Execute"> <command>bash -c '. /full/path/to/sublime_text'</command> </action>
(Untested)
I managed to get sublime text working now...in fact I've got everything working reliably in a repeatable manner, except for thunar/bl-file-manager.
Here is my code:
<application class="Atom" name="atom">
<decor>yes</decor>
<desktop>1</desktop>
<maximized>yes</maximized>
<fullscreen>no</fullscreen>
</application>
<application class="Sublime_text" name="sublime_text">
<decor>yes</decor>
<desktop>1</desktop>
<maximized>yes</maximized>
<fullscreen>no</fullscreen>
</application>
<application class="X-terminal-emulator" name="x-terminal-emulator">
<decor>yes</decor>
<desktop>2</desktop>
<maximized>yes</maximized>
<fullscreen>no</fullscreen>
</application>
<application class="Terminator" name="terminator">
<decor>yes</decor>
<desktop>2</desktop>
<maximized>yes</maximized>
<fullscreen>no</fullscreen>
</application>
<application class="BL File Manager" name="bl-file-manager" role="Thunar-1505083654-3600475657">
<decor>yes</decor>
<desktop>3</desktop>
<maximized>yes</maximized>
<fullscreen>no</fullscreen>
</application>
<application class="Thunar File Manager" name="thunar" role="Thunar-1505083745-558402334">
<decor>yes</decor>
<desktop>3</desktop>
<maximized>yes</maximized>
<fullscreen>no</fullscreen>
</application>
<application class="Catfish" name="Catfish">
<decor>yes</decor>
<desktop>3</desktop>
<maximized>yes</maximized>
<fullscreen>no</fullscreen>
</application>
<application class="Bl-text-editor" name="bl-text-editor">
<decor>yes</decor>
<desktop>4</desktop>
<maximized>yes</maximized>
<fullscreen>no</fullscreen>
</application>
<application class="Geany" name="geany">
<decor>yes</decor>
<desktop>4</desktop>
<maximized>yes</maximized>
<fullscreen>no</fullscreen>
</application>
<application class="Opera" name="Opera">
<decor>yes</decor>
<desktop>5</desktop>
<maximized>yes</maximized>
<fullscreen>no</fullscreen>
</application>
I've even gone to extremes and tried (and failed) with obapps (gui).
https://sourceforge.net/projects/obapps/
That was a trainwreck! It installed once, crashed many times, and following a reboot and some uninstall and reinstall action (including the requirements/dependencies) for python-wxtools, I gave up on obapps! Lucky I made a backup on rc.xml because it smashed it to bits!
So, using:
obxprop | grep "^_OB_APP"
...I added class, name and role for bl-file-manager and thunar, and no matter what I try I just can't get them to work.
Does anything look wrong with it to you (see above). Should work, right?
Thanks.
Last edited by tedrogers (2017-09-10 22:58:42)
Offline
I managed to get sublime text working now
Did my suggestion actually work?
If not, please post your actual solution for the benefit of our studio audience.
Offline
tedrogers wrote:I managed to get sublime text working now
Did my suggestion actually work?
If not, please post your actual solution for the benefit of our studio audience.
Hi,
The actual solution for sublime-text was detailed above. No special measures required other than the correct class and name:
<application class="Sublime_text" name="sublime_text">
<decor>yes</decor>
<desktop>1</desktop>
<maximized>yes</maximized>
<fullscreen>no</fullscreen>
</application>
Any ideas with thunar / bl-file-manager, as detailed above?
Thanks.
Offline
Okay, solved it.
Needs * next to bl-file-manager and thunar entries as such:
<application class="Bl-file-manager*" name="bl-file-manager*">
<decor>yes</decor>
<desktop>3</desktop>
<maximized>yes</maximized>
<fullscreen>no</fullscreen>
</application>
<application class="Thunar*" name="thunar*">
<decor>yes</decor>
<desktop>3</desktop>
<maximized>yes</maximized>
<fullscreen>no</fullscreen>
</application>
Got there in the end.
Hope this helps someone else.
Thanks.
Offline
Okay, solved it.
Needs * next to bl-file-manager and thunar entries as such:
<application class="Bl-file-manager*" name="bl-file-manager*"> <decor>yes</decor> <desktop>3</desktop> <maximized>yes</maximized> <fullscreen>no</fullscreen> </application> <application class="Thunar*" name="thunar*"> <decor>yes</decor> <desktop>3</desktop> <maximized>yes</maximized> <fullscreen>no</fullscreen> </application>
Got there in the end.
Hope this helps someone else.
Thanks.
Thanks, but out of interest why does that * make it work?
volvox.biz a very tedious daily account of life during covid,
Offline
Thanks, but out of interest why does that * make it work?
I have got a Scooby Doo (clue) why the wildcard is required. All I know is that after testing iteratively for what seems like days, it works with a * and doesn't work otherwise.
I'm rocking on it now...so easy to set-up any other application, as long as I ALT+F2 to run the required application, then grep for the right command...
obxprop | grep "^_OB_APP"
...put the command in rc.xml, and place a * at the end...first time...every time.
Also, the <focus>yes</focus> works very well, so on launch it pulls me to the relevant desktop.
I installed gnome-terminal and didn't put it in my rc.xml file so if I happen to want a terminal on the desktop-view I'm currently using, I'll just run that from Kupfer / ALT-F2.
Nice little system now!
Last edited by tedrogers (2017-09-12 09:55:57)
Offline
As an update to this, following some system updates (I don't really know which ones) the custom workspace solution with a * stopped working. I have since removed all the * from the rc.xml entries and it works again! This is the kind of weirdness that is hard to work with.
Offline