Google Groups no longer supports new Usenet posts or subscriptions. Historical content remains viewable.
Dismiss

different command prompt and terminal title

6 views
Skip to first unread message

lovecreatesbeauty

unread,
Dec 29, 2011, 11:11:07 AM12/29/11
to
i want to set my command line prompt to a single $, but let terminal
title shows the hostname information on Debian 6.

i need to put this:

PS1='\$ '

before the following content in .bashrc, which appears to set the same
PS1 too, to keep command line prompt and terminal title different,
why?

what does the following syntax for set terminal title with PS1 mean?

# If this is an xterm set the title to user@host:dir
case "$TERM" in
xterm*|rxvt*)
PS1="\[\e]0;${debian_chroot:+($debian_chroot)}\u@\h: \w\a\]$PS1"
;;
*)
;;
esac

Joe Rosevear

unread,
Dec 31, 2011, 11:21:48 PM12/31/11
to
Hi Love,

I don't understand the part about $debian_chroot, but maybe we can
ignore it. Try this:

exec xterm -title $HOSTNAME -e "sh -c 'export PS1=\$'; sh"&

Does that give you what you need?

--
http://JosephRosevear.com
http://RosevearSoftware.com

Joe Rosevear

unread,
Jan 1, 2012, 12:21:54 AM1/1/12
to
Type (or paste) this at the command line. I don't know how to help
through the .bashrc. Maybe this will help you think?
0 new messages