How to set xterm for Window Titls for PuTTy

 
Thread Tools Search this Thread
Operating Systems Linux Red Hat How to set xterm for Window Titls for PuTTy
# 1  
Old 08-27-2011
How to set xterm for Window Titls for PuTTy

Hi,
I still cant find step by step manual how to make my putty display let say PWD in its title, read about some xterm, but where it is?
Can anybody help me with this.

Thx
M
# 2  
Old 08-27-2011
Put this snippet either or in both .bashrc or .bash_profile if you are using bash shell
Code:
export PROMPT_COMMAND='echo -ne "\033]0;${USER}@${HOSTNAME}: ${PWD}\007"'

These 2 Users Gave Thanks to h@foorsa.biz For This Post:
# 3  
Old 08-27-2011
Thanks, H
I afraid that its still promt, I'm looking to change <window title> on putty app, which is on very top on blue background.

Thanks
V
# 4  
Old 08-27-2011
Tested in bash:

On bash shell prompt :

Code:
 echo -ne "\e]2;${PWD}\a";

From putty FAQ:

Code:
PuTTY allows the server to send xterm control sequences which modify the title of the window in mid-session (unless this is disabled - see section 4.6.5); the title string set here is therefore only the initial window title.

# 5  
Old 08-28-2011
It works for me like charm , I have attached a photo as a proof
OS : AIX
Shell : bash
$TERM: xterm
How to set xterm for Window Titls for PuTTy-tiltlegif

Last edited by h@foorsa.biz; 08-28-2011 at 09:28 AM..
Login or Register to Ask a Question

Previous Thread | Next Thread

10 More Discussions You Might Find Interesting

1. UNIX for Beginners Questions & Answers

Toggle between xterm window and standard terminal window

Is it possible to toggle back and forth between an xterm invoked from one tty, and a shell invoked from a different tty? I am running Centos 7 with KDE and booting in non-graphic mode. After logging in on the default window (/dev/tty1) , I can then use ALT-F2 to access a new window (/dev/tty2),... (1 Reply)
Discussion started by: rhgscty
1 Replies

2. Shell Programming and Scripting

Help with putty window setting

hi friends, This is not a shell scripting related doubt, but still posting so that you can answer it ;) or redirect to correct place in this website. Many a times i have to open multiple putty sessions by duplicating a session and want to rename their tabs. For this activity i have to right... (4 Replies)
Discussion started by: kunwar
4 Replies

3. UNIX for Advanced & Expert Users

Change the window name for putty

Hi everyone , Happy new year ! I have a question , hope someone will respond to me . I will be logging into so many servers in the same putty . So , whenever i loggedoff and loggedin into anonther server , putty window will change accordingly to the server name . If the above is... (7 Replies)
Discussion started by: radha254
7 Replies

4. UNIX for Dummies Questions & Answers

Putty - window size

Hi Guys, When I use putty and maximize it, then the second half of the emulator window is not utilized and used! I mean the mouse cursor is at the half of the page not at the bottom! i have to once minimize and maximize the window to tell putty that i am going to use the maxmized window...is... (4 Replies)
Discussion started by: messi777
4 Replies

5. Shell Programming and Scripting

Xterm window,should not prompt for a password?

Hi all, I have a script that opens a xterm window and will prompt for a password. My intention is, instead of waiting for a password it should get the password from a file. How can I make this happen.?:confused: Any help much appreciated. (1 Reply)
Discussion started by: dnam9917
1 Replies

6. Shell Programming and Scripting

How do I Get the Title of My Putty Window (Emulating an XTerm)

I have a Perl script that changes the terminal window title and I would like to reset it to the original value when I am done. We are using Putty which emulates xterm. We are not running X-Windows so I can't use something like xprop (can I?). I'm using XTerm control codes to change the title and I... (2 Replies)
Discussion started by: NateTut
2 Replies

7. UNIX for Dummies Questions & Answers

Bringing an Xterm window to top

Hi, Is there a way to configure a Linux machine so that I can click on any where on the Xterm window to bring it to the front/top. By default, I have to click on the title bar but often the entire title bar is underneath another window. Thanks in advance! PS. GNU/Linux (4 Replies)
Discussion started by: pidge66
4 Replies

8. UNIX for Advanced & Expert Users

putty title window?

I have implemented the solution from mschwage located in post https://www.unix.com/unix-advanced-expert-users/35784-change-putty-title-window.html; ie wt () { echo -n "^2;${@}^G" } This method is awesome!!!! The reason I am sending you this message is to get your assistance with... (3 Replies)
Discussion started by: lwif
3 Replies

9. UNIX for Dummies Questions & Answers

how to disable color text in xterm window

Hello, Anyone knows how to disable color text displayed on xterm window screen? I hate that color making me hard to read when front and background color are similar. Thanks, M. (1 Reply)
Discussion started by: modemer
1 Replies

10. Shell Programming and Scripting

Maximizing an xterm or aixterm window?

Is there a way to maximize an xterm window in a ksh script? I've tried a number of approaches, but none seem to have the desired affect. All I want to accomplish is to have the window maximized upon being called in the script...i.e: xterm -T MyNewXterm -e programToOpen & | maximized --or... (1 Reply)
Discussion started by: spieterman
1 Replies
Login or Register to Ask a Question