Simulate a built-in X11 server package

Apr 28, '03 09:31:00AM

Contributed by: twalther

I personally hate having to specifically start Apple's X11 when I log into a machine, and in a lab administration setting, it is not ideal either. Here's how to make X11 Beta 3 run in the background of 10.2.5, invisible to the user. It's a collection of known hints and tricks. NOTE: This will affect all users on a machine.

  1. Turn off X11's Quit Warning Dialog Box. Type defaults write com.apple.x11 no_quit_alert true in a Terminal.

  2. Make X11 run without dock icon or menu bar. If you have the OS X Developer Tools installed:

    1. Control-click on X11.app in the Finder and select "Show Package Contents"
    2. Open Contents and open "Info.plist" in Property List Editor.
    3. Open root and click "New Sibling" with Property "LSUIElement" and String "1" as the value.
    4. Save and quit.

  3. (Optional) If you don't have a .xinitrc file, get one. Type cp /etc/X11/xinit/xinitrc ~/.xinitrc to copy an existing one.

  4. (Optional) Modify the .xinitrc file to lose startup programs. Type pico ~/.xinitrc in Terminal. Go down to where it says start some nice programs and put a # in front of xterm & (Result: # xterm &).

  5. Enable Terminal to open X11 apps. Type cat >> ~/.login and hit return in Terminal. Then type setenv DISPLAY :0 and hit return, then hit Control-D.

  6. Add X11 to the user's Startup Items, or implement a login hook to do so (see previous hint).

  7. Log out and log in, then try running an X11 program from Terminal.
[robg adds: I have not tested this one myself...]

Comments (5)


Mac OS X Hints
http://hints.macworld.com/article.php?story=20030424014422259