由买买提看人间百态

boards

本页内容为未名空间相应帖子的节选和存档,一周内的贴子最多显示50字,超过一周显示500字 访问原贴
Unix版 - How to set the titile of the terminal?
相关主题
xtermbash prompt 一问
[转载] 如何返回当前窗口正在运行的程序名称a question, thank you!
System Environment variables in Perl求助: DHCP设置on solaris
输入xterm总提示display错误xterm显示不了颜色
求助!!How to add network card under solaris?
Job control question???re-configure network and change hostname
why?which dot file control xterm/etc in solaris 9?
HELP:scorllbar on xterm windowHow to understand 'global zone' in solaris?
相关话题的讨论汇总
话题: terminal话题: titile话题: set话题: username话题: hostname
进入Unix版参与讨论
1 (共1页)
d*******t
发帖数: 36
1
How to set the titile of the terminal. I used Solaris and Linux system. The
dtterm are used.
Normally, the title of the terminal is just a terminal. I would like to set it
title to the form like this:
Terminal username@hostname:path.
I don't want to set this information in the prompt in command line, for it is
too long for a terminal. In the command line, I would like the prompt like
this:
username@shellname_number% or so.
Then how to do it?
Thanks a lot.
m*****e
发帖数: 4193
2
Check the man page of the term emulator you are using.
For xterm it's xterm -title newtitle.

【在 d*******t 的大作中提到】
: How to set the titile of the terminal. I used Solaris and Linux system. The
: dtterm are used.
: Normally, the title of the terminal is just a terminal. I would like to set it
: title to the form like this:
: Terminal username@hostname:path.
: I don't want to set this information in the prompt in command line, for it is
: too long for a terminal. In the command line, I would like the prompt like
: this:
: username@shellname_number% or so.
: Then how to do it?

W****n
发帖数: 141
3
#!/bin/sh
if [ $# -eq 0 ]
then
hostname=`/usr/ucb/hostname | cut -d'.' -f1`
username=`/usr/ucb/whoami`
echo "^[]0;$hostname:$username^G\c"
else
echo "^[]0;$1^G\c"
fi
notice: ^ is ctrl key

【在 d*******t 的大作中提到】
: How to set the titile of the terminal. I used Solaris and Linux system. The
: dtterm are used.
: Normally, the title of the terminal is just a terminal. I would like to set it
: title to the form like this:
: Terminal username@hostname:path.
: I don't want to set this information in the prompt in command line, for it is
: too long for a terminal. In the command line, I would like the prompt like
: this:
: username@shellname_number% or so.
: Then how to do it?

1 (共1页)
进入Unix版参与讨论
相关主题
How to understand 'global zone' in solaris?求助!!
[转载] HOw to use Emacs as Xterm?Job control question???
telnet problem in cygwin xterm windowwhy?
[转载] xterm现在上面的标题怎么那么牛啊?HELP:scorllbar on xterm window
xtermbash prompt 一问
[转载] 如何返回当前窗口正在运行的程序名称a question, thank you!
System Environment variables in Perl求助: DHCP设置on solaris
输入xterm总提示display错误xterm显示不了颜色
相关话题的讨论汇总
话题: terminal话题: titile话题: set话题: username话题: hostname