# No fortunes found in /usr/share/games/fortune:/usr/local/share/games/fortune.



## noodlefling (Jul 22, 2021)

I recently updated to 12.2 and a user immediately noticed that `fortune` no longer works.

I know it's not that important, and apparently there was some sort of holy war over inclusion of "offensive" fortunes, which resulted in a change to the default installation.  I don't care about any of that, but the issue is that there's a base command that used to work, but doesn't now:


```
# which fortune
/usr/bin/fortune
# fortune
No fortunes found in /usr/share/games/fortune:/usr/local/share/games/fortune.
# pwd
/usr/share/games/fortune
# ls -l
total 32
-r--r--r--  1 root  wheel  27042 Jul  8 18:50 freebsd-tips
-r--r--r--  1 root  wheel   1104 Jul  8 18:50 freebsd-tips.dat
```

I can install old fortunes through ports, but I don't actually want any of the potentially controversial ones, I just want the FreeBSD tips, which are already on the system, right where it says it's looking.

Any suggestions?

The only reason I'm even bringing up something so trivial is that the user had the command in his login files, so he was used to getting a FreeBSD tip every morning.  Now that the system is upgraded, the very first thing he saw was an error message, which did not instill confidence.  If I can make it work like it used to, he'll just be that much more comfortable.

Thanks!


----------



## mer (Jul 22, 2021)

Same behavior on FreeBSD-13, but if you do

`fortune /usr/share/games/fortune/freebsd-tips`

it works, so it's something about the default search path algorithm.

It's not ideal, but if you have the user modify his login files, it will work again.


----------



## SirDice (Jul 22, 2021)

You have to provide the category.

```
root@mail:~ # fortune freebsd-tips
Can't remember if you've installed a certain port or not? Try "pkg info
-x port_name".
```


----------



## Tieks (Jul 22, 2021)

Put this in a file .login in your home directory: `if ( -x /usr/bin/fortune ) /usr/bin/fortune freebsd-tips`


----------



## Deleted member 30996 (Jul 22, 2021)

You're out of luck.


----------



## SirDice (Jul 22, 2021)

The skeleton files (/usr/share/skel/) have all been updated so a _new_ user will get the correct one. An upgrade won't change an existing user's own ~/.login file though. Those will need to be modified by the users themselves.


----------



## noodlefling (Jul 22, 2021)

He's a reasonably sophisticated user, so I can just explain the situation and he can edit his own login file.  I'd rather explain that it was a political thing than make him think it's "broken"...even though changing default ancient behavior is pretty close to breaking something!

Looks like he wrote his .bash_profile almost 25 years ago.

Thanks, guys, always glad to have an easy one!


----------

