Visit Jeremy's Blog.
Go Back > Forums > Linux Forums > Linux - Distributions > Slackware
User Name
Slackware This Forum is for the discussion of Slackware Linux.


  Search this Thread
Old 09-07-2009, 04:53 PM   #1
Registered: Oct 2007
Location: Oregon
Distribution: Slackware 12.2
Posts: 65

Rep: Reputation: 18
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!
Old 09-07-2009, 10:42 PM   #2
Registered: Jun 2008
Location: Bonn/Germany
Distribution: Slackware-13.37
Posts: 94

Rep: Reputation: 19
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.
Old 09-08-2009, 12:42 AM   #3
Senior Member
Registered: Sep 2005
Distribution: Slackware
Posts: 1,442

Rep: Reputation: 71
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).
Old 09-08-2009, 08:00 AM   #4
Registered: Oct 2007
Location: Oregon
Distribution: Slackware 12.2
Posts: 65

Original Poster
Rep: Reputation: 18
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!


slackware, workspace, xfce4

Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off

Similar Threads
Thread Thread Starter Forum Replies Last Post
upgrade to slackware 12.2 + xfce4.6 (xfce4-power-manager doesn't work) zux Slackware 4 04-22-2009 11:28 AM
full screen app and change workspace? SChipS Ubuntu 1 07-24-2007 10:53 AM
launching an app into a specific workspace? jasonv Fedora 0 11-14-2004 04:58 PM
how to set workspace when running an app evian Linux - General 1 08-17-2003 04:18 PM
Run app in a different workspace?? kelesh Linux - General 2 02-28-2003 05:05 AM > Forums > Linux Forums > Linux - Distributions > Slackware

All times are GMT -5. The time now is 06:43 AM.

Main Menu
Write for LQ is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration