Phosphor is a nice screensaver (at least, I love it) that scrolls a text on the screen in a old school 80’s style. On Ubuntu 7.10, it comes with xscreensaver-data-extra from universe repository.
I wrote a bash script to generate the text choosing a random fortunes from a folder ~/fortunes where I save the fortunes in a text file (the script doesn’t depends from fortune app) :
#!/bin/bashThe next step is phosphor configuration, here’s the command I use to launch it :nb_fortunes=${#fortune[*]}
- put the fortunes in an array c=0 for i in `ls $HOME/fortunes/`; do fortune[$c]=$i c=$c+1 done;
- count the fortunes
fortune_out=${fortune[$((RANDOM%nb_fortunes))]}
- take a random fortune from the array
- Now, output it echo ”——————————————————————————————————————” echo ”$USER@$HOSTNAME:`date +%H:%M:%S` ~>\$ cat fortunes/$fortune_out” echo ” ” cat $HOME/fortunes/$fortune_out
phosphor -root -delay 57846 -scale 2 -ticks 13 -program /home/ayoli/local/bin/myfortunesReplace /home/ayoli/local/bin/myfortunes with the path to your text generator application (which can also be a rss agregator, htop, or any other CLI app).
- If you use Xscreensaver, launch xcreensaver-demo from a terminal, then choose phosphor screensaver, hit ‘settings’ button and then ‘advanced’. Here you can enter the line.
- Else if you use gnome-screensaver you need to edit, as super user, the file that gnome-screensaver uses to launch phosphor :
sudo gedit /usr/share/applications/screensavers/phosphor.desktop
find the line that begins with exec and paste your configuration line






english
français
[...] informacion | ayozone Tambien te puede [...]
[...] Exec=phosphor -root -delay 57846 -scale 2 -ticks 13 -program /tu_ruta/tu_programa Sustituyendo tu_ruta/tu_programa por ese programa o shell script tuyo, que muestra un texto al azar. Ademas nos puede venir bien para depurar nuestro codigo sobre la marcha. DESDE ubuntulife.net Original en ayozone.org [...]
[...] writing a post about this entry http://ayozone.org/2007/11/30/my-phosphor-screensaver/ Stay [...]
Oh jesus. What a waste of code. You linsux people are always making it harder than it needs to be.
On FreeBSD, ‘phosphor -program fortune’ will accomplish the exact same thing. What a dumbass…
jarjruwv…
jarjruwv…