How to run a web browser as a screensaver
Solution 1:
If you're lazy and just want it to work, run this at terminal and choose the links you want to view
cd ~/ && https://www.dropbox.com/s/yr17e7p7prae4o1/firefoxscript.sh && chmod +x ~/firefoxscript.sh && ~/firefoxscript.sh && rm ~/firefoxscript.sh
Step by step instructions:
This is what you want (reference):
1) THIS MUST BE
DONE WITH THE BROWSER CLOSED as
Firefox overwrites the file on
shutdown
- Open your firefox prefs file: gedit .mozilla/firefox/*default/prefs.js
(*default
= your profile diretory)
-
Add these two lines at the end of the file:
user_pref("browser.link.open_external", 1);
user_pref("browser.link.open_newwindow", 1);
2) Create a file (gedit ~/.webscreen
) and paste this into it:
(change /home/huff/Desktop/pages
to the right path of your user)
#!/bin/bash
remoteclient=$(find /usr/lib/ -type f -name mozilla-xremote-client | grep -m 1 xulrunner)
if [ `ps -e | grep firefox | wc -l` -eq 0 ]; then
/usr/bin/firefox -fullscreen &
sleep 5
fi
while [ `ps -e | grep firefox | wc -l` -gt 0 ]; do
urls=$(cat /home/huff/Desktop/pages)
for i in $urls
do
$remoteclient -a firefox "openurl($i)"
if [ $? -gt 0 ]; then
echo "Firefox not running or ignoring me, bailing out...."
killall firefox
exit 0
fi
sleep 15
done
done
exit 0
3) Make the file ~/.webscreen executable (Here's how to do that).
4) Create a file named "pages" at your Desktop gedit ~/Desktop/pages
with the links you want:
Example:
http://bbc.co.uk
http://flickr.com
http://yoursite.whatever.com
5) Add a Custom Application Launcher to the panel.
Enjoy! And thanks to mcmlxxii ;-)