VanDyke Software Forums

VanDyke Software Forums (https://forums.vandyke.com/index.php)
-   General (https://forums.vandyke.com/forumdisplay.php?f=11)
-   -   Request: Ability to pass arguments to Local Shell (https://forums.vandyke.com/showthread.php?t=14184)

blixem 05-19-2020 10:59 AM

Request: Ability to pass arguments to Local Shell
 
Request to add the ability to add either arguments, or custom commands to the "Local Shell" configuration.

In my scenario I use WSL often as a local shell. SecureCRT allows this by setting a new session with the local shell: "C:\Windows\System32\wsl.exe" Unfortunately wsl launches this local shell with the "Windows" users home directory instead of the linux user home dir. The fix for this on the command line is to pass the path to the directory you wish to start wsl working directory as after wsl.exe. E.g. "wsl.exe ~" will launch properly with proper home directory.

As of 8.7.1 the Local Shell will not let you add that argument to the command, and displays the error: "Local shell path is not a console application"

blixem 05-19-2020 11:04 AM

FYI, low priority as the current work around is to have a logon action that just executes "cd ~" when I connect and the prompt is what I would see with the windows user directory instead of the wsl home dir.

bgagnon 05-19-2020 11:35 AM

Hi blixem,

I have added this thread to a feature request in our product enhancement database to add the ability to pass command line arguments to local shell process. 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 #14184 in the subject line or use this form from the support page of our website.

Quote:

As of 8.7.1 the Local Shell will not let you add that argument to the command, and displays the error: "Local shell path is not a console application"
Are you saying this worked in versions prior to v8.7.1?

blixem 06-10-2020 10:26 AM

Quote:

Originally Posted by bgagnon (Post 53569)

Are you saying this worked in versions prior to v8.7.1?

No, this is an request to enhance the Local Shell feature.

ross 06-11-2020 10:47 AM

Please see if you can also allows users to run an elevated shell
 
When I try to launch an elevated (Administrator) shell, by setting the Local Shell to:
Code:

C:\tools\NirLauncher\NirSoft\nircmdc.exe elevate cmd.exe /k
SecureCRT 8.7.2 fails to accept this value, and pops up an error dialog box, that says:
Code:

Local shell path is not a console application:

C:\tools\NirLauncher\NirSoft\nircmdc.exe elevate cmd.exe /k

Perhaps it's not possible, but it would be really useful if this could be done.

For now, I have to run SecureCRT itself in an elevated session, which is not really optimal.

bgagnon 06-11-2020 11:03 AM

Hi ross,

In my earlier post I indicated it was not possible presently and is a feature request. :)

ross 06-11-2020 07:45 PM

Quote:

Originally Posted by bgagnon (Post 53653)

My request is slightly different. I'm requesting that SecureCRT allow me to run an elevated cmd.exe shell. I don't know if this is technically possible, without running SecureCRT itself in an elevated shell, but I wanted to throw the idea out there.

bgagnon 06-12-2020 07:24 AM

Hi ross,

Thanks for the clarification, but alas, that is also a feature request. :)

I have added this thread to a feature request in our product enhancement database for the ability to run local shell application as Administrator. 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 #14184 in the subject line or use this form from the support page of our website.

ross 04-24-2021 05:58 PM

Another reason to allow command line options
 
Another reason to allow command line options is if I want to run a non-default distribution under WSL/WSL2. To run the default instance, I just type
Code:

C:\Windows\System32\wsl.exe
To run another distribution other than the default one, say Ubuntu 20.04, I would type:
Code:

C:\Windows\System32\wsl.exe -d Ubuntu-20.04
I can't do this in SecureCRT 9.01, as it doesn't allow command line options.

Is there a workaround, until this issue is addressed?

bgagnon 04-26-2021 07:17 AM

Hi ross,

I know of no workaround, sorry.

I have added this thread to a feature request in our product enhancement database to add the ability to pass command line arguments to local shell process. 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 Forum Thread #14184 - Command Line/Local Shell in the subject line or use this form from the support page of our website.

bgagnon 04-26-2021 09:25 AM

Hi ross,

A colleague just let me know if you wrap your desired commands in a batch file then you should be able to point to the batch file as the local shell path.


All times are GMT -6. The time now is 11:45 AM.