New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fail to start plasma with zsh #352

Closed
mdias opened this Issue Jan 29, 2015 · 3 comments

Comments

Projects
None yet
3 participants
@mdias
Copy link

mdias commented Jan 29, 2015

I was having trouble starting plasma 5. After entering the password and pressing enter, sddm would freeze (mouse would turn into the X cross, and still be movable).
After analysing .xsession-errors, I found out that if I switched my shell from zsh to bash it would work.
I figured the problem came from the Xsession script, which would also complain about not being able to execute xrdb.

I managed to fix the problem by moving the "emulate -R sh" line (inside the "zsh" case) to AFTER sourcing the ${zdir,zhome}/.z* files.
I don't know if this is the proper fix, but now I can login fine and the previous errors I had in .xsession-errors are gone.

@rfariasc

This comment has been minimized.

Copy link

rfariasc commented Jan 30, 2015

Hi, I have the same issue, can you explain a little more the fix please?

@mdias

This comment has been minimized.

Copy link
Author

mdias commented Jan 30, 2015

In my distro, the script Xsession is installed on "/usr/share/sddm/scripts/Xsession". If you open this file you'll notice a "case" conditional that checks for bash, zsh and others. In the zsh condition there's a line "emulate -R sh" that you should move to just before ";;" (the end of the zsh condition).

example:

...
*/zsh)
    [ -z "$ZSH_NAME" ] && exec $SHELL $0 "$@"
    emulate -R sh
    [ -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
    ;;
...

should become:

...
*/zsh)
    [ -z "$ZSH_NAME" ] && exec $SHELL $0 "$@"
    [ -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
    ;;
...
@rfariasc

This comment has been minimized.

Copy link

rfariasc commented Jan 30, 2015

it worked, thanks!!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment