Welcome to Linux Forums! With a comprehensive Linux Forum, information on various types of Linux software and many Linux Reviews articles, we have all the knowledge you need a click away, or accessible via our knowledgeable members.
Find the answer to your Linux question:
New to Linux Forums? Register here for free!
    Linux Forums > GNU Linux Zone > Linux Desktop / X-Windows > freshly-launched applications show on top of already-running ones

Forgot Password?
 Linux Desktop / X-Windows   Anything X. Gnome, KDE, remote desktop's, XGames etc.

Site Navigation
Linux Articles
Linux Forums
Linux Downloads
Linux Hosting
Free Magazines
Job Board
IRC Chat
RSS Feeds


Linux Forum Topics
Linux Forums
Your Distro
Linux Resources
GNU Linux Zone
The Community
Reply
 
Thread Tools Display Modes
Old 07-08-2009   #1 (permalink)
Just Joined!
 
Join Date: Jul 2009
Posts: 7
freshly-launched applications show on top of already-running ones

Hello people,

I am not sure, but I can imagine this has to do with the window-manager, therefore I post here.

You have probably noticed it, whenever you launch a new application (say, firefox), it will (for most apps) show up on top of every other application that's already running.
Example: I'm typing a text in a text editor, wants to search something on the internet, execute firefox by whatever means, go on typing my text. But some seconds later, firefox has finished its initialisation, and comes on top of my text editor, just to bother me . The few last words I've typed are lost.

Well, this is not that big a deal, but is there anywhere a simple option that deals with that behavior, is it tied to applications themselves, due to something else?

Thanks in advance for your answers!
Nico.
nicoulas is offline  


Reply With Quote
Old 07-08-2009   #2 (permalink)
Super Moderator
 
ozar's Avatar
 
Join Date: May 2004
Posts: 12,056
Welcome to the forums, Nico!

Yes, this behavior is window manager configuration related.

Tell us what window manager you are using so that someone can help you.
__________________
oz

New Members: * README *
ozar is offline   Reply With Quote
Old 07-08-2009   #3 (permalink)
Just Joined!
 
Join Date: Jul 2009
Posts: 7
Hello Ozar! Thanks for the welcoming .

I use gnome, probably the latest version (I can precise this later on if necessary, I'm not on my pc here).
nicoulas is offline   Reply With Quote
Old 07-09-2009   #4 (permalink)
Linux Guru
 
reed9's Avatar
 
Join Date: Feb 2009
Location: Boston, MA
Posts: 2,199
The GNOME window manager is called metacity. I don't use GNOME much myself, but it does not seem to be particularly easy to configure to do what you want. I would guess, if metacity is able to do it, you can configure it with gconf. Easiest way to do that is with the gconf editor.

Otherwise take a look at using Devil's Pie.

Or switch to a window manager like (my favorite) openbox which makes that sort of thing easy.
reed9 is online now   Reply With Quote
Old 07-10-2009   #5 (permalink)
Just Joined!
 
Join Date: Jul 2009
Posts: 7
Thanks reed9 for your quick answer.
I'm going to try these, and maybe take a look at alternative wms .

Of course, any further (more precise?) answer is welcome!
nicoulas is offline   Reply With Quote
Old 07-10-2009   #6 (permalink)
Linux Guru
 
reed9's Avatar
 
Join Date: Feb 2009
Location: Boston, MA
Posts: 2,199
It doesn't look like metacity can do this, so you will need to use devil's pie.
http://blogs.gnome.org/metacity/2008...ndow-matching/

There is a GUI frontend for it, which is nice since hand editing all the configurations isn't always fun. It's called gdevilspie.

You can find more info on window properties using xprop.

So if you want to create a rule in devilspie that matches a role (say web browser) and action (keep below), you can find that window property with
Code:
xprop WM_WINDOW_ROLE
and then click on an open firefox window. My output is
Code:
[reed@reed-laptop ~]$ xprop WM_WINDOW_ROLE
WM_WINDOW_ROLE(STRING) = "browser"
In gdevilspie, it looks like you can just click on window_role under the matching tab, and fill in browser, then create an action that will be something like layer below. I didn't see a screenshot of the action tab, so I don't know what their syntax looks like.
reed9 is online now   Reply With Quote
Old 07-10-2009   #7 (permalink)
Just Joined!
 
Join Date: Jul 2009
Posts: 7
This is very interesting!
I didn't know a thing about window matching and its lack in Metacity. Thanks a lot for the explanation and links, I'll be trying this during the week-end.
Gratefully, Nico.
nicoulas is offline   Reply With Quote
Old 07-10-2009   #8 (permalink)
Linux Guru
 
reed9's Avatar
 
Join Date: Feb 2009
Location: Boston, MA
Posts: 2,199
I hate to throw in another complication, but it occurred to me that if you're using GNOME, you may well be using compiz-fusion. I don't think you mentioned which distro you're using, but I know, for example, that Ubuntu turns on special effects (compiz) by default if your hardware supports it. I've seen mention that devilspie and compiz don't play nice together, but compiz has it's own window matching capabilities.

WindowMatching - Compiz Wiki

If you are using compiz-fusion and want to set window matching using it, make sure you have the CompizConfig Settings Manager installed. It's probably the easiest way to configure things.
reed9 is online now   Reply With Quote
Old 07-10-2009   #9 (permalink)
Just Joined!
 
Join Date: Jul 2009
Posts: 7
Good hint about compiz... However, I don't think I will be using it, it's really too much stuff I do neither need nor want .
By the way, I'm running under Fedora.
I'm currently trying gdevilspie...
nicoulas is offline   Reply With Quote
Old 07-10-2009   #10 (permalink)
Just Joined!
 
Join Date: Jul 2009
Posts: 7
Having tried gdevilspie, I can not figure out how to do what I want. For example, the rule :

Code:
( if 
( and 
( is ( window_role ) "browser" )
) 
( begin 
( below )
( println "match" )
)
)
makes firefox stay below all other windows. This is not wanted.

Actually, what would be liked is to "not-focus" or maybe "unfocus" firefox, so that it lets the focus to the current window when executed (if I'm not clear about something, please tell me).

Unfortunately, I'm not sure that this is possible with devilspie, as the actions only include the "focus" action for this purpose...

I'm going on investigating.
nicoulas is offline   Reply With Quote
Reply


Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)
 
Thread Tools
Display Modes

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 On
HTML code is Off
Trackbacks are Off
Pingbacks are Off
Refbacks are Off

Free Magazines
Run Your Own Web Server Using Linux & Apache - Free 191 Page Preview
Learn about everything you'll need to build and maintain your Linux servers, and to deploy Web applications to them.
subscribe
Open Source Security Myths Dispelled
Dispel the five major myths surrounding Open Source Security and gain the tools necessary to make a truly informed decision for your IT organization
subscribe
InformationWeek
InformationWeek is the only newsweekly you'll need to stay on top of the latest developments in information technology.
subscribe



All times are GMT. The time now is 11:32 AM.






© 2000 - 2009 - All Rights Reserved - Property of  MAS Media

Content Relevant URLs by vBSEO 3.3.0 RC2