Take the 2-minute tour ×
Ask Ubuntu is a question and answer site for Ubuntu users and developers. It's 100% free, no registration required.

I have no programming language preferences and I have a good knowledge of OpenGL coding. If I could use something like OpenFrameworks or Processing as a base, that would be ideal.

share|improve this question

1 Answer 1

up vote 13 down vote accepted

A screensaver in Linux is a pretty simple thing made up of two key parts:

  1. A graphical application that renders the images.
  2. A .desktop file pointing to that application.

I'm not sure what end-result you're trying to achieve so I'll start in reverse. The .desktop files for existing screensavers live in /usr/share/applications/screensavers/. Here's ubuntu_theme.desktop for an example of what you're aiming for:

[Desktop Entry]
Name=Floating Ubuntu
Comment=Ubuntu logo floating around the screen
Exec=floaters /usr/share/pixmaps/ubuntu-screensaver.svg
TryExec=floaters
StartupNotify=false
Terminal=false
Type=Application
Categories=GNOME;Screensaver
OnlyShowIn=GNOME

If you want to float a different image around, you could just clone the launcher, and replace /usr/share/pixmaps/ubuntu-screensaver.svg with your own image (use SVGs where possible as they scale a lot better).

If you want to write your own binary for a completely custom screensaver, you should probably start here: http://www.dis.uniroma1.it/~liberato/screensaver/

It uses very simple X graphics to do some pretty simple things. You can pimp it out with OpenGL but it's important you get the basics laid out first.

Once you're done, packaging is its whole set of problems but for a very simple package, you can quickly bang a package out following something like this: https://help.ubuntu.com/community/PythonRecipes/DebianPackage

But if you're serious about distributing this to lots of people you probably want to start with a PPA (a private repository). You can read about PPAs, building source packages, the build process, etc on LaunchPad's help system.

share|improve this answer

Your Answer

 
discard

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.