Go Back   The macosxhints Forums > OS X Help Requests > UNIX - General



Reply
 
Thread Tools Rate Thread Display Modes
Old 10-26-2003, 10:08 AM   #1
Craig R. Arko
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.
Craig R. Arko is offline   Reply With Quote
Old 10-26-2003, 12:55 PM   #2
mervTormel
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.
mervTormel is offline   Reply With Quote
Reply


Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump



All times are GMT -5. The time now is 09:00 PM.


Powered by vBulletin® Version 3.8.7
Copyright ©2000 - 2014, vBulletin Solutions, Inc.
Site design © IDG Consumer & SMB; individuals retain copyright of their postings
but consent to the possible use of their material in other areas of IDG Consumer & SMB.