diff options
author | D.M.D. Ljungmark <spider@gentoo.org> | 2002-05-29 22:16:23 +0000 |
---|---|---|
committer | D.M.D. Ljungmark <spider@gentoo.org> | 2002-05-29 22:16:23 +0000 |
commit | 780dc1edc5218a522ef57a01386b1253102b6aba (patch) | |
tree | aca9f7ce7b82b3d20e14ec8c1fc6acc94b32f878 /gnome-base/gnome-session/files | |
parent | PAM update (diff) | |
download | gentoo-2-780dc1edc5218a522ef57a01386b1253102b6aba.tar.gz gentoo-2-780dc1edc5218a522ef57a01386b1253102b6aba.tar.bz2 gentoo-2-780dc1edc5218a522ef57a01386b1253102b6aba.zip |
XSESSION support added
Diffstat (limited to 'gnome-base/gnome-session/files')
-rw-r--r-- | gnome-base/gnome-session/files/Gnome | 109 | ||||
-rw-r--r-- | gnome-base/gnome-session/files/digest-gnome-session-1.5.20-r1 | 1 |
2 files changed, 110 insertions, 0 deletions
diff --git a/gnome-base/gnome-session/files/Gnome b/gnome-base/gnome-session/files/Gnome new file mode 100644 index 000000000000..55c0d72cc606 --- /dev/null +++ b/gnome-base/gnome-session/files/Gnome @@ -0,0 +1,109 @@ +#!/bin/sh + +for errfile in "$HOME/.gnomerc-errors" "${TMPDIR-/tmp}/gnomerc-$USER" "/tmp/gnomerc-$USER" +do + if ( cp /dev/null "$errfile" 2> /dev/null ) + then + chmod 600 "$errfile" + exec > "$errfile" 2>&1 + break + fi +done + +# +# Distributors: +# You should modify the paths here to fit your distro +# If you need to do so, send me (jirka@5z.com) a patch +# and I'll try to make the script detect the distro stuff +# + +userresources=$HOME/.Xresources +usermodmap=$HOME/.Xmodmap +userxkbmap=$HOME/.Xkbmap + +sysresources=/etc/X11/Xresources +sysmodmap=/etc/X11/Xmodmap +sysxkbmap=/etc/X11/Xkbmap + +rh6sysresources=/etc/X11/xinit/Xresources +rh6sysmodmap=/etc/X11/xinit/Xmodmap + +if [ -x "$HOME/.gnomerc" ]; then + command="$HOME/.gnomerc" +elif [ -x /etc/X11/gdm/gnomerc ]; then + command="/etc/X11/gdm/gnomerc" +else + # as fallback in case the config is screwed + command=`which gnome-session` +fi + +sshagent=`which ssh-agent` +if [ -n "$sshagent" ] && [ -x "$sshagent" ] && [ -z "$SSH_AUTH_SOCK" ]; then + command="$sshagent -- $command" +fi + +# merge in defaults +if [ -f "$rh6sysresources" ]; then + xrdb -merge "$rh6sysresources" +fi + +if [ -f "$sysresources" ]; then + xrdb -merge "$sysresources" +fi + +if [ -f "$userresources" ]; then + xrdb -merge "$userresources" +fi + +# merge in keymaps +if [ -f "$sysxkbmap" ]; then + setxkbmap `cat "$sysxkbmap"` + XKB_IN_USE=yes +fi + +if [ -f "$userxkbmap" ]; then + setxkbmap `cat "$userxkbmap"` + XKB_IN_USE=yes +fi + +# +# Eeek, this seems like too much magic here +# +if [ -z "$XKB_IN_USE" ] && [ ! -L /etc/X11/X ]; then + if grep '^exec.*/Xsun' /etc/X11/X > /dev/null 2>&1 && [ -f /etc/X11/XF86Config ]; then + xkbsymbols=`sed -n -e 's/^[ ]*XkbSymbols[ ]*"\(.*\)".*$/\1/p' /etc/X11/XF86Config` + if [ -n "$xkbsymbols" ]; then + setxkbmap -symbols "$xkbsymbols" + XKB_IN_USE=yes + fi + fi +fi + +# xkb and xmodmap don't play nice together +if [ -z "$XKB_IN_USE" ]; then + if [ -f "$rh6sysmodmap" ]; then + xmodmap "$rh6sysmodmap" + fi + + if [ -f "$sysmodmap" ]; then + xmodmap "$sysmodmap" + fi + + if [ -f "$usermodmap" ]; then + xmodmap "$usermodmap" + fi +fi + +unset XKB_IN_USE + +# run all system xinitrc shell scripts. +if [ -d /etc/X11/xinit/xinitrc.d ]; then + for i in /etc/X11/xinit/xinitrc.d/* ; do + if [ -x "$i" ]; then + . "$i" + fi + done +fi + +exec $command + diff --git a/gnome-base/gnome-session/files/digest-gnome-session-1.5.20-r1 b/gnome-base/gnome-session/files/digest-gnome-session-1.5.20-r1 new file mode 100644 index 000000000000..def03139beec --- /dev/null +++ b/gnome-base/gnome-session/files/digest-gnome-session-1.5.20-r1 @@ -0,0 +1 @@ +MD5 13a5d0e866fa5496e057e18a489fdf92 gnome-session-1.5.20.tar.bz2 963668 |