- Added Xsession script from xinitrc, as it is very similar codebase, which
shares "xinitrc-common" anyway, and all of the display managers use it.
This commit is contained in:
parent
b419356891
commit
451f77ca50
94
Xsession
Normal file
94
Xsession
Normal file
@ -0,0 +1,94 @@
|
|||||||
|
#!/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
|
||||||
|
# GNU General Public License version 2.
|
||||||
|
#
|
||||||
|
# You should have received a copy of the GNU General Public License
|
||||||
|
# along with this program; if not, write to the Free Software
|
||||||
|
# Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
|
||||||
|
|
||||||
|
# redirect errors to a file in user's home directory if we can
|
||||||
|
if [ -z "$GDMSESSION" ]; then
|
||||||
|
# GDM redirect output itself in a smarter fashion
|
||||||
|
errfile="$HOME/.xsession-errors"
|
||||||
|
if cp /dev/null "$errfile" 2> /dev/null ; then
|
||||||
|
chmod 600 "$errfile"
|
||||||
|
exec > "$errfile" 2>&1
|
||||||
|
else
|
||||||
|
errfile=$(mktemp -q /tmp/xses-$USER.XXXXXX)
|
||||||
|
if [ $? -eq 0 ]; then
|
||||||
|
exec > "$errfile" 2>&1
|
||||||
|
fi
|
||||||
|
fi
|
||||||
|
fi
|
||||||
|
|
||||||
|
if ! printenv PATH | grep -q /usr/X11R6/bin
|
||||||
|
then
|
||||||
|
PATH="${PATH}":/usr/X11R6/bin
|
||||||
|
fi
|
||||||
|
|
||||||
|
SWITCHDESKPATH=/usr/share/switchdesk
|
||||||
|
|
||||||
|
# Mandatorily source xinitrc-common, which is common code shared between the
|
||||||
|
# Xsession and xinitrc scripts which has been factored out to avoid duplication
|
||||||
|
. /etc/X11/xinit/xinitrc-common
|
||||||
|
|
||||||
|
# This Xsession.d implementation, is intended to obsolte and replace the
|
||||||
|
# various mechanisms present in the 'case' statement which follows, and to
|
||||||
|
# eventually be able to easily remove all hard coded window manager specific
|
||||||
|
# content from this script. See bug #142260 for additional explanation and
|
||||||
|
# details. All window manager rpm packages and desktop environment
|
||||||
|
# packages should be modified to provide the Xsession.d/Xsession.$wm scripts
|
||||||
|
# to start themselves up. In the future, the legacy switchdesk mechanisms
|
||||||
|
# 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
|
||||||
|
exec -l $SHELL -c "$SSH_AGENT $DBUS_LAUNCH $XCLIENTS_D/Xclients.$1.sh"
|
||||||
|
else
|
||||||
|
# now, we see if xdm/gdm/kdm has asked for a specific environment
|
||||||
|
case $# in
|
||||||
|
1)
|
||||||
|
if [ -x "$SWITCHDESKPATH/Xclients.$1" ]; then
|
||||||
|
exec -l $SHELL -c "$SWITCHDESKPATH/Xclients.$1";
|
||||||
|
fi;
|
||||||
|
|
||||||
|
case "$1" in
|
||||||
|
failsafe)
|
||||||
|
exec -l $SHELL -c "xterm -geometry 80x24-0-0"
|
||||||
|
;;
|
||||||
|
gnome)
|
||||||
|
exec -l $SHELL -c "$SSH_AGENT $DBUS_LAUNCH gnome-session"
|
||||||
|
;;
|
||||||
|
kde|kde1|kde2)
|
||||||
|
exec -l $SHELL -c "$SSH_AGENT $DBUS_LAUNCH $SWITCHDESKPATH/Xclients.kde"
|
||||||
|
;;
|
||||||
|
twm)
|
||||||
|
# fall back to twm
|
||||||
|
exec -l $SHELL -c "$SSH_AGENT $DBUS_LAUNCH $SWITCHDESKPATH/Xclients.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 -l $SHELL -c "$SSH_AGENT $DBUS_LAUNCH $1"
|
||||||
|
fi
|
||||||
|
;;
|
||||||
|
esac
|
||||||
|
esac
|
||||||
|
fi
|
||||||
|
|
||||||
|
# otherwise, take default action
|
||||||
|
if [ -x "$HOME/.xsession" ]; then
|
||||||
|
exec -l $SHELL -c "$SSH_AGENT $DBUS_LAUNCH $HOME/.xsession"
|
||||||
|
elif [ -x "$HOME/.Xclients" ]; then
|
||||||
|
exec -l $SHELL -c "$SSH_AGENT $DBUS_LAUNCH $HOME/.Xclients"
|
||||||
|
elif [ -x /etc/X11/xinit/Xclients ]; then
|
||||||
|
exec -l $SHELL -c "$SSH_AGENT $DBUS_LAUNCH /etc/X11/xinit/Xclients"
|
||||||
|
else
|
||||||
|
# should never get here; failsafe fallback
|
||||||
|
exec -l $SHELL -c "xsm"
|
||||||
|
fi
|
||||||
|
|
@ -3,17 +3,19 @@
|
|||||||
Summary: X.Org X11 X Window System xinit startup scripts
|
Summary: X.Org X11 X Window System xinit startup scripts
|
||||||
Name: xorg-x11-%{pkgname}
|
Name: xorg-x11-%{pkgname}
|
||||||
Version: 0.99.3
|
Version: 0.99.3
|
||||||
Release: 3
|
Release: 4
|
||||||
License: MIT/X11
|
License: MIT/X11
|
||||||
Group: User Interface/X
|
Group: User Interface/X
|
||||||
URL: http://www.x.org
|
URL: http://www.x.org
|
||||||
Source0: http://xorg.freedesktop.org/releases/X11R7.0-RC1/everything/%{pkgname}-%{version}.tar.bz2
|
Source0: http://xorg.freedesktop.org/releases/X11R7.0-RC2/everything/%{pkgname}-%{version}.tar.bz2
|
||||||
Source10: xinitrc-common
|
Source10: xinitrc-common
|
||||||
Source11: xinitrc
|
Source11: xinitrc
|
||||||
Source12: Xclients
|
Source12: Xclients
|
||||||
Source13: Xmodmap
|
Source13: Xmodmap
|
||||||
Source14: Xresources
|
Source14: Xresources
|
||||||
Source15: xinput.sh
|
Source15: xinput.sh
|
||||||
|
# Xsession is used by xdm/kdm/gdm and possibly others, so let's keep it here.
|
||||||
|
Source16: Xsession
|
||||||
BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n)
|
BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n)
|
||||||
|
|
||||||
BuildRequires: libX11-devel
|
BuildRequires: libX11-devel
|
||||||
@ -53,7 +55,7 @@ rm -rf $RPM_BUILD_ROOT
|
|||||||
|
|
||||||
# Install Red Hat custom xinitrc, etc.
|
# Install Red Hat custom xinitrc, etc.
|
||||||
{
|
{
|
||||||
for script in %{SOURCE10} %{SOURCE11} %{SOURCE12} ; do
|
for script in %{SOURCE10} %{SOURCE11} %{SOURCE12} %{SOURCE16} ; do
|
||||||
install -m 755 $script $RPM_BUILD_ROOT%{_sysconfdir}/X11/xinit/${script##*/}
|
install -m 755 $script $RPM_BUILD_ROOT%{_sysconfdir}/X11/xinit/${script##*/}
|
||||||
done
|
done
|
||||||
|
|
||||||
@ -91,7 +93,11 @@ rm -rf $RPM_BUILD_ROOT
|
|||||||
%{_mandir}/man1x/xinit.1x*
|
%{_mandir}/man1x/xinit.1x*
|
||||||
|
|
||||||
%changelog
|
%changelog
|
||||||
* Fri Nov 11 2005 Mike A. Harris <mharris@redhat.com> 0.99.3-1
|
* Sat Nov 12 2005 Mike A. Harris <mharris@redhat.com> 0.99.3-4
|
||||||
|
- Added Xsession script from xinitrc, as it is very similar codebase, which
|
||||||
|
shares "xinitrc-common" anyway, and all of the display managers use it.
|
||||||
|
|
||||||
|
* Fri Nov 11 2005 Mike A. Harris <mharris@redhat.com> 0.99.3-3
|
||||||
- Updated to xinit 0.99.3 from X11R7 RC2.
|
- Updated to xinit 0.99.3 from X11R7 RC2.
|
||||||
|
|
||||||
* Mon Nov 7 2005 Mike A. Harris <mharris@redhat.com> 0.99.2-3
|
* Mon Nov 7 2005 Mike A. Harris <mharris@redhat.com> 0.99.2-3
|
||||||
|
Loading…
Reference in New Issue
Block a user