LinuxQuestions.org
Latest LQ Deal: Latest LQ Deals
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie
User Name
Password
Linux - Newbie This Linux forum is for members that are new to Linux.
Just starting out and have a question? If it is not in the man pages or the how-to's this is the place!

Notices


Reply
  Search this Thread
Old 09-14-2002, 06:28 PM   #1
caldosh
LQ Newbie
 
Registered: Sep 2002
Location: The Netherlands
Distribution: Debian
Posts: 15

Rep: Reputation: 0
fortune command not working


ok .. hopefully this is an 'easy' question ....

I want to use the 'fortune' command again, but it doesn't seem to work.

I checked its location, and it's in /usr/games but that's all I knew where to look.

~caldosh
 
Old 09-14-2002, 09:58 PM   #2
speck
Member
 
Registered: Nov 2001
Location: US
Distribution: Slackware 14.2
Posts: 375

Rep: Reputation: 115Reputation: 115
At the console, try entering the full path to the executable:

/usr/games/fortune

"/usr/games" is probably not in you path, so just typing "fortune" at the console will return "command not found".

Speck
 
Old 09-15-2002, 03:58 AM   #3
caldosh
LQ Newbie
 
Registered: Sep 2002
Location: The Netherlands
Distribution: Debian
Posts: 15

Original Poster
Rep: Reputation: 0
thanks!

*grin* how do I get it into my path?

~caldosh
 
Old 09-15-2002, 07:31 AM   #4
sandy
Member
 
Registered: Aug 2002
Location: Mumbai,India
Distribution: Linux Mint 12, Gentoo
Posts: 230

Rep: Reputation: 30
Quote:
Originally posted by caldosh
thanks!

*grin* how do I get it into my path?

~caldosh
export PATH=$PATH:/usr/games will add /usr/games to your default path
 
Old 09-15-2002, 08:58 AM   #5
caldosh
LQ Newbie
 
Registered: Sep 2002
Location: The Netherlands
Distribution: Debian
Posts: 15

Original Poster
Rep: Reputation: 0
bingo!

thanks for the help

~caldosh
 
Old 09-15-2002, 09:43 AM   #6
Mara
Moderator
 
Registered: Feb 2002
Location: Grenoble
Distribution: Debian
Posts: 9,696

Rep: Reputation: 232Reputation: 232Reputation: 232
To make it permanent for all users add it to /etc/profile
 
Old 09-15-2002, 01:48 PM   #7
caldosh
LQ Newbie
 
Registered: Sep 2002
Location: The Netherlands
Distribution: Debian
Posts: 15

Original Poster
Rep: Reputation: 0
fortune and strfile ... and how to permanently add them to profile

right .... where and how do I add the fortune path?

and while I'm at it ... how can I make the strfile work? I tried the same 'putting it into my path' (export blabla), but that doesnt' seem to work

~caldosh
who feels like she's in way over her head

Last edited by caldosh; 09-15-2002 at 01:56 PM.
 
Old 09-24-2002, 04:55 AM   #8
Mara
Moderator
 
Registered: Feb 2002
Location: Grenoble
Distribution: Debian
Posts: 9,696

Rep: Reputation: 232Reputation: 232Reputation: 232
Add a line
export PATH=$PATH:/usr/games
at the end of your /etc/profile
What do you mean by " how can I make the strfile work?"
 
Old 09-24-2002, 04:30 PM   #9
caldosh
LQ Newbie
 
Registered: Sep 2002
Location: The Netherlands
Distribution: Debian
Posts: 15

Original Poster
Rep: Reputation: 0
Quote:

What do you mean by " how can I make the strfile work?"
like 'fortune', 'strfile' isn't in my path .. but I figured I could just export it like fortune.

thanks though!

~caldosh
 
Old 09-24-2002, 05:25 PM   #10
Bert
Senior Member
 
Registered: Jul 2001
Location: 406292E 290755N
Distribution: GNU/Linux Slackware 8.1, Redhat 8.0, LFS 4.0
Posts: 1,004

Rep: Reputation: 46
Here's a fun thing to do with fortune. Add these lines to your .bash_profile:

# If the .signature file exists, delete it

if [ -e $HOME/.signature ]; then
rm $HOME/.signature

fi

# When you log in, print the thought for the day on the console and add
# it to your .signature file for emails.

echo "Today's randomly generated thought:" >> .signature
/usr/games/fortune | tee -a .signature

Fun, fun, fun.

Bert
 
Old 03-08-2003, 02:07 PM   #11
caldosh
LQ Newbie
 
Registered: Sep 2002
Location: The Netherlands
Distribution: Debian
Posts: 15

Original Poster
Rep: Reputation: 0
adding fortune to signature file

Quote:
Originally posted by Bert
Here's a fun thing to do with fortune. Add these lines to your .bash_profile:

# If the .signature file exists, delete it

if [ -e $HOME/.signature ]; then
rm $HOME/.signature

fi

# When you log in, print the thought for the day on the console and add
# it to your .signature file for emails.

echo "Today's randomly generated thought:" >> .signature
/usr/games/fortune | tee -a .signature

Fun, fun, fun.

Bert
I know it has been a long time since my last post, but I still have a question.

Thanks to a friend I've been able to change my distro from RedHat 8.0 to Debian (latest/unstable) ... but the cool signature script isn't working anymore ...

can someone help me?
 
Old 03-08-2003, 02:17 PM   #12
Mara
Moderator
 
Registered: Feb 2002
Location: Grenoble
Distribution: Debian
Posts: 9,696

Rep: Reputation: 232Reputation: 232Reputation: 232
Do you have /usr/games/fortune? Maybe it has a different location?
 
Old 03-08-2003, 02:26 PM   #13
cuckoopint
Member
 
Registered: Feb 2003
Distribution: Debian
Posts: 797

Rep: Reputation: 30
Code:
whereis fortune  
fortune: /usr/games/fortune /usr/share/man/man6/fortune.6.gz
running debian testing

maybe its just not installed. how about try a 'apt-get install'?
also, use apt-cache to figure out all the different fortune files you can get. or maybe you dont have permission to run it....
 
Old 03-08-2003, 02:29 PM   #14
cuckoopint
Member
 
Registered: Feb 2003
Distribution: Debian
Posts: 797

Rep: Reputation: 30
also, maybe fortune cannot find the files.
from the manpage:

Quote:
Note: these are the defaults as defined at compile time.

/usr/share/games/fortunes - Directory for inoffensive fortunes
/usr/share/games/fortunes/off - Directory for offensive fortunes
/usr/local/share/games/fortunes - Local directory for inoffensive for-
tunes
/usr/local/share/games/fortunes/off - Local directory for offensive
fortunes
 
Old 03-08-2003, 02:38 PM   #15
caldosh
LQ Newbie
 
Registered: Sep 2002
Location: The Netherlands
Distribution: Debian
Posts: 15

Original Poster
Rep: Reputation: 0
don't know what I did -- I prolly just forgot to restart X, I think

but my signature file is working beautifully again.

thanks for the help!
 
  


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



Similar Threads
Thread Thread Starter Forum Replies Last Post
fortune in konsole? greythorne Mandriva 1 12-22-2004 04:51 AM
fortune drigz Linux - Software 3 06-26-2004 10:40 AM
soldier of fortune 2 not working any help? citrus Linux - Games 8 03-22-2004 09:44 PM
What's Your FORTUNE Today? bolinux Linux - Software 1 10-22-2003 08:48 PM
Fortune r00tshell Slackware 6 07-15-2003 09:06 PM

LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie

All times are GMT -5. The time now is 09:27 AM.

Main Menu
Advertisement
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
Open Source Consulting | Domain Registration