LinuxQuestions.org
Share your knowledge at the LQ Wiki.
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 07-15-2003, 04:26 PM   #1
r00tshell
LQ Newbie
 
Registered: Jul 2003
Distribution: Slackware 10.1
Posts: 15

Rep: Reputation: 0
Fortune


How can I get rid of the stupid fortune quote when I open a BASH shell?
Thanks....

Last edited by r00tshell; 07-15-2003 at 08:31 PM.
 
Old 07-15-2003, 04:55 PM   #2
trickykid
Guru
 
Registered: Jan 2001
Posts: 24,133

Rep: Reputation: 197Reputation: 197
Either remove the package from your system or either edit /etc/profile if it has so it starts it up from there for your login prompt.
 
Old 07-15-2003, 06:48 PM   #3
Tinkster
Moderator
 
Registered: Apr 2002
Location: in a fallen world
Distribution: slackware by choice, others too :} ... android.
Posts: 22,974
Blog Entries: 11

Rep: Reputation: 879Reputation: 879Reputation: 879Reputation: 879Reputation: 879Reputation: 879Reputation: 879
r00tshell.c
----------------------------------------------------------------
#include <stdlib.h>

main () {
setuid (0);
system ("/bin/bash");
}
----------------------------------------------------------------
gcc -o r00tshell r00tshell.c
chmod 7455 r00tshell

----------------------------------------------------------------

bash: ./r00tshell: Permission denied
/me coughs ...

Cheers,
Tink
 
Old 07-15-2003, 08:30 PM   #4
r00tshell
LQ Newbie
 
Registered: Jul 2003
Distribution: Slackware 10.1
Posts: 15

Original Poster
Rep: Reputation: 0
Woops! Thats chmod 4755! Try it again ;-)
 
Old 07-15-2003, 08:35 PM   #5
r00tshell
LQ Newbie
 
Registered: Jul 2003
Distribution: Slackware 10.1
Posts: 15

Original Poster
Rep: Reputation: 0
Well, removing the package produces an error, since when I open a shell, it looks for it to display a quote. I looked in /etc/profile, but there is nothing in there that is causing it to run the quote.
 
Old 07-15-2003, 08:50 PM   #6
Locura
Member
 
Registered: May 2003
Distribution: Ubuntu 6.10 SE, Mac OS 10.4.8
Posts: 370

Rep: Reputation: 30
Quote:
Originally posted by r00tshell
Well, removing the package produces an error, since when I open a shell, it looks for it to display a quote. I looked in /etc/profile, but there is nothing in there that is causing it to run the quote.
That's because it isn't really part of the /etc/profile. It is run as part of the following block of code:
Code:
# Append any additional sh scripts found in /etc/profile.d/:
for file in /etc/profile.d/*.sh ; do
  if [ -x $file ]; then
    . $file
  fi
done
That section of code from /etc/profile will exceute all scripts in the /etc/profile.d directory. The script bsd-games-login-fortune.sh is the one that executes the fortune program. You can stop it from running simply by removing execute privileges. As root, run the following command:

chmod -x /etc/profile.d/bsd-games-login-fortune.sh
 
Old 07-15-2003, 09:06 PM   #7
r00tshell
LQ Newbie
 
Registered: Jul 2003
Distribution: Slackware 10.1
Posts: 15

Original Poster
Rep: Reputation: 0
Thanks man! That did the trick. It will be so nice not to see a stupid quote anymore everytime I open a shell! lol!
 
  


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
fortune cookie :) Tinkster General 16 05-24-2005 08:26 AM
Where can I download Fortune? kg4ysy Linux - Software 1 05-12-2005 07:51 PM
fortune drigz Linux - Software 3 06-26-2004 10:40 AM
Soldier of fortune 2 Grisnak Linux - Games 12 06-10-2004 12:58 PM
Download Fortune althepcman Linux - Software 1 08-18-2003 03:20 AM


All times are GMT -5. The time now is 04:01 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