Pick of the Week - Nov 10 [Show all picks]
Path Finder 5 - A feature-laden Finder replacement
Submit Hint Search The Forums LinksStatsPollsFAQHeadlinesRSS
12,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 0.00 / 5
  • 1
  • 2
  • 3
  • 4
  • 5
  (0 votes cast)
 
[4,594 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 whomever posted them. This site is not responsible for what they say.
Prevent accidental quits from Apple's X11
Authored by: wgscott on Mon, Sep 19 2005 at 10:22AM PDT
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 Mon, Sep 19 2005 at 11:53AM PDT
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 | # ]