Improvements to provided scripts (Resolves #549551)

This commit is contained in:
Matej Cepl 2010-01-29 09:33:32 +00:00
parent 1d9d1cc2ac
commit ae42efc48b
4 changed files with 14 additions and 11 deletions

View File

@ -8,8 +8,8 @@
# along with this program; if not, write to the Free Software
# Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
GSESSION="$(which gnome-session 2>/dev/null)"
STARTKDE="$(which startkde 2>/dev/null)"
GSESSION="$(type -p gnome-session)"
STARTKDE="$(type -p startkde)"
# check to see if the user has a preferred desktop
PREFERRED=
@ -39,7 +39,7 @@ fi
# We should also support /etc/X11/xinit/Xclients.d scripts
XCLIENTS_D=/etc/X11/xinit/Xclients.d
if [ -d "$XCLIENTS_D" -a "$#" -eq 1 -a -x "$XCLIENTS_D/Xclients.$1.sh" ]; then
if [ "$#" -eq 1 ] && [ -x "$XCLIENTS_D/Xclients.$1.sh" ]; then
exec -l $SHELL -c "$SSH_AGENT $XCLIENTS_D/Xclients.$1.sh"
fi
@ -56,8 +56,6 @@ rm -f $HOME/Xrootenv.0
if [ -x /usr/bin/xclock ] ; then
/usr/bin/xclock -geometry 100x100-5+5 &
elif [ -x /usr/bin/xclock ] ; then
/usr/bin/xclock -geometry 100x100-5+5 &
fi
if [ -x /usr/bin/xterm ] ; then
/usr/bin/xterm -geometry 80x50-50+150 &

View File

@ -40,7 +40,7 @@ SWITCHDESKPATH=/usr/share/switchdesk
# and hard coded window managers and desktop environments will be removed from
# this script.
XCLIENTS_D=/etc/X11/xinit/Xclients.d
if [ -d "$XCLIENTS_D" -a "$#" -eq 1 -a -x "$XCLIENTS_D/Xclients.$1.sh" ]; then
if [ "$#" -eq 1 ] && [ -x "$XCLIENTS_D/Xclients.$1.sh" ]; then
exec -l $SHELL -c "$CK_XINIT_SESSION $SSH_AGENT $XCLIENTS_D/Xclients.$1.sh"
else
# now, we see if xdm/gdm/kdm has asked for a specific environment

View File

@ -1,4 +1,3 @@
#!/bin/bash
# Copyright (C) 1999 - 2004 Red Hat, Inc. All rights reserved. This
# copyrighted material is made available to anyone wishing to use, modify,
# copy, or redistribute it subject to the terms and conditions of the
@ -56,7 +55,7 @@ done
# Prefix launch of session with ssh-agent if available and not already running.
SSH_AGENT=
if [ -x /usr/bin/ssh-agent -a -z "$SSH_AGENT_PID" ]; then
if [ -z "$SSH_AGENT_PID" ] && [ -x /usr/bin/ssh-agent ]; then
if [ "x$TMPDIR" != "x" ]; then
SSH_AGENT="/usr/bin/ssh-agent /bin/env TMPDIR=$TMPDIR"
else
@ -65,6 +64,6 @@ if [ -x /usr/bin/ssh-agent -a -z "$SSH_AGENT_PID" ]; then
fi
CK_XINIT_SESSION=
if [ -x /usr/bin/ck-xinit-session -a -z "$XDG_SESSION_COOKIE" ]; then
if [ -z "$XDG_SESSION_COOKIE" ] && [ -x /usr/bin/ck-xinit-session ]; then
CK_XINIT_SESSION="/usr/bin/ck-xinit-session"
fi

View File

@ -41,7 +41,6 @@ Requires: xauth
Requires: coreutils
Requires: xorg-x11-server-utils
Requires: ConsoleKit-x11
Requires: which
# NOTE: Most of the xinitrc scripts/config files are now in xorg-x11-xinit,
# so the xinitrc package became unnecessary. The xdm configs/scripts move
@ -90,7 +89,9 @@ install -m644 -D $RPM_SOURCE_DIR/xinit-compat.desktop $RPM_BUILD_ROOT%{_datadir}
# Install Red Hat custom xinitrc, etc.
{
for script in %{SOURCE10} %{SOURCE11} %{SOURCE12} %{SOURCE16} ; do
install -m 644 %{SOURCE10} $RPM_BUILD_ROOT%{_sysconfdir}/X11/xinit/xinitrc-common
for script in %{SOURCE11} %{SOURCE12} %{SOURCE16} ; do
install -m 755 $script $RPM_BUILD_ROOT%{_sysconfdir}/X11/xinit/${script##*/}
done
@ -131,6 +132,11 @@ rm -rf $RPM_BUILD_ROOT
%{_datadir}/xsessions/xinit-compat.desktop
%changelog
* Tue Dec 22 2009 Ville Skyttä <ville.skytta@iki.fi>
- Eliminate dependency on which.
- Change Xclients, Xsession and xinitrc-common to make fewer stat calls.
- Install xinitrc-common non-executable.
* Tue Nov 10 2009 Matěj Cepl <mcepl@redhat.com> - 1.0.9-13
- Fix SELinux labels on $errfile (fixes bug# 530419)