Post a reply

Before posting, please read how to report bug or request support effectively.

Bug reports without an attached log file are usually useless.

Options
Add an Attachment

If you do not want to add an Attachment to your Post, please leave the Fields blank.

(maximum 10 MB; please compress large files; only common media, archive, text and programming file formats are allowed)

Options

Topic review

martin

Re: environmental problem running command via terminal window

I'm sorry, but I've runned out of ideas. I just works for me fine :-(
aphongka

Re: environmental problem running command via terminal window

martin wrote:

Can you try to add -T option to ssh command and check what, if any, script is executed? With -T option, 'ssh' should use then the same mode as WinSCP.


first variant of ssh (non interactive) works with -T option too (I mean .bashrc is run)

second variant (interactive) hangs with -T option and I am not able to see if it works
martin

Re: environmental problem running command via terminal window

Can you try to add -T option to ssh command and check what, if any, script is executed? With -T option, 'ssh' should use then the same mode as WinSCP.
aphongka

Re: environmental problem running command via terminal window

No, I setup PATH, LANG and some application specific variables.

Well when i use ssh from cigwin environment like

ssh -l user host.com env|sort

i see that .bashrc has run. The command like this

ssh -l user host.com
$>env|sort

shows that .bash_profile has run

But nothing has run with WinSCP. What is the problem? Is it a bug or a feature?
martin

Re: environmental problem running command via terminal window

Strange. Another hint: some variables are unset by WinSCP on start up. Maybe the one you need is among them. These variables are: LANG, LANGUAGE, LC_CTYPE, LC_COLLATE, LC_MONETARY, LC_NUMERIC, LC_TIME, LC_MESSAGES, LC_ALL, HUMAN_BLOCKS. You may uncheck the "clean national variables" on SCP tab of login window to avoid this. But WinSCP may not work then,
aphongka

Re: environmental problem running command via terminal window

martin wrote:

Some of the startup scripts are not executed for non-interactive sessions. Try to set your variables in other scripts (like .profile, .bash_profile, etc.)


Strange, but non of the files seems to work :( neither .bashrc, nor .bash_profile, nor .profile, nor .cshrc, nor /etc/profile. Are there any other ways to set up the environment while running a script?
martin

Re: environmental problem running command via terminal window

Some of the startup scripts are not executed for non-interactive sessions. Try to set your variables in other scripts (like .profile, .bash_profile, etc.)
aphongka

Re: environmental problem running command via terminal window

Forget to mention.

I use version 3.6.6 build 234
I use SCP protocol

/Alexey
Alexey

environmental problem running command via terminal window

Hi

I succesfully login to my acoount on FreeBSD machine. But when I open Terminal/Console window and issue 'env' command I don't see enviroment variables that have to be set in .bashrc file.

I want to run a bash script which uses some environment configured in .bashrc.

What could be a problem? Are there any workarounds?

Thanks,
Alexey