Konsole not showing prompt on Plasma Wayland

This forum is dedicated to testing early releases and cauldron : Howtos, tips, tricks and user global feedback and thoughts...

Helpful tip :
For bugs tracking we use : https://bugs.mageia.org = The Mageia Bug Tracker
In this bug tracker you'll find already reported bugs and you'll be able to report those you have found....

Konsole not showing prompt on Plasma Wayland

Postby ITA84 » Jun 26th, '20, 16:30

I hadn't tried Plasma Wayland in a while, so this is probably not a recent issue, but when I start Konsole in a Wayland session I get no prompt, because the PS1 environment variable is not set, whereas on an X11 session is shows just fine; note that input works normally, and if I enter

export PS1="[\u@\h \W]\\$ "

in the Wayland session the prompt appears. Also, if I enter 'su -' the root prompt appears as well (not with just 'su').

I assume this is due to the difference in how X11 and Wayland sessions load their environment variables, but I couldn't really find which configuration file is used for X11 and not for Wayland. First of all, I would like to know if anybody else has the same issue (in which case I'll just use a workaround until it's fixed); if not, I'd like to ask for help in figuring out what's wrong with my setup.

Thanks in advance
ITA84
 
Posts: 199
Joined: Mar 5th, '13, 18:15

Re: Konsole not showing prompt on Plasma Wayland

Postby xerxes2 » Jun 26th, '20, 21:38

In Gnome it works to put the prompt in the .bashrc file in your home directory.
xerxes2
 
Posts: 62
Joined: Jul 18th, '18, 15:53
Location: Sweden

Re: Konsole not showing prompt on Plasma Wayland

Postby ITA84 » Jun 27th, '20, 08:47

Do you mean that in a Gnome Wayland session, if you don't explicitly put the prompt setup in ~/.bashrc, it won't show in the terminal either? In that case then I'd assume it's this way for everyone. In any case, thanks for your answer
ITA84
 
Posts: 199
Joined: Mar 5th, '13, 18:15

Re: Konsole not showing prompt on Plasma Wayland

Postby doktor5000 » Jun 27th, '20, 11:04

Asking the other way around, where do you define your PS1 ? Or are you asking about the default one?
In any case, it might help if you could post what PS1 actually contains in your wayland session. Or is it really unset ?
Cauldron is not for the faint of heart!
Caution: Hot, bubbling magic inside. May explode or cook your kittens!
----
Disclaimer: Beware of allergic reactions in answer to unconstructive complaint-type posts
User avatar
doktor5000
 
Posts: 17659
Joined: Jun 4th, '11, 10:10
Location: Leipzig, Germany

Re: Konsole not showing prompt on Plasma Wayland

Postby xerxes2 » Jun 27th, '20, 14:11

ITA84 wrote:Do you mean that in a Gnome Wayland session, if you don't explicitly put the prompt setup in ~/.bashrc, it won't show in the terminal either? In that case then I'd assume it's this way for everyone. In any case, thanks for your answer

Yes.
xerxes2
 
Posts: 62
Joined: Jul 18th, '18, 15:53
Location: Sweden

Re: Konsole not showing prompt on Plasma Wayland

Postby ITA84 » Jun 27th, '20, 15:50

doktor5000 wrote:Asking the other way around, where do you define your PS1 ? Or are you asking about the default one?

I haven't defined any custom PS1. Yes, I'm talking about the default one that I see in an X session (which should be "[\u@\h \W]\\$ ", if I understand correctly; I found it in /etc/bashrc)

In any case, it might help if you could post what PS1 actually contains in your wayland session. Or is it really unset ?

I've double-checked and it's actually set to the empty string: if I do

Code: Select all
echo $PS1

I get nothing, while if I do

Code: Select all
echo ${PS1+x}

'x' gets printed, which shouldn't happen if PS1 is unset.

If it's any help, this is what's in my /etc/bashrc; I've never edited it, but apparently it was last modified on 17th June.

Code: Select all
# /etc/bashrc

# System wide functions and aliases
# Environment stuff goes in /etc/profile

# It's NOT good idea to change this file unless you know what you
# are doing. Much better way is to create custom.sh shell script in
# /etc/profile.d/ to make custom changes to environment. This will
# prevent need for merging in future updates.

# By default, we want this to get set.
# Even for non-interactive, non-login shells.
if [ "`id -gn`" = "`id -un`" -a `id -u` -gt 99 ]; then
        umask 002
else
        umask 022
fi

# are we an interactive shell?
if [ "$PS1" ]; then
    i='${USER}@${HOSTNAME%%.*}:$([[ "${PWD}" =~ ^"${HOME}"(/|$) ]] && echo "~${PWD#${HOME}}" || echo "${PWD}")'
    case $TERM in
        xterm*)
            PROMPT_COMMAND='echo -ne "\033]0;'${i}'\007"'
            ;;
        screen)
            PROMPT_COMMAND='echo -ne "\033_'${i}'\033\\"'
            ;;
        *)
            ;;
    esac
    unset i

    [ "$PS1" = "\\s-\\v\\\$ " ] && PS1="[\u@\h \W]\\$ "

    # You might want to have e.g. tty in prompt (e.g. more virtual machines)
    # and console windows
    # If you want to do so, just add e.g.
    # if [ "$PS1" ]; then
    #   PS1="[\u@\h:\l \W]\\$ "
    # fi
    # to your custom modification shell script in /etc/profile.d/ directory
   
    if [ -z "$loginsh" ]; then # We're not a login shell
        # Not all scripts in profile.d are compatible with other shells
        # TODO: make the scripts compatible or check the running shell by
        # themselves.
        if [ -n "${BASH_VERSION}${KSH_VERSION}${ZSH_VERSION}" ]; then
            for i in /etc/profile.d/*.sh; do
                if [ -r $i ]; then
                    . $i
                fi
            done
            unset i
        fi
    fi
fi

unset loginsh
ITA84
 
Posts: 199
Joined: Mar 5th, '13, 18:15


Return to Testing : Alpha, Beta, RC and Cauldron

Who is online

Users browsing this forum: No registered users and 1 guest

cron