You are not logged in.

#1 2004-08-22 20:20:29

colnago
Member
From: Victoria, BC
Registered: 2004-03-25
Posts: 438

kdm and tcsh problem

Hi,

I did a 'chsh -s /usr/bin/tcsh' and now I cannot log in with kdm.  It is fine if i revert to bash.  I tried going to run level 3 and then startx and kde starts ok, it is only a problem if i boot to run level 5  (kdm started).  Any users that have tcsh as the default shell are allowed to login, but it doesn't even make it to the kde splash, the screen just blackens & flickers and then the kdm login prompt reappears.   I don't see anything useful in /var/log or in .xsessionerrors.   I am using the new kde 3.3.0-1 (and whatever kdm comes with it) , the old one was ok.

Any suggestions would be appreciated.

Offline

#2 2004-08-23 20:50:42

cmf
Member
Registered: 2003-10-18
Posts: 86

Re: kdm and tcsh problem

i have no idea on this one... they're both compiled with the same options (3.2.3 & 3.3), and i assume no config has changed on your end...?

i use bash here so no idea...

Offline

#3 2004-08-23 22:56:26

oz
Member
Registered: 2004-05-20
Posts: 67

Re: kdm and tcsh problem

First hit on Google for "kdm tcsh" is this:

http://lists.debian.org/debian-qt-kde/2 … 00430.html

Offline

#4 2004-08-24 01:01:55

colnago
Member
From: Victoria, BC
Registered: 2004-03-25
Posts: 438

Re: kdm and tcsh problem

Thank you, that is the problem and the solution.  For us, the file is /opt/kde/share/config/kdm/Xsession.

Offline

#5 2004-09-03 19:58:11

Snowman
Developer/Forum Fellow
From: Montreal, Canada
Registered: 2004-08-20
Posts: 5,212

Re: kdm and tcsh problem

I modified the  /opt/kde/share/config/kdm/Xsession file but there are still problems.  I can login in some window manager (WindowMaker, IceWM) but there is the same problem   for KDE and XFCE4.

Offline

#6 2004-09-03 21:58:15

Snowman
Developer/Forum Fellow
From: Montreal, Canada
Registered: 2004-08-20
Posts: 5,212

Re: kdm and tcsh problem

I am using the old version (KDE 3.2) of  Xsession. It is working now.  lol

Offline

#7 2004-09-03 23:28:24

colnago
Member
From: Victoria, BC
Registered: 2004-03-25
Posts: 438

Re: kdm and tcsh problem

My solution was to switch to bash.

Offline

#8 2004-09-04 06:20:36

Snowman
Developer/Forum Fellow
From: Montreal, Canada
Registered: 2004-08-20
Posts: 5,212

Re: kdm and tcsh problem

If you prefer using tcsh, here is a copy of the old (KDE 3.2) Xsession file:

#! /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
PATH=
test -f /etc/profile && . /etc/profile
test -f $HOME/.profile && . $HOME/.profile
IFS_SAVE=$IFS
IFS=:
for i in $DM_PATH; do
    case :$PATH: in
      *:$i:*) ;;
      ::) PATH=$i;;
      *) PATH=$PATH:$i;;
    esac
done
IFS=$IFS_SAVE
export PATH

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

case $1 in
    "")
        exec xmessage -center -buttons OK:0 -default OK "Sorry, $DESKTOP_SESSION is no valid session."
        ;;
    failsafe)
        exec xterm -geometry 80x24-0-0
        ;;
    custom)
        exec $HOME/.xsession
        ;;
    default)
        exec startkde
        ;;
    *)
        eval exec "$1"
        ;;
esac
exec xmessage -center -buttons OK:0 -default OK "Sorry, cannot execute $1. Check $DESKTOP_SESSION.desktop."

I have used it for the last hours or so and my system is working fine. The new Xsession  (KDE 3.3) is quite different from this one.  If I have some spare time, I will compare the 2 versions.  This might help to figure out the problem.

Offline

#9 2004-09-06 20:18:06

Snowman
Developer/Forum Fellow
From: Montreal, Canada
Registered: 2004-08-20
Posts: 5,212

Re: kdm and tcsh problem

I have finally figured it out lol .  It's a question of path.
Here is my Xsession file :

#! /bin/sh
# Xsession - run as user

# Note that the respective logout scripts are not sourced.
case $SHELL in
  */bash)
    [ -z "$BASH" ] && exec $SHELL $0 "$@"
    set +o posix
    [ -f /etc/profile ] && . /etc/profile
    if [ -f $HOME/.bash_profile ]; then
      . $HOME/.bash_profile
    elif [ -f $HOME/.bash_login ]; then
      . $HOME/.bash_login
    elif [ -f $HOME/.profile ]; then
      . $HOME/.profile
    fi
    ;;
  */zsh)
    [ -z "$ZSH_NAME" ] && exec $SHELL $0 "$@"
    emulate -R zsh
    [ -d /etc/zsh ] && zdir=/etc/zsh || zdir=/etc
    zhome=${ZDOTDIR:-$HOME}
    # zshenv is always sourced automatically.
    [ -f $zdir/zprofile ] && . $zdir/zprofile
    [ -f $zhome/.zprofile ] && . $zhome/.zprofile
    [ -f $zdir/zlogin ] && . $zdir/zlogin
    [ -f $zhome/.zlogin ] && . $zhome/.zlogin
    ;;
  */csh|*/tcsh)
    # [t]cshrc is always sourced automatically.
    # Note that sourcing csh.login after .cshrc is non-standard.
    set -a
    eval `$SHELL -c 'if (-f /etc/csh.login) source /etc/csh.login; if (-f ~/.login) source ~/.login; /bin/sh -c set | egrep -v "^(BASH_VERSINFO|EUID|PPID|UID|_|GROUPS|DIRSTACK|SHELLOPTS)="'`
    set +a
    test -f /etc/profile && . /etc/profile
    ;;
  *) # Plain sh, ksh, and anything we don't know.
    [ -f /etc/profile ] && . /etc/profile
    [ -f $HOME/.profile ] && . $HOME/.profile
    ;;
esac

[ -f /etc/xprofile ] && . /etc/xprofile
[ -f $HOME/.xprofile ] && . $HOME/.xprofile

case $1 in
  "")
    exec xmessage -center -buttons OK:0 -default OK "Sorry, $DESKTOP_SESSION is no valid session."
    ;;
  failsafe)
    exec xterm -geometry 80x24-0-0
    ;;
  custom)
    exec $HOME/.xsession
    ;;
  default)
    exec /opt/kde/bin/startkde
    ;;
  *)
    eval exec "$1"
    ;;
esac
exec xmessage -center -buttons OK:0 -default OK "Sorry, cannot execute $1. Check $DESKTOP_SESSION.desktop."

I made the change as suggested fromhttp://lists.debian.org/debian-qt-kde/2 … 00430.html   and I added "test -f /etc/profile && . /etc/profile".

Offline

Board footer

Powered by FluxBB