Hello, everyone. Thanks to the help here I've gotten both Apple's X11 and XDarwin coexisting. However, tips on how to use a single xinitrc file aren't working thus far. Here's the history:
1) Installed Apple's X11. Changed my xinitrc to fire up /usr/X11R6/bin/quartz-wm. Worked fine.
2) Installed the XDarwin 4.2.1.1 Update which gave me the XDarwin application. Restored original xdm from Apple's X11 over the XDarwin installed one. Restored the /usr/X11R6/bin/XDarwin* files from backup. Changed xinitrc back to twm and xterm as before. XDarwin works fine.
3) After verifying that both Apple's X11 and XDarwin work fine with their own window managers in the xinitrc, tried to use tips to create an xinitrc that determines which one is launched and acts accordingly - this hasn't worked.
So, in a nutshell, as long as I continue modifying xinitrc before I launch X11, everything works fine. Here's the script I was using to try to select the proper window manager based on the X11 environment (code from forums, comments mine, and for some reason the forums won't post my indentation):
# Start the proper window manager and programs
# Find out if X11 is running
pid=$(cat /tmp/.X0-lock)
if [ $pid -ne 0 ] ; then
# Determine if "XDarwin" is part of the process name
isxdarwin=$(ps -p $pid | grep XDarwin)
isxdarwin=$?
if [ $isxdarwin -eq 0 ] ; then
# XDarwin
twm &
xterm -geometry 120x50+5+5 -name login
#exec gnome-session --no-xshm
#/sw/bin/startkde
else
# Apple X11
/usr/X11R6/bin/quartz-wm &
fi
fi
Now, I think I understand what it's doing, but I'm at a loss as to why it's failing. Probably something tiny - any insights?