[vox-tech] Setting foreground window from command line

Troy Arnold troy-vox at zenux.net
Sat Dec 1 12:49:48 PST 2007


On Fri, Nov 30, 2007 at 02:54:58PM -0800, Chris Jenks wrote:
> 
>   Hello,
> 
>   I'm looking for a way to cause a specific window to move to the 
> foreground when a shell script is run. My googling is returning very 
> little signal to noise! I'm running pretty much stock Gutsy ubuntu. Any 
> pointers?

Check out wmctrl.  What you want might be as simple as:
wmctrl -R Firefox

>From the Debian package description:
 
Description: control an EWMH/NetWM compatible X Window Manager
 Wmctrl is a command line tool to interact with an
 EWMH/NetWM compatible X Window Manager (examples include
 Enlightenment, icewm, kwin, metacity, and sawfish).
 .
 Wmctrl provides command line access to almost all the features
 defined in the EWMH specification. For example it can maximize
 windows, make them sticky, set them to be always on top. It can
 switch and resize desktops and perform many other useful
 operations.


More information about the vox-tech mailing list