The fully qualified directories in this particular “howto” are specific to SLED 10, and will undoubtedly be different on a different version of Linux.
Something you might notice on installing SLED 10 is that, like most distros which feature Gnome 2.12 or 2.14, xscreensaver has been partially or fully replaced by gnome-screensaver. In the case of SLED 10, xscreensaver was installed, but none of its screensavers were available; gnome-screensaver listed only a scant five or six options.
I spent some time tracking down how to make xscreensaver’s hacks available to gnome-screensaver, so here it is.
Each screensaver, for both gnome-screensaver and xscreensaver, has a config file. So to move files from xscreensaver to gnome-screensaver, we need to move not only the screensaver programs themselves, but also the config files.
Moving the screensavers is the easy part; all you’d need to do is:
Yes, technically this code copies the screensavers, not moves them… but that’s okay. The -i switch is to make the process interactive; if any other the new screensavers has the same name as an existing one, it will as if you want to overwrite it, rather than just deciding for you. There should be only one such anomaly: popsquares. I chose not to overwrite it, as it works fine already and is probably exactly the same.
Next, you need to move the config files. The only problem is, xscreensaver config files are .xml files, and gnome-screensaver files are .desktop files.
It turns out that this is a problem with a ready made solution: our friends at Gnome have a script which will migrate our .xml files into .desktop files. For this to work, you’ll need 2 files:
migrate-xscreensaver-config.sh
Just click the “download” links on the above two pages. I moved the two files to /opt/gnome/lib/gnome-screensaver/, but you can put them anywhere — they just need to be in the same place.
You’ll need to make migrate-xscreensaver-config.sh executable (it should go without saying, but you’ll need to execute the following command from whatever directory you put the files in):
That being done, all you’ll have left is:
# /opt/gnome/lib/gnome-screensaver/migrate-xscreensaver-config.sh /etc/xscreensaver/*.xml
That’s that. You will find (at least on SLED 10) that you need to restart X — just logging out of Gnome and back in should do it.
If you’re attempting to use these steps on a different version of linux, you may need to use find or locate to figure out the proper file paths to use. Enjoy.
Hey! great job! nice and smooth, thank you. Ive done it in Debian testing(etch) and the directories are:
For the screensaver binaries:
/usr/lib/gnome-screensaver/gnome-screensaver
For the desktop files:
/usr/share/gnome-screensaver/themes
For the xml files:
/usr/share/xscreensaver/config/
:D
Bye
Awesome! Worked flawlessly.Thank you so much…been wanting more screensavers for a while now! I’m using fedora 5, so of course I had to install xscreensaver first with yum:
yum install xscreensaver-base
yum install xscreensaver-extras
yum install xscreensaver-gl-extras (OpenGL stuff, great if you’ve got hw accel)
On Fedora 5, the directories are:
xscreensaver binaries (copy from): /usr/libexec/xscreensaver/
gnome screensaver binaries (copy to): /usr/libexec/gnome-screensaver/
Xscreensaver XML files: /usr/share/xscreensaver/config/
gnome-screensaver desktop files: /usr/share/gnome-screensaver/themes/
The migrate script and the xsl file are already installed in /usr/libexec/gnome-screensaver/
so the entire process is:
cp -i /usr/libexec/xscreensaver/* /usr/libexec/gnome-screensaver/
cd /usr/share/gnome-screensaver/themes/
/usr/libexec/gnome-screensaver/migrate-xscreensaver-config.sh \ /usr/share/xscreensaver/config/*.xml
Restart X and voila! :-)
Hope that helps somebody…Thanks again!
Great; glad to hear that it worked so well, or at least, was clear enough to adapt to your system. Thanks for the feedback! :-)
I can’t seem to get this to work.. Can someone write out the commands for this for Ubuntu? I tried the Debian conversion over there but it only seemed to not be able to parse anything.
Not sure, Loknar; what error are you getting?
Also, I would bet that there are Ubuntu-specific tips in some of the the Ubuntu forums — do those help?
Keep at it, and keep having fun.
Has anyone tried this on an x86_64 machine? On my SLED installation you see a lib directory conflict:
/usr/lib64/xscreensaver/
/opt/gnome/lib/gnome-screensaver/
xscreensaver seems to be 64-bit while gnome-screensaver does not. Any issue with this?
Nevermind … I just went ahead and tried it and it works just fine.
Hey Phil,
I’m running Suse 10.1 and the *.desktop files need to be placed in
/opt/gnome/share/gnome-screensaver/themes/Thanks a bunch for posting this.. I was really sick of the 6 choices i had and I knew there were much cooler ones using OpenGL in xscreensaver. I think I’ll mention this to Novell so it will be pre-configured on a new install of Suse Linux.
–Micah
Okay, I’m a relative Linux newbie and I didn’t seem to be able to get this to work. I:
1. Downloaded the .sh file without problem
2. For the .xsl file, Firefox wouldn’t let me download it, per se, so I copy and pasted the contents of the script (perhaps minus the XML style sheet) into gedit and saved it as ‘xscreensaverconfig.xsl’
3. Put both files in /opt/gnome/lib/gnome-screensaver/gnome-screensaver
4. Opened up terminal, su’ed to root. Changed to the directory above and did chmod x on migrate*.sh.
5. Next did:
cd /opt/gnome/share/gnome-screensaver/themes /opt/gnome/lib/gnome-screensaver/gnome-screensaver/migrate-xscreensaver-config.sh /etc/xscreensaver/*.xml
6. But…..when I look in /opt/share/gnome/themes, the only files that are there are .desktop files.
Any tips for a serious beginner?
Thanks,
DD
P.S. I imagine with the high usability of SLED, you’re going to get lots of noob questions from people like me who are just getting into Linux.
Hi, DD; you shouldn’t be looking in /opt/share/gnome/themes, but I’m going to guess that you meant to type /opt/share/gnome-screensaver/themes… ;-)
Probably the reason you see .desktop files is that they are supposed to be .desktop files. That’s what the migrate script does; it transforms the xml files into desktop files. The key is: does it work when you open gnome-screensaver? Are the screensavers not listed?
Let me know; I’m not running SLED anymore, but if I can help I certainly will… happy hacking.
Also did you noticed that with gnome-screensaver you have no “setttings” button. Settings can’t be set in the GUI. If you want specific settings for a particular screensaver you CAN create them easily:
(This works on Fedora Core 5) grab one of the .desktop files and copy it in ~/.local/share/applications/screensavers/, now open the file, add your tweaks and restart the screensaver preference dialog : that’s done :-)
Example:
cp /usr/share/applications/screensavers/cosmos-slideshow.desktop ~/.local/share/applications/screensavers/my-cosmos.desktop
Now change this file. Here is mine:
[Desktop Entry]
Encoding=UTF-8
Name=Cosmos (Space)
Comment=Display a slideshow of pictures of the space
Exec=slideshow --location=/home/gozer/Images/Space
TryExec=slideshow
StartupNotify=false
Terminal=false
Type=Application
Categories=GNOME;Screensaver;
Good tip!
Yes, lack of settings is a problem in gnome-screensaver — it’s an omission that I don’t really understand, but for whatever reason that’s how it is for now. A “preview” feature like xscreensaver had would be nice, too; maybe that’s coming in a future version. ;-)
I don’t understand how this modifies the settings of the specific screensaver? I don’t see any settings in the file. If it isn’t obvious, I’m a noob :) Also, how would I do this on SLED. I have all the screensavers now active, but no settings :(
As a followup to my previous post, on FC6 the dirs I found for the xscreensaver files were:
binaries: /usr/libexec/xscreensaver/
XML: /usr/share/xscreensaver/config/
If the themes don’t show up and you are sure you followed the steps correctly then you might have installed de .desktop files in the wrong directory.
To find out in which directory gnome-screensaver looks for the .desktop files use this command (without quotes): “pkg-config –variable themesdir gnome-screensaver”
Now just run the migrate script again from that directory, then restart X if needed and well there you go.
Now … go show your friends your new screensavers eh!
Good tip Maarten; thanks for commenting. :)
The location of the migration files has moved:
http://svn.gnome.org/viewcvs/gnome-screensaver/trunk/data/migrate-xscreensaver-config.sh?rev=241&view=log
http://svn.gnome.org/viewcvs/gnome-screensaver/trunk/data/xscreensaver-config.xsl?rev=241&view=log
i’m using gentoo and all these tips here didn’t work for me.
i wrote my own howto for gentoo users:
create the *.desktop files:
sh migrate-xscreensaver-config.sh /usr/share/xscreensaver/config/*.xml
move or copy xscreensaver executables from :
/usr/lib/misc/xscreensaver
into
/usr/libexec/gnome-screensaver.
drag and drop the *.desktop files to the gnome-screensaver-preferenes window,
or move *.desktop files to /usr/share/applications/screensavers to make them
available for all users.
going to the gnome-screensaver-preferences dialog should now show the
new modules in the list.
edit the *.desktop files to change screensaver-preferences to show fps and so on.
Very good; yes, these sort of steps will vary from system to system, depending on where things are saved by default. Thanks for posting your steps in case someone needs them. :)
I followed the instructions and when I execute the command I get the following error
/opt/gnome/lib/gnome-screensaver/migrate-xscreensaver-config.sh /etc/xscreensaver/*.xml
/opt/gnome/lib/gnome-screensaver/migrate-xscreensaver-config.sh: line 5: !DOCTYPE: No such file or directory
/opt/gnome/lib/gnome-screensaver/migrate-xscreensaver-config.sh: line 6: syntax error near unexpected token `newline’
/opt/gnome/lib/gnome-screensaver/migrate-xscreensaver-config.sh: line 6: `”http://www.w3.org/TR/REC-html40/loose.dtd”>’
Can you please help?
Thanks
Raj Sankuratri
Thank You
Like Raj I got similar comment
dwade2:/opt/gnome/share/gnome-screensaver/themes # /opt/gnome/lib/gnome-screensaver/migrate-xscreensaver-config.sh/ etc/xscreensaver/*.xml
bash: /opt/gnome/lib/gnome-screensaver/migrate-xscreensaver-config.sh/: No such file or directory
Anybody Know???
Thanks,
Derek
I just removed the Gnome screensavers and the xscreensavers take over and work just fine. There is a bug or two in openSUSE 10.3 in the x server configs so use an earlier version I used 5.01 and it works just fine…
Trying to get this working, but having no joy. I get the same issue as posted above… the error messages below… there must be a good reason :-D
I’m using Gnome on Centos 5. Cheers.
[root@localhost screensavers]#
[root@localhost screensavers]# /usr/libexec/gnome-screensaver/migrate-xscreensaver-config.sh \ /usr/share/xscreensaver/config/*.xml
/usr/libexec/gnome-screensaver/migrate-xscreensaver-config.sh: line 5: !DOCTYPE: No such file or directory
/usr/libexec/gnome-screensaver/migrate-xscreensaver-config.sh: line 6: syntax error near unexpected token `newline’
/usr/libexec/gnome-screensaver/migrate-xscreensaver-config.sh: line 6: `”http://www.w3.org/TR/REC-html40/loose.dtd”>’
[root@localhost screensavers]#
Well; keep in mind that the original how-to was tested on Suse, and it was from over a year ago.
However, the error you post makes it sound like you have html in your script; that’s not going to work.
Unfortunately, you’ll probably need to take a look at the script; maybe post it on linuxquestions.org, or the fedora forums, see if anyone can see what’s wrong. Because, there should be no !DOCTYPE or dtd definition in a shell script.
Good luck!