HOWTO: Minimal Debian Lenny + Dharma + Latest nVidia drivers + no window manager
I'm posting this in the hope it may be useful to other Debian aficionados (or curious Ubuntu users who want to get closer to the action)....

[ Guide is based on the following hardware ]
  • Acer Aspire Revo R3600 nettop with 1GB RAM / 160GB HDD
  • Western Digital Elements 1TB USB2.0 Ext. HDD
  • Samsung SE-S084 Slim 8x DVD±RW DL RAM USB
My setup: Revo is connected to TV via HDMI, audio is analogue via 3.5mm jack (don't laugh!) and LAN connectivity is via an ethernet cable.

[ Objective ]
Turn the Revo in to a lean, dedicated xbmc and media streaming/storage box. The key goals are no bloat and no fluff - just a stripped down install of Debian Lenny with only the bare essentials necessary to get xbmc running (we're not even going to use a window manager). The advantage of this approach is that you end up with a very clean install of Debian and xbmc, making it easy to use the Revo for other hacking duties alongside running xbmc.


1). Perform a minimal network install of Debian Lenny (remember to de-select both "Standard System" and "Desktop System" during the install wizard). Once Debian is installed, the base system should be using no more than 700MB or so of total disk space (well, we did say no fluff!).

[ for more info on performing a network install, see: ]

2). Using the Revo provided keyboard, log in locally and:
  • install ssh
  • create some basic iptables rules
  • make any necessary changes to /etc/network/interfaces (e.g. give the Revo a static IP on your LAN and get 'pre-up' to call your iptables script).
  • make any necessary changes to /etc/resolv.conf
  • add contrib and non-free repositories to /etc/apt/sources.list

For the remaining part of the guide, we'll do everything remotely over ssh as root

3). Install the kernel headers, alsa sound drivers (we're shunning pulse audio - too bloated and not needed for analogue audio!) plus some useful helper programs:

# aptitude install linux-headers-2.6.26-2-686 pciutils xorg wget lsof iptraf htop nmap tcpdump linux-sound-base alsa-base alsa-utils psmisc

4). Configure the audio:

# alsamixer
# alsactl store 0

5). Install the latest nvidia binary drivers:

# cd /usr/src
# wget
# export CC=/usr/bin/gcc-4.1
# sh

6). Grab the libvdpau headers so that xbmc can offload video processing to the GPU and support full, stutter free 1080p playback (this is necessary because nvidia has stopped including vdpau header files with their latest binary drivers):

# cd /usr/src
# wget
# tar zxvf libvdpau-0.4.1.tar.gz
# cp libvdpau-0.4.1/include/vdpau/* /usr/include/vdpau/  [ done because on Debian Lenny, `cc -print-search-dirs` does not include the /usr/local/lib path by default which results in xbmc configure throwing an "Unable to determine soname of librtmp library" error ]

7). Install the minimum third party libraries required to successfully compile xbmc:

# aptitude install cvs make g++ gcc autoconf gawk pmount libtool quilt python-support autotools-dev libgl1-mesa-dev libglew-dev libvorbisenc2 libmysqlclient-dev libcurl3 libcurl4-openssl-dev libavahi-common-dev libavahi-client-dev libavcodec-dev libavformat-dev libavutil-dev libpostproc-dev libswscale-dev libdts-dev libmpeg2-4-dev libflac-dev libwavpack-dev python-dev libcwiid1-dev libbluetooth-dev zlib1g-dev libtiff4-dev libmicrohttpd-dev libmodplug-dev nasm automake cmake gperf unzip bison libogg0 libflac8 libsdl-dev libsdl-image1.2-dev libsdl-gfx1.2-dev libsdl-mixer1.2-dev libsdl-sound1.2-dev libsdl-stretch-dev libfribidi-dev liblzo2-dev libfreetype6-dev libsqlite3-dev libogg-dev libasound-dev python-sqlite libglew-dev libcurl4-dev x11proto-xinerama-dev libxinerama-dev libxrandr-dev libxrender-dev libmad0-dev libogg-dev libvorbis-dev libmysqlclient15-dev libpcre3-dev libdbus-1-dev libhal-dev libhal-storage-dev libjasper-dev libfontconfig-dev libbz2-dev libboost-dev libenca-dev libxt-dev libxmu-dev libpng-dev libjpeg-dev libpulse-dev mesa-utils libcdio-dev libsamplerate0-dev libmms-dev libxtst-dev zip libssl-dev libfaad-dev libsmbclient-dev libiso9660-dev

8). I hate using backports but we need one package from here to satisfy the xbmc build process:

Add "deb lenny-backports main contrib non-free" (without the quotes) to /etc/apt/sources.list

and run:
# aptitude install debian-backports-keyring
# aptitude install libass-dev

9). Install the latest version of rtmpdump:

# cd /usr/src
# wget
# tar zxvf rtmpdump-2.3.tgz
# cd rtmpdump-2.3
# make SYS=posix
# make install
# ln -s /usr/local/lib/ /usr/lib/  [ done because, on Debian Lenny, `cc -print-search-dirs` does not include the /usr/local/lib path by default which results in xbmc configure throwing an "Unable to determine soname of librtmp library" error ]

10). Compile and install Dharma stable:

# cd /usr/src
# wget
# tar zxvf xbmc-10.0.tar.gz
# cd xbmc-10.0
# ./bootstrap
# ./configure --disable-pulse --enable-external-libass --enable-rtmp --enable-vdpau

You should get the following after configure has run:
XBMC Configuration:
Debugging: Yes
Profiling: No
Optimization: Yes
Crosscomp.: No
target ARCH: no
target CPU: no
OpenGL: Yes
CrystalHD: No
VDADecoder: No
OpenMax: No
Joystick: Yes
XRandR: Yes
Bluray: No
MID Support: No
ccache: No
PulseAudio: No
HAL Support: Yes
Avahi: Yes
Non-free: Yes
ASAP Codec: No
Webserver: Yes
libRTMP support: Yes
Deprecated libdts: No
Deprecated liba52: No
External FFmpeg: No
External Python: No
prefix: /usr/local

Then compile and install xbmc:

# make
# make install

11). Create an xbmc user (rather than running xbmc as root):

# groupadd xbmc
# useradd -d /home/xbmc -m -s /bin/bash -g xbmc,audio xbmc
# passwd xbmc

12). Log-in as the new xbmc user and configure xinitrc so that xbmc automatically starts as soon as you type "startx" (thus negating the need for a window manager):

# echo "exec /usr/local/bin/xbmc" > ~/.xinitrc

That's it! You now have a bare bones Debian Lenny install with only the absolute minimum software required to run XBMC. To start xbmc, login locally as the xbmc user and type "startx".
Useful Optional Extras:

1). Add an entry to fstab to support a USB CD/DVD drive:

# nano /etc/fstab [ add: /dev/scd0       /mnt/cdrom0   udf,iso9660 user,noauto     0       0 ]
# mkdir /mnt/cdrom0
# mkdir /media
# ln -s /mnt/cdrom0 /media/cdrom

2). Install autofs and ntfs-3g to support auto-mounting an NTFS formatted external USB drive for media storage:

# aptitude install autofs ntfs-3g
# mkdir /mnt/removable
# nano /etc/auto.master [ add line: /mnt/removable  /etc/auto.removable     --timeout=120 ]
# nano /etc/auto.removable [ add line: usbdrive  -fstype=ntfs-3g,rw,sync,uid=1001,gid=110,umask=002,locale=en_GB.UTF8       :/dev/sdb1 ] Note: uid should be the xbmc user and gid should be the xbmc group id and you may also want to change locale to something more appropriate.
# /etc/init.d/autofs restart
# mkdir /media
# cd /media
# ln -s /mnt/removable/usbdrive /media/usbdrive
# ls -l /media/usbdrive  [ should show you the contents of the drive ]

3). Install samba, samba-common and libcups2 to share the USB drive across the network (useful for exposing your media to other devices on the network):

# aptitude install samba samba-common libcups2
# cp /etc/samba/smb.conf /etc/samba/smb.conf.bak
# nano /etc/samba/smb.conf [ see end of post for an example samba configuration ]
# smbpasswd -a xbmc
# /etc/init.d/samba restart

4). Install the BBC iplayer plugin for xbmc (only of interest if you are in the UK and want to access the BBC iplayer service via xbmc):

# cd /home/xbmc/.xbmc/addons/
# wget [url][/url]
# unzip
# mv IPlayer
# rm

5). Install up-to-date ffmpeg (needed for archiving BBC iplayer shows via get_iplayer. Again, this is only of interest if you are in the UK, use the BBC iplayer service and want to archive some programmes for personal use):

# cd /usr/src
# wget [url][/url]
# cd ffmpeg-0.6.1
# ./configure
# make
# make install

6). Install youtube-dl (great for downloading youtube videos for later playback through xbmc):

# cd /usr/src
# wget [url][/url]
# chmod 750 youtube-dl
# mv youtube-dl /usr/bin

Finally, here is an example /etc/samba/smb.conf for sharing a USB hard drive via eth0 (don't forget to open the necessary ports on the firewall):

#======================= Global Settings =======================


## Browsing/Identification ###

workgroup = WORKGROUP
server string = %h server
dns proxy = no

#### Networking ####

interfaces = lo eth0
bind interfaces only = yes
hosts deny = all

# You may need to change the following line to correspond to your network address scheme
hosts allow =

#### Debugging/Accounting ####

log file = /var/log/samba/log.%m
max log size = 1000
syslog only = no
syslog = 0
#panic action = /usr/share/samba/panic-action %d

####### Authentication #######

security = user
encrypt passwords = true
passdb backend = tdbsam
obey pam restrictions = yes
unix password sync = yes
passwd program = /usr/bin/passwd %u
passwd chat = *Enter\snew\s*\spassword:* %n\n *Retype\snew\s*\spassword:* %n\n *password\supdated\ssuccessfully* .
pam password change = yes

############ Misc ############

socket options = TCP_NODELAY SO_RCVBUF=8192 SO_SNDBUF=8192
winbind enum groups = yes
winbind enum users = yes
printcap name = /etc/printcap
load printers = no
printing = cups
printcap name = /dev/null
disable spoolss = yes

#======================= Some Example Share Definitions =======================

comment = XBMC Media Directory
browseable = yes
read only = no
create mask = 0750
directory mask = 0750
valid users = xbmc
# This is the path to the root folder of your media storage on the external hard drive (note: folder should be read and writable by the xbmc user)
path = /media/usbdrive/media_store

comment = XBMC CD Drive
read only = yes
locking = no
path = /media/cdrom
guest ok = yes
preexec = /bin/mount /media/cdrom
postexec = /bin/umount /media/cdrom
thanks! great howto!
thank you, i use it for update camelot to dhama on Lenny

thank you
Anyone got a remote working? Preferrably a mce_usb (former mce_usb2)

There are tons of 'guides', but I did not succeed.
I'm building a custom kernel on squeeze right now, but any help is welcome.

Updated version of the guide (for Debian Squeeze) is here:

bas.t: I have an MCE remote and that's next on my "todo" list... will post a guide if I get it working (plan is to use lirc).
Hi ,
Thanks for the Xcellent Guide it works.
I wanted to know How to configure XBMC without X11 and to use only FrameBufferDisplays , for set-up-box kind of Boxes.
Please let me know it will be of a Great Help!!
(2012-06-12, 12:36)rashmi Wrote: Hi ,
Thanks for the Xcellent Guide it works.
I wanted to know How to configure XBMC without X11 and to use only FrameBufferDisplays , for set-up-box kind of Boxes.
Please let me know it will be of a Great Help!!
There is no need to cross-post asking the same question in three different threads, and re-opening old threads at that will also annoy people.

Again see and avoid cross-posting in the future, or no one will answer you out of spite Angry

Thread Rating:
  • 0 Vote(s) - 0 Average

Logout Mark Read Team Forum Stats Members Help
HOWTO: Minimal Debian Lenny + Dharma + Latest nVidia drivers + no window manager00