I'm running Lubuntu 13,04 and have four workspaces set up. I want certain programs to open in a specfic workspace every time (like BOINC in workspace 4, an application for writing books in Workspace 2, etc). I've looked at a few other posts on the subject–but they're all for Ubuntu and Unity.
I tried devilspie, but it wouldn't open (technically it was gdevilspie that wouldn't open). I don't have compiz, as I'm on LXDE, so the CCSM options are out.
Any suggestions are greatly appreciated.
Have a great day.:)
Patrick.
Best Answer
Let's assume you have four desktops. And you want to always launch
leafpad
on Desktop 1,chromium-browser
on Desktop 2,lxterminal
on Desktop 3, andDocument Viewer
on Desktop 4.First you need to run a program called
xprop
for each application this way as illustrated withleafpad
. On any desktop, openlxterminal
(not maximized) and openleafpad
(not maximized). Then, inlxterminal
, runxprop | grep "^_OB_APP"
. Nothing happens but the mouse cursor is now a cross-hairs. Now, click anywhere within theleafpad
window. Then look back in the terminal window. You should see output like this:Then, do this for the other programs.
With this information, we can proceed. Make a backup of
~/.config/openbox/lubuntu-rc.xml
. Use a text editor, preferably one providing syntax highlighting, to editlubuntu-rc.xml
as described below.Lubuntu-rc.xml
has several sections and we're interested in the last section that starts with<applications>
and ends with</applications>
. You'll notice that the content in between these tags is commented out by the use of<!--
and-->
.Move to the end of this section and just above the line that has
</applications>
, paste in the following (as an illustrative example):(Please note everything is case-sensitive. Use regular double quotes not smart quotes --- smart quotes may confuse the syntax highlighting in some editors.)
Save and close
lubuntu-rc.xml
. In a terminal, runopenbox --reconfigure
to register the changes. If you've done everything correctly, you'll just get the command prompt back. If you've messed up the tags, you'll get a pop-up!Now, whenever you launch the programs you've specified above, they'll open on the assigned desktops.
I've found Openbox - Edit rc.xml to Gain Control very helpful in understanding
lubuntu-rc.xml
even though it's not written for Lubuntu.Please note that you can also specify how (most) windows open. In other words, you can specify if they are to open maximized or, if not maximized, you maybe able to specify their size and position on the respective desktop.