Review your favorite Linux distribution.
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, 04:50 AM   #1
Registered: Jul 2007
Posts: 70

Rep: Reputation: 15
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, 11:38 AM   #2
Registered: Nov 2008
Location: US
Distribution: slackware
Posts: 167

Rep: Reputation: 64
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, 03:09 AM   #3
Registered: Jul 2007
Posts: 70

Original Poster
Rep: Reputation: 15
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 03:31 PM
OpenOffice- strange bug LinuxNoob75 Linux - Software 1 02-14-2008 07:29 AM
Strange lsof behaviour, possible bug? closet geek Linux - General 9 07-27-2006 02:18 AM
an inconsequential but strange bug joshknape Linux - Newbie 5 02-09-2006 12:56 AM
Strange problem or bug bato Slackware 3 02-18-2005 01:56 PM

All times are GMT -5. The time now is 05:02 PM.

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