Difference between revisions of "XBMC"

From Amahi Wiki
Jump to: navigation, search
Line 2: Line 2:
 
sabat: ya, I'll never forget the name vail. :) when I was reading the suprised and annoyed peoples comments, I was thinking of walking down the aisle, lifting the womans vail, and seeing some ugly chick that isn't what you expected. I thought the analogy fit.
 
sabat: ya, I'll never forget the name vail. :) when I was reading the suprised and annoyed peoples comments, I was thinking of walking down the aisle, lifting the womans vail, and seeing some ugly chick that isn't what you expected. I thought the analogy fit.
  
When I got my hands on amahi, the first thing I wanted was for it to not only store my movies, but also play them! I've done this for years using an xbox running xbmc, so I figured why not on my amahi server! Well, it worked, and here's how I did it. Currently I have been unable to get the webserver to work. I saw no reason to go through the full compile process, seeing that the only thing it adds is the webserver, which is broken. This method uses a RPM from rpmfusion, and takes about 1% of the time that the compiling method takes. Also this is based on nvidia video cards, I'll try to get to ATI and intel later. I know the average joe won't be able to install video drivers easily, so I am attempting to include the info on the video drivers, specially because fedora 12 is aging and documentation is starting to get somewhat stale for it on other websites. I literally had to use 5 or more websites to get this to work.
+
When I got my hands on Amahi, the first thing I wanted was for it to not only store my movies, but also play them! I've done this for years using a Xbox 1 running XBMC, so I figured why not on my Amahi server! Well, it worked, and here's how I did it. Currently I have been unable to get the webserver to work. I saw no reason to go through the full compile process, seeing that the only thing it adds is the webserver, which is broken. This method uses a RPM from rpmfusion, and takes about 1% of the time that the compiling method takes. Also this is based on nvidia video cards, I'll try to get to ATI and intel later. I know the average joe won't be able to install video drivers easily, so I am attempting to include the info on the video drivers, specially because fedora 12 is aging and documentation is starting to get somewhat stale for it on other websites. I literally had to use 5 or more websites to get this to work.
 
   
 
   
This was mainly tested on a fairly basic test system, HP a282n, 2gb ram, 40gb hd, nvidia mx-440 8xAGP using the Fedora 12 based, 32bit amahi express cd.
+
This was mainly tested on a fairly basic test system, HP a282n, 2gb ram, 40gb hd, nvidia mx-440 8xAGP using the Fedora 12 based, 32bit Amahi express cd.
  
 
=== Initial system setup with Gnome ===
 
=== Initial system setup with Gnome ===
#install amahi (via express cd)
+
#Install Amahi (via express cd)
#once you get a login prompt, login as admin/admin
+
#Once you get a login prompt, login as admin/admin
 
     su -
 
     su -
 
     yum -y groupinstall "GNOME Desktop Environment"
 
     yum -y groupinstall "GNOME Desktop Environment"
Line 15: Line 15:
 
=== Adding XBMC to the system ===
 
=== Adding XBMC to the system ===
 
#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]
 
#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]
#goto 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
+
#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
 
#Back to the console
 
#Back to the console
 
     yum -y install xbmc
 
     yum -y install xbmc
#xbmc also needs an addition to the xorg server, otherwise it crashes every time you run it.
+
#XBMC also needs an addition to the Xorg server, otherwise it crashes every time you run it.
 
     yum -y install xorg-x11-utils
 
     yum -y install xorg-x11-utils
  
Line 32: Line 32:
 
     links www.nvidia.com  
 
     links www.nvidia.com  
 
     chmod +x nvidiadrivername
 
     chmod +x nvidiadrivername
you may have to reboot after disabling the nouveau driver before installing the driver
+
You may have to reboot after disabling the nouveau driver before installing the driver
 
     ./nvidiadrivername
 
     ./nvidiadrivername
  
Line 38: Line 38:
 
This line will add rdblacklist=nouveau to the kernel line in grub.conf
 
This line will add rdblacklist=nouveau to the kernel line in grub.conf
 
     sed -i '/root=/s|$| rdblacklist=nouveau|' /boot/grub/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.
+
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
 
     nano /etc/modprobe.d/blacklist
  
Line 71: Line 71:
  
 
=== A Few Suggestions ===
 
=== A Few Suggestions ===
# 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.
+
# 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.
# 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.
+
# 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.
 
# 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
 
# 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
  

Revision as of 23:34, 25 November 2010

Here's a great quote to start this out on. sabat: ya, I'll never forget the name vail. :) when I was reading the suprised and annoyed peoples comments, I was thinking of walking down the aisle, lifting the womans vail, and seeing some ugly chick that isn't what you expected. I thought the analogy fit.

When I got my hands on Amahi, the first thing I wanted was for it to not only store my movies, but also play them! I've done this for years using a Xbox 1 running XBMC, so I figured why not on my Amahi server! Well, it worked, and here's how I did it. Currently I have been unable to get the webserver to work. I saw no reason to go through the full compile process, seeing that the only thing it adds is the webserver, which is broken. This method uses a RPM from rpmfusion, and takes about 1% of the time that the compiling method takes. Also this is based on nvidia video cards, I'll try to get to ATI and intel later. I know the average joe won't be able to install video drivers easily, so I am attempting to include the info on the video drivers, specially because fedora 12 is aging and documentation is starting to get somewhat stale for it on other websites. I literally had to use 5 or more websites to get this to work.

This was mainly tested on a fairly basic test system, HP a282n, 2gb ram, 40gb hd, nvidia mx-440 8xAGP using the Fedora 12 based, 32bit Amahi express cd.

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

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.