|
|
#1 |
|
Site Admin
Join Date: Dec 2001
Location: Minneapolis, MN
Posts: 3,988
|
The fortune and SFTP problem
OK, so I run "fortune" from my .tcshrc file for a little fun.
But, when I try to access my machine via SFTP I get the 'Bad packet length' error, because when it starts a shell and reads my .tcshrc file, it doesn't know what to do with the output from fortune. So, my question to the great shell gods and goddesses, is what's the syntax of the test to put in .tcshrc to conditionally test for an interactive login (and execute 'fortune') vs. a remote shell (and don't)? Or am I doing this stuff in the wrong file? Would using .login help? TIA. |
|
|
|
|
|
#2 |
|
League Commissioner
Join Date: Jan 2002
Posts: 5,536
|
.tcshrc should run silent; no commands that report to stdout.
.login should be used for commands that may spit up to stdout. .login is run per login shell, and skipped for subshells. same applies to other shell families, and their respective startup files. |
|
|
|
![]() |
|
|