LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Desktop (https://www.linuxquestions.org/questions/linux-desktop-74/)
-   -   gnome-terminal OpenBox WM_CLASS xprop (https://www.linuxquestions.org/questions/linux-desktop-74/gnome-terminal-openbox-wm_class-xprop-559165/)

ycr 06-04-2007 05:45 PM

gnome-terminal OpenBox WM_CLASS xprop
 
Hi :study:,

I'm running Ubuntu Edgy and have replaced Gnome's default window manager Metacity with OpenBox. Now I want to apply different window manager handles on gnome-terminals. For example different designs for specific purposes.

Generally window managers are using X Properties to differ between applications and their windows. One can take a look at the X Properties of a window by typing 'xprop' in the console and clicking on the window. OpenBox (like most window managers) uses especially the property WM_CLASS.

I have been able to apply different handles on xterms handles by specifying the name of the application:
Code:

xterm -name Test1 &
and xprop says:
Code:

WM_CLASS(STRING) = "Test1", "XTerm"
But unfortunately using --name in the command:
gnome-terminal --name Test1 &
doesn't change anything in WM_CLASS:
Code:

WM_CLASS(STRING) = "gnome-terminal", "Gnome-terminal"
So I'm not able to differ between gnome-terminals? :confused:
"--name" is a gtk+ command and I read that the gnome-settings-daemon should synchronize the properties with X. The daemon seems to be running on my system but I still cannot change the WM_CLASS property of gtk+ applications using "--name" or "--class". :confused:
1. Does anybody know something about that? :rolleyes:
One can also set X properties using xprop:
Code:

xprop -f WM_CLASS 8s -set WM_CLASS Test1
So the property changes to:
Code:

WM_CLASS(STRING) = "Test1"
But this seems to be invalid and is not recognized by the window manager. The property should always contain of two strings, like:
Code:

WM_CLASS(STRING) = "Test1", "Gnome-terminal"
I have read the xprop man pages but still cannot figure out how to format and correctly pass two strings. And the few hits on Google are telling me, that this seems to be either a trivial or a quite unusual problem.
2. Does anybody know how to get things right? :rolleyes:

ycr 06-09-2007 01:47 AM

Hmm...
 
Wow, nobody here knows how to manage X properties? :cry:

Ok, please tell me:
Does the option "--name" or "--class" work on your system?:scratch:

In order to check this, just start a gnome or gtk app, like:
Code:

gnome-terminal --name testname &
then call:
Code:

xprop | grep WM_CLASS
and click on the started app window.

If your chosen name is contained in the respond string:
Code:

WM_CLASS(STRING) = "testname", "Gnome-terminal"
then it seems to work.
If not:
Code:

WM_CLASS(STRING) = "gnome-terminal", "Gnome-terminal"
then it doesn't work.

You can check the same for:
Code:

xterm -name testname &
thx.


All times are GMT -5. The time now is 03:51 PM.