Running Rygel as a system service with Ubuntu
=============================================

This guide has been tested with Ubuntu 12.04 LTS.

Dependencies
~~~~~~~~~~~~

Install Rygel and most of the GStreamer plug-ins:

 sudo apt-get install rygel gstreamer0.10-plugins-good \
      gstreamer0.10-plugins-bad gstreamer0.10-plugins-ugly \
      gstreamer0.10-ffmpeg

You might want to skip gstreamer0.10-plugins-multiverse if you're using rygel
< 0.15.1, otherwise you'll run into troubles with transcoding.

Configuration
~~~~~~~~~~~~~

After that, you might want to create a dedicated user for the server:
 sudo adduser --home /home/rygel --disabled-password --disabled-login \
    --gecos 'Rygel media server' rygel

Then switch to that user, create ~/.config and copy /etc/rygel.conf there.
Modify it to fit your needs by disabling plugins and transcoders you don't need,
setting the device name and paths.

Then copy upstart/rygel.conf to /etc/init and call "sudo start rygel" to start
the service. It should get started at every boot from now on.

Generating Thumbnails
~~~~~~~~~~~~~~~~~~~~~

Rygel reuses thumbnails that were generated by external software such as
nautilus. However, it can also request creation of thumbnails by itself.

To enable this feature, you have to install tumbler:

 sudo apt-get install tumbler

Since tumbler is a D-Bus service, rygel has to have access to a D-Bus session
bus. To accomplish this you need to copy the included D-Bus wrapper script
"wrap-dbus" somewhere and modify the upstart script to call a wrapped rygel:

 exec /usr/local/bin/wrap-dbus rygel

wrap-dbus makes sure that a session bus is running and will re-use an existing
bus it spawned itself.

After (re-) starting rygel, it should start requesting thumbnail generation
for files that don't have thumbnails. If you don't see them in your client
right away, you might have to refresh the view.

Note: For Rygel versions below 0.15.1, you have to create ~/.thumbnails/normal
as well, otherwise Rygel thinks there are no thumbnails available as it is not
aware that tumbler will generate this directory.
