Well, thx for all your effort but I managed to fix it in a different way. The issue here was that a simple blank and a couple of " " was making the default script for mint-fortune non-aware if the checkbox was ticked or not. So if anyone has the same issue, I make my version available here:
Code: Select all
#!/bin/bash
function show_fortune {
RANGE=4
number=$RANDOM
let "number %= $RANGE"
case $number in
0)
cow="moose"
;;
1)
cow="tux"
;;
2)
cow="koala"
;;
3)
cow="bunny"
;;
esac
RANGE=2
number=$RANDOM
let "number %= $RANGE"
case $number in
0)
command="/usr/games/cowsay"
;;
1)
command="/usr/games/cowthink"
;;
esac
/usr/games/fortune | $command -f $cow
}
if [ -x "/usr/bin/mateconftool-2" ]; then
SHOWFORTUNES=$(mateconftool-2 --get /desktop/linuxmint/terminal/show_fortunes) 2> /dev/null
#echo "$SHOWFORTUNES"
if [ $SHOWFORTUNES == "true" ]; then
show_fortune
#else
#fortune
fi
fi
And be aware that the checkbox in Menu>Other>DesktopSettings>Terminal change the value in `mateconftool-2` and not `gconftool-2`, at least in my system.
It took some time, trial and error, but in the end I know a lot more about BASH and scripting, so that's a good thing.
I change this as solved...