Topic ".bashrc & .bash_logout"

Author Message
aibon
[View user's profile]

Joined: 2004-10-23
Posts: 3
I wonder if its possible to get a bash_logout to work. .bashrc wors fine with sftp, but i cant manage to get a .bash_logout to work. is this supported by winscp or could this be possible for a future version?
would be a great feature.. really great for people with clustered servers, as we for example have set up 3 webservers and a few ppl are uloading stuff to to the master with winscp. so it would be really neat to make a rsync in the .bash_logout and synchronize with the slaves after uploading... doing this in cron every couple of minutes isnt quite as elegant as this would be. or does any1 got another suggestion how this can be done?

thx a lot ....
and keep on the good work with winscp, i really like this litte program...
Advertisements
martin
[View user's profile]
Site Admin
Joined: 2002-12-10
Posts: 24512
Location: Prague, Czechia
.bashrc is not invoked by the client, but by the server. So in the same way, the .bash_logout must be invoked by the server. I cannot add any support for this to WinSCP. It is natural, as obviously the scripts are platform dependent. For example there are so such scripts on Windows.
_________________
Martin Prikryl
aibon
[View user's profile]

Joined: 2004-10-23
Posts: 3
thx for the fast answer. as i found out the .bash_logout is only executed when issuing a "exit", "logout" or "bye". think the problem is, that winscp just closes the session...
martin
[View user's profile]
Site Admin
Joined: 2002-12-10
Posts: 24512
Location: Prague, Czechia
aibon wrote:
thx for the fast answer. as i found out the .bash_logout is only executed when issuing a "exit", "logout" or "bye". think the problem is, that winscp just closes the session...

What protocol are you using, SCP or SFTP? With SCP I can maybe issue 'exit' command before logout. But SFTP protocol does not have anything like this.
_________________
Martin Prikryl
aibon
[View user's profile]

Joined: 2004-10-23
Posts: 3
prikryl wrote:
What protocol are you using, SCP or SFTP? With SCP I can maybe issue 'exit' command before logout. But SFTP protocol does not have anything like this.


are you sure? with scp i can't get .bashrc to execute on login, this works only with sftp....
martin
[View user's profile]
Site Admin
Joined: 2002-12-10
Posts: 24512
Location: Prague, Czechia
aibon wrote:
are you sure? with scp i can't get .bashrc to execute on login, this works only with sftp....

Yes, I'm sure.
_________________
Martin Prikryl
asz

Guest


Hi
I am experiencing the same problem with .bash_logout. Has this been fixed in some winscp version, 2002 was a while ago?

/andreas
martin
[View user's profile]
Site Admin
Joined: 2002-12-10
Posts: 24512
Location: Prague, Czechia
asz wrote:
I am experiencing the same problem with .bash_logout. Has this been fixed in some winscp version, 2002 was a while ago?

Well, this is not a bug. And the functionality has not been implemented, as there was no demand for that. Added to tracker though.
_________________
Martin Prikryl
Advertisements

You can post new topics in this forum






Search Site

What is WinSCP?

It is award-winning SFTP client, SCP client, FTPS client and FTP client integrated into one software program for file transfer to FTP server or secure SFTP server. [More]

And it's free!

Donate

About donations

$9   $19   $49   $99

About donations

Recommend

WinSCP Privacy Policy

WinSCP License