Bugzilla – Bug 315
SUDO_PS1 is ignored
Last modified: 2009-02-06 13:54:53 MST
SUDO_PS1 is set in .bashrc (tried .profile, and both files for root). Trying to make the username@host red during "sudo -s", but it just uses $PS1. debug: bracken@testvbox:~$ sudo -s root@testvbox:~# echo $PS1 \[\e]0;\u@\h: \w\a\]${debian_chroot:+($debian_chroot)}\[\033[01;32m\]\u@\h\[\033[00m\]:\[\033[01;34m\]\w\[\033[00m\]\$ root@testvbox:~# echo $SUDO_PS1 ${debian_chroot:+($debian_chroot)}\[\033[01;31m\]\u@\h\[\033[00m\]:\[\033[01;34m\]\w\[\033[00m\]\$
Works fine for me. Perhaps you have SUDO_PS1 set but not exported.
exported... bracken@eeepc:~$ export SUDO_PS1='doesntworkforme' bracken@eeepc:~$ echo $SUDO_PS1 doesntworkforme bracken@eeepc:~$ sudo -s root@eeepc:~# echo $SUDO_PS1 root@eeepc:~# echo $PS1 \[\e]0;\u@\h: \w\a\]${debian_chroot:+($debian_chroot)}\[\033[01;32m\]\u@\h\[\033[00m\]:\[\033[01;34m\]\w\[\033[00m\]\$ root@eeepc:~# exit bracken@eeepc:~$ env SUDO_PS1=doesntworkforme KDE_MULTIHEAD=false and so on....