Calling PuTTY: automatic change catalog

Advertisement

Splinty
Donor
Joined:
Posts:
33
Location:
Russia, Kurgan

Calling PuTTY: automatic change catalog

Hello.
Does exist a way while calling a PuTTY submit a current catalog from Tree to PuTTY that PuTTY go there? Terminal (Ctrl-T) does it successfully.
It would be a very nice.

Reply with quote

Advertisement

martin
Site Admin
martin avatar
Joined:
Posts:
41,441
Location:
Prague, Czechia

Re: Calling PuTTY: automatic change catalog

Sorry, I do not understand. Do you mean to instruct PuTTY to start in the same working directory as WinSCP is?

Reply with quote

Splinty
Donor

Yes, it was the my question. Now i need to copy current WinSCP path (Ctrl-]) and insert into just opened PuTTY session (Ctrl-P) with cd command. Yes, it's not a problem, but it would be very suitable to automate it.

Reply with quote

martin
Site Admin
martin avatar
Joined:
Posts:
41,441
Location:
Prague, Czechia

Any suggestion how to do that? :-)
WinSCP could add cd command to Connection > SSH > Remote command session option of PuTTY. But it also needs then to start a shell, otherwise PuTTY would exit immediately after issuing cd command.
So something like
cd "/current/winscp/path/" ; $SHELL -l
in Remote command might do the work.
However I'm not sure how much reliable that would be.

This issue has been added to tracker.

Reply with quote

Advertisement

Splinty
Donor
Joined:
Posts:
33
Location:
Russia, Kurgan

cd "/current/winscp/path/" ; $SHELL -l looks funny :mrgreen:
Environment variables is one more way.
let's try it also.

I mean, that if WinSCP set PUTTYPATH to current path then i can make cd $PUTTYPATH in .bash_profile. Yes, it can fail on SSH-1 servers (reading PuTTY manual) but please, don't regret that idea. It's not so hard to add in default PuTTY connection properties that parameter, right?

Reply with quote

martin
Site Admin
martin avatar
Joined:
Posts:
41,441
Location:
Prague, Czechia

Splinty wrote:

I mean, that if WinSCP set PUTTYPATH to current path then i can make cd $PUTTYPATH in .bash_profile. Yes, it can fail on SSH-1 servers (reading PuTTY manual) but please, don't regret that idea. It's not so hard to add in default PuTTY connection properties that parameter, right?
If your SSH server supports setting environment variables. I believe that OpenSSH (the most common) does not.

Reply with quote

Splinty
Donor
Joined:
Posts:
33
Location:
Russia, Kurgan

Well... It was my hope... But You are right. it doesn't.
So, it seems, that topic can't be realized. But if You will correct Terminal, it will be really happy day :mrgreen:
I'd like to say, that it will be much more useful You will spent time in developing Terminal.
I mean
1. Translation support
2. Fonts and colors setup

Reply with quote

Advertisement

You can post new topics in this forum