On Nov 30, 2007 2:54 PM, Chris Jenks <jenks@re...> wrote:
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
First, it may help to know that while windows can ask to be moved to
the front, they are not guaranteed any benefaction on the part of the
window manager. So it might be impossible, unless you scripted the
window manager itself, and that's probably all sorts of annoying.
(Unless you're using a sweet window manager like Ion).
However, something that you may find useful are two Xterm resources:
popOnBell and bellIsUrgent. You can "man xterm" for details on them.
But basically your usage would be something like:
xterm -xrm "XTerm*popOnBell: true"
and/or -xrm "XTerm*bellIsUrgent: true"
and then in that xterm,
$ if its_time_to_run_the_script(); then
# Ring the bell to ask to pop to front and set urgent flag
echo -e "\a"
If that works for you, there are other fun way to specify the
resources, rather than the command line, that you might find useful.