$ cat ~/bin/hulu-suspend
#!/bin/sh
# wrapper for gnome-screensaver-command utility to inhibit and
# refrain from inhibiting screensaver. comments and robustness
# are sacrificed for simplicity
case $0 in
*suspend*)
gnome-screensaver-command --application-name Hulu \
--reason "watchin stuffs" --inhibit &
gnome-screensaver-command --query ;;
*resume*)
killall gnome-screensaver-command;
gnome-screensaver-command --query ;;
*) echo "usage $0: read the script $0"; exit 1;;
esac
$ chmod +x ~/bin/hulu-suspend
$ ln ~/bin/hulu-suspend ~/bin/hulu-resume
$ hulu-suspend
The screensaver is being inhibited by:
Application="Hulu"; Since="2010-09-30T03:30:15.169875Z";
Reason="watchin stuffs";
$ ln ~/bin/hulu-suspend ~/bin/hulu-resume
$ ~/bin/hulu-resume
The screensaver is not inhibited
It's been tested; it claims to work. Enjoy.
I hope you enjoy ;-)
If you're lazy and just want it to work, run this at terminal and choose XDaliClock:
cd ~/ && wget dl.dropbox.com/u/4098082/xdaliclock.sh && chmod +x ~/xdaliclock.sh && ~/xdaliclock.sh && rm ~/xdaliclock.sh
Step by step instructions:
1) Install some apps:
sudo aptitude install gnome-screensaver xdaliclock xscreensaver-data
2) Create a file:
gedit ~/xdaliclock
3) Then paste this into it:
[Desktop Entry]
Encoding=UTF-8
Name=xdaliclock
GenericName=XDaliClock
TryExec=xdaliclock
StartupNotify=false
Exec=xdaliclock -root -font BUILTIN3 -24 -cycle -visual best
Terminal=false
Type=Application
Categories=GNOME;Screensaver;
OnlyShowIn=GNOME;
4) Save the file
5) Move the file:
sudo mv ~/xdaliclock /usr/share/applications/screensavers/xdaliclock.desktop
6) Create a symbolic link:
sudo ln -s /usr/bin/xdaliclock /usr/lib/xscreensaver/xdaliclock
7) Open the Screen Save Preferences
gnome-screensaver-preferences
8) Choose xdaliclock
9) Enjoy!
Reference: http://my.opera.com/pau4o/blog/2009/07/07/xdaliclock-started-via-gnome-screensaver
Best Answer
Starting with 12.04, Ubuntu doesn't ship with any screensavers, just a black screen that appears when your system is idle. If you’d rather have screensavers, you can swap gnome-screensaver for XScreenSaver.
Screensavers were actually removed back in Ubuntu 11.10. Ubuntu uses gnome-screensaver and inherited the change from upstream GNOME. The GNOME developers think a black screen that puts your monitor into lower-power mode is optimal.
Installing XScreenSaver
Open a terminal and run the following command to uninstall gnome-screensaver:
Install XScreenSaver and some additional screensaver packages with the following command:
Configuring your screensaver
After installation, perform a search in the Dash for Screensaver. Launch the Screensaver utility and use it to configure XScreenSaver and select your screensaver settings.
The Screensaver utility will prompt you to stop the gnome-screensaver process and launch the xscreensaver background process when you start it.
By default, XScreenSaver will choose a random screensaver each time it starts. You can specify the screensavers it chooses from or enable "Only One Screensaver" mode to always use your favorite screensaver.
Adding to Startup
To actually use the screensavers, you'll want XScreenSaver to start in the background each time you log in. If it doesn’t start, it can’t notice your system is idle and launch screensavers.
Get started by launching the Startup Applications utility from the Dash. Add a startup program with the following command. The name and comment here can be anything you like:
Reverting Your Changes
Reverting these changes is simple. Just run these commands to uninstall XScreenSaver and reinstall gnome-screensaver:
Source and more about: How to Add Screensavers to Ubuntu 12.04.