This forum has been archived. All content is frozen. Please use KDE Discuss instead.

Change KDE window attributes (eg STICKY) from COMMAND LINE

Tags: None
(comma "," separated)
greybeard
Registered Member
Posts
2
Karma
0
Hi,

I want to put a window up on all virtual desktops under KDE, and do so from the command line. I know I can do that by right clicking on the window's title line once the window is up, but I have an application where I want to do that without manual intervention. It is also for a variety of applications (not necessarily KDE applications) so System Settings --> Window Behavior --> Window Rules doesn't do it for me either.

I happen to be running under Linux so I went out and got "wmctrl". For some window properties it works, for example

wmctrl -b toggle,fullscreen -r :ACTIVE:

toggles the terminal window I am on (":ACTIVE:") from full-screen to not-full-screen and back again. However not all properties appear to work, specifically the one I need, "sticky", does nothing whether I add, remove, or toggle it.

wmctrl -b toggle,sticky -r :ACTIVE:

There is no error message but nothing happens. Therefore I suspect that the KDE window manager is blocking the "sticky" property ( _NET_WM_STATE _NET_WM_STATE_STICKY).

I've also looked at kcmshell4 but all that seems to do is throw up some window that I'd have to click on, that being what I am trying to avoid.

So is there some command line program I can run which will change the sticky bit (and perhaps others for future reference)?

I am running KDE 4.10.5 under Slackware Linux 14.1.


Thanks in advance :-)
luebking
Karma
0
tl;dr

Code: Select all
wmctrl -r :ACTIVE: -t  4294967295


(4294967295 == -1, but wmctrl cannot handle -1)

To start some application set on all desktops, just run
Code: Select all
kstart --alldesktops foobar


alternatively you could use https://github.com/luebking/KLItools/bl ... system.cpp
(there's a build script in the repo)

and
kwindowsystem set active desktop all

(kwindowsystem has more features to control windows ;-)

-------

Background: "sticky" is defined wrt to virtual desktops implemented as canvas (eg. fvwm and instead of as stack, like it is in many WMs) and means "that the Window Manager SHOULD keep the window's position fixed on the screen, even when the virtual desktop scrolls." [1]

Since on a stacked VD concept windows are _always_ on the same position and there is an explicit property defined for the assigned virtual desktops, most WMs with a stacked VD implementation simply ignore that property (or actually resolve the inevitable conflict in favor of _NET_WM_DESKTOP)

[1] http://standards.freedesktop.org/wm-spe ... 0472615568
greybeard
Registered Member
Posts
2
Karma
0
"wmctrl -r :ACTIVE: -t 4294967295" did not appear to do anything.

"kstart --alldesktops [command]" did the trick. Sort of. For some
reason the command would not take arguments. I got it to work when I
changed over to "kstart --alldesktops --service [command].desktop" and
the provided a "[command].desktop" with the command and its args.

I downloaded kwindowsystem for future reference too.

Thank you for the info. Problem solved.


Bookmarks



Who is online

Registered users: bartoloni, Bing [Bot], Evergrowing, Google [Bot], ourcraft