LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Slackware (https://www.linuxquestions.org/questions/slackware-14/)
-   -   philosophy in slack shell (https://www.linuxquestions.org/questions/slackware-14/philosophy-in-slack-shell-58175/)

VioLaToR 05-05-2003 05:09 AM

philosophy in slack shell
 
Where does the wonderful words of wisdom come from at every shell in slack? any terminal, or upon login these philosophical words are thrown at me, but i have no idea where they are generated from. Anyone know the directory and filename?

acid_kewpie 05-05-2003 05:17 AM

the program will be "fortune"

VioLaToR 05-05-2003 01:09 PM

# cd /usr/games/fortune
bash: cd: /usr/games/fortune: Not a directory

# cd /usr/games/
# less fortune
"fortune" may be a binary file. See it anyway? n
# more fortune

******** fortune: Not a text file ********

/usr/games# fortune
bash: fortune: command not found

How do i go about seeing the contents of this? Nothing i did lets me see the "fortune" you told me about. I wanted to be able to read the entries and/or modify them. is this possible?

trickykid 05-05-2003 01:26 PM

Quote:

Originally posted by VioLaToR
How do i go about seeing the contents of this? Nothing i did lets me see the "fortune" you told me about. I wanted to be able to read the entries and/or modify them. is this possible?
Its a binary file, you can't view it.

Here is a project listing of some of the various fortune programs that you can download. If they supply the source code to them, then you can manipulate and then recompile, adding your changes to it that way. But you can't edit a binary file.

fancypiper 05-05-2003 01:28 PM

Try the command locate fortune

Mine is /usr/share/games/fortune

I think there are some dirty ones, some BOFH, and lots others you can use.

salparadise 05-05-2003 02:57 PM

how do i switch it off??

NSKL 05-05-2003 03:08 PM

To switch it off, take the execute bit of off /etc/profile.d/bsd-games.sh
HTH
-NSKL

acid_kewpie 05-05-2003 03:24 PM

or just uninstall it, most systems run these things IF they are there, and don't complain if they aren't ans they check before hand.

Tinkster 05-05-2003 04:37 PM

Quote:

How do i go about seeing the contents of this? Nothing i did lets me see the "fortune" you told me about. I wanted to be able to read the entries and/or modify them. is this possible?
/usr/share/games/fortunes/*

Look at the ones that DON'T have a
.dat extension :) ... most of them are
human-readable, some of the potentially
offensive ones are ROT13-encoded :)

The offensive ones don't get displayed
by default ;) ...

man fortune for more infor :)

I don't know about the modify part, if you
want to try it, make a backup copy of the
files first ;)

Cheers,
Tink

salparadise 05-06-2003 01:09 AM

ahhhhhhh

all gone
many thanks

ozanbaba 05-07-2003 03:28 AM

try this
fortune --help

it got a option that shows you which files it uses for fortuning :)


All times are GMT -5. The time now is 03:39 AM.