[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Re: KDE Session for gdm



* Ivan E. Moore II (rkrusty@tdyc.com) [001208 22:37]:
> shoot...that's all there is to this? :)  I'll add this in the next round...
> (or if that doesn't happen it'll be out with 2.1)

I have a "generic" script that I use for Sessions.  I pieced this
together for the TurboLinux gdm/enlightenment packages.  I had it
part of the gdm package, as Enlightenment (gdm required it) but
anything else could symlink it and it'd "do the right thing".

Frankly, I think the "do the right thing" logic is wrong and stupid
(especially for Debian, where Debian is much more flexible than TL)
and should probably be stripped, but it works for KDE I use it on my
Debian system (woody).

Just copy/symlink it with the name KDE and away you go.

The best parts are the SSH stuff and the resource loading.  Stolen
from various places: xinit/xsession and some stuff I saw floating
around for GDM.

Hope this is helpful.

Ciao!

-- 
"I'm a strange err in a LEGO land!"
	 -- Christian Holtje

The Doctor What: A really hip dude               http://docwhat.gerf.org/
docwhat@gerf.org                                                   KF6VNC
#!/bin/bash -login
# Error file finding borrowed from Xsession stuff

# Turn on debugging
set -x

# Set the name of this file
WM=`basename $0`

# redirect errors to a file in user's home directory if we can
for errfile in "$HOME/.$WM-errors" "${TMPDIR-/tmp}/$WM-$USER" "/tmp/$WM-$USER"
do
	if ( cp /dev/null "$errfile" 2> /dev/null )
	then
		chmod 600 "$errfile"
		exec > "$errfile" 2>&1
		break
	fi
done

# Lower Case the name
WM=`echo $WM | tr '[:upper:]' '[:lower:]'`

sysmodmap=/etc/X11/Xmodmap
usrmodmap=$HOME/.Xmodmap
startup=$HOME/.${WM}rc
resources=$HOME/.Xresources

startssh=
sshagent=/usr/bin/ssh-agent

if [ -x $sshagent -a -z "$SSH_AUTH_SOCK" ]; then
	startssh=yes
fi

if [ -x /usr/bin/X11/xmodmap ]; then
	if [ -f $sysmodmap ]; then
		xmodmap $sysmodmap
	fi
	if [ -f $usrmodmap ]; then
		xmodmap $usrmodmap
	fi
fi

if [ -x "$startup" ]; then
	$startup
fi

if [ -f "$resources" ]; then
	xrdb -load "$resources"
fi

if [ ! -n "`which $WM`" ]; then
   echo "$WM: $WM not found. Quiting."
   exit 1
fi

if [ -n "$startssh" ]; then
  exec $sshagent -- $WM
else
  exec $WM
fi


Reply to: