Can't launch PuTTY in ConEmu anymore (wrong position of "-load" argument?)

Advertisement

CherryDT
Joined:
Posts:
3

Can't launch PuTTY in ConEmu anymore (wrong position of "-load" argument?)

Hello,

I am launching PuTTY inside ConEmu. To achieve this, my PuTTY application path is set to:

"c:\Program Files\conemu\ConEmu64.exe" /cmd "C:\Program Files (x86)\PuTTY\putty.exe"

This worked perfectly for a long time. I was last using version 5.5.6 (build 4746). Then I updated to version 5.9.3 (build 7136) and it stopped working.

I get the following error:

---------------------------
ConEmu 161206 [64]
---------------------------
Unknown switch specified:



-load "WinSCP temporary session" /cmd "C:\Program Files (x86)\PuTTY\putty.exe"



Visit website to get thorough switches description:

https://conemu.github.io/en/ConEmuArgs.html



Or run ‘ConEmu.exe -?’ to get the brief.
---------------------------
OK   
---------------------------

Apparently, WinSCP now injects the "-load" argument between application path and the first parameter I define (which would be "/cmd") and hence breaks the command line. I haven't found any way to change this. Am I doing something wrong? It would be great if the "-load ...." argument would just be another pattern, e.g. "!L", so I could put it where it belongs...

Thanks!

PS: I'm running Windows 10 Pro Build 14393.576

Reply with quote

Advertisement

Makc666
Joined:
Posts:
52
Location:
MSK-RU

The only thing about -load I was able to find in docs is here:
https://winscp.net/eng/docs/ui_pref_integration_app
If pattern !@ is not used, parameter -load <site> is automatically added to the command.
+
https://the.earth.li/~sgtatham/putty/latest/htmldoc/Chapter3.html#using-cmdline
In order to start an existing saved session called sessionname, use the -load option (described in section 3.8.3.1).
+
https://the.earth.li/~sgtatham/putty/latest/htmldoc/Chapter3.html#using-cmdline-load

Reply with quote

CherryDT
Joined:
Posts:
3

Well, I don't want to use !@, !U, !P because I am using private keys which should be set correctly, also I don't want to do a hack like using !@ but in some ignored parameter or so and then manually adding '-load "WinSCP Temporary Session"' because WinSCP selects existing sessions if possible, so it wouldn't always be hardcoded to "WinSCP Temporary Session"...

It looks like in the past, the -load was appended at the end of the command, which works great for such a scenario (albeit less flexible than with a dedicated pattern), but in the current version it's inserted at the beginning of the command line after the application name, which breaks ConEmu or any other "prefixed" command like this...

Reply with quote

Makc666
Joined:
Posts:
52
Location:
MSK-RU

CherryDT wrote:

Well, I don't want to use !@, !U, !P because ...

And this one?

https://conemu.github.io/en/NewConsole.html

Or, from your shell prompt (e.g. cmd.exe started in ConEmu) you can start PuTTY (or any other simple GUI applications) in the new ConEmu tab (or split):
PuTTY.exe -new_console -load "yourserver"

P.S. Can you tell me, how do you execute ConEmu64.exe?

When you say that you start:
"c:\Program Files\conemu\ConEmu64.exe" /cmd "C:\Program Files (x86)\PuTTY\putty.exe"
it sounds like you start it from the .bat file.

In that case I hardly believe that it then changes to:
"c:\Program Files\conemu\ConEmu64.exe" -load "WinSCP temporary session" /cmd "C:\Program Files (x86)\PuTTY\putty.exe"
somewhere.

I don't see WinSCP involved anywhere?!

Reply with quote

CherryDT
Joined:
Posts:
3

I am talking about setting it as path in WinSCP for PuTTY (similar to how the WinSCP docs suggest running WSL SSH instead). Under "Applications" in the settings.

About -new_console: It's a ConEmu-interpreted parameter to start a command in a new console, so it works when run from a shell which runs inside ConEmu already... Chicken and egg issue: WinSCP is not running in ConEmu ;)

And it does change:


Reply with quote

Advertisement

martin
Site Admin
martin avatar
Joined:
Posts:
28,542
Location:
Prague, Czechia

Re: Can't launch PuTTY in ConEmu anymore (wrong position of "-load" argument?)

Thanks for your report. I'll try to find some good solution.

Reply with quote

martin
Site Admin
martin avatar
Joined:
Posts:
28,542
Location:
Prague, Czechia

Re: Can't launch PuTTY in ConEmu anymore (wrong position of "-load" argument?)

This issue has been added to the tracker:
https://winscp.net/tracker/1493

I'm sending you an email with a development version of WinSCP to the address you have used to register on this forum.

Reply with quote

Advertisement

You can post new topics in this forum