Difference between revisions of "Kodi"

From ArchWiki
Jump to: navigation, search
m (grammar fixed in warning copied from XBMC wiki)
(http://wiki.xbmc.org/index.php?title=Installing_XBMC_for_Linux#Autostarting_XBMC)
Line 23: Line 23:
  
 
{{Warning|This is not the recommended way of using XBMC, as svn versions are always on the bleeding edge of development and thus can break sometimes. If you want a stable media center experience, go with the stable releases.}}
 
{{Warning|This is not the recommended way of using XBMC, as svn versions are always on the bleeding edge of development and thus can break sometimes. If you want a stable media center experience, go with the stable releases.}}
 +
 +
==Starting XBMC==
 +
 +
First add [[D-Bus]] to your [[Daemons#Starting_on_Boot|DAEMONS Array]] if you haven't already:
 +
 +
{{bc|(... '''dbus''' ...)}}
 +
 +
Next, you'll probably want to get [[ConsoleKit]] up and running, if you haven't already, and add the following line to your {{ic|.xinitrc}}:
 +
 +
{{bc|exec ck-launch-session xbmc-standalone}}
 +
 +
Make sure you add your user (or whatever user will run xmbc on your system) to at least groups '''audio''', '''video''', and '''storage'''.
 +
 +
{{bc|$ for x in audio video storage; do sudo gpasswd -a $USER $x; done}}
 +
 +
{{Note|If you don't run [[Sudo]], simply run the above command as root.}}
 +
 +
===Autostarting at Boot===
 +
 +
Using the above method, xbmc should run every time you start your X server, so auto-starting at boot can be configured just like a [[Display Manager]], with one important difference. If you choose to use the {{ic|/etc/inittab}} method, you can skip loading a display manager altogether and autologin XBMC by default. To do this, change your default runlevel to 5 in {{ic|/etc/inittab}} as usual:
 +
 +
{{bc|## Only one of the following two lines can be uncommented!
 +
# Boot to console
 +
'''#'''id:3:initdefault:
 +
# Boot to X11
 +
id:5:initdefault:}}
 +
 +
Note the comment (#) in front of {{ic|id:3:initdefault:}} and not {{ic|id:5:initdefault}}. Then, comment out all the default display manager lines at the end of the file:
 +
 +
{{bc|# Example lines for starting a login manager
 +
#x:5:respawn:/usr/bin/xdm -nodaemon
 +
#x:5:respawn:/usr/sbin/gdm -nodaemon
 +
#x:5:respawn:/usr/bin/kdm -nodaemon
 +
#x:5:respawn:/usr/bin/slim >/dev/null 2>&1}}
 +
 +
Finally, add this line (toward the end of the file, near where the lines you just commented are):
 +
 +
{{bc|x:5:wait:login -f <YOUR_XBMC_USERNAME> </dev/tty7 &>/dev/tty7}}
 +
 +
{{Warning|'''There is a security risk using this method.''' This bypasses login authentication and should only be used if you are sure you know what you are doing!}}

Revision as of 10:33, 13 March 2012

XBMC (formerly "Xbox Media Center") is a free, open source (GPL) multimedia player that originally ran on the first-generation XBox, (not the newer Xbox 360), and now runs on computers running Linux, Mac OS X, Windows, and iOS.

XBMC can be used to play/view the most popular video, audio, and picture formats, and many more lesser-known formats, including:

  • Video - DVD-Video, VCD/SVCD, MPEG-1/2/4, DivX, XviD, Matroska
  • Audio - MP3, AAC.
  • Picture - JPG, GIF, PNG.

These can all be played directly from a CD/DVD, or from the hard-drive. XBMC can also play multimedia from a computer over a local network (LAN), or play media streams directly from the Internet. For more information, see the XBMC FAQ.

Installation

Note: These instructions assume you have a working X installation. If you have not done this yet, please consult Beginners_Guide#Graphical_User_Interface.


The stable version of XBMC is available in the community repo:

# pacman -Syu xbmc

The SVN (testing) version of XBMC can be downloaded from the AUR (XBMC-git), e.g. using yaourt:

$ yaourt -Syua xbmc-git
Warning: This is not the recommended way of using XBMC, as svn versions are always on the bleeding edge of development and thus can break sometimes. If you want a stable media center experience, go with the stable releases.

Starting XBMC

First add D-Bus to your DAEMONS Array if you haven't already:

(... dbus ...)

Next, you'll probably want to get ConsoleKit up and running, if you haven't already, and add the following line to your .xinitrc:

exec ck-launch-session xbmc-standalone

Make sure you add your user (or whatever user will run xmbc on your system) to at least groups audio, video, and storage.

$ for x in audio video storage; do sudo gpasswd -a $USER $x; done
Note: If you don't run Sudo, simply run the above command as root.

Autostarting at Boot

Using the above method, xbmc should run every time you start your X server, so auto-starting at boot can be configured just like a Display Manager, with one important difference. If you choose to use the /etc/inittab method, you can skip loading a display manager altogether and autologin XBMC by default. To do this, change your default runlevel to 5 in /etc/inittab as usual:

## Only one of the following two lines can be uncommented!
# Boot to console
#id:3:initdefault:
# Boot to X11
id:5:initdefault:

Note the comment (#) in front of id:3:initdefault: and not id:5:initdefault. Then, comment out all the default display manager lines at the end of the file:

# Example lines for starting a login manager
#x:5:respawn:/usr/bin/xdm -nodaemon
#x:5:respawn:/usr/sbin/gdm -nodaemon
#x:5:respawn:/usr/bin/kdm -nodaemon
#x:5:respawn:/usr/bin/slim >/dev/null 2>&1

Finally, add this line (toward the end of the file, near where the lines you just commented are):

x:5:wait:login -f <YOUR_XBMC_USERNAME> </dev/tty7 &>/dev/tty7
Warning: There is a security risk using this method. This bypasses login authentication and should only be used if you are sure you know what you are doing!