[PATCH] Gentoo-specific customizations

Rémi Cardona remi at gentoo.org
Tue Dec 8 06:22:13 PST 2009


---
 xinitrc.cpp |   29 +++++++++++++++++------------
 1 files changed, 17 insertions(+), 12 deletions(-)

diff --git a/xinitrc.cpp b/xinitrc.cpp
index 379b1f3..159f294 100644
--- a/xinitrc.cpp
+++ b/xinitrc.cpp
@@ -2,8 +2,8 @@ XCOMM!SHELL_CMD
 
 userresources=$HOME/.Xresources
 usermodmap=$HOME/.Xmodmap
-sysresources=XINITDIR/.Xresources
-sysmodmap=XINITDIR/.Xmodmap
+sysresources=XINITDIR/Xresources
+sysmodmap=XINITDIR/Xmodmap
 
 XCOMM merge in defaults and keymaps
 
@@ -84,19 +84,24 @@ fi
 XCOMM This is the fallback case if nothing else is executed above
 #endif /* !defined(__SCO__)  && !defined(__UNIXWARE__) */
 
-#ifdef __APPLE__
+if [ -n "`/etc/X11/chooser.sh`" ]; then
+	command="`/etc/X11/chooser.sh`"
+else
+	failsafe="yes"
+fi
 
 if [ -d XINITDIR/xinitrc.d ] ; then
-	for f in XINITDIR/xinitrc.dXSLASHGLOB.sh ; do
+	for f in XINITDIR/xinitrc.dXSLASHGLOB ; do
 		[ -x "$f" ] && . "$f"
 	done
 	unset f
 fi
-
-#endif
-
-TWM &
-XCLOCK -geometry 50x50-1+1 &
-XTERM -geometry 80x50+494+51 &
-XTERM -geometry 80x20+494-0 &
-exec XTERM -geometry 80x66+0+0 -name login
+if [ -n "$failsafe" ]; then
+	TWM &
+	XCLOCK -geometry 50x50-1+1 &
+	XTERM -geometry 80x50+494+51 &
+	XTERM -geometry 80x20+494-0 &
+	exec XTERM -geometry 80x66+0+0 -name login
+else
+	exec $command
+fi
-- 
1.6.5.5


--------------050501020501080306090402--


More information about the xorg-devel mailing list