/usr/bin/mint-fortune: line 35: [: ==: unary operator expected

By | 2011/05/29

In Linux Mint Debian Edition, a recent update made the fortune script stop working. I’ll show you how to fix it!


1. Open this file with nano, or your favorite editor:

sudo nano /usr/bin/mint-fortune
2. Locate line 35 which looks like this:

    if [ $showfortunes == "true" ]; then        

(Tip: in nano, press Control+C to display the current line number.)

3. Edit that line to remove the spaces around the double equals (==) so it then reads as:

  if [ $showfortunes=="true" ]; then  

When finished, control+X then Y to save in nano.

4. Now open up a brand new terminal. mint-fortune is back!



5 thoughts on “/usr/bin/mint-fortune: line 35: [: ==: unary operator expected

  1. David

    Thanks! It helped on LMDE 😀 Now i can see the funny quotes again

  2. Rob

    Works great!

    One small typo, though:

    sudo nano /usr/bin/mint-forture

    should read

    sudo nano /usr/bin/mint-fortune


  3. nomad

    lovely. i was wondering what that error was. thanks!


Leave a Reply

Your email address will not be published. Required fields are marked *

Notify me of followup comments via e-mail. You can also subscribe without commenting.