##(see the SpecSpec for an explanation) * '''Launchpad Entry''': https://launchpad.net/distros/ubuntu/+spec/foo * '''Created''': 2006-02-25 by Garyu * '''Contributors''': Garyu, JackWasey * '''Packages affected''': == Summary == Display daily tips for helping new (and experienced) users make the most of their Ubuntu system. == Rationale == == Use cases == == Scope == == Design == I have made a bash script using zenity that works. It would, however, be better with a real "Tip of the day" application which could start on first boot and then have the checkbox "Do not display this again" added. == Implementation == === Code === #!/bin/bash # # Ubuntu tips # # Displays a random "daily tip" in a dialog box when called # Usage: "sh ubuntutips.sh < inputfilename" # # Author: Dan-Erik Lindberg (Garyu in the Ubuntu forums) # 2006-02-22 # # Load all lines in an array and count how many rows there are maxrows=0 while read line do number=${line:0:6} content[number]=${line:7} let "maxrows += 1" done # Reseed random generator and select tip to display RANDOM=$$ thistip=$RANDOM let "thistip %= maxrows" # Randomize tip from file and display using zenity for numb in $(seq 0 $maxrows) do if [ $numb = $thistip ] then zenity --title "Ubuntu daily tip" --info --text "${content[numb]}" fi done exit 0 === Data preservation and migration === == Outstanding issues == == BoF agenda and discussion == * It would be great to think about using this as a way of including information from: EthicalInfo. * i18n, please! == Forum page with sample tips in a textfile == http://www.ubuntuforums.org/showthread.php?p=768965#post768965 ---- CategorySpec