This is a strange one, because I've tried changing ~/bashrc and ~/.profile but to no avail. All I can get is a basic "$" prompt for a user shell, but if I switch to root, it works properly:
The other thing is that the arrow buttons don't work properly as a user, producing a tilde followed by two left square brackets and A, B, C or D in user mode, but as soon as I su to root, they work correctly! I've also had a look at /root/.bashrc, /etc/profile and /etc/profile.d/ and I can't work out why I can't get the prompt to work. I've tried using PS1='something' within the shell, but everything just appears literally, rather than providing a prompt format. Again, it works correctly in root mode:
Any ideas?
P.S. I should have added: This works correctly on the Cinnamon desktop. On the KDE desktop, this affects Konsole, Yakuake and Xterm.
- Code:
$ su
Password:
[root@davecomp davepcd]# exit
exit
$
$ su
Password:
[root@davecomp davepcd]# cd Desktop
[root@davecomp Desktop]# exit
exit
$
$ cd Desktop
$
$
The other thing is that the arrow buttons don't work properly as a user, producing a tilde followed by two left square brackets and A, B, C or D in user mode, but as soon as I su to root, they work correctly! I've also had a look at /root/.bashrc, /etc/profile and /etc/profile.d/ and I can't work out why I can't get the prompt to work. I've tried using PS1='something' within the shell, but everything just appears literally, rather than providing a prompt format. Again, it works correctly in root mode:
- Code:
$
$ ^[[A^[[A^[[B^[[B^[[D^[[D^[[C^[[C
/bin/sh: 10: : not found
$
$ PS1="${debian_chroot:+($debian_chroot)}\[\033[01;31m\][\u@\h \[\e[0;1;34m\]\W\[\033[01;31m\]]#\[\e[0;0m\] "
\[\033[01;31m\][\u@\h \[\e[0;1;34m\]\W\[\033[01;31m\]]#\[\e[0;0m\]
\[\033[01;31m\][\u@\h \[\e[0;1;34m\]\W\[\033[01;31m\]]#\[\e[0;0m\]
\[\033[01;31m\][\u@\h \[\e[0;1;34m\]\W\[\033[01;31m\]]#\[\e[0;0m\] export PS1="${debian_chroot:+($debian_chroot)}\[\033[01;31m\][\u@\h \[\e[0;1;34m\]\W\[\033[01;31m\]]#\[\e[0;0m\] "
\[\033[01;31m\][\u@\h \[\e[0;1;34m\]\W\[\033[01;31m\]]#\[\e[0;0m\]
\[\033[01;31m\][\u@\h \[\e[0;1;34m\]\W\[\033[01;31m\]]#\[\e[0;0m\]
\[\033[01;31m\][\u@\h \[\e[0;1;34m\]\W\[\033[01;31m\]]#\[\e[0;0m\] su
Password:
[root@davecomp Desktop]# PS1="${debian_chroot:+($debian_chroot)}\[\033[01;31m\][\u@\h \[\e[0;1;34m\]\W\[\033[01;31m\]]#\[\e[0;0m\] "
[root@davecomp Desktop]#
[root@davecomp Desktop]#
[root@davecomp Desktop]# PS1="\[\033[01;31m\][\u@\h \[\e[0;1;34m\]\W\[\033[01;31m\]]#\[\e[0;0m\] "[root@davecomp Desktop]#
[root@davecomp Desktop]# exit
exit
\[\033[01;31m\][\u@\h \[\e[0;1;34m\]\W\[\033[01;31m\]]#\[\e[0;0m\] PS1="\[\033[01;31m\][\u@\h \[\e[0;1;34m\]\W\[\033[01;31m\]]#\[\e[0;0m\] "
\[\033[01;31m\][\u@\h \[\e[0;1;34m\]\W\[\033[01;31m\]]#\[\e[0;0m\]
\[\033[01;31m\][\u@\h \[\e[0;1;34m\]\W\[\033[01;31m\]]#\[\e[0;0m\] PS1="$"
$
Any ideas?
P.S. I should have added: This works correctly on the Cinnamon desktop. On the KDE desktop, this affects Konsole, Yakuake and Xterm.
Last edited by davecs on 14th June 2024, 4:05 pm; edited 2 times in total