Make startx work properly with Apple's X11

May 20, '03 09:41:00AM

Contributed by: discordantus

If you are used to launching X11 from the terminal via startx, you may have noticed that it does not seem to start Apple's X11 very nicely. It removes all the good stuff from the menubar, and gives it a generic document icon in the Dock. At first I just used open -a X11 as a workaround, but if you do that you don't see the X11 startup information.

My solution was to alias startx to /Applications/X11.app/Contents/MacOS/X11. X will still run your .xinitrc file, and it will start up with the full Apple GUI features enabled.

If you use zsh or bash, add this line to your .zshrc or .bashrc file:

  alias startx="/Applications/X11.app/Contents/MacOS/X11"
If you use tcsh or csh, add this line to your .cshrc or .tcshrc file:
  alias startx /Applications/X11.app/Contents/MacOS/X11
If you don't have a .[your-shell-here]rc file in our home directory, just create an empty file with that name and stick that line in it.

Comments (5)


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