Change putty title name


 
Thread Tools Search this Thread
Top Forums UNIX for Dummies Questions & Answers Change putty title name
# 15  
Old 04-23-2012
then use `hostname` instead or just put serverA in there ...
# 16  
Old 04-23-2012
Quote:
Originally Posted by neutronscott
then use `hostname` instead or just put serverA in there ...
Thanks...its already using hostname in the code...

Code:
ssh() 
{
set -A args "$@"
        #try find out destination
        while [[ $1 = -* ]]; do shift; done

        printf '\033]0;%s\007' "$1"
        command ssh "${args[@]}"
        printf '\033]0;%s\007' "$USER@$HOSTNAME"
}


Last edited by Scrutinizer; 04-23-2012 at 06:38 PM..
# 17  
Old 04-23-2012
`hostname` differs from $HOSTNAME
This User Gave Thanks to neutronscott For This Post:
# 18  
Old 04-24-2012
Quote:
Originally Posted by neutronscott
`hostname` differs from $HOSTNAME
THANK YOU GUYS...You are awesome...
# 19  
Old 07-09-2012
Hello all again,

I know this is an old post, but wanted to bring it up. This works perfectly fine for putty....i have something like below that change my putty title when i do
ssh username@server name....

Code:
# SSH Wrapper
ssh()
{
set -A args "$@"
    #try find out destination
        while [[ $1 = -* ]]; do shift; done

        printf '\033]0;%s\007' "$1"
        command ssh "${args[@]}"
        printf '\033]0;%s\007' "`whoami`@`hostname`"
}

But now i have a question with regards to another tool...Putty connection manager or any other Tabbed style putty tool...the title dose not seems to change...is there anything special i need to do to get that changed for putty connection manager??

Moderator's Comments:
Mod Comment Please view this code tag video for how to use code tags when posting code and data.

Last edited by vbe; 07-09-2012 at 09:43 AM.. Reason: code tags
# 20  
Old 07-11-2012
Anything on the above ?
# 21  
Old 07-11-2012
If the terminal doesn't support changing its title, it doesn't support changing its title. Not much can be done except asking whoever maintains that terminal product for that feature.
 
Login or Register to Ask a Question

Previous Thread | Next Thread

10 More Discussions You Might Find Interesting

1. Post Here to Contact Site Administrators and Moderators

Change title of a thread after it is created

hi, how do we change the title of a thread after it is created? Thanks (5 Replies)
Discussion started by: milhan
5 Replies

2. UNIX for Dummies Questions & Answers

Getting command output to putty window title.

Hi, Last 2 weeks I have searched many forums and i haven't found the answer for the question: How to get all command output to Putty title? Needed it for other programs to know when some jobs on a server is done and is it done right or wrong. Plink stdout and stdin wasn't working, i used many... (1 Reply)
Discussion started by: domagaj
1 Replies

3. Shell Programming and Scripting

Remotely setting putty window title

I have successfully used a script to modify putty's window title for many years. It has worked great in a Solaris 10 environment, using, sh, bash and tcsh. But I've never been able to get it to work in linux :( The script relies on sending escape sequences via gnu echo. The version of echo on... (4 Replies)
Discussion started by: tsreyb
4 Replies

4. 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

5. 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

6. UNIX for Advanced & Expert Users

PuTTY TITLE

Is it possible to set the PuTTY title to show the current hostname of the terminal opened? I meant to say I would be rlogin between servers, that should be updated in PuTTTY title ? :confused: (4 Replies)
Discussion started by: ./hari.sh
4 Replies

7. 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

8. UNIX for Advanced & Expert Users

Change putty title window?

Is it possible to change the putty window title from a Unix command line? (12 Replies)
Discussion started by: akbar
12 Replies

9. 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

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