[ltp] SXGA+ versus XGA resolution, any suggestions?
linux-thinkpad@linux-thinkpad.org
linux-thinkpad@linux-thinkpad.org
Sat, 13 Aug 2005 09:54:24 -0700
> JP Renaud wrote:
>
> >However, I find hard to use Konsole's tabs, mainly because I like being
> >able to see different terminals at once... So OK ;-)
>
> Try putting the following into your bashrc. It makes the konsole tabs
> vastly more useful! Even more so, if you have the same on other
> machines, and log in via ssh.
>
> ---- ~/.bashrc ---------------------
> #Set up a useful session name in Konsole. Include hostname for
> #remote logins (where $DISPLAY != :0).
> #The first part: \[\e]30;XXXX\a\] sets the session name to XXXX;
> #the second part: \[\e]0;\a\] sets the window title to "" (to which
> #the session name is then appended anyway)
>
> if test "$DISPLAY"; then
> if [ "$DISPLAY" == ":0" -o "$DISPLAY" == ":0.0" ];then
> export PS1=$PS1"\[\e]30;\W/ \a\]\[\e]0;\a\]"
> else
> export PS1=$PS1"\[\e]30;\h:\W/ \a\]\[\e]0;\a\]"
> fi
> fi
> -------------------------------------------
>
>
> ------- /root/.bashrc ----------------------------
> #Set up a useful shell name in Konsole. Use * for root, and
> #include hostname for remote logins (where $DISPLAY != :0)
> if test "$DISPLAY"; then
> if [ "$DISPLAY" == ":0" -o "$DISPLAY" == ":0.0" ];then
> export PS1=$PS1"\[\e]30;*\W/ \a\]\[\e]0;\a\]"
> else
> export PS1=$PS1"\[\e]30;*\h:\W/ \a\]\[\e]0;\a\]"
> fi
> fi
> -------------------------------------------
>
Debian recently started including this in the default .bashrc which,
when you are logged in remotely via ssh, conveniently displays
<user>@<host> in the terminal titlebar:
# If this is an xterm set the title to user@host:dir
case "$TERM" in
xterm*|rxvt*)
PROMPT_COMMAND='echo -ne "\033]0;${USER}@${HOSTNAME}: ${PWD}\007"'
;;
*)
;;
esac
Here's another cool one I like for identifying a chroot:
# set variable identifying the chroot you work in (used in the prompt
# below)
if [ -z "$debian_chroot" -a -r /etc/debian_chroot ]; then
debian_chroot=$(cat /etc/debian_chroot)
fi
# set a fancy prompt (non-color, unless we know we "want" color)
case "$TERM" in
xterm-color)
PS1='${debian_chroot:+($debian_chroot)}\[\033[01;32m\]\u@\h\[\033[00m\]:\[\0
33[01;34m\]\w\[\033[00m\]\$ '
;;
*)
PS1='${debian_chroot:+($debian_chroot)}\u@\h:\w\$ '
;;
esac
For all the people who said they can't stand rxvt, perhaps you are not
invoking it with options to make it look good? Have you tried:
# rxvt -bg 0 -fg grey -sb -sr -vb -fn -misc-fixed-medium-r-semicondensed-*-*-120-*-*-c-*-iso8859-15
I personally find the minimilist features, especially the sleek scrollbar, to be very appealing.