LinuxQuestions.org
Visit the LQ Articles and Editorials section
Go Back   LinuxQuestions.org > Forums > Linux > Linux - Software
User Name
Password
Linux - Software This forum is for Software issues.
Having a problem installing a new program? Want to know which application is best for the job? Post your question in this forum.

Notices

Tags used in this thread
Popular LQ Tags , , , ,

Reply
 
Thread Tools
Old 09-03-2009, 03:34 PM   #1
NateTut
LQ Newbie
 
Registered: Apr 2006
Location: Eagan, MN
Distribution: SuSe cuz that's what we run at work when we don't run Solaris
Posts: 11
Thanked: 1
Cool How to get the Title of a Putty Window (Emulating an XTerm)


[Log in to get rid of this advertisement]
I have a Perl script that changes the terminal window title and I would like to be polite and 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 have found a code that returns the window title ESC[21t; It seems to work except it doesn't go to STDOUT or STDERR. I can see the title, but I need to capture it

Putty has an option: "Response to remote title query (SECURITY)" I would like to know how to make such a query. I understand the security implications, but this is behind a firewall and Putty will not be used on sites in the wild.
windows_xp_2003 NateTut is offline  
Tag This Post , , , ,
Reply With Quote
Old 09-05-2009, 06:12 AM   #2
carltm
Member
 
Registered: Jan 2007
Location: Canton, MI
Distribution: CentOS, SuSE, Red Hat, Debian, etc.
Posts: 204
Thanked: 14
I use this line to change the window title from my .profile:
Quote:
PROMPT_COMMAND='echo -ne "\033]0;$USER@${HOSTNAME}: ${PWD}\007"'
Try running echo $PROMPT_COMMAND before running your perl script. If that
variable contains something, run PROMPT_COMMAND_OLD="$PROMPT_COMMAND" before
you run the script and then PROMPT_COMMAND="$PROMPT_COMMAND_OLD" afterwards.
linuxcentos carltm is offline     Reply With Quote

Reply

Bookmarks


Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
Get the title of xterm/gnome-terminal redleafong Linux - Software 5 07-13-2009 11:47 AM
Change title of xterm - Fedora 2.6 sohnir Linux - General 3 12-13-2005 12:40 PM
xterm title after quittin ssh sessions bujecas Slackware 1 07-01-2005 09:27 PM
Rename Putty Title dlublink Linux - General 3 03-10-2005 09:28 AM
custom xterm title when already defined in .bashrc brian0918 Linux - Software 1 06-01-2004 12:17 PM


All times are GMT -5. The time now is 12:03 AM.

Main Menu
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
RSS2  LQ Podcast
RSS2  LQ Radio
Twitter: @linuxquestions
identi.ca: @linuxquestions
Facebook: @linuxquestions
Open Source Consulting | Domain Registration