VanDyke Software Forums

VanDyke Software Forums (https://forums.vandyke.com/index.php)
-   Scripting (https://forums.vandyke.com/forumdisplay.php?f=14)
-   -   Tab name = Connected device (https://forums.vandyke.com/showthread.php?t=12211)

arries289 01-22-2016 09:03 AM

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,

rtb 01-22-2016 09:33 AM

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?

rtb 01-22-2016 11:11 AM

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%%.*}"'

arries289 01-22-2016 12:51 PM

Thanks guys for the info!


All times are GMT -6. The time now is 08:16 AM.