You are here

Ubuntu + Elisa media center

Introduction

Elisa is quite new (to me), but I was impressed when I first saw it at Fosdem 2008. If Elisa is completely new to you and you want to see some screenshots, take a look here: http://elisa.fluendo.com. A copy-paste from the Elisa site: Elisa is an open source cross-platform media center solution designed to be simple for people not particularly familiar with computers. Basicly, it plays/shows media like movies, music, pictures, with a simple to use interface. The interface can be controlled with only a few buttons, and can be used on a TV.

If you're now thinking "I got a commandline and mplayer/xine/... installed, why would I need this?" ... you may have missed a little point here: Media centers should be easy to use. I know, you can use a GUI to browse trough files and then doubleclick... sure, but even if you have a Highdef tv and can display your desktop on it, you'll need to be close to the screen to read everything, and use a mouse and/or keyboard to use it. But this is not the point. A media center... what are the requirements? Let's rephrase that: what are my requirements:

  • can play all sorts of files
  • usable on a PAL 16:9 tv
  • fast startup
  • controlable by infrared remote, or maybe gamepad

What did I have when I started this project

  • A pentium III 1Ghz system with 256MB ram,network onboard,harddisk, and USB 2.0 ports and a Nvidia GeForce FX 5200 with S-video output

MythTV I first tried this with MythTV. Why? Because I knew about that software, and it seemed very easy to install on a clean Ubuntu installation.
Did that work: yes, mostly. MythTV worked with an old usb gamepad that I had, and I could play videofiles from an NFS server (just
mounted the NFS where MytvTV looked for videofiles. MythTV turned out to have some disadvantages too: It needed to index all the
files before you could play one. Depending on the amount of files you have, that can take a while.

Another problem: It didn't seem to be able to browse trough USB harddisks (easily).

Because a notebook with TV-out is available, and several meters of audio and videocable running through the room to the couch
don't really bother me, the media center hasn't been used for a while.

But, sitting in the sofa, with a notebook on your lap, connected with a wire for the powersupply, a USB cable to an external
harddisk, a cable for audio and one for video... it's not completely comfortable. And then I saw the unused "Media Center Ubuntu"
beneath the tv, and I tought of Elisa.

Requirements/Goals

Elisa promised what I needed: a simple Media Center interface, easy to browse through USB devices, plays a lot of filetypes (it
uses gstreamer).
a list of what I wanted:

  • Elisa automatically started
  • USB devices automatically mounted and shown in Elisa
  • Fast startup
  • easy remote control

How did I set this up?

First I upgraded the box to Ubuntu Gutsy, which has Elisa as a package. I also installed Openbox, which is a very light window
manager. You could probably run elisa without a window manager, but I like having the posibility to run a shell to start
nvidia-settings eg. Another package which is very useful is the "ivman" package. It's package that uses HAL (should also be
installed) and probably pmount to automount USB devices. If you've installed those things, you should be able to boot, start an
openbox session (or gnome/kde session if you don't mind wasting memory and time on a desktop environment you don't you use).

That's not enough, the system should boot up, and run elisa in full screen by just pushing the power button. This can be done in
a lot of ways. I figured out that the sessions gdm show are defined in /usr/share/xsessions/. I made a script that would start
openbox, run elisa and disable dpms (you don't want your screen to turn black or blue every 10 minutes):
/usr/local/bin/elisa-openbox

#!/bin/bash
/usr/bin/elisa &
/usr/bin/xset -dpms
/usr/bin/openbox


This is the .desktop file for the session, it starts the script above:
/usr/share/xsessions/elisa-session.desktop

[Desktop Entry]
Encoding=UTF-8
Name=Elisa on openbox
Comment=This will start openbox and elisa in fullscreen
Exec=/usr/local/bin/elisa-openbox
Icon=
Type=Application

If you start gdm and select the elisa session, gdm should remember to use that session next time. or edit ~/.dmrc (of the user
that will be auto-logged-on.

To prevent your media center to hang on a password prompt, you'll have to tell gdm to autologon. Or you could just disable gdm and
make X start with Elisa from an init script. This would save a few seconds on the startup time. You can probably configure this
with a GUI, but the fonts on my television were to small, so I configured this from a shell over ssh. Edit the gdm configuration
file. This could be gdm.conf, of gdm-cdd.conf, or gdm.conf-custom. Take a look at the ps -aux output, or check the /etc/init.d/gdm
file to figure out which file needs to be edited. You'll need to change the folowing parameters:

AutomaticLoginEnable=true
AutomaticLogin=tvuser

# Timed login, useful for kiosks.  Log in a certain user after a certain amount
# of time.
TimedLoginEnable=true
TimedLogin=tvuser
TimedLoginDelay=5

To make Elisa startup in fullscreen, there's a "start_fullscreen" parameter in ~/.elisa/elisa.conf

Depending on what kind of display you connect the computer, you might want to set the resolution and screen size properly:
I've got my X set to 800x600. This is a 4:3 resolution, but I want to use the most of the limited lines PAL has, so I have the tv
"squeeze" the full PAL image into a 16:9 screen. Elisa can automatically adjust the displayed videos, but it needs to be aware of
the physical dimensions of you're screen. I added those by adding a "DisplaySize <width> <height>" line to the monitor section of
xorg.conf. If you're using a svideo cable, and only get a black and white image, try adding this line to the Device section of
your xorg.conf (this is the configuration of an Nvidia card, maybe it's different for other:

    Option         "TVOutFormat" "SVIDEO"
    Option         "TVStandard" "PAL-B"

One last useful (at least I hope) hint, is TVOverscan. Sometimes there are black borders (not the 4:3/16:9 ones) around the image.
Or sometimes a border of the image is missing, anyways, if you're using a Nvidia card, the option you need to configure is
"TVOverscan". Run nvidia-settings to use the GUI to change the TVOverscan and find the best value. If you later want to restore
that setting from a script, "nvidia-settings -a TVOverScan=XX". If you want to have color, saturation, ... settings changed,
nvidia-settings might be interesting to you.

missing...

LIRC... should be supported under Elisa, but I don't have an IR receiver on the computer.UPDATE:

I've got this working now, I found an IR transceiver in an old pc, and the mobo on the settopbox has an irda connector :)
If you're interested in how to set up LIRC and Elisa and you want to know how I did it, mail me, I'll try to make time to document
it then.


Unmounting of the USB devices from Elisa. Currently I use pumount over ssh.

Shutdown - from Elisa. I could make the computer shutdown when elisa quits, but that would be inconvenient in case Elisa would crash. So basicly a "shutdown" button in Elisa is what I want.

If you have any questions, you can reach me at email adress

Linux: 

Comments

Excellent Howto!
There's one thing I'd like to add. If you have a 16:9 screen and want to start elisa @ 800x600 but keep normal sessions and gdm at a higher resolution you can add a xrandr to the ~/.xprofile of your elisa user. As you mentioned, adding the physical dimensions of your screen to xorg.conf allows elisa to correct the aspect ratio of movies. But xrandr resets this information. There is an parameter for xrandr to tell which dimensions to use:

xrandr --output VGA --mode 800x600 --fbmm 340x190

Add new comment