Ubuntu Forums ubuntu.com - launchpad.net - ubuntu help  

Go Back   Ubuntu Forums > The Ubuntu Forum Community > Other Community Discussions > Tutorials & Tips
Register Reset Password Forum Help Forum Council Search Today's Posts Mark Forums Read

Tutorials & Tips
The place to find Ubuntu related Tips & Tricks.

 
Thread Tools Display Modes
Old June 13th, 2006   #1
23meg
Ubuntu QA Team
 
Join Date: Mar 2005
Location: İstanbul
Beans: 5,882
HOWTO: Replace gnome-screensaver with xscreensaver

Note: I have another guide for adjusting screensaver settings in Dapper without replacing gnome-screensaver. I prefer the method described in that guide to this one, but your mileage may vary. Both have their pros and cons so make sure you check out both before applying the instructions.

Problem: Dapper ships with gnome-screensaver instead of xscreensaver, which gives the user no option to set individual screensaver settings.

Details: In Dapper display power management functions were decoupled from the screensaver with the introduction of Gnome Power Manager. xscreensaver provides both functions, thus became partially redundant. Refer to the gnome-screensaver FAQ, the upstream bugzilla discussion and the Launchpad discussion for more details if interested.

Ubuntu has a tendency to stick with the GNOME suite of applications unless absolutely necessary, and the GNOME developers do have reasons for doing what they're doing, so gnome-screensaver does have its longer term use, but in immediate practical terms we need a way of configuring screensaver options; otherwise most of them are either unusable or have crippled functionality. The following isn't a very elegant modification, but one that works nevertheless. Refer to the "Drawbacks" part at the bottom for possible dysfunctions after applying this.

Solution: Get xscreensaver back, disable gnome-screensaver.

1. To configure gnome-screensaver not to function, go to System / Preferences / Screensaver and uncheck both checkboxes.

2. To totally stop gnome-screensaver from running, kill its process
Code:
sudo killall gnome-screensaver
and prevent it from being launched on startup
Code:
gconftool-2 --type boolean -s /apps/gnome_settings_daemon/screensaver/start_screensaver false
If the latter doesn't seem to be working persistently for some reason, resort to making gnome-screensaver unexecutable:
Code:
sudo chmod -x /usr/bin/gnome-screensaver
3. Install xscreensaver.
Code:
sudo apt-get install xscreensaver
4. Optional: Install the extra screensavers in the repositories that don't come installed as default.
Code:
sudo apt-get install xscreensaver-data-extra xscreensaver-gl-extra
5. Add the xscreensaver daemon to your list of startup programs. Go to System / Preferences / Sessions / Startup Programs, click "Add" and type "xscreensaver -no-splash".

6. Modify the System / Preferences / Screensaver menu entry to launch the xscreensaver configuration window instead of the gnome-screensaver one:
Code:
gksudo gedit /usr/share/applications/gnome-screensaver-preferences.desktop
Locate the following line:
Code:
Exec=gnome-screensaver-preferences
and change it to
Code:
Exec=xscreensaver-demo
and comment out the last four lines to make them look like this:
Code:
#X-GNOME-Bugzilla-Bugzilla=GNOME
#X-GNOME-Bugzilla-Product=gnome-screensaver
#X-GNOME-Bugzilla-Component=general
#X-Ubuntu-Gettext-Domain=gnome-screensaver
7. Click System / Preferences / Screensaver to launch the xscreensaver configuration window, go to the "Advanced" tab and uncheck the "Power Management Enabled" checkbox. This should stop xscreensaver's power saving features from conflicting with Gnome Power Manager.

8. Optional: Create a launcher to lock the screen manually. Right click your desktop, choose "Create Launcher", and enter the following as the command: "xscreensaver-command -lock".

Drawbacks:

- System / Quit / Lock Screen doesn't function after applying this, since it locks the screen via gnome-screensaver. I'm looking for a fix to this; in the meantime you can use the launcher you created in step 8 as a workaround. (Update: See this post for a suggested fix. I haven't tried it yet)


- In my experience the screen won't get locked when closing the laptop lid but this may be due to my (mis)configuration; I'll report back on this after experimenting a bit.

- You get the standard xscreensaver unlock dialog when unlocking the screen instead of the Dapper one, which detracts from the overall polish a bit, if you mind such things.
__________________
"Theoretically, a great number of ideas assures a great number of choices, but such choices are essentially quantitative. This practice is as bewildering as it is wasteful. It discourages spontaneity, encourages indifference, and more often than not produces results which are neither distinguished, interesting, nor effective. In short, good ideas rarely come in bunches." -- Paul Rand, The Politics of Design

Last edited by 23meg; June 11th, 2009 at 02:22 AM..
23meg is offline   Reply With Quote
Old June 13th, 2006   #2
bulldog
Ubuntu addict and loving it
 
bulldog's Avatar
 
Join Date: Jun 2006
Location: The Netherlands
My beans are hidden!
Ubuntu 9.10 Karmic Koala
Re: HOWTO: Replace gnome-screensaver with xscreensaver

Thank you for this HowTo.
All worked fine and no messing up so far
bulldog is offline   Reply With Quote
Old June 13th, 2006   #3
ayoli
Fresh Brewed Ubuntu
 
ayoli's Avatar
 
Join Date: Jun 2006
Location: Millau, France
Beans: 1,476
Ubuntu 9.10 Karmic Koala
Send a message via Yahoo to ayoli
Re: HOWTO: Replace gnome-screensaver with xscreensaver

yes, that's work, but i prefer to use alacarte to add a new menu entry for xscreensaver-demo, this way keep everything to restore easily gnome screensaver, and btw why edit manually conf file when the graphical way works
ayoli is offline   Reply With Quote
Old June 13th, 2006   #4
23meg
Ubuntu QA Team
 
Join Date: Mar 2005
Location: İstanbul
Beans: 5,882
Re: HOWTO: Replace gnome-screensaver with xscreensaver

Quote:
Originally Posted by ayoli
yes, that's work, but i prefer to use alacarte to add a new menu entry for xscreensaver-demo, this way keep everything to restore easily gnome screensaver,
Having menu items for both doesn't make sense when gnome-screensaver is completely disabled; that's why I suggested replacing the existing menu item instead of adding another.
Quote:
and btw why edit manually conf file when the graphical way works
It's easier and less error prone to describe the non-graphical way in a guide, and you can't comment out lines with Alacarte.
__________________
"Theoretically, a great number of ideas assures a great number of choices, but such choices are essentially quantitative. This practice is as bewildering as it is wasteful. It discourages spontaneity, encourages indifference, and more often than not produces results which are neither distinguished, interesting, nor effective. In short, good ideas rarely come in bunches." -- Paul Rand, The Politics of Design
23meg is offline   Reply With Quote
Old June 13th, 2006   #5
ayoli
Fresh Brewed Ubuntu
 
ayoli's Avatar
 
Join Date: Jun 2006
Location: Millau, France
Beans: 1,476
Ubuntu 9.10 Karmic Koala
Send a message via Yahoo to ayoli
Re: HOWTO: Replace gnome-screensaver with xscreensaver

Quote:
Originally Posted by 23meg
Having menu items for both doesn't make sense when gnome-screensaver is completely disabled; that's why I suggested replacing the existing menu item instead of adding another.
menu items can be hide/shown and if ppl totally don't want gnome-screensaver why don't just apt-get remove it ?
Quote:
Originally Posted by 23meg
It's easier and less error prone to describe the non-graphical way in a guide...
i agree with that
ayoli is offline   Reply With Quote
Old June 13th, 2006   #6
23meg
Ubuntu QA Team
 
Join Date: Mar 2005
Location: İstanbul
Beans: 5,882
Re: HOWTO: Replace gnome-screensaver with xscreensaver

Quote:
Originally Posted by ayoli
menu items can be hide/shown and if ppl totally don't want gnome-screensaver why don't just apt-get remove it ?
Because removing it also removes ubuntu-desktop; just disabling it is a less aggressive method and makes it easier to revert back to it if desired.
__________________
"Theoretically, a great number of ideas assures a great number of choices, but such choices are essentially quantitative. This practice is as bewildering as it is wasteful. It discourages spontaneity, encourages indifference, and more often than not produces results which are neither distinguished, interesting, nor effective. In short, good ideas rarely come in bunches." -- Paul Rand, The Politics of Design
23meg is offline   Reply With Quote
Old June 13th, 2006   #7
ayoli
Fresh Brewed Ubuntu
 
ayoli's Avatar
 
Join Date: Jun 2006
Location: Millau, France
Beans: 1,476
Ubuntu 9.10 Karmic Koala
Send a message via Yahoo to ayoli
Re: HOWTO: Replace gnome-screensaver with xscreensaver

ah yes, true. but weird to have a dep that force to keep unwanted/unused apps.
ayoli is offline   Reply With Quote
Old June 13th, 2006   #8
NoWhereMan
Ubuntu Extra Shot
 
NoWhereMan's Avatar
 
Join Date: Dec 2005
Location: Milano, Italy
Beans: 224
Ubuntu 7.10 Gutsy Gibbon
Re: HOWTO: Replace gnome-screensaver with xscreensaver

it's only me, or "fade to black" option doesn't work?
NoWhereMan is offline   Reply With Quote
Old June 13th, 2006   #9
ayoli
Fresh Brewed Ubuntu
 
ayoli's Avatar
 
Join Date: Jun 2006
Location: Millau, France
Beans: 1,476
Ubuntu 9.10 Karmic Koala
Send a message via Yahoo to ayoli
Re: HOWTO: Replace gnome-screensaver with xscreensaver

xscreensaver "fade to black" option works perfectly on my laptop
ayoli is offline   Reply With Quote
Old June 13th, 2006   #10
NoWhereMan
Ubuntu Extra Shot
 
NoWhereMan's Avatar
 
Join Date: Dec 2005
Location: Milano, Italy
Beans: 224
Ubuntu 7.10 Gutsy Gibbon
Re: HOWTO: Replace gnome-screensaver with xscreensaver

d'oh. that's strange...
NoWhereMan is offline   Reply With Quote

Bookmarks

Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT -4. The time now is 06:11 PM.


vBulletin ©2000 - 2010, Jelsoft Enterprises Ltd. Ubuntu Logo, Ubuntu and Canonical © Canonical Ltd. Tango Icons © Tango Desktop Project. lingonberry