Question

Is it possible to change window title of an arbitrary window that does not belong to my application (identified by application PID or window descriptor) in KDE? If so, how can it be done?

Was it helpful?

Solution

For anyone also searching for this, the above has helped me find the way to do this from the command line...

You will need to have wmctrl installed....

From the command line this can be achieved like this: First (optionally) list all windows:

wmctrl -l

Then, assuming you have a window called "foo this is a window bar", issuing

wmctrl -r "this is a window" -N "Full new title"

will set the title of this window to Full new title

OTHER TIPS

Yes, it can be done.

  1. Iterate over the X11 Windows and check for one with the _NET_WM_PID property set to PID, yielding the XID of the window;
  2. then change the WM_NAME property of that window.

But note that if this _NET_WM_PID property is not set by the program on its windows, you will not be able to find the window by the PID. And note that a program may set _NET_WM_PID on all of its windows, so the result of the first step may not be a single window.

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top