LinuxQuestions.org
LinuxAnswers - the LQ Linux tutorial section.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Distributions > Slackware
User Name
Password
Slackware This Forum is for the discussion of Slackware Linux.

Notices

Reply
 
Search this Thread
Old 12-01-2008, 03:05 PM   #1
darkstar01
Member
 
Registered: Nov 2008
Distribution: Slackware 12.1 and Ubuntu 8.04
Posts: 38

Rep: Reputation: 15
How to turn off the fortune after boot (or at least change the files presented)


As the topic states, I'm trying to remove the fortune that occurs after login or at least change the quotes to something I actually like. If it's not even possible to change them should I just substitute it with a script?

Thanks in advance all
 
Old 12-01-2008, 03:23 PM   #2
dugan
Senior Member
 
Registered: Nov 2003
Location: Canada
Distribution: distro hopper
Posts: 4,543

Rep: Reputation: 1385Reputation: 1385Reputation: 1385Reputation: 1385Reputation: 1385Reputation: 1385Reputation: 1385Reputation: 1385Reputation: 1385Reputation: 1385
From http://www.therockgarden.ca/aolsfaq.txt

Quote:
Why do I get a weird saying (or fortune) whenever I log in?

The command is being run out of /etc/profile (or /etc/csh.profile), which call additional scripts like so:

Code:
for file in /etc/profile.d/*.sh ; do
        if [ -x $file ]
                .  $file
        fi
done
This translates to "Run every file in the /etc/profile.d directory if the filename ends in .sh and it's executable." There's a file called bsd-games-login-fortune.sh which has a call to the program fortune. fortune is the actual program that prints out the weird saying or quote when users login.

If you don't like the message, disable it by Removing execute permission on the script permission (this needs to be done as root):
Code:
chmod a-x /etc/profile.d/bsd-games-login-fortune.sh
You'll need to do the same with bsd-games-login-fortune.csh, so that users on your system that use csh or tcsh as their login shell will not see these fortune messages either.
I can't tell you how to change the fortunes but, now that you know the names of the program displaying them, you should be able to find out yourself.
 
Old 12-01-2008, 03:25 PM   #3
zoran119
Member
 
Registered: Dec 2007
Posts: 215

Rep: Reputation: 18
I think it happens in /etc/profile.d/bsd-games-login-fortune.sh. Try commenting all the lines out in that file.

BEATEN
 
Old 12-01-2008, 06:01 PM   #4
richwmn
LQ Newbie
 
Registered: Dec 2005
Location: Athens, GA
Distribution: Slackware (various),Ubuntu 9.04
Posts: 27

Rep: Reputation: 17
You can also make up your own file -- one set of instructions is at
http://applegrew.blogspot.com/2007/0...r-fortune.html

You can then select only that fortune data file by changing the command to
fortune <datafile>


Rich
 
Old 12-02-2008, 01:30 AM   #5
Stroker
Member
 
Registered: Dec 2006
Location: The Nature Coast
Distribution: Slackware 01001101
Posts: 83

Rep: Reputation: 18
Also, the "offensive" database text files are ROT13 encoded, e.g.:
/usr/share/games/fortunes/fortunes-o

(I assume they then use the -x option on strfile when creating the .dat)

EDIT: I had that wrong. The rot13 command always operates using the ROT13 cipher. It's the caesar command that uses a rotation argument.

TO ENCODE: cat CLEARTEXT.txt | rot13 > ENCODED.txt
TO DECODE: cat ENCODED.txt | rot13 > DECODED.txt

Last edited by Stroker; 12-02-2008 at 04:24 PM.
 
Old 01-17-2009, 02:15 PM   #6
xlq
Member
 
Registered: Feb 2007
Distribution: Slackware 12.0
Posts: 58

Rep: Reputation: 15
Quote:
Originally Posted by Stroker View Post
TO ENCODE: cat CLEARTEXT.txt | rot13 > ENCODED.txt
TO DECODE: cat ENCODED.txt | rot13 > DECODED.txt
That is indeed a waste of 'cat' process.

Code:
TO ENCODE: rot13 < CLEARTEXT.txt > ENCODED.txt
TO DECODE: rot13 < ENCODED.txt > DECODED.txt
Quote:
Originally Posted by zoran119
I think it happens in /etc/profile.d/bsd-games-login-fortune.sh. Try commenting all the lines out in that file.
There is no need to comment out all the lines. Just chmod -x it.
 
Old 01-18-2009, 08:10 PM   #7
orbit
Member
 
Registered: Sep 2006
Location: Australia
Distribution: Slackware
Posts: 176

Rep: Reputation: 30
A simpler method to get rid of the stupid messages is to just uninstall (or don't install in the first place): the bsd-games package.

Cheers
 
Old 01-19-2009, 04:50 AM   #8
xlq
Member
 
Registered: Feb 2007
Distribution: Slackware 12.0
Posts: 58

Rep: Reputation: 15
Quote:
Originally Posted by orbit View Post
A simpler method to get rid of the stupid messages is to just uninstall (or don't install in the first place): the bsd-games package.
I cannot live without my bsdgames!
 
  


Reply


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
How to change the default monitor turn off time, when system is not in use harry2006 Linux - Newbie 2 10-14-2008 05:45 AM
when .tgz files are downloaded they turn into .tar files?!?! Flz Slackware 10 12-20-2005 02:32 PM
can't boot, how do I change config files? linoj Linux - Newbie 6 01-01-2005 05:00 PM
custom fortune files MiniMe001 Linux - Software 11 11-10-2004 04:30 PM
movies & TV turn green after resolution change nicktmro Fedora 1 07-15-2004 10:55 AM


All times are GMT -5. The time now is 07:53 AM.

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