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

Use Fink's xorg package to bring X11 windows forward UNIX
Apple's X11.app has an annoying bug where Command-Tab doesn't bring the X11 window(s) to the foreground -- you have to click on the X11 Dock icon (for all windows), or on a particular window, to bring them/it forward. A good solution:
  1. Install Fink.

  2. In Terminal, run these commands:
     $ sudo mv /usr/X11R6 /usr/X11R6.old
     $ sudo mv /etc/X11 /etc/X11.old
     $ sudo mv /Applications/Utilities/X11.app \
     /Applications/Utilities/X11.old.app
     $ sudo fink install xorg
     $ sudo fink install quartz-wm
    
    Note that you'll need your Mac OS CD for that last command.
Now you have an application, XDarwin.app, that replaces X11.app, but fixes the Command-Tab bug. You may also need to make a file named .xinitrc in your home directory, that contains a single line: exec /sw/bin/quartz-wm.

[robg adds: I haven't tested this one yet this morning, but will do so later today, as the Command-Tab problem bothers me quite a bit. If I find anything worth mentioning after testing, I'll post an update.]
    •    
  • Currently 2.50 / 5
  You rated: 4 / 5 (2 votes cast)
 
[11,353 views]  

Use Fink's xorg package to bring X11 windows forward | 20 comments | Create New Account
Click here to return to the 'Use Fink's xorg package to bring X11 windows forward' hint
The following comments are owned by whoever posted them. This site is not responsible for what they say.
Use Fink's xorg package to bring X11 windows forward
Authored by: britrock on Sep 08, '05 01:02:03PM

It looks like its a wee bit more complicated than that. It seems that the xorg package is in fink unstable, so you'll have to reconfigure fink to allow access to the unstable tree.

I am trying to install it right now with darwin ports. I'll post another comment when done to let you all know how it went.



[ Reply to This | # ]
Use Fink's xorg package to bring X11 windows forward
Authored by: wr0ngway on Sep 08, '05 03:33:56PM
Thanks for the tip!

I installed xorg from fink unstable (see below) and command-tab does indeed bring the X11 app to the foreground now. Still doesn't allow me to cycle between mutliple X11 apps using command-tab though, is there a way to have each X11 app show up as a separate item in the command-tab list?

Setup fink unstable as documented here (takes a looooong time as it has to buildx org from sources):

[ Reply to This | # ]

Use Fink's xorg package to bring X11 windows forward
Authored by: merlyn on Sep 09, '05 09:53:26AM

The X11 server (responsible for drawing on the screen) sees each window as a separate client thread, and so it has no idea which "windows" belong to an "application". Therefore, there can't be any coordinated window locating or mapping, except with the cooperation of the client app itself.

Unless they snuck in something on me when I wasn't looking.



[ Reply to This | # ]
Menu item and hotkey
Authored by: djinn on Sep 08, '05 01:48:56PM

In my version of the X11 application (Tiger.2), there's a menu item "Bring all to front" in the Window menu. It woefully doesn't have an hotkey defined by default.

Since I use it all the time to bring all the gimp windows to the front, I assigned a hotkey to it using the Interface Builder.

To do it, "Show package content" of the X11 app, then go to the Contents/Resources/English.lproj folder. Then open main.nib with Interface Builder. Open MainMenu, go to the Window menu, select "Bring All to Front" and open the inspector (shift-command-I or menu/Tools/Show Inspector). Then in "Key equivalent" put the character you want as an hotkey, modify the modifier keys (default is command), and save. You're done - once you restart X11. Interface Builder also saves a backup by default.

If you, like me, are not english, you have to modify your language's data, but if you just replace in the above instructions "English.lproj" with "XXX.lproj", you'll get an error, because the other language packs miss some data to be opened with interface builder. So, first open English.lproj/main.nib (Show package content), and copy to your language's main.nib the files "classes.nib" and "info.nib".



[ Reply to This | # ]
Menu item and hotkey
Authored by: vykor on Sep 08, '05 02:20:22PM

Or you could just do it directly from System Preferences.app, if you don't have Developer Tools installed or don't like fiddling with nib files on your own.

In System Preferences -> Keyboard & Mouse, pick the Keyboard Shortcuts tab. Hit the plus button to bring up the assignment dialog, select Other... -> X11.app from the Application drop down menu, type in "Bring All to Front" as the menu title, and then just assign the keyboard shortcut you want by typing into the Shortcut box.

Close X11.app and reopen. The shortcut should be active now.



[ Reply to This | # ]
Menu item and hotkey
Authored by: djinn on Sep 08, '05 06:00:54PM

thanks!



[ Reply to This | # ]
Menu item and hotkey
Authored by: rjbailey on Sep 08, '05 02:25:37PM

Better yet: define a keyboard shortcut in System Preferences. I hadn't used this before. Now F13 brings all the windows to the front. (I'd still rather not have to hit anything...)



[ Reply to This | # ]
Mine works ok...
Authored by: caesurae on Sep 08, '05 03:41:51PM

is this a 10.4.x/Tiger bug?

my copy of Apple's X11 application (v1.0.1) brings all of it's windows forward when chosen via Command-Tab...seems to work just fine. i can type into the frontmost X11 window immediately after switching.

i'm running OS X 10.3.9/Panther (Build 7W98).

i wonder if it could be a matter of having the right variables defined in ~/.xinitrc, ~/.Xresources, ~/.MacOSX/environment.plist, or some other config file.

*shrug*



[ Reply to This | # ]
Mine works ok...
Authored by: nathanw on Sep 08, '05 05:40:53PM

Yes, it's a bug that was introduced in 10.4. It worked fine in 10.3 and 10.2.



[ Reply to This | # ]
Use Fink's xorg package to bring X11 windows forward
Authored by: speir on Sep 08, '05 04:22:50PM

Another X11 window work around, albeit not a keyboard shortcut, is Expose. If you have a multi-button mouse, assign one as an Expose activator (e.g. Kensington Mouseworks). This allows you to quickly bring the specific X11 app you want to the foreground (i.e. if you have multiple X11 apps open, you can chose between them at the same time, same for all other apps as well).



[ Reply to This | # ]
Keyboard Maestro
Authored by: ennisdb on Sep 08, '05 06:31:20PM

Also, consider Keyboard Maestro. There is a control-tab app switch that works properly with all apps, including X11. Call me happy.



[ Reply to This | # ]
Use Fink's xorg package to bring X11 windows forward
Authored by: protoplasm on Sep 08, '05 04:57:27PM

Have you tried ctrl-tab instead of command-tab when switching between X11 apps?



[ Reply to This | # ]
Use Fink's xorg package to bring X11 windows forward
Authored by: afb on Sep 09, '05 12:44:02AM

It's not as convenient as cmd+tab, but using LaunchBar for app switching does make X11 windows in 10.4 come forward correctly.



[ Reply to This | # ]
Finding the quartz-wm package
Authored by: cobbe on Sep 09, '05 09:17:53PM

I ran into some problems when I tried this myself. With the help of some friendly folks on the fink-users list, I figured out the difficulty; I thought I'd pass this along to others in case it might be useful.

I normally track fink stable using the rsync update method. I didn't want to switch to unstable for this, so I figured I'd do a "fink selfupdate-cvs", copy the necessary files into /sw/fink/dists/local/whatever, and off I'd go. When I went to do this, though, I couldn't find quartz-wm.info.

This is because the quartz-wm package is described in applex11tools.info, as well as two or three other packages. The fink page for the quartz-wm package does suggest this; note that the "Parent" field is "applex11tools".

I'm just about to start building everything; we'll see how well this works.



[ Reply to This | # ]
Finding the quartz-wm package
Authored by: cobbe on Sep 09, '05 10:35:56PM

Well, the installation worked fine, but I'm still going back to Apple's X11.app. XDarwin intercepts cmd-W and cmd-Q to mean close-window and close-application, respectively (though if you hit cmd-Q, XDarwin will ask for confirmation if you have any open clients). These interfere with some fairly common keybindings (meta-W, meta-Q) in Emacs, which I use all the time.

I could, in theory, muck about with xmodmap and use option for meta instead of command. But my hands are too used to using command for meta, and I really don't want to deal with the frustration of killing my emacs buffer (repeatedly) when I really want to save the current region to the kill ring. (That's "copy" for those of you out there who don't use Emacs.)

The cmd-tab bug in Apple's X11 is annoying, but nowhere near as annoying to me as the interception of cmd. Oh, well; it was worth a try.



[ Reply to This | # ]
Use Fink's xorg package to bring X11 windows forward
Authored by: jacquesravel on Sep 10, '05 09:33:15PM

Command-Tab doesn't work, but if you hit command-tab to get to X11, then Command-Tab again and while still holding command, hit the key ~, then you go back to X11 and bring all the X11 windows to the front. You'll need to get used to it, but it is a simple work around.



[ Reply to This | # ]
Use Fink's xorg package to bring X11 windows forward
Authored by: chris_on_hints on Sep 15, '05 09:56:07AM

this is the same behaviour i get when clicking on the X11 dock icon. one click selects the app (no windows come forward) then a second click brings all windows forward.

hmmm.... maybe one for the 500 bug-fixes coming in 10.4.3?



[ Reply to This | # ]
Use Fink's xorg package to bring X11 windows forward
Authored by: ps on Sep 12, '05 09:07:39AM

I use LiteswitchX from Proteron http://www.proteron.com/liteswitchx to fix this problem.
LiteswitchX works and solves this annoying problem.



[ Reply to This | # ]
Speed ?
Authored by: Johnny_B on Sep 13, '05 05:29:34PM

Is Xorg faster ?



[ Reply to This | # ]
Use Fink's xorg package to bring X11 windows forward
Authored by: paperwings on Sep 15, '05 09:42:12AM

Someone mentioned that they would try this with Darwinports. Was this successful?



[ Reply to This | # ]