From afece66c47e376d2417e1b4970c751be3ed416eb Mon Sep 17 00:00:00 2001 From: Ray Strode Date: Mon, 4 Feb 2008 18:49:27 +0000 Subject: [PATCH] - don't special case dbus-launch. dbus-x11 now installs a script into /etc/X11/xinit/xinitrc.d. - Drop the weird grep rule for extensions ending in .sh when sourcing /etc/X11/xinit/xinitrc.d --- Xsession | 18 +++++++++--------- xinitrc | 4 ++-- xinitrc-common | 7 ------- xorg-x11-xinit.spec | 13 ++++++++++++- 4 files changed, 23 insertions(+), 19 deletions(-) diff --git a/Xsession b/Xsession index 7194442..0a4f4bf 100644 --- a/Xsession +++ b/Xsession @@ -40,7 +40,7 @@ SWITCHDESKPATH=/usr/share/switchdesk # this script. XCLIENTS_D=/etc/X11/xinit/Xclients.d if [ -d "$XCLIENTS_D" -a "$#" -eq 1 -a -x "$XCLIENTS_D/Xclients.$1.sh" ]; then - exec -l $SHELL -c "$SSH_AGENT $DBUS_LAUNCH $XCLIENTS_D/Xclients.$1.sh" + exec -l $SHELL -c "$SSH_AGENT $XCLIENTS_D/Xclients.$1.sh" else # now, we see if xdm/gdm/kdm has asked for a specific environment case $# in @@ -54,22 +54,22 @@ case $# in exec -l $SHELL -c "xterm -geometry 80x24-0-0" ;; gnome) - exec -l $SHELL -c "$SSH_AGENT $DBUS_LAUNCH gnome-session" - exec $SSH_AGENT /bin/sh -c "exec -l $SHELL -c \"$DBUS_LAUNCH gnome-session\"" + exec -l $SHELL -c "$SSH_AGENT gnome-session" + exec $SSH_AGENT /bin/sh -c "exec -l $SHELL -c \"gnome-session\"" ;; kde|kde1|kde2) - exec $SSH_AGENT /bin/sh -c "exec -l $SHELL -c \"$DBUS_LAUNCH startkde\"" + exec $SSH_AGENT /bin/sh -c "exec -l $SHELL -c \"startkde\"" ;; twm) # fall back to twm - exec $SSH_AGENT /bin/sh -c "exec -l $SHELL -c \"DBUS_LAUNCH twm\"" + exec $SSH_AGENT /bin/sh -c "exec -l $SHELL -c \"twm\"" ;; *) # GDM provies either a command line as the first argument or # provides 'failsafe', 'default' or 'custom'. KDM will do the # same at some point if [ "$1" != "default" -a "$1" != "custom" ]; then - exec $SSH_AGENT /bin/sh -c "exec -l $SHELL -c \"$DBUS_LAUNCH $1\"" + exec $SSH_AGENT /bin/sh -c "exec -l $SHELL -c \"$1\"" fi ;; esac @@ -78,11 +78,11 @@ fi # otherwise, take default action if [ -x "$HOME/.xsession" ]; then - exec -l $SHELL -c "$SSH_AGENT $DBUS_LAUNCH $HOME/.xsession" + exec -l $SHELL -c "$SSH_AGENT $HOME/.xsession" elif [ -x "$HOME/.Xclients" ]; then - exec -l $SHELL -c "$SSH_AGENT $DBUS_LAUNCH $HOME/.Xclients" + exec -l $SHELL -c "$SSH_AGENT $HOME/.Xclients" elif [ -x /etc/X11/xinit/Xclients ]; then - exec -l $SHELL -c "$SSH_AGENT $DBUS_LAUNCH /etc/X11/xinit/Xclients" + exec -l $SHELL -c "$SSH_AGENT /etc/X11/xinit/Xclients" else # should never get here; failsafe fallback exec -l $SHELL -c "xsm" diff --git a/xinitrc b/xinitrc index 8d552a0..39e5b10 100755 --- a/xinitrc +++ b/xinitrc @@ -18,10 +18,10 @@ # The user may have their own clients they want to run. If they don't, # fall back to system defaults. if [ -f $HOME/.Xclients ]; then - exec $CK_XINIT_SESSION $SSH_AGENT $DBUS_LAUNCH $HOME/.Xclients || \ + exec $CK_XINIT_SESSION $SSH_AGENT $HOME/.Xclients || \ exec $CK_XINIT_SESSION $SSH_AGENT $HOME/.Xclients elif [ -f /etc/X11/xinit/Xclients ]; then - exec $CK_XINIT_SESSION $SSH_AGENT $DBUS_LAUNCH /etc/X11/xinit/Xclients || \ + exec $CK_XINIT_SESSION $SSH_AGENT /etc/X11/xinit/Xclients || \ exec $CK_XINIT_SESSION $SSH_AGENT /etc/X11/xinit/Xclients else # Failsafe settings. Although we should never get here diff --git a/xinitrc-common b/xinitrc-common index c8c269e..db32b5a 100644 --- a/xinitrc-common +++ b/xinitrc-common @@ -51,11 +51,7 @@ unset XKB_IN_USE # run all system xinitrc shell scripts. for file in /etc/X11/xinit/xinitrc.d/* ; do - if echo $file | grep -q "\.sh$" ; then . $file - else - echo "warning: $file does not end in .sh extension, ignoring" - fi done # Prefix launch of session with ssh-agent if available and not already running. @@ -68,8 +64,5 @@ if [ -x /usr/bin/ssh-agent -a -z "$SSH_AGENT_PID" ]; then fi fi -DBUS_LAUNCH= -[ -x /usr/bin/dbus-launch -a -z "$DBUS_SESSION_BUS_ADDRESS" ] && DBUS_LAUNCH="/usr/bin/dbus-launch --exit-with-session" - CK_XINIT_SESSION= [ -x /usr/bin/ck-xinit-session ] && CK_XINIT_SESSION="/usr/bin/ck-xinit-session" diff --git a/xorg-x11-xinit.spec b/xorg-x11-xinit.spec index b564673..ef28ad2 100644 --- a/xorg-x11-xinit.spec +++ b/xorg-x11-xinit.spec @@ -3,7 +3,7 @@ Summary: X.Org X11 X Window System xinit startup scripts Name: xorg-x11-%{pkgname} Version: 1.0.7 -Release: 2%{?dist} +Release: 3%{?dist} License: MIT/X11 Group: User Interface/X URL: http://www.x.org @@ -49,6 +49,11 @@ Obsoletes: XFree86, xorg-x11 # to the xdm package. Obsoletes: xinitrc +# We don't explicitly run dbus-launch anymore. We depend on a dbus new enough +# that it installs its own .sh file in xinitrc.d to launch itself at session +# startup. +Conflicts: dbus < 1.1.4-3.fc9 + %description X.Org X11 X Window System xinit startup scripts @@ -115,6 +120,12 @@ rm -rf $RPM_BUILD_ROOT %{_mandir}/man1/xinit.1* %changelog +* Mon Feb 4 2008 Ray Strode 1.0.7-3 +- don't special case dbus-launch. dbus-x11 now installs + a script into /etc/X11/xinit/xinitrc.d. +- Drop the weird grep rule for extensions ending in .sh + when sourcing /etc/X11/xinit/xinitrc.d + * Fri Oct 12 2007 Nalin Dahyabhai 1.0.7-2 - Try opening the console-kit session after the user's UID has already been granted access to the server by localuser.sh, so that console-kit-daemon