Welcome to the VanDyke Software Forums

Join the discussion today!


Go Back   VanDyke Software Forums > SecureCRT on the Mac

Reply
 
Thread Tools Rate Thread Display Modes
  #1  
Old 10-03-2018, 11:09 PM
waynespa waynespa is offline
Registered User
 
Join Date: Jul 2012
Posts: 4
Local Shell - strange bash prompt

Hi guys,

When I hit command-L for a local shell tab, I get the following bash prompt

37;RemoteHost=waynes@Waynes-MacBook-Pro.local37;CurrentDir=/Users/waynes37;ShellIntegrationVersion=11;shell=bash3;C;37;RemoteHost=waynes@Waynes-MacBook-Pro.local37;CurrentDir=/Users/waynes3;D;03;AWaynes-MacBook-Pro:~ waynes$ 3;B
3;C;37;RemoteHost=waynes@Waynes-MacBook-Pro.local37;CurrentDir=/Users/waynes3;D;03;AWaynes-MacBook-Pro:~ waynes$ 3;B
3;C;37;RemoteHost=waynes@Waynes-MacBook-Pro.local37;CurrentDir=/Users/waynes3;D;03;AWaynes-MacBook-Pro:~ waynes$ 3;B


Anyone else getting this or know how to fix?

SCRT Version 8.5.0 (build 1740)
MacOS 10.14

Many thanks
Reply With Quote
  #2  
Old 10-04-2018, 08:50 AM
bgagnon bgagnon is online now
VanDyke Technical Support
 
Join Date: Oct 2008
Posts: 3,570
Hi waynespa,

Do you see the same issue in Mac's native Terminal app?

Do you (or have you in the past) had iTerm2 installed on this machine?

If so, I believe this is because iTerm customizations (due to enabling Shell Integration) to the environment are not compatible with a native Xterm terminal. There are escape sequences that don't mean anything to an Xterm; they end up resulting in the display of the garbage since SecureCRT doesn't know how to interpret the iTerm2 specific customizations (and SecureCRT shouldn't be expected to know how to handle these custom-to-iterm2 sequences).

Since only iTerm (or other "in-the-know" apps) can interpret the customized escape sequences, you will need to follow instructions on disabling iterm2's Shell Integration, or have a Logon Action in SecureCRT for your local shell connections (the default session) to do something like below (YouTube video demonstrating Default Session):

Code:
  Expect:      waynes$ 3;B
  Send:        export PROMPT_COMMAND='echo -ne "\033]2;${USER}@{$HOSTNAME}\007"'
Here's links to a couple forum posts about Logon Actions:

https://forums.vandyke.com/showpost....60&postcount=6

https://forums.vandyke.com/showthread.php?t=13260

I have added this thread to a feature request in our product enhancement database for an option for SecureCRT to nicely handle the customizations associated with iterm2's Shell Integration. Should a future release of SecureCRT include this feature, notification will be posted here.

If you prefer direct email notification, send an email to support@vandyke.com and include "Feature Request - Forum Thread #13279" in the subject line or use this form from the support page of our website.
__________________
Thanks,
--Brenda

VanDyke Software
Technical Support
support@vandyke.com
(505) 332-5730
Reply With Quote
  #3  
Old 10-06-2018, 06:34 AM
waynespa waynespa is offline
Registered User
 
Join Date: Jul 2012
Posts: 4
Solved

Hi Brenda,

Thanks for the reply you were 100% correct

I removed the iTerm2 Shell integration and used this guide https://www.alexkras.com/remove-shel...n-from-iterm2/
Reply With Quote
  #4  
Old 10-06-2018, 11:24 AM
bgagnon bgagnon is online now
VanDyke Technical Support
 
Join Date: Oct 2008
Posts: 3,570
Hi waynespa,

Great! Thanks for posting the link for others.
__________________
Thanks,
--Brenda

VanDyke Software
Technical Support
support@vandyke.com
(505) 332-5730
Reply With Quote
  #5  
Old 11-08-2018, 06:34 AM
sybabe sybabe is offline
Registered User
 
Join Date: Nov 2018
Posts: 1
Cool How to change the prompt specifically

I'm still trying to figure out where to change the prompt of the local shell. Is it in the Advanced in Terminal Session Options? If so, what do I put in and where?


Quote:
Originally Posted by bgagnon View Post
Hi waynespa,

Do you see the same issue in Mac's native Terminal app?

Do you (or have you in the past) had iTerm2 installed on this machine?

If so, I believe this is because iTerm customizations (due to enabling Shell Integration) to the environment are not compatible with a native Xterm terminal. There are escape sequences that don't mean anything to an Xterm; they end up resulting in the display of the garbage since SecureCRT doesn't know how to interpret the iTerm2 specific customizations (and SecureCRT shouldn't be expected to know how to handle these custom-to-iterm2 sequences).

Since only iTerm (or other "in-the-know" apps) can interpret the customized escape sequences, you will need to follow instructions on disabling iterm2's Shell Integration, or have a Logon Action in SecureCRT for your local shell connections (the default session) to do something like below (YouTube video demonstrating Default Session):

Code:
  Expect:      waynes$ 3;B
  Send:        export PROMPT_COMMAND='echo -ne "\033]2;${USER}@{$HOSTNAME}\007"'
Here's links to a couple forum posts about Logon Actions:

https://forums.vandyke.com/showpost....60&postcount=6

https://forums.vandyke.com/showthread.php?t=13260

I have added this thread to a feature request in our product enhancement database for an option for SecureCRT to nicely handle the customizations associated with iterm2's Shell Integration. Should a future release of SecureCRT include this feature, notification will be posted here.

If you prefer direct email notification, send an email to support@vandyke.com and include "Feature Request - Forum Thread #13279" in the subject line or use this form from the support page of our website.
Reply With Quote
  #6  
Old 11-08-2018, 09:24 AM
ekoranyi ekoranyi is offline
VanDyke Technical Support
 
Join Date: Jan 2017
Posts: 559
Hi sybabe,

Changing your local prompt is something that is typically handled outside of SecureCRT. The commands/formatting needed to change your prompt will vary depending on the Operating System you are running on.

What Operating System are you using?

Can you elaborate on the changes you are trying to make? What is your prompt displaying now? What would you like your prompt to be?
__________________
Thanks,
--Eric

VanDyke Software
Technical Support
support@vandyke.com
(505) 332-5730
Reply With Quote
Reply


Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)
 
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 09:54 AM.