-   Slackware (
-   -   can I bind an app to a workspace, using slackware 12.2, and xfce4? (

globaltree 09-07-2009 04:53 PM

can I bind an app to a workspace, using slackware 12.2, and xfce4?
Hello Bob:

I was just wondering if there was a way (perhaps by creating ~/.config/xfce4/xfwm4/xfwm4rc and adding appropriate lines) to bind applications to always use the same workspace. In other words, no matter which workspace I happen to be in when I click on an app, say konsole, I want it always to open up in my first workspace... then I could bind my browser to the second, my mail client to the third, and the other apps that I generally keep open to their own workspace.

Searching these forums, I have found that it can be done with icewm, but I'm not trying to start a wm flame thread, and don't want to know how other wm gets the job done... just want to know if xfce4 can do this.

If anyone knows how, here is a chance to get some votes, kudos, thumbs-ups, praise, and otherwise show off your tux erudition.

I am running slackware 12.2!

bonaire 09-07-2009 10:42 PM

Which window-manager are you using? With Kwin it is possible to do it in two ways: via dcop/dbus-call (Disadvantage is: you need to script it) and in the window specific settings (reachable via context menu of the title bar.)

An example is for the dbus-call is:

CURDESK=$(qdbus org.kde.kwin /KWin currentDesktop)
qdbus org.kde.kwin /KWin setCurrentDesktop 1
qdbus org.kde.kwin /KWin setCurrentDesktop $CURDESK

I know Kwin uses dcop in your slackware version, but i show the dbus-call to illustrate how the window manager of xfce should be setted up.

Maybe it helps.

shadowsnipes 09-08-2009 12:42 AM

Try using something like devilspie. If you would rather not have a daemon running then you could use something like wmctrl by creating custom launcher scripts for the applications you want to customize.

Both programs should work regardless of the desktop environment/window manager (assuming the WM follows certain standards).

globaltree 09-08-2009 08:00 AM

both wmctl and devilspie bind apps to workspaces -- thankyou
Thankyou bonaire and shadowsnipes for contributing to this thread. Unfortunately, bonaire, qdbus was not installed by default on my xfce4 system (maybe I needed to install all the kde packages) so I was unable to test your suggestion. However, the tools suggested by shadowsnipes both were able to get the job done.

I created some s-expressions of the form:

(if (contains (application_name) "Konsole") (set_workspace 2))
(if (contains (application_name) "Firefox") (set_workspace 3))
... and so on for all my apps

and saved them in ~/.devilspie/sexp.ds and then added devilspie to xfce4 session autostart menu, and I have the desired behavior, though I do notice a delay when apps startup as the s-expressions are processed. Despite the desired behavior being achieved, if I use the -d (debug) flag, some kind of error is reported:


** (devilspie:3205): CRITICAL **: e_sexp_eval: assertion `f->tree != NULL' failed
Changing workspace to 2

It still changed the workspace, so I'm happy... but errors always make me nervous, and I noticed in the output of ./configure when I was compiling the phrase in allcaps, COMPLETELY UNSTABLE, and I noticed that the man pages were written on a train, but I'm using it anyways.

Thanks again. SOLVED by shadowsnipes!

All times are GMT -5. The time now is 12:48 PM.