Re: Minor (very) problem... - Workaround
Re: Minor (very) problem... - Workaround
- Subject: Re: Minor (very) problem... - Workaround
- From: Jeremy Huddleston <email@hidden>
- Date: Sun, 10 Feb 2008 14:38:38 -0800
Ok, so if I understand you correctly, this is _just_ with launching an
application when X11 is already running. When X11 isn't running, it
should properly claim focus. It looks like you're explaining http://trac.macosforge.org/projects/xquartz/ticket/43
, but I thought you were just talking about when X11 started.
--Jeremy
On Feb 10, 2008, at 14:30, John Koren wrote:
Jeremy
No it is still a problem for me. Let me give you more detail.
First of all, the problem occurs only if the wrapper script created by
Platypus is placed into the Finder's toolbar.
Here are two simple shell scripts starting xterm. (My real script has
directory path set so the xterm opens in the directory I want).
1)
#! /bin/sh
# start_xterm1.sh
/usr/X11/bin/xterm &
# end start_xterm1.sh
2)
#! /bin/sh
# start_xterm2.sh
/usr/X11/bin/xterm & # call 1
#*** bring X11 to the front ***
sleep 1
/usr/bin/osascript -e 'tell application "/Applications/Utilities/
X11.app" to
activate' # call 2
# end start_xterm2.sh
The first script (start_xterm1.sh), after being wrapped in Platypus
and
placed in the Finder's tool bar, will start xterm but the Finder
window will
stay in the foreground. In detail, xterm opens on the top but as the
script
exits it jumps back behind the Finder window.
The second script will keep the xterm on the top. 'sleep 1' is needed
because without it sometimes two xterms would open because of the race
condition between call 1 and call 2 on the initial launch of X11.
I should also make a correction to my earlier statement that 'open -
a X11'
would also bring X11 to the front. In fact it does not but the
osascript
does.
What seems to be happening is that when xterm is launched it does
does not
let the OS know that it belongs with X11 and therefore after the
script
start_xterm1.sh terminates Finder takes over again. One needs to
activate
X11 explicitly.
Cheers -John
PS. Jeremy, I can send you the corresponding Platypus wrappers if
needed.
On Feb 10, 2008 2:07 AM, Jeremy Huddleston
<email@hidden> wrote:
No you are not the only one. I have open -a X11 in my bundled
scripts mainly
to bring X11 to the front since some X11 windows (e.g. rxvt) stay
behind
Finder windows when launched from Finder.
That should not be the case as of 2.1.2 (maybe even 2.1.1, but I'm
not
sure about that)
Attachment:
smime.p7s
Description: S/MIME cryptographic signature
_______________________________________________
Do not post admin requests to the list. They will be ignored.
X11-users mailing list (email@hidden)
This email sent to email@hidden