unable to start kde with zsh set as login shell

Bug #13965 reported by Martin Pluskal
16
Affects Status Importance Assigned to Milestone
kdebase (Ubuntu)
Fix Released
Medium
Andreas Mueller

Bug Description

/etc/kde3/kdm/Xsession tries to emulate zsh, later it includes /etc/X11/Xsession
(which can not work properly with zsh emulation turned on) causing error:
/etc/X11/Xsession:.:122 file not found:
/etc/X11/Xsession.d/20xorg-common_process-args\n/etc/X11/Xsession.d/30xorg-common_xresources\n/etc/X11/Xsession.d/50xorg-common_determine-startup\n/etc/X11/Xsession.d/90xorg-common_ssh-agent\n/etc/X11/Xsession.d/99xorg-common_start
Problem can be solved by removing the zsh specific part of code from
/etc/kde3/kdm/Xsession.

Revision history for this message
Chris Halls (halls) wrote :

(In reply to comment #0)
> Problem can be solved by removing the zsh specific part of code from
> /etc/kde3/kdm/Xsession.

Surely that's a workaround, not a solution? Removing the zsh parts will stop your zsh environment files from being
read.

Revision history for this message
Martin Pluskal (plusky) wrote :

(In reply to comment #1)
> (In reply to comment #0)
> > Problem can be solved by removing the zsh specific part of code from
> > /etc/kde3/kdm/Xsession.
>
> Surely that's a workaround, not a solution? Removing the zsh parts will stop
your zsh environment files from being
> read.
>
But not removing them prevents me from starting kde ... What about invoking '.
/etc/X11/Xsession' before the zsh part is executed?

Revision history for this message
Tom Fernandes (anyaddress) wrote :

*** Bug 14202 has been marked as a duplicate of this bug. ***

Revision history for this message
Antti S. Lankila (alankila) wrote :

I changed the zsh-specific portion of /etc/kde3/kdm/Xsession as follows:

  */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
    emulate -R sh
    ;;

My change is on the last line. I'm simply asking it to come back to sh emulation
after it's done reading the user's zsh wares. This seems to fix the problem for me.

Revision history for this message
Wayne Davison (wayned) wrote :

(In reply to comment #4)

Adding the "emulate -R sh" at the end of the zsh section fixes the problem for
me too. Seems like the right solution as well.

Revision history for this message
Chris Halls (halls) wrote :

 kdebase (4:3.4.0-0ubuntu13) hoary; urgency=low
 .
   * Fix kdm login when shell is zsh. Thanks Antti S. Lankila for the hint.
      19_kdm_zsh_emulate.diff (Hoary #7620)

To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Duplicates of this bug

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.