LinuxQuestions.org
Download your favorite Linux distribution at LQ ISO.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Desktop
User Name
Password
Linux - Desktop This forum is for the discussion of all Linux Software used in a desktop context.

Notices


Reply
  Search this Thread
Old 06-04-2007, 05:45 PM   #1
ycr
LQ Newbie
 
Registered: Jun 2007
Posts: 2

Rep: Reputation: 0
gnome-terminal OpenBox WM_CLASS xprop


Hi ,

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?
"--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".
1. Does anybody know something about that?
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?
 
Old 06-09-2007, 01:47 AM   #2
ycr
LQ Newbie
 
Registered: Jun 2007
Posts: 2

Original Poster
Rep: Reputation: 0
Hmm...

Wow, nobody here knows how to manage X properties?

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

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.
 
  


Reply


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
pressing 'x' in gnome terminal starts new terminal instance Drwfan54 Ubuntu 3 09-26-2006 03:09 PM
Mouse problems in openbox, but not GNOME? epheles Linux - General 0 09-23-2005 12:23 AM
Changing Default Desktop Environment from GNOME to Openbox! marsupial Fedora 9 02-26-2005 01:40 AM
Alternative terminal to konsole & gnome-terminal Adony Linux - Software 3 10-08-2004 03:59 AM
running xprop in an xterm paledread Linux - Newbie 2 02-05-2004 11:55 PM

LinuxQuestions.org > Forums > Linux Forums > Linux - Desktop

All times are GMT -5. The time now is 08:14 AM.

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