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

Prevent accidental quits from Apple's X11 Apps
After accidentally quitting Tiger's X11 client with no warning -- losing the contents of several important windows -- I was annoyed to find no preference setting to prevent this from happening. Fortunately there are two solutions. Either one should help, but there's no harm in doing both.
  1. Quit X11, then in Terminal.app, type defaults write com.apple.x11 "no_quit_alert" false and press Return. Restart X11, and the the next time you try to quit X11.app, you'll be asked to confirm that you want to quit. I'm not sure what the default is; in my case it was set to "false.")

  2. Remove Command-Q from the File menu. In the Finder, select the X11 program, control- or right-click, and select "Show Package Contents." Then (if you have Developer Tools installed), double click on Contents -> Resources -> English.lproj -> main.nib to open Interface Builder, and you can delete the command-Q from the File menu in the X11 main menu.
Once doing either/both of the above, you'll no longer accidentally quite Apple's X11 app.

[robg adds: My Tiger X11 client already provides this warning if I try to quit, and when I checked the existing settings via defaults read com.apple.x11, I found only one entry ("done_xinit_check" = 1;). A much older hint explains how to disable this quit dialog as well, so it seems this has been the default setting for quite a while. If you're looking for other solutions, here's a third workaround: just use the Keyboard & Mouse preferences panel to change the Quit key assignment in X11 to Control-Command-Q (or something similarly obscure).

I'm not sure how the poster's settings got tweaked, but if you don't receive the warning, this hint will fix the problem.]
    •    
  • Currently 1.20 / 5
  You rated: 1 / 5 (5 votes cast)
 
[6,602 views]  

Prevent accidental quits from Apple's X11 | 2 comments | Create New Account
Click here to return to the 'Prevent accidental quits from Apple's X11' hint
The following comments are owned by whoever posted them. This site is not responsible for what they say.
Prevent accidental quits from Apple's X11
Authored by: wgscott on Sep 19, '05 10:22:58AM

Another thing you can do is disable the menu and dock icon completely. Have X11 launch automatically when you log in, and just launch stuff from the command line or some other launching utility.



[ Reply to This | # ]
Prevent accidental quits from Apple's X11
Authored by: fivefifty on Sep 19, '05 11:53:48AM

Just make sure Terminal.app is setup properly for X11. I think all you need is the following lines in .bash_profile:

if [ ! $DISPLAY ] ; then
export DISPLAY=:0.0
fi



[ Reply to This | # ]