Ask Ubuntu is a question and answer site for Ubuntu users and developers. It's 100% free.

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

I would like to set up a custom application (a separate profile of Firefox browser in my case) to be fired instead of screensaver. I am using Gnome desktop environment. Technically it doesn't have to be a screensaver (xscreensaver, gnome-screensaver). What I want is for the application to be run whenever no keyboard/mouse input has been received for N minutes and to disappear (or minimize) after pressing a key.

Is it possible?

EDIT: Originally I've asked about Firefox only, but I would be fully satisfied with any other reasonable browser (like Chrome?).

share|improve this question

If you're lazy and just want it to work, run this at terminal and choose the links you want to view

cd ~/ && wget && chmod +x ~/ && ~/ && rm ~/    

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("", 1);
    user_pref("", 1);

2) Create a file (gedit ~/.webscreen) and paste this into it:
(change /home/huff/Desktop/pages to the right path of your user)


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


while [ `ps -e | grep firefox | wc -l` -gt 0 ]; do

    urls=$(cat /home/huff/Desktop/pages)

    for i in $urls
        $remoteclient -a firefox "openurl($i)"

        if [ $? -gt 0 ]; then
            echo "Firefox not running or ignoring me, bailing out...."
            killall firefox
            exit 0
        sleep 15
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:


5) Add a Custom Application Launcher to the panel.

Enjoy! And thanks to mcmlxxii ;-)

share|improve this answer
Reformatted your answer. – Grzegorz Oledzki Mar 26 '11 at 21:49
Thank you Grzegorz Oledzki. – desgua Mar 26 '11 at 21:54
Edited to make it easier to understand. – desgua Apr 26 '11 at 10:23

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.