Setting XFCE terminal PS1 value and making it permanent

Posted by Matt on Super User See other posts from Super User or by Matt
Published on 2011-10-16T22:39:09Z Indexed on 2012/09/09 15:40 UTC
Read the original article Hit count: 218

Filed under:
|

I'm trying to add the value PS1='\u@\h: \w\$ ' to my terminal in XFCE. I added the line to (what I think is) the correct area in /etc/profile. The relevant segment is:

# Set a default shell prompt:
#PS1='`hostname`:`pwd`# '
PS1='\u@\h: \w\$ '
if [ "$SHELL" = "/bin/pdksh" ]; then
# PS1='! $ '
  PS1='\u@\h: \w\$ '
elif [ "$SHELL" = "/bin/ksh" ]; then
# PS1='! ${PWD/#$HOME/~}$ '
  PS1='\u@\h: \w\$ '
elif [ "$SHELL" = "/bin/zsh" ]; then
# PS1='%n@%m:%~%# '
  PS1='\u@\h: \w\$ '
elif [ "$SHELL" = "/bin/ash" ]; then
# PS1='$ '
  PS1='\u@\h: \w\$ '
else
 PS1='\u@\h: \w\$ '
fi

Most of that was already there, I just commented out the existing value and added the one I want.

By manually opening the terminal and doing . profile, I can load these values, but they don't stick - I close the terminal and reopen, and I'm back to sh-4.1$.

Maybe I'm doing this in the wrong place, but how can I make that value stick?

All the info I've found on google is Fedora/Ubuntu-specific. I use Slackware. Any help on this matter would be greatly appreciated.

© Super User or respective owner

Related posts about linux

Related posts about xfce

  • Fedora 12 xfce permissions

    as seen on Super User - Search for 'Super User'
    Hi all, I installed fedora 12 xfce and when i run Gigolo to mount windows partitions i get Authentication is required. In fedora 11 xfce there was a tool that change the system permission to allow any user to mount any partition,but i cant find it in fedora 12. please help me how to fix this… >>> More

  • Fedora 12 XFCE mount permissions

    as seen on Super User - Search for 'Super User'
    I installed Fedora 12 with XFCE. When I run Gigolo to mount Windows partitions, I get an "Authentication is required" message. In Fedora 11 XFCE, there was a tool that changed the system permission to allow any user to mount any partition, but I can't find it in Fedora 12. How can I fix this problem… >>> More

  • Gigolo under fedora 12 xfce

    as seen on Super User - Search for 'Super User'
    Hi all, I installed fedora 12 xfce and when i run Gigolo to mount windows partitions i get Authentication is required. In fedora 11 xfce there was a tool that change the system permission to allow any user to mount any partition,but i cant find it in fedora 12. please help me how to fix this… >>> More

  • XFCE: active panel buttons when mouse is on screen edge

    as seen on Super User - Search for 'Super User'
    I'm using XFCE 4.6.1 (Xubuntu distribution) on my laptop and main computer; the settings are approximately the same. so far for the intro. What I'm experiencing is that when going to the screen edge over the task bar on the laptop, the button under the mouse is active. On the main machine however… >>> More

  • What is controlling the desktop display?

    as seen on Ask Ubuntu - Search for 'Ask Ubuntu'
    I have two Ubuntu systems and in the course of changing configurations something has become muddled. I have disabled Unity in favor of gnome shell, the older style display of the desktop. Then I installed xfce 4. Seemed everything would be working okay, and for the most part it does. Except I noticed… >>> More