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

conty

I lose :oops:

I always wondered the difference between .bash_profile and .bashrc, I get it now.. you learn something every day, I guess :?

ps error message contains suggestion that .profile prints the message (the faq says .profile isn't executed for non-interactive), which made me think .bashrc and .bash_profile are the other way around. argh. maybe make it link to the faq? :)

sorry for wasting time, delete please. :x
martin

Re: small fix for login fortunes, etc

You should read F.A.Q. to learn cause of your problems and also to learn that your solution is not the right one :-)
conty

small fix for login fortunes, etc

When connecting to ssh, I have "fortune" in my .bashrc, which prints a little fortune. However winscp chews on this, because it makes the initial packet(s) too big and complains. Trivial fix is to check the type of terminal through environment variable in script, like:

# Fix for winscp

if [ "$TERM" != "dumb" ]; then
    fortune
fi


(putty and openssh emulate xterm, should work for other clients also - try "echo $TERM" to see)

Now winscp works and I get my fortunes in putty and so on. why winscp needs to launch bash at all, I don't know, maybe weirdness in ssh protocol, hah. anyway, hope that helps someone out :D