Welcome to the MacNN Forums.

If this is your first visit, be sure to check out the FAQ by clicking the link above. You may have to register before you can post: click the register link above to proceed. To start viewing messages, select the forum that you want to visit from the selection below.

You are here: MacNN Forums > Software - Troubleshooting and Discussion > Mac OS X > XDarwin and Apple's X11 with same .xinitrc

XDarwin and Apple's X11 with same .xinitrc
Thread Tools
Senior User
Join Date: Apr 2000
Location: Woodridge, IL
Status: Offline
Reply With Quote
Feb 4, 2003, 11:23 AM
 
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?
(Last edited by diamondsw; Feb 5, 2003 at 09:33 AM. )
     
Fresh-Faced Recruit
Join Date: Sep 2002
Location: Sydney, Australia
Status: Offline
Reply With Quote
Feb 4, 2003, 10:57 PM
 
well, as i am too lazy to try to figure out what is going on in your script , i'll just show you my .xinitrc (which basically does the same thing)...

---

xdar="`ps xo command | grep XDarwin.app | grep -v grep | wc -l`"

if [ $xdar -eq 1 ]; then
exec blackbox
else
exec quartz-wm
fi

---

cheers
     
Senior User
Join Date: Apr 2000
Location: Woodridge, IL
Status: Offline
Reply With Quote
Feb 5, 2003, 09:35 AM
 
That worked perfectly, and I even understand it all to boot. X11 and XDarwin are now happily running on the same .xinitrc. Just have to fire up the proper app. Hmmm.... wonder if I can run XDarwin from the console now?
     
   
Thread Tools
Forum Links
Forum Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts
BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On
Top
Privacy Policy
All times are GMT -5. The time now is 12:32 PM.
All contents of these forums © 1995-2011 MacNN. All rights reserved.
Branding + Design: www.gesamtbild.com
vBulletin v.3.8.7 © 2000-2011, Jelsoft Enterprises Ltd., Content Relevant URLs by vBSEO 3.3.2