DISQUS

philcrissman.com: Howto: Add xscreensavers to gnome-screensaver

  • Rafael · 3 years ago
    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
  • Jason · 3 years ago
    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!
  • Phil Crissman · 3 years ago
    Great; glad to hear that it worked so well, or at least, was clear enough to adapt to your system. Thanks for the feedback! :-)
  • Loknar · 3 years ago
    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.
  • Phil Crissman · 3 years ago
    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.
  • soliari · 3 years ago
    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?
  • soliari · 3 years ago
    Nevermind ... I just went ahead and tried it and it works just fine.
  • Micah · 3 years ago
    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
  • DD · 3 years ago
    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.
  • Phil Crissman · 3 years ago
    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.
  • Gozer · 3 years ago
    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;
  • Phil Crissman · 3 years ago
    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. ;-)
  • Mitch · 3 years ago
    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 :(
  • Geoff · 3 years ago
    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/
  • Maarten · 2 years ago
    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!
  • Phil Crissman · 2 years ago
    Good tip Maarten; thanks for commenting. :)
  • Tschäms · 2 years ago
  • kearone · 2 years ago
    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.
  • Phil Crissman · 2 years ago
    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. :)
  • Raj Sankuratri · 2 years ago
    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
  • Alex · 2 years ago
    Thank You
  • Derek · 2 years ago
    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
  • Joe · 2 years ago
    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...
  • Jess · 2 years ago
    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]#
  • Phil Crissman · 2 years ago
    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!