Submit Hint Search The Forums LinksStatsPollsHeadlinesRSS
14,000 hints and counting!

An xinitrc file for Apple's X11 and XDarwin UNIX
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:
pid=$(cat /tmp/.X0-lock)
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
[Editor's note: I have not tested this myself...]
    •    
  • Currently 1.00 / 5
  • 1
  • 2
  • 3
  • 4
  • 5
  (1 vote cast)
 
[6,061 views]  

An xinitrc file for Apple's X11 and XDarwin | 2 comments | Create New Account
Click here to return to the 'An xinitrc file for Apple's X11 and XDarwin' hint
The following comments are owned by whoever posted them. This site is not responsible for what they say.
Another way...
Authored by: DaphneDiane on Jan 23, '03 12:47:50AM
I find following .xinitrc stuff works well and actually keys off the difference between the two X11 servers. Apparently Apple's X11 using an "Apple-DRI" extension for quartz-wm to talk to, so I just check for this...
if /usr/X11R6/bin/xdpyinfo | /usr/bin/grep -q Apple-DRI; then
    # Using Apple's server
    /usr/X11R6/bin/quartz-wm
else
    # Using XDarwin or another server
    /sw/bin/startkde
fi


[ Reply to This | # ]
An xinitrc file for Apple's X11 and XDarwin
Authored by: hedgies4all on Nov 08, '03 04:54:44PM
Hmm... It doesn't seem to work for me. I have everything set up following instructions I found here- but the xinitrc file there doesn't work for me either. XDarwin now exits when I open it. Apple's X11 opens, but I had to add a quartz-wm item to the applications menu. Any ideas?

[ Reply to This | # ]