Welcome to the VanDyke Software Forums

Join the discussion today!


Go Back   VanDyke Software Forums > Scripting

Notices

Reply
 
Thread Tools Rate Thread Display Modes
  #1  
Old 01-22-2016, 09:03 AM
arries289 arries289 is offline
Registered User
 
Join Date: Oct 2013
Posts: 4
Tab name = Connected device

I am trying to figure out how to get my tab name to automatically be populated with my connected linux device. I searched the site and found the following but not sure how to implement for a global change. I could do it per session but would rather automatic and global.

echo -ne "\033]2;`hostname`\007"

Any ideas?

Thanks,
Reply With Quote
  #2  
Old 01-22-2016, 09:33 AM
rtb rtb is offline
VanDyke Technical Support
 
Join Date: Aug 2008
Posts: 4,305
Hi arries289,

You can make the change on a global or multi-session basis using one of the following tips respectively:
http://www.vandyke.com/support/tips/defaultset.html
http://www.vandyke.com/support/tips/multisessions.html
Does this help you accomplish your goal?
__________________
--Todd

VanDyke Software
Technical Support
support@vandyke.com
505-332-5730
Reply With Quote
  #3  
Old 01-22-2016, 11:11 AM
rtb rtb is offline
VanDyke Technical Support
 
Join Date: Aug 2008
Posts: 4,305
Hi arries289,

An alternative to your current approach would be to modify the remote shell to use bash and then set the PROMPT_COMMAND environment variable. Here is an example that will set the hostname for the tab:
PROMPT_COMMAND='printf "\033]0;%s\007" "${HOSTNAME%%.*}"'
__________________
--Todd

VanDyke Software
Technical Support
support@vandyke.com
505-332-5730
Reply With Quote
  #4  
Old 01-22-2016, 12:51 PM
arries289 arries289 is offline
Registered User
 
Join Date: Oct 2013
Posts: 4
Thanks guys for the info!
Reply With Quote
Reply

Thread Tools
Display Modes Rate This Thread
Rate This Thread:

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 On
HTML code is Off

Forum Jump


All times are GMT -6. The time now is 03:10 AM.