Share your knowledge at the LQ Wiki.
Go Back > Forums > Linux Forums > Linux - Distributions > Slackware
User Name
Slackware This Forum is for the discussion of Slackware Linux.


  Search this Thread
Old 10-08-2012, 05:50 AM   #1
Registered: Jul 2007
Posts: 87

Rep: Reputation: 18
Strange bug with csh.

I use tcsh as my shell.

The strange thing is that /etc/profile.d/bsd-games-login-fortune.csh gets executed for all shells, not just login ones.

I mean, when i run "su" I get a fortune:

locky@netbook:~% su locky

Boy, that crayon sure did hurt!

This leads to an even more strange consequence:
I cannot run "less" command as for every file it shows less'ed fortune text. (different each time).

As a temporary workaround, I chmodded -x /etc/profile.d/bsd-games-login-fortune.csh, but it seems like a bug in Slackware.
Old 10-08-2012, 12:38 PM   #2
Registered: Nov 2008
Location: US
Distribution: slackware
Posts: 255

Rep: Reputation: 126Reputation: 126
None of that happens for me, I would check out your ~/.login and ~/.tcsrc. Things to consider:
Are you starting tcsh as `tcsh -l` ?
'su' to root keeps you in /bin/tcsh ?
Does this happen when executing a script ?
Are commands you do not want to run except when logging in bracketed by
if ($?prompt) then
I noticed a very minor issue with /etc/csh.login, this line:
set path = ( $path /usr/games )
can cause duplicate entries to show up in $path, depending upon what you are doing. I changed it to
set path = ( /usr/local/bin /bin /usr/games )
in order to correct the issue. At one time in a prior release /etc/csh.login was changed to prevent dups, I think the change was different than above. I am planning to search for that change but been lazy so far

Old 10-09-2012, 04:09 AM   #3
Registered: Jul 2007
Posts: 87

Original Poster
Rep: Reputation: 18
Are commands you do not want to run except when logging in bracketed by
that's not me:-) it is Slackware

locky@netbook:~> cat /etc/profile.d/bsd-games-login-fortune.csh
# Print a fortune cookie for login shells:

if ( { tty --silent } ) then >& /dev/null
  echo "" ; fortune fortunes fortunes2 linuxcookie ; echo ""
locky@netbook:~> /etc/profile.d/
locky@netbook:~> /etc/profile.d/bsd-games-login-fortune.csh

Accidents cause History.

If Sigismund Unbuckle had taken a walk in 1426 and met Wat Tyler, the
Peasant's Revolt would never have happened and the motor car would not
have been invented until 2026, which would have meant that all the oil
could have been used for lamps, thus saving the electric light bulb and
the whale, and nobody would have caught Moby Dick or Billy Budd.
		-- Mike Harding, "The Armchair Anarchist's Almanac"

I hear what you're saying but I just don't care.



Thread Tools Search this Thread
Search this Thread:

Advanced Search

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 Off
HTML code is Off

Similar Threads
Thread Thread Starter Forum Replies Last Post
[SOLVED] Possible bug or strange feature of upgradepkg? w1k0 Slackware 13 08-14-2009 04:31 PM
OpenOffice- strange bug LinuxNoob75 Linux - Software 1 02-14-2008 08:29 AM
Strange lsof behaviour, possible bug? closet geek Linux - General 9 07-27-2006 03:18 AM
an inconsequential but strange bug joshknape Linux - Newbie 5 02-09-2006 01:56 AM
Strange problem or bug bato Slackware 3 02-18-2005 02:56 PM > Forums > Linux Forums > Linux - Distributions > Slackware

All times are GMT -5. The time now is 05:08 AM.

Main Menu
Write for LQ is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration