XBMC

From Amahi Wiki
Revision as of 05:25, 13 January 2011 by Sabat (talk | contribs)
Jump to: navigation, search

Initial system setup with Gnome

  1. Install Amahi (via express cd)
  2. Once you get a login prompt, login as admin/admin
   su -
   yum -y groupinstall "GNOME Desktop Environment"
   yum -y install Xorg

Adding XBMC to the system

  1. From another pc, open the hda webpage http://hda, and add the user xbmcuser:xbmcuser and check to enable admin[I haven't tried doing this without admin yet on the xbmcuser account]
  2. Go to the webapps section on the hda page http://hda/setup?sub=available&tab=app and add rpmfusion and rpmfusion nonfree in the web apps secion
  3. Back to the console
   yum -y install xbmc
  1. XBMC also needs an addition to the Xorg server, otherwise it crashes every time you run it.
   yum -y install xorg-x11-utils

Required for nvidia driver

   yum -y install kernel-devel
   yum -y install kernel-headers
   yum -y install kernel
   yum -y install gcc

Obtaining and installing the driver

Download the nvidia driver, in my case, I used used the links text based web browser, however this method is a bit tricky, I would suggest you do not disable the nouveau driver and use 'yum -y install firefox' and goto the nvidia web page, skipping this section and saving it for later. I also needed the older 96.xx driver because I was using an older video card.

   yum -y install links
   links www.nvidia.com 
   chmod +x nvidiadrivername

You may have to reboot after disabling the nouveau driver before installing the driver

   ./nvidiadrivername

Removing the nouveau driver completely

This line will add rdblacklist=nouveau to the kernel line in grub.conf

   sed -i '/root=/s|$| rdblacklist=nouveau|' /boot/grub/grub.conf

Add blacklist nouveau to /etc/modprobe.d/blacklist, I'm sure there is a sed command for this, will get to it later, I used this next command and added it manually.

   nano /etc/modprobe.d/blacklist.conf

If the nouveau driver still causes problems

This line failed for me, so I rebooted and logged back in, then it worked fine. maybe the nouveau has to be disabled before it's possible to remove it. also, this is the section I suggest you skip if you were unable to download the proper driver using links.

   yum erase xorg-x11-drv-nouveau
   mv /lib/modules/$(uname -r)/kernel/drivers/gpu/drm/nouveau/nouveau.ko /lib/modules/$(uname -r)/kernel/drivers/gpu/drm/nouveau/nouveau.txt
   mv /boot/initramfs-$(uname -r).img /boot/initramfs-$(uname  -r)-nouveau.img
   dracut /boot/initramfs-$(uname -r).img $(uname -r)

Setup autologin for the xbmcuser

   cat >> /etc/gdm/custom.conf <<EOF
   [daemon]
   TimedLoginEnable=true
   TimedLogin=xbmcuser
   TimedLoginDelay=5
   EOF

Change initial runlevel to 5

This is what tells Amahi to boot into X instead of console.

   sed -i 's/^id:3:/id:5:/' /etc/inittab

Add xbmc to X startup

   echo xinit /usr/bin/xbmc >/home/xbmcuser/xbmcstartup
   chmod a+x /home/xbmcuser/xbmcstartup
   chown xbmcuser:users /home/xbmcuser/xbmcstartup

Now just reboot, it should come up to the normal desktop. Log out of the system using the top left button, then hit escape a few times to cancel the auto login. Now click on xbmcuser, then at the bottom of the screen it has "sessions", select xbmc instead of gnome, then type in your xmbcuser password and click login.

You're done. The next time you reboot, it should come right back up in xbmc.

A Few Suggestions

  1. Install the DLNA server, it works perfectly with any movies you put in the movies share, photos you put in the pictures share, and any music in the music folder. I've heard mention that mkv files might not work with dlna, but I have not verified this.
  2. If you have a noisy server, remember you don't have to have the pc in the same room as the TV, I don't and it works great, or put the server in a closet or something on the other side of the wall and run a cable to the back of the tv.
  3. Setup VNC on your Amahi server, it really is nice to have remote control of xbmc, I don't ever actually try to watch movies through vnc, but It's a great remote until we get the webserver working

Troubleshooting

If you lose video, try hitting CTRL+ALT+F2, CTRL+ALT+backspace, or ssh into the amahi server and change /etc/inittab back to runlevel 3.

One file that can easily make or break your video, is /etc/X11/xorg.conf and one of the most common things to have to edit is the vertical refresh, or the resolution lines. for instance my tv doesn't like 1600x1200, and every time I did this how-to on this particular pc, I had to remove the 1600x1200 from the xorg.conf before it would work right, but this is not going to happen to everyone.