How to change the title bar of the terminal screen


 
Thread Tools Search this Thread
Top Forums Shell Programming and Scripting How to change the title bar of the terminal screen
# 1  
Old 10-14-2011
How to change the title bar of the terminal screen

Hi,

How to change the value after the symbol '@' ?

[oracle@mac1~]$

i.e. @mac1

I want to change it to @prod2

Also need to change the same in the title bar on the top when we open a new terminal.
# 2  
Old 10-14-2011
if you are connecting server through putty. You can go to "change settings" --> "Windows" --> "Behaviour"
# 3  
Old 10-14-2011
I am directly accessing Linux machine. No putty.
# 4  
Old 10-14-2011
It's possible to add special codes to your prompt that will cause the title bar of your X terminal (such as rxvt or aterm) to be dynamically updated. All you need to do is add the following sequence to your PS1 prompt:

Code:
"\e]2;titlebar\a"


Simply replace the substring "titlebar" with the text that you'd like to have appear in your xterm's title bar, and you're all set! You don't need to use static text; you can also insert bash escape sequences into your titlebar. Check out this example, which places the username, hostname, and current working directory in the titlebar, as well as defining a short, bright green prompt:

Code:
export PS1="\[\e]2;\u@\H \w\a\e[32;1m\]>\[\e[0m\] "

Login or Register to Ask a Question

Previous Thread | Next Thread

10 More Discussions You Might Find Interesting

1. Ubuntu

Title bar top and bottom

Hello forum, Seems that only I have alot of questions regarding Ubuntu :D In Ubuntu 12.04 LTS the gnome I have been using gdm and lightdm. In lightdm the top and side bars are aka "unity" and can be removed using apt-get remove unity I need to do the same for menu bars gdm. I do not... (0 Replies)
Discussion started by: br1an
0 Replies

2. UNIX for Dummies Questions & Answers

Change putty title name

Hello all, I have a not so unix question for you guys(or maybe it is). I use PUTTY to login to serverA (my putty title shows as serverA.domainname.com) Now from ServerA i do ssh user@ServerB (i have ssh public private key setup)... now my question is when i do ssh and logon to... (20 Replies)
Discussion started by: abdul.irfan2
20 Replies

3. UNIX for Dummies Questions & Answers

Setting the current directory path to terminal title

In ubuntu, I want to update the title of the terminal window with the current directory path. Any ideas how this can be achieved? ---------- Post updated at 02:22 PM ---------- Previous update was at 02:08 PM ---------- Done it ---------- Post updated at 02:30 PM ---------- Previous update... (2 Replies)
Discussion started by: kristinu
2 Replies

4. UNIX for Dummies Questions & Answers

Reflection X v14 Desktop Title bar

Not sure exactly where to post this, so I apologize if this is incorrect. I have recently installed Reflection X v14.1 as an X windows client. While this may sound trivial, I have found that if you are connected to multiple servers, only 1 desktop is used. If anyone happens to know much about... (3 Replies)
Discussion started by: niswonp
3 Replies

5. Shell Programming and Scripting

Directory name in terminal title

I would like to have the directory I am currently in being shown in the title when I open a terminal window in Fedora (selecting "Open in terminal" or using the Terminal from the panel). Any way that I can do this? Basically whenever I do "cd", the title should update I have created this... (1 Reply)
Discussion started by: kristinu
1 Replies

6. AIX

How to change cronjob title?

Once I type "mail" command, I got to see the mail like below: > 1 daemon Thu Aug 12 17:31 31/938 "Output from cron job " My question is, how to do change the default title "Output from cron job " to be more customized title? Thanks. (4 Replies)
Discussion started by: ngaisteve1
4 Replies

7. UNIX Desktop Questions & Answers

Terminal title bar tweak discrepancy problem in Cygwin/X

Code for the tweak (not my fave 'running process' but the more popular 'working directory') : case "$TERM" in xterm*|rxvt*|rxvt-unicode*) PROMPT_COMMAND='echo -e "\033]0;$TERM: ${PWD}\007"' ;; *) ;; esac Where it works: rxvt (the one I run 'rootless' outside of ... (0 Replies)
Discussion started by: SilversleevesX
0 Replies

8. Solaris

Change Terminal Title

Is it possible to change the title of a Terminal window on Solaris? For example, for a MS Windows command window, one can simply type "title NameofWindow" to change the title for a command window. I was looking for similar functionality for terminal windows. Thanks. (8 Replies)
Discussion started by: here2learn
8 Replies

9. Shell Programming and Scripting

title bar manipulation in F-Secure SSH Client for Windows

Hello All, I was wondering if the titlebar in "F-Secure SSH Client for Windows" is changeable. Currently I see the host name in the title bar. I would like to add "user@host" to the title. So when I log on to a particular box and do a ssh to another box the title should dynamically... (3 Replies)
Discussion started by: ssikhar
3 Replies

10. UNIX for Dummies Questions & Answers

Change Console Title

Hello. I am trying to figure out how to change the title of my console window. I don't need it to dynamically change with my current directory. I just want to be able to change the name of it, so when I minimize the window I can see which windows are for what purpose. I've tried using the... (8 Replies)
Discussion started by: medmonson
8 Replies
Login or Register to Ask a Question