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

Re: kdm and use of /etc/profile



On Thu, Feb 27, 2003 at 09:43:32PM +0100, Henning Moll wrote:
> Hi!
> 
> It has been discussed a few days before how to setup kdm to use a login shell:
> 
> in /etc/kde3/kdm/Xsession change the first line from:
> #!/bin/sh 
> to
> #!/bin/bash --login
> 
> ok.
> 
not ok. binding it to bash is evil.

it's a matter of policy ...
anything that is done to kdm should be probably in sync with xdm.

i attatched kdm's default Xsession for reference.

greetings

-- 
Hi! I'm a .signature virus! Copy me into your ~/.signature, please!
--
Chaos, panic, and disorder - my work here is done.
#! /bin/sh
# Xsession - run as user

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

DM_PATH=$PATH
test -f /etc/profile && . /etc/profile
test -f $HOME/.profile && . $HOME/.profile
IFS_SAVE=$IFS
IFS=:
for i in $PATH; do
    case :$DM_PATH: in
      *:$i:*) ;;
      ::) DM_PATH=$i;;
      *) DM_PATH=$DM_PATH:$i;;
    esac
done
IFS=$IFS_SAVE
PATH=$DM_PATH
export PATH

test -f /etc/xprofile && . /etc/xprofile
test -f $HOME/.xprofile && . $HOME/.xprofile

sess=$1
shift

case $sess in
    failsafe)
	exec xterm -geometry 80x24-0-0 $*
	;;
    ""|default)
	if test -x $HOME/.xsession; then
	    exec $HOME/.xsession $*
	else
	    sess=kde
	fi
	;;
esac

# start windowmanager
type "$sess" >/dev/null 2>&1 && exec "$sess" $*
type "start$sess" >/dev/null 2>&1 && exec "start$sess" $*
type "$sess-session" >/dev/null 2>&1 && exec "$sess-session" $*
sess=`echo "$sess" | tr A-Z a-z`
type "$sess" >/dev/null 2>&1 && exec "$sess" $*
type "start$sess" >/dev/null 2>&1 && exec "start$sess" $*
type "$sess-session" >/dev/null 2>&1 && exec "$sess-session" $*

# windowmanager not found, tell user
exec xmessage -center -buttons OK:0 -default OK "Sorry, $sess not found."

Reply to: