Page 1 of 1

LMDE: Xfce fortune cookie fix

Posted: Sat Oct 20, 2012 11:44 am
by Sithrazer
This one is a little different from the other fixes I've seen for missing fortune cookies.

Long story short, Xfce doesn't use mateconftool and yet, mint-fortune was trying to use mateconftool for its on/off check after updating from UP4 to UP5.

The long story; I updated my LMDE installation from UP4 to UP5 yesterday and it went mostly well (and yes, I selected 'keep current config files' option every time it came up). Unfortunately, once again, fortune cookies went missing from the terminal after the update(s) finally completed. I checked to make sure fortunes were still installed, then spent a while trying to figure out if the option for fortunes was turned on (it was; Xfce Desktop settings lack a terminal tab and had to resort to gconftool cli commands). I even tried manually executing '/usr/bin/mint-fortune', still nothing.

gconftool command to check if fortunes are enabled:

Code: Select all

gconftool-2 --get /desktop/linuxmint/terminal/show_fortunes
command to turn them on if fortunes are disabled:

Code: Select all

gconftool-2 --type bool --set /desktop/linuxmint/terminal/show_fortunes true
This morning I opened up '/usr/bin/mint-fortune' in my favorite text editor just to make sure it actually contained -something-, and that's when I found the problem. The mint-fortunes script checks for fortunes to be set to true in mateconftool, but when I went looking it turned out mateconftool didn't exist on my machine, but gconftool does.

So on a hunch, I changed to script from:

Code: Select all

if [ -x "/usr/bin/mateconftool-2" ]; then
    showfortunes=`mateconftool-2 --get /desktop/linuxmint/terminal/show_fortunes 2>/dev/null`
    if [ "$showfortunes" == "true" ]; then        
        show_fortune
    fi
fi
to:

Code: Select all

if [ -x "/usr/bin/gconftool-2" ]; then
    showfortunes=`gconftool-2 --get /desktop/linuxmint/terminal/show_fortunes 2>/dev/null`
    if [ "$showfortunes" == "true" ]; then        
        show_fortune
    fi
fi
And sure enough, fortune cookies are working again.

I hope someone finds this short little guide useful.

Re: LMDE: Xfce fortune cookie fix

Posted: Thu Sep 12, 2013 5:51 am
by Sithrazer
I made the mistake up updating my laptop today and discovered the hard way that, once again, fortune cookies got disabled despite my previous configurations to ensure they were on (a pet peeve . I also discovered that the way configs are kept changed altogether rendering the little guide above obsolete.

The bright side is that the default config specified in the fortune cookie script does indeed work this time around.

Just run this to turn them on:

Code: Select all

gsettings set com.linuxmint.terminal show-fortunes true
I hope my previous post didn't cause anyone trouble after the config scheme was changed.