Le 15/04/2010 03:54, Jeremy Huddleston a écrit :
> Since we're on the subject of xinit...
> 
> Apple uses an xinitrc.d for modularizing xinitrc (you can see this in some 
> #ifdef __APPLE__ magic) ... is this something we should enable for other 
> architectures?  It's been useful here.

Yeah, we use it too, but in a slightly different way. Here's the patch
we apply.

Cheers,

Rémi
>From 4f039767273b60f9a1a24867db0988d46abe5972 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?R=C3=A9mi=20Cardona?= <[email protected]>
Date: Tue, 8 Dec 2009 15:22:13 +0100
Subject: [PATCH] Gentoo-specific customizations

---
 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

_______________________________________________
[email protected]: X.Org development
Archives: http://lists.x.org/archives/xorg-devel
Info: http://lists.x.org/mailman/listinfo/xorg-devel

Reply via email to