If you have both Apple's X11 and XDarwin installed, this chunk of code should be of use. It will choose the correct window manager (quartz-wm for X11 or twm for XDarwin) when you start X.
Make sure your .xinitrc shell uses sh or bash if you choose to use this code snippet. Replace your window manager invocation in .xinitrc with:
Make sure your .xinitrc shell uses sh or bash if you choose to use this code snippet. Replace your window manager invocation in .xinitrc with:
pid=$(cat /tmp/.X0-lock)[Editor's note: I have not tested this myself...]
if [ $pid -ne 0 ] ; then
isxdarwin=$(ps -p $pid | grep XDarwin)
isxdarwin=$?
if [ $isxdarwin -eq 0 ] ; then
# we've got XDarwin ...
twm &
#/sw/bin/blackbox &
else
# We've probably got native X11
/usr/X11R6/bin/quartz-wm &
fi
fi
•
[6,113 views]

