#1
|
|||
|
|||
tabs renamed automatically?
Something's been bugging me for a while. I've been suing SecureCRT 5.5 and when I connect to some linux servers, the tab name automatically changes to the command prompt. This sometimes gets really annoying as I may have long current directory names and the tabs get too wide and start pushing other tabs off the screen. Is there a way to turn this off?
Last edited by GKnight; 09-12-2009 at 09:39 AM. |
#2
|
||||
|
||||
The server is sending window title change requests. That's the real cause of the problem. You could disable that by setting your prompt in one of your initialization files (.bash_profile, .tcshrc, etc.).
SecureCRT does provide an option to ignore the window title change requests. If you enable the option to Ignore window title change requests in Session Options / Terminal / Emulation / Advanced, does that fix the problem?
__________________
Mike VanDyke Software Technical Support [http://www.vandyke.com/support] |
#3
|
|||
|
|||
Quote:
What exactly triggers the window title change? Some of my linux servers do it while some don't, I can't quite figure it out by looking at the profiles or env settings. It's only happening on the linux servers. |
#4
|
||||
|
||||
Quote:
ESC]2;titleBEL(By BEL, I mean ASCII(7)). What's likely happening is that the shell prompt on your Linux machines is configured to send the escape sequence as part of displaying the command prompt. If you're running a bash shell on your Linux machines, it's likely that either the PS1 or PROMPT_COMMAND environment variables are responsible for sending the window title change request to SecureCRT. You can play around with this if you want to experiment. For example, you might want to set up your remote startup scripts to always set the tab title to the remote hostname to which you are connected. Here's an example command you can run to change your window prompt (assuming the Session option to Ignore window title change requests is not enabled): echo -ne "\033]2;This is my new window Title\007"To set your prompt to the hostname of the Linux machine to which you are connected, you might use the following as an example: echo -ne "\033]2;`hostname`\007"Or, to set your prompt to the IP address of the Linux machine to which you are connected, you could use the following command: echo -ne "\033]2;`ifconfig eth0 | grep 'inet addr:'| grep -v '127.0.0.1' | cut -d: -f2 | awk '{ print $1}'`\007" --Jake
__________________
Jake Devenport VanDyke Software Technical Support YouTube Channel: https://www.youtube.com/vandykesoftware Email: support@vandyke.com Web: https://www.vandyke.com/support |
#5
|
|||
|
|||
Thanks for the detailed explanation! I checked, and sure enough, I found this in the /etc/bashrc file:
Code:
PROMPT_COMMAND='echo -ne "\033]0;${USER}@${HOSTNAME%%.*}:${PWD/#$HOME/~}\007"' |
#6
|
|||
|
|||
how do do this in other shells?
I noticed that the cmds you gave only work on bash.
what about tcsh, csh, or zsh? Thanks |
#7
|
||||
|
||||
Quote:
What problem are you trying to solve, Aaron? --Jake
__________________
Jake Devenport VanDyke Software Technical Support YouTube Channel: https://www.youtube.com/vandykesoftware Email: support@vandyke.com Web: https://www.vandyke.com/support |
![]() |
Currently Active Users Viewing This Thread: 1 (0 members and 1 guests) | |
Thread Tools | |
Display Modes | |
|
|