LMDE: Xfce fortune cookie fix

Write tutorials and howtos in here
More tutorials here http://community.linuxmint.com/tutorial/welcome
Forum rules
Do not start a support topic here please, Before you post please read this

LMDE: Xfce fortune cookie fix

Postby Sithrazer on Sat Oct 20, 2012 11:44 am

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.
Sithrazer
Level 1
Level 1
 
Posts: 1
Joined: Sat Oct 20, 2012 10:33 am

Linux Mint is funded by ads and donations.
 

Return to Tutorials / Howtos

Who is online

Users browsing this forum: ichiro [Crawler] and 1 guest