Take the 2-minute tour ×
Unix & Linux Stack Exchange is a question and answer site for users of Linux, FreeBSD and other Un*x-like operating systems.. It's 100% free, no registration required.

I'd like to be able to move (pin) an existing window to all desktops using a scriptable command, rather than through the window menu.

wmctrl -r <WIN> -t <DESK> will move a window to a different desktop, but I haven't found a way to use this to cause the window to be displayed on all desktops. wmctrl -l shows -1 as the desktop number for windows which are displayed on all desktops, but passing -1 to -t doesn't work.

An unresolved fedora bug report seems to address this issue: apparently the -1 value is used internally by wmctrl, and for this reason cannot be passed to -t. The bug report also mentions window can be pinned with some window managers by giving the target window the sticky property. However, I'm running openbox and this approach does not seem to work for me. There is actually a patch posted to that bug report; I haven't tried using it. It is from 2009. I'd prefer to avoid patching wmctrl or anything else.

Is there another way to script this behaviour that will work under openbox?

share|improve this question
Also does not work with Metacity 2.22.0. It seems to me that the wmctrl development is stalled. The last entry in the Changelog is from 2005. The problem is obvious. The program needs a new maintainer. If you like the program and if the program needs to be patched, do it. That is the way open source works. –  ceving May 13 '11 at 15:04

2 Answers 2

As of wmctrl v1.07, -t -2 works for me.

share|improve this answer

Like a user said in the comments, wmctrl hasn't been touched since October 2005. Its very possible that the featured worked at the time, and has since been made broken due to packages changing around it.

Here's the wmctrl changelog

share|improve this answer

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.