LMDE: Xfce fortune cookie fix
Posted: 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:
command to turn them on if fortunes are disabled:
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:
to:
And sure enough, fortune cookies are working again.
I hope someone finds this short little guide useful.
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
Code: Select all
gconftool-2 --type bool --set /desktop/linuxmint/terminal/show_fortunes true
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
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
I hope someone finds this short little guide useful.