Submit Hint Search The Forums LinksStatsPollsHeadlinesRSS
14,000 hints and counting!

10.4: Bring X11 windows forward via AppleScript Apps
Tiger only hintX11 windows do not raise (come to the front) when the application is activated. This is a well-known bug in Tiger and the current X11 release. If you switch apps with the Dock, then you must click the X11 icon twice -- once to activate and once to bring the windows forward. If you switch apps (like I do) using Command-Tab, then you must Command-Tab to X11 a second time, e.g. with the key sequence Command-(Tab,Shift-Tab).

One workaround is to bind a new key to an AppleScript that activates X11. There are many ways to do this, but one way is to use Butler.
  1. Using Script Editor, create a one-line applescript that says:
    tell application "X11" to activate
  2. Find your script in the Finder and drag it onto Butler's configuration.

  3. Select it in Butler and add a hot key, e.g. Option-Tab.

  4. Change "Open With Default" to "Execute Applescript."
So now I switch to X11 by typing Option-Tab, and cycle through my other apps with Command-Tab. A simple hint to solve an annoying problem until Apple releases a patch.
  • Currently 3.00 / 5
  You rated: 5 / 5 (6 votes cast)

10.4: Bring X11 windows forward via AppleScript | 8 comments | Create New Account
Click here to return to the '10.4: Bring X11 windows forward via AppleScript' hint
The following comments are owned by whoever posted them. This site is not responsible for what they say.
10.4: Bring X11 windows forward via AppleScript
Authored by: zojas on Jul 22, '05 11:51:08AM

don't hold your breath waiting for apple to fix this. full-screen x11 mode has a bug which has been around for at least a year; if you toggle back and forth between full screen x11 and rootless mode a few times, all the hotkeys in aqua will stop working. things like cmd-tab.

[ Reply to This | # ]
10.4: Bring X11 windows forward via AppleScript
Authored by: cedric on Jul 22, '05 02:16:53PM

I don't use Butler, and don't want to. But I don't know how to bind a key to an applescript. Anyone can help?! Please! I didn't find any doc in apple website. And this X11 bug is really painful.

Many thanks,


[ Reply to This | # ]
10.4: Bring X11 windows forward via AppleScript
Authored by: Anonymous on Jul 22, '05 03:56:33PM

Another option is to follow up the command-tab with a command-tilde to cycle through the windows. Not optimal, but no mouse needed.

[ Reply to This | # ]
10.4: Bring X11 windows forward via AppleScript
Authored by: dkulp on Jul 23, '05 12:53:23AM

This doesn't work when you only have one X11 window open. And it's annoying if you have many open. But otherwise a reasonable alternative that I used until this hint.

[ Reply to This | # ]
Try a third party App launcher
Authored by: sharakan on Jul 23, '05 04:30:25PM

An even easier workaround if you use LaunchBar is to rely on LB's App switching functionality, (Cmd-space-space by default) which does bring the X11 window to the front. Dunno whether this works for other App launchers like Quicksilver or DragThing, but it's worth a shot.

[ Reply to This | # ]
10.4: Bring X11 windows forward via AppleScript
Authored by: kaz219 on Jul 25, '05 09:57:40AM

I just use commande-tab 2 times and it works for me. Hold command and press tab until X11 is selected, and a second time, even if X11 is already selcted, cycle trough all active applications to come back to X11. (or use theleft arrow to go back)

[ Reply to This | # ]
Applescript + Quicksilver works too
Authored by: wainstead on Jul 30, '05 11:33:14AM

I added the one liner Applescript to my Scripts folder, then went into Quicksilver's preferences and refreshed my Scripts folder so Quicksilver knew about it.

Now when I raise QS with command-spacebar and type the script name (I called it xx1111, which is unique and I only need to type the 'xx') comes up correctly and in focus.

[ Reply to This | # ]
Keyboard Maestro works...
Authored by: ennisdb on Aug 13, '05 06:20:54PM

Keyboard Maestro has a nice built-in application switcher that works similarly to Apple's, but uses the option+tab key combo instead. It raises X11 windows as one would expect. It also allows you to assign key combos to run applescripts etc. I find it pretty useful.

[ Reply to This | # ]