MythicalLibrarian, HOW-TO:Install Ubuntu and XBMC on Asus EeeBox PC EB1501

From XBMC
(Difference between pages)
Jump to: navigation, search
(mythicalLibrarian works from terminal, but not from user job)
 
(added XBMC SVN Repo Installer and Launcher)
 
Line 1: Line 1:
[[Image:Librarianas.png|left|200px|diagram of how mythicalLibrarian works]]Newest version was released --[[User:Outleradam|Outleradam]] 00:54, 8 January 2010 (UTC)
+
= Asus EeeBox PC EB1501 - Ubuntu & xbmc =
[[Image:Libraraianlibraryfiles2.jpg|right|200px|actual picture from XBMC with recordings from MythTV ]]
+
[[Image:Librararianlibraryfile.jpg|right|200px|actual picture from XBMC with recordings from MythTV ]]
+
'''The Missing Symlink'''
+
  
mythicalLibrarian will convert your recordings into a [[Video Library]], free of commercials, automatically after recording.  You can see an example to the right.
+
This is a tut on a couple of howtos but its dedicated to installing a miminal Ubuntu 9.10 and xbmc on the Asus EeeBox PC EB1501.  
  
 +
[[Image:EB1501.png]] [[Image:And.png‎]] [[Image:Ubuntu_logo.png‎]] [[Image:And.png‎]] [[Image:Xbmc.png]]
  
'''About The Program'''
+
Things that where considered when buying a HTPC that led me to the Asus EeeBox PC EB1501:
 +
* NVIDIA® ION™ platform and Slot-load ODD.
 +
* Silent
 +
* Small
 +
* HDMI
 +
* Optical Output
  
mythicalLibrarian is a highly versitile tool designed to assign season and episode numbers to television shows based on show title and episode title so they are easily recognized by XBMC or Boxee.  mythicalLibrarian interfaces with TheTvDb to gain information about the target file.  mythicalLibrarian also has the ability to interface with MythTV's local database, XBMC's command interface, and Ubuntu GNOME desktop to provide an all-around recording recognition/managing engine which will run in the background of your back-end computer to update your library and provide status updates upon each completed job.
+
== credits ==
 +
Most of this is already documented but this is now specific to EB1501 & Ubuntu 9.10
  
mythicalLibrarian pulls information supplied by your [[MythTV]] program guide for episodes, and makes a fuzzy logic match out of the supplied data. If fuzzy logic is not enough, it will match original air date. For Movies, mythicalLibrarian will rename your MythTV recordings based upon information obtained from the program guide database on your computer. If you allow commercial data to be generated for your shows, mythicalLibrarian will also copy this data with the recordings. mythicalLibrarian allows MythTV to remain in control of the files, so there is no reason not to process your recordings for boxee and XBMC.
+
Thanks to the following people:
 +
*succo (xbmc.org)
 +
*soundcheck (ubuntuforums.org)
 +
*everyone (xbmc.org - wiki)
  
MythicalLibrarian was designed to run under Ubuntu Karmic Koala OS through BASH2.
+
== Install Ubuntu & xbmc ==
 +
Get the most recent 9.10 image from here. Various posts  recommend the 32-bit version.
 +
 +
*The ISO can either be burned to CD (seems like a waste for 10 MB); alternatively, use UNetbootin to make a bootable USB drive from ISO.  
  
 +
After starting the computer with either the CD or the USB drive, select "Install" at boot prompt, then when prompted provide info about your location, language, keyboard layout, time zone. Disk partitioning will be basic, the full disk will be deleted and used.
  
[[Image:Files.mythicalfilesystemthumb.jpg|right|thumb|250px|Click this link to see folder layout http://wiki.xbmc.org/images/5/5f/Files.mythicalfilesystem.gif ]][[Image:MythicalDBaseThumb.jpg|right|thumb|250px|Click this link to see an example database http://wiki.xbmc.org/images/e/ed/MythicalDBasea.jpg ]]
+
When prompted to create an account, use xbmc and anything you want to for a password.
'''How it works'''
+
  
mythicalLibrarian will generate several files of it's own while running. It must have it's own working directory. To the right, you can see an example of the layout of /mythicalLibrarian, the files which it creates and their purposes.
+
During the installation select "Basic Ubuntu server" as the only option, or optionally "OpenSSH server" if you want to have (secure) remote connections facilities.  
Here is the basic flow:
+
*You put in- 'mythicalLibrarian.sh "episode or movie name" "episode name" "file/to/process.ext"'
+
*Episodes- mythicalLibrarian references TheTvDb to gain SeriesID. Get current time from TheTvDb  If the database is out-of-date or non existant, it will download the full series and parse it.  Then, using fuzzy logic, it makes a match of the series name and gains season and episode information.  If this is not possible, it will attempt a match of original airdate from your MythTV program guide database.
+
mythicalLibrarian will rename your recognizable episodes to: "'''''/Show Name/Show Name.SxxExx (episode title).ext'''''"
+
  
*Movies- mythicalLibrarian references your MythTV program guide database to verify it is a movie and then obtains the year for the movie.
+
=== Initial system configuration ===
mythicalLibrarian will rename your movies to: "'''''/Movie Name/movie title (Year).ext'''''"
+
run the following commands:
 +
xbmc:$ sudo apt-get install python-software-properties -y
 +
xbmc:$ sudo add-apt-repository ppa:team-xbmc
 +
xbmc:$ sudo add-apt-repository ppa:nvidia-vdpau/ppa
 +
Import the TeamXBMC key:
 +
xbmc:$ sudo apt-key adv --recv-keys --keyserver keyserver.ubuntu.com 91E7EE5E 318C7509
 +
Now run and update:
 +
xbmc:$ sudo apt-get update && sudo apt-get upgrade
  
 +
=== Install XBMC ===
 +
The core XBMC application and its related dependencies can be installed by typing:
 +
xbmc:$ sudo apt-get install xbmc xinit x11-xserver-utils -y
 +
This will take a considerable amount of time since lots of packages are due to be installed.
  
'''Additional Information'''
+
To install XBMC SVN Repo Installer and Launcher do the following:
*Although mythicalLibrarian has no known issues at the present time, mythicalLibrarian is in beta until it goes one month without problem reports. There is a problem in the fuzzy logic "agrep" pacakage. While not fatal, it causes incorrect recognition of episode number in approximately 1 out of 400 episodes. Please report problems here in the XBMC Forum thread:  http://forum.xbmc.org/showthread.php?p=470402#post470402 
+
  xbmc:$ sudo apt-get install unzip -y
*If you would like to see additional features and functions, additional back-ends, or additional guide data, please post in this thread http://forum.xbmc.org/showthread.php?t=65769
+
  xbmc:$ cd /home/xbmc/.xbmc/plugins/programs
 +
  xbmc:$ wget http://xbmc-addons.googlecode.com/svn/packages/plugins/programs/SVN_Repo_Installer.zip
 +
xbmc:$ wget http://xbmc-launcher.googlecode.com/files/Launcher1.04.zip
 +
xbmc:$ unzip -o SVN_Repo_Installer.zip
 +
xbmc:$ unzip -o Launcher1.04.zip
 +
xbmc:$ rm SVN_Repo_Installer.zip
 +
xbmc:$ rm Launcher1.04.zip
 +
xbmc:$ chown -R xbmc:xbmc "SVN Repo Installer"
 +
xbmc:$ chown -R xbmc:xbmc Launcher
  
 +
=== Install NVIDIA restricted drivers - NVIDIA-VDPAU repository  ===
 +
There are a lot of howtos and so on on this, I simply just use the NVIDIA-VDPAU repository:
 +
This will list all the available drivers:
 +
xbmc:$ apt-cache search nvidia | grep ^nvidia
 +
Looking at the listed versions from the command above enter the following command substituting 195 if you desire if there is a newer version:
 +
xbmc:$ sudo apt-get install nvidia-glx-195 nvidia-settings mesa-utils libvdpau1 libvdpau-dev vdpauinfo pkg-config -y
  
==Installation Setup and Use of mythicalLibrarian==
+
=== Generate an xorg.conf file ===
This section covers installation, setup, and use of mythicalLibrarian. After completing this section, mythicalLibrarian can run autonomously without user intervention. See Librarian Interfaces for information on notifications and automation tasks.
+
You need a proper xorg.conf file; you can generate a new one automatically by using:
 +
  xbmc:$ sudo nvidia-xconfig -s --no-logo --force-generate --output-xconfig=/etc/X11/xorg.conf
  
====Installation====
+
You will need to add the following to xorg.conf to get a smother feel:
This section covers installation of mythicalLibrarian.   
+
  xbmc:$ sudo vi /etc/X11/xorg.conf
  
*Install dependencies
+
Then add the following to the Device Section:
  apt-get install curl agrep libnotify-bin
+
  Option "HWCursor" "False"        # Blinking Cursor Fix
dependencies breakdown:
+
  Option "DynamicTwinView" "false" # Enable 1080p 24Hz
#curl downloads web pages as text. 
+
#agrep provides fuzzy logic.  
+
#libnotify-bin provides GNOME desktop notifications
+
  
*Download the current version of mythcalLibrarian from this [http://mythicallibrarian.googlecode.com/files/mythicalLibrarian.sh download link]
+
To Disable Composite for better H264 acceleration at the bottom of xorg.conf add the following:
*Place mythicalLibrarian.sh in /home/mythtv/mythicalLibrarian
+
  Section "Extensions"
  mkdir /home/mythtv/mythicalLibrarian
+
          Option        "Composite" "Disable" # Disable Composite for better H264 acceleration
cp /home/yourusername/downloads/mythicallibrarian.sh /home/mythtv/mythicalLibrarian
+
  EndSection
*Make mythicalLibrarian executable by typing the following:
+
  sudo chmod +x /home/mythtv/mythicalLibrarian
+
  
====Setting the Settings====
+
Load the NVIDIA kernel module
[[Image:Mythicalsetthumb.jpg|right|thumb|250px| Click this link to see the big picture http://wiki.xbmc.org/images/4/4e/Mythicalsettingss.jpg]]
+
The NVIDIA module can now either be loaded:  
This section covers basic setup of mythicalLibrarian. To make mythicalLibrarian work, you will need to set the following settings located in text format within mythicalLibrarian.sh.You can see a picture of the settings to the right.
+
xbmc:$ sudo modprobe nvidia
*MoveDir - this is your primary episode move dir.
+
Or you can reboot and it will be automatically loaded:
*AlternateMoveDir- this is the folder where episodes will be moved if movedir cannot be used
+
  xbmc:$ sudo reboot
*FailSafeDir- folder to place links if files cannot be moved
+
*PrimaryMovieDir-Folder to place movies
+
*AlternateMovieDir- this is where movies will be placed if PrimaryMovieDir fails
+
*Database username and password should be mythtv/mythtv. When installing MythTV a root user and password was assigned by the user.
+
Leave the rest as default
+
  
====Use of mythicalLibrarian on MythTV Applications====
+
=== Install XBMC-live and Test XBMC ===
This section covers setup of MythTV without any changes to mythicalLibrarian settings.  This will create only a basic setup.  Make sure to follow up by checking the /home/mythtv/mythicalLibrarian/output.log file after the first run.
+
You do not need a window manager to run XBMC. In fact, your system will be much more lightweight without one. Instead, install the XBMC-live startup script.  
+
*Download mythicalLibrarian.sh and put it on your desktop: http://mythicallibrarian.googlecode.com/files/mythicalLibrarian.sh
+
*Download librarian-notify-send and put it on your desktop: http://mythicallibrarian.googlecode.com/files/librarian-notify-send
+
*Type the following into a terminal
+
sudo apt-get install curl agrep libnotify-bin
+
sudo mkdir /home/mythtv /home/mythtv/mythicalLibrarian /home/mythtv/Episodes /home/mythtv/Movies /home/mythtv/Videos /home/mythtv/FailSafe
+
sudo chown -R mythtv:mythtv /home/mythtv /home/mythtv/mythicalLibrarian /home/mythtv/Episodes /home/mythtv/Movies /home/mythtv/Videos /home/mythtv/FailSafe
+
sudo mv ~/Desktop/mythicalLibrarian.sh /home/mythtv/mythicalLibrarian/mythicalLibrarian.sh
+
sudo mv ~/Desktop/librarian-notify-send /usr/local/bin/librarian-notify-send
+
sudo chmod +x /usr/local/bin/librarian-notify-send
+
sudo chmod +x /home/mythtv/mythicalLibrarian/mythicalLibrarian.sh
+
See use of mythicalLibrarian on MythTV Applications for setting up mythtv here: http://wiki.xbmc.org/index.php?title=MythicalLibrarian&action=edit&section=4
+
sudo adduser *Your User Name here* mythtv
+
*Click System/Administration MythTV Baclend setup
+
*Select "1. General" then select next until you get to screen 3
+
*Check "Follow symbolic links when deleting files". 
+
*Select next until you get to screen 8
+
*Check "Allow user job #1 Jobs"
+
*Select next until you get to screen 10
+
UserJob #1 Description: mythicalLibrarian
+
User Job #1 Command: /home/mythtv/mythicalLibrarian/mythicalLibrarian.sh  "%TITLE%" "%SUBTITLE%" "%DIR%/%FILE%"
+
*Select Finish to exit
+
*Select 6. Storage Directories
+
*Select Default
+
*Add a recording folder to which MythTV has access ie. /home/mythtv/Videos
+
*Add additional folders if required. 
+
*Remove folders to which MythTV cannot run move jobs such as /lib or /var
+
  
====Use of mythicalLibrarian on non-MythTV Applications====
+
Add the xmbc user to the required groups:
This section covers setup of non-MythTV applicationsMake sure permissions are set correctly.
+
xbmc:$ sudo usermod --group audio,video,netdev,fuse,cdrom,plugdev xbmc
*edit mythicalLibrarian.sh and set Database=Disabled
+
Install XBMC-live:
*Set mythicalLibrarian up to run the job as follows:
+
xbmc:$ sudo apt-get install xbmc-live -y
  /home/mythtv/mythicalLibrarian/mythicalLibrarian.sh "Show name" "Show Title" "File to rename"
+
Now to test, logout of your administrative user and log back in as "xbmc". Then run:
*see Setting the Settings in this section
+
  xbmc:$ xinit xbmc-standalone
 +
If everything has been setup correctly, you should be greeted by the XBMC interface. If not, a likely culprit is your X setup. Check the logfile /var/log/Xorg.0.log. A quick way to find fatal errors is with the command:  
 +
  xbmc:$ grep EE /var/log/Xorg.0.log
  
==Librarian Interfaces ==
+
=== Automated startup ===
mythicalLibrarian has the capability to send notifications to the Ubuntu GNOME desktop and keep your XBMC library up-to-date and clean. This section covers setup of notifications of the various platforms supported by mythicalLibrarian
+
Edit the following line in /etc/default/grub to appear as:
 +
xbmc:$ sudo vi /etc/default/grub
 +
Change the cmd line default to look like this:
 +
  GRUB_CMDLINE_LINUX_DEFAULT="quiet splash xbmc=autostart,noredir loglevel=0"
 +
Then update grub:
 +
xbmc:$ sudo update-grub
  
====XBMC Commands====
+
=== Updating ALSA ===
[[Image:Xbmc notification.jpg|right|http://www.xbmc.org Another Sucessful library addition]]
+
There are a few issues with the current ALSA package shipped with Ubuntu, therefore it might be a good idea to upgrade.
This section covers setup of XBMC Commands. mythicalLibrarain can keep XBMC's library up to date, clean out deleted files and send a notification upon a completed job.
+
xbmc:$ sudo apt-get install wget
*edit mythicalLibrarian.sh in your text editor
+
xbmc:$ wget http://nfye.com/EB1501/AlsaUpgrade-1.0.21-4.sh -O alsaup.sh
*set XBMCUpdate, XBMCClean, and XBMCNotify to the desired settings, either Enabled, or Disabled
+
  xbmc:$ chmod +x alsaup.sh
* Set the IP and port under XBMCIPs. Separate IP addresses with a space. eg.
+
  xbmc:$ sudo ./alsaup.sh -di
  XBMCIPs=( "192.168.1.110:8080 192.168.1.111:8080 XBOX:8080" )
+
  
====GNOME Desktop Notifications====
+
This should download and update your ALSA to the latest version
[[Image:GNOMENotificationsthumbs.jpg|right|thumb|250px|Another Sucessful library addition ]]
+
* mythicalLibrarian requires no-password sudo access to send GNOME notifications.
+
  
GNOME Desktop notifications can be turned on and off from within the script
+
By default the sound card will have several channels muted, others with low volumes, including the hdmi port.
 +
xbmc:$ alsamixer
 +
Adjust the channels you are interested in S/PDIF 1 for hdmi. Once done, save permanently with:
 +
xbmc:$ sudo alsactl store
  
GNOME Desktop notifications are used on the back-end machine by mythicalLibrarian to let you know that a file move operation is in process or an operation has completed. The external script librarian-notify-send becomes the specified username and sends a GNOME desktop notification. librarian-notify-send requires the user mythtv to have access to the sudo command without a password if run as a user job.
+
=== Custom Boot Splash ===
 +
If you want to replace the standard Ubuntu boot screen with a custom, XBMC related one TeamXBMC provides the following in its repository:
 +
xbmc:$ sudo vi /etc/usplash.conf
 +
Add the following dependent of you screen resolution:
 +
# Usplash configuration file for 720p
 +
xres=1366
 +
yres=720
 +
or
 +
# Usplash configuration file for 1080p
 +
xres=1920
 +
yres=1080
  
* Get the current version of librarian-notify-send from Google Code [http://mythicallibrarian.googlecode.com/files/librarian-notify-send download link]
+
To install the pulsating logo, as an example, type the following:
* place the file in /usr/local/bin
+
  xbmc:$ sudo apt-get install usplash-theme-xbmc-* -y
* add mythtvall group
+
xbmc:$ sudo update-alternatives --config usplash-artwork.so
sudo addgroup mythtvall
+
  xbmc:$ sudo update-initramfs -u
* add mythtv to the mythtvall group
+
sudo adduser mythtv mythtvall
+
* edit the sudoers file
+
sudo visudo
+
* add the following line to the sudoers
+
  %mythtvall ALL=(ALL) NOPASSWD:ALL
+
* hit ctrl-x and then y, then enter to write out and quit visudo
+
* make librarian-notify-send executable by typing
+
  sudo chmod +x /usr/local/bin/librarian-notify-send
+
* edit mythicalLibrarian and set Notify=Enabled  and NotifyUserName=*your user name*
+
  
You are done.
+
=== Resume from Sleep with Remote  ===
 +
After installing in order to be able to allow the remote to trigger resume from suspend, you must add USB0 to /proc/acpi/wakeup, you can do this by one of two ways:
 +
xbmc:$ sudo vi /etc/rc.local
 +
And add the following just before the exit 0 line:
 +
echo USB0>/proc/acpi/wakeup
 +
OR
 +
xbmc:$ sudo wget http://nfye.com/EB1501/set_wakup.conf -O /etc/init/set_wakup.conf
  
 +
=== Disable extra TTYs in upstart  ===
 +
By default ubuntu has 7 consoles, this uses memory and delays startup time. The console-setup defines how many ttys are created.
 +
xbmc:$ sudo vi /etc/default/console-setup
 +
Change
 +
ACTIVE_CONSOLES="/dev/tty[1-6]"
 +
to the number of consoles you want. Lets say, 2 ttys, then change it to:
 +
ACTIVE_CONSOLES="/dev/tty[1-2]"
  
== Troubleshooting ==
+
  xbmc:$ sudo rm -Rf /etc/init/tty3.conf /etc/init/tty4.conf /etc/init/tty5.conf /etc/init/tty6.conf
While mythicalLibrarian is designed to run fully autonomously, configuration issues come up from time to time. This section deals with these set-up issues
+
  
 +
'''NOTE:''' Even though you've reduced the tty number, X is still on Alt-F7.
  
 +
== ASUS Remote Control ==
  
=== Permission Errors===
+
The EB1501 comes with a MCE USB IR Receiver- Spinel plusf0r ASUS (0471:206c)  
This section of Troubleshooting is designated for permission errors.
+
==== permission errors when run from terminal ====
+
Ensure the user running mythicalLibrarian has permission to run mythicalLibrarian.  This includes read and write permissions to the working folder (default=~/mythicalLibrarian)
+
see this post for more information: http://forum.xbmc.org/showpost.php?p=489246&postcount=36
+
==== mythicalLibrarian is not generating a log ====
+
Make sure mythicalLibrarian.sh is executable.  You can set the permissions by typing "sudo chmod +x /path/to/mythicalLibrarian.sh"
+
note: mythtv will be the user running mythicalLibrarian when run as a user job from MythTV
+
see this post for more information: http://forum.xbmc.org/showpost.php?p=489246&postcount=36
+
==== Files are not being renamed or moved, but they are owned my mythtv ====
+
mythtv must have full access to the files.  the /var/ folder does not allow users to move files without special permissions.  Try moving your recording directory to your /home/ folder
+
==== mythicalLibrarian works from terminal, but not from user job ====
+
"mythtv" is the user calling the user job.  If the user running mythicalLibrarian does not have access to the file, then mythicalLibrarian will not have access to the file.  MythTV users can troubleshoot by changing your username with "sudo su mythtv", then running mythicalLibrarian.
+
  
==== mythcialLibrarian will not copy to my NFTF/FAT/EXT3 mounted drive ====
+
[[Image:EB1501-remote.png‎ ]]
Additonal file systems may require editing the /etc/fstab file to change permissions.  Search your OS documentation for information on how to mount a file system under a different username. Alternately, you may wish to add the user running mythicalLibrarian to your user group.
+
  
=== XBMC library is not being updated ===
+
You don not need to use lirc, but then you will not have full functionality with it, if you want full control then configure the IR receiver and use lirc.
This section of Troubleshooting is designated for XBMC specific issues
+
==== XBMC does not show notifications ====
+
mythicalLibrarian requires the user to set the IP address of XBMC.
+
*ensure you have a static IP set up in your router, see your router's manufacturer's website for more information
+
*Open mythicalLibrarian.sh and edit the "XBMCIPs" setting to your XBMC IP.
+
==== XBMC shows notifications but Library is not updated ====
+
* Add a source http://wiki.xbmc.org/?title=Adding_Media_Sources
+
* Set the content of your video library http://wiki.xbmc.org/?title=Set_Contents_%28Video_Library%29
+
  
 +
=== MCE USB IR Receiver ===
  
 +
To see where the remote is located located type:
 +
xbmc:$ cat /proc/bus/input/devices
  
=== OS Speciffic issues ===
+
There will be a lot of output but you want to look at this section:
This section of Troubleshooting is designated for OS Specific issues
+
==== Gentoo ====
+
Gentoo OS requires upgrade of many packages.  See here for version information: http://forum.xbmc.org/showpost.php?p=495697&postcount=62
+
  
 +
I: Bus=0003 Vendor=0471 Product=206c Version=0100
 +
N: Name="PHILIPS MCE USB IR Receiver- Spinel plusf0r ASUS"
 +
P: Phys=usb-0000:00:04.0-1/input0
 +
S: Sysfs=/devices/pci0000:00/0000:00:04.0/usb3/3-1/3-1:1.0/input/input3
 +
U: Uniq=
 +
H: Handlers=kbd mouse1 event3
 +
B: EV=120017
 +
B: KEY=c0000 400 0 0 70000 0 58000 8001f8 4000c004 e0beffdf 1cfffff ffffffff fffffffe
 +
B: REL=103
 +
B: MSC=10
 +
B: LED=1f
  
 +
Ok so this means the remote is located at event3, but it can change if the controller is plugged into  another usb port. Make an udev rule to link the event device which has the vendor-id and product id of the remote to /dev/input/irremote. The vendor id is 0471 and device id is 0206c so edit the following:
  
=== Problems after upgrade to new version ===
+
  xbmc:$ sudo vi /etc/udev/rules.d/10-local.rules
This section of Troubleshooting is designated for issues after upgrade when the previous version was working
+
And add the following:
==== Episodes are not identifed ====
+
KERNEL=="event*",ATTRS{idVendor}=="0471",ATTRS{idProduct}=="206c",SYMLINK="input/irremote"
When episodes are not identified after an upgrade it is because the database handling has been upgraded, however, the database itself has not. Delete all database folders to correct the issue  http://forum.xbmc.org/showpost.php?p=492001&postcount=40
+
==== mythicalLibrarian does not generate any files in it's working directory====
+
Ensure the user running mythicalLibrarian has permission to run mythicalLibrarian.  This includes read and write permissions to the working folder (default=~/mythicalLibrarian)
+
  
 +
Now restart udev:
 +
xbmc:$ sudo service udev restart
  
 +
Detach and reattach the remote check it creates a symlink /dev/input/irremote
  
=== Gnome Desktop Notifications ===
+
=== Install lircd ===
This section of Troubleshooting is designated for GNOME Desktop Notifications issues
+
 
==== Gnome Desktop Notifications are not showing up ====
+
xbmc:$ sudo apt-get install lirc -y
Ensure you have Notify=Enabled set in mythicalLibrarian.sh See this section for more information http://wiki.xbmc.org/index.php?title=MythicalLibrarian&action=submit#GNOME_Desktop_Notifications
+
 
=== Guide Data errors ===
+
This will bring up a configuration and will ask you what kind of remote you  have. Select custom and point it to /dev/input/irremote, Select None for IR Transmitter.
for SchedulesDirect/Tribune/Zap2it set the GuideDataType setting in mythicalLibrarian.sh to "SchedulesDirect"
+
 
==== Currently Unsupported Guide data types ====
+
If you make a mistake you can always reconfigure lirc using the following command:
Support for guide data will be available with help from you. See this post: http://forum.xbmc.org/showpost.php?p=496721&postcount=90
+
sudo dpkg-reconfigure lirc-modules-source
 +
 
 +
Edit hardware.conf so that it loads the correct remote template
 +
 
 +
xbmc:$ sudo vi /etc/lirc/hardware.conf
 +
 
 +
Set the REMOTE_LIRCD_CONF line to look like this:
 +
 
 +
REMOTE_LIRCD_CONF="devinput/lircd.conf.devinput"
 +
 
 +
Restart lirc:
 +
xbmc:$ sudo /etc/init.d/lirc restart
 +
 
 +
Now try using irw
 +
xbmc:$ irw
 +
 
 +
Press buttons on the remote and check that its working. If its working proceed to make the remote work with xbmc
 +
 
 +
xbmc:$ wget http://nfye.com/EB1501/lircmap.xml -O ~/.xbmc/userdata/Lircmap.xml
 +
 
 +
The commented  out keys are not working.
 +
 
 +
Here is what your hardware.conf & lircd.cong should look like:
 +
 
 +
xbmc:$ cat /etc/lirc/hardware.conf
 +
# hardware.conf for eb1501
 +
#
 +
REMOTE="Windows Media Center Transceivers/Remotes (all)"
 +
REMOTE_MODULES="lirc_dev"
 +
REMOTE_DRIVER="devinput"
 +
REMOTE_DEVICE="/dev/input/irremote"
 +
REMOTE_SOCKET=""
 +
REMOTE_LIRCD_CONF="devinput/lircd.conf.devinput"
 +
REMOTE_LIRCD_ARGS=""
 +
TRANSMITTER="None"
 +
TRANSMITTER_MODULES=""
 +
  TRANSMITTER_DRIVER=""
 +
TRANSMITTER_DEVICE=""
 +
TRANSMITTER_SOCKET=""
 +
TRANSMITTER_LIRCD_CONF=""
 +
TRANSMITTER_LIRCD_ARGS=""
 +
START_LIRCD="true"
 +
LOAD_MODULES="true"
 +
LIRCMD_CONF=""
 +
FORCE_NONINTERACTIVE_RECONFIGURATION="false"
 +
START_LIRCMD=""
 +
REMOTE_MODULES=""
 +
REMOTE_LIRCD_CONF=""
 +
 
 +
xbmc:$ cat /etc/lirc/lircd.conf
 +
# lircd.conf for eb1501
 +
#
 +
include "/usr/share/lirc/remotes/devinput/lircd.conf.devinput"
 +
 
 +
== Other ==
 +
 
 +
=== Disabling startup of a service ===
 +
The procedure for disabling a service in Ubuntu is very simple: all you have to do is remove the symlinks from all the runlevel-specific directories, /etc/rc*.d, so that no links are pointing to the original /etc/init.d script for your service. That original script will be kept, so you can re-enable the startup/shutdown of the service whenever you feel like using it again.
 +
This example below shows how a service called "cups" was disabled on my system:
 +
xbmc:$ sudo update-rc.d -f cups remove
 +
Removing any system startup links for /etc/init.d/cups ...
 +
  /etc/rc1.d/K80cups
 +
  /etc/rc2.d/S50cups
 +
  /etc/rc3.d/S50cups
 +
  /etc/rc4.d/S50cups
 +
  /etc/rc5.d/S50cups
 +
 
 +
=== Install build environment ===
 +
If not already installed in previous steps, you may want to have a build environment in your system in order to allow the compilation of both custom applications and updated version of kernel modules and packages that are not available in Ubuntu repositories.
 +
The basic packages needed are installed by the following command:
 +
xbmc:$ sudo apt-get install build-essential cdbs fakeroot dh-make debhelper debconf libstdc++5 dkms linux-headers-$(uname -r)
 +
 
 +
=== Install XBMC build environment and SVN tools  ===
 +
If you want to walk on the bleeding edge and follow daily development of XBMC you have to install subversion and all XBMC build dependencies:
 +
xbmc:$ sudo apt-get install subversion
 +
xbmc:$ sudo apt-get build-dep xbmc
 +
 
 +
=== Change SSH Welcome Banner ===
 +
Every time you connect to your htpc via ssh, you will receive the motd message and if you get tired of seeing it, you can change the message to something else.
 +
 
 +
Here’s the message that you should get:
 +
 
 +
    Linux xbmc 2.6.20-16-generic #2 SMP Thu Jun 7 19:00:28 UTC 2007 x86_64
 +
 +
    The programs included with the Ubuntu system are free software;
 +
    the exact distribution terms for each program are described in the
 +
    individual files in /usr/share/doc/*/copyright.
 +
 +
    Ubuntu comes with ABSOLUTELY NO WARRANTY, to the extent permitted by
 +
    applicable law.
 +
 +
    Last login: Mon Aug 13 01:05:46 2007 from ipaddress removed
  
==Notes==
+
Changing this message requires editing the motd:
mythicalLibrarian is a spawn from the project BashSExx and [[MythSExx]].  
+
  xbmc:$ sudo vi /etc/motd
  
[[MythSExx]] can be used if you are strictly trying to rename episodes
+
Now add something funky like the following:
 +
        ___.                 
 +
___  __\_ |__  _____  ____ 
 +
\  \/  /| __ \ /    \_/ ___\
 +
  >    < | \_\ \  Y Y  \  \___
 +
/__/\_ \|___  /__|_|  /\___  >
 +
      \/    \/      \/    \/
 +
              http://xbmc.org/
  
mythicalLibrarian is currently in advanced beta stage.
+
Yea, that looks cool...
  
[[category:Linux]]
+
If you also wish to get rid of the "Last Login" (which I don’t recommend doing) information do the following:
[[category:File Sharing|Sources]]
+
xbmc:$ sudo vi /etc/ssh/sshd_config
 +
And set
 +
PrintLastLog yes
 +
To
 +
PrintLastLog no

Revision as of 16:03, 26 January 2010

Contents

1 Asus EeeBox PC EB1501 - Ubuntu & xbmc

This is a tut on a couple of howtos but its dedicated to installing a miminal Ubuntu 9.10 and xbmc on the Asus EeeBox PC EB1501.

EB1501.png And.png Ubuntu logo.png And.png File:Xbmc.png

Things that where considered when buying a HTPC that led me to the Asus EeeBox PC EB1501:

  • NVIDIA® ION™ platform and Slot-load ODD.
  • Silent
  • Small
  • HDMI
  • Optical Output

1.1 credits

Most of this is already documented but this is now specific to EB1501 & Ubuntu 9.10

Thanks to the following people:

  • succo (xbmc.org)
  • soundcheck (ubuntuforums.org)
  • everyone (xbmc.org - wiki)

1.2 Install Ubuntu & xbmc

Get the most recent 9.10 image from here. Various posts recommend the 32-bit version.

  • The ISO can either be burned to CD (seems like a waste for 10 MB); alternatively, use UNetbootin to make a bootable USB drive from ISO.

After starting the computer with either the CD or the USB drive, select "Install" at boot prompt, then when prompted provide info about your location, language, keyboard layout, time zone. Disk partitioning will be basic, the full disk will be deleted and used.

When prompted to create an account, use xbmc and anything you want to for a password.

During the installation select "Basic Ubuntu server" as the only option, or optionally "OpenSSH server" if you want to have (secure) remote connections facilities.

1.2.1 Initial system configuration

run the following commands:

xbmc:$ sudo apt-get install python-software-properties -y
xbmc:$ sudo add-apt-repository ppa:team-xbmc
xbmc:$ sudo add-apt-repository ppa:nvidia-vdpau/ppa

Import the TeamXBMC key:

xbmc:$ sudo apt-key adv --recv-keys --keyserver keyserver.ubuntu.com 91E7EE5E 318C7509

Now run and update:

xbmc:$ sudo apt-get update && sudo apt-get upgrade

1.2.2 Install XBMC

The core XBMC application and its related dependencies can be installed by typing:

xbmc:$ sudo apt-get install xbmc xinit x11-xserver-utils -y

This will take a considerable amount of time since lots of packages are due to be installed.

To install XBMC SVN Repo Installer and Launcher do the following:

xbmc:$ sudo apt-get install unzip -y
xbmc:$ cd /home/xbmc/.xbmc/plugins/programs
xbmc:$ wget http://xbmc-addons.googlecode.com/svn/packages/plugins/programs/SVN_Repo_Installer.zip
xbmc:$ wget http://xbmc-launcher.googlecode.com/files/Launcher1.04.zip
xbmc:$ unzip -o SVN_Repo_Installer.zip
xbmc:$ unzip -o Launcher1.04.zip
xbmc:$ rm SVN_Repo_Installer.zip
xbmc:$ rm Launcher1.04.zip
xbmc:$ chown -R xbmc:xbmc "SVN Repo Installer"
xbmc:$ chown -R xbmc:xbmc Launcher

1.2.3 Install NVIDIA restricted drivers - NVIDIA-VDPAU repository

There are a lot of howtos and so on on this, I simply just use the NVIDIA-VDPAU repository: This will list all the available drivers:

xbmc:$ apt-cache search nvidia | grep ^nvidia

Looking at the listed versions from the command above enter the following command substituting 195 if you desire if there is a newer version:

xbmc:$ sudo apt-get install nvidia-glx-195 nvidia-settings mesa-utils libvdpau1 libvdpau-dev vdpauinfo pkg-config -y

1.2.4 Generate an xorg.conf file

You need a proper xorg.conf file; you can generate a new one automatically by using:

xbmc:$ sudo nvidia-xconfig -s --no-logo --force-generate --output-xconfig=/etc/X11/xorg.conf

You will need to add the following to xorg.conf to get a smother feel:

xbmc:$ sudo vi /etc/X11/xorg.conf

Then add the following to the Device Section:

Option "HWCursor" "False"        # Blinking Cursor Fix
Option "DynamicTwinView" "false" # Enable 1080p 24Hz

To Disable Composite for better H264 acceleration at the bottom of xorg.conf add the following:

Section "Extensions"
         Option         "Composite" "Disable" # Disable Composite for better H264 acceleration
EndSection

Load the NVIDIA kernel module The NVIDIA module can now either be loaded:

xbmc:$ sudo modprobe nvidia

Or you can reboot and it will be automatically loaded:

xbmc:$ sudo reboot

1.2.5 Install XBMC-live and Test XBMC

You do not need a window manager to run XBMC. In fact, your system will be much more lightweight without one. Instead, install the XBMC-live startup script.

Add the xmbc user to the required groups:

xbmc:$ sudo usermod --group audio,video,netdev,fuse,cdrom,plugdev xbmc

Install XBMC-live:

xbmc:$ sudo apt-get install xbmc-live -y

Now to test, logout of your administrative user and log back in as "xbmc". Then run:

xbmc:$ xinit xbmc-standalone

If everything has been setup correctly, you should be greeted by the XBMC interface. If not, a likely culprit is your X setup. Check the logfile /var/log/Xorg.0.log. A quick way to find fatal errors is with the command:

xbmc:$ grep EE /var/log/Xorg.0.log

1.2.6 Automated startup

Edit the following line in /etc/default/grub to appear as:

xbmc:$ sudo vi /etc/default/grub 

Change the cmd line default to look like this:

GRUB_CMDLINE_LINUX_DEFAULT="quiet splash xbmc=autostart,noredir loglevel=0"

Then update grub:

xbmc:$ sudo update-grub

1.2.7 Updating ALSA

There are a few issues with the current ALSA package shipped with Ubuntu, therefore it might be a good idea to upgrade.

xbmc:$ sudo apt-get install wget
xbmc:$ wget http://nfye.com/EB1501/AlsaUpgrade-1.0.21-4.sh -O alsaup.sh
xbmc:$ chmod +x alsaup.sh
xbmc:$ sudo ./alsaup.sh -di

This should download and update your ALSA to the latest version

By default the sound card will have several channels muted, others with low volumes, including the hdmi port.

xbmc:$ alsamixer

Adjust the channels you are interested in S/PDIF 1 for hdmi. Once done, save permanently with:

xbmc:$ sudo alsactl store

1.2.8 Custom Boot Splash

If you want to replace the standard Ubuntu boot screen with a custom, XBMC related one TeamXBMC provides the following in its repository:

xbmc:$ sudo vi /etc/usplash.conf 

Add the following dependent of you screen resolution:

# Usplash configuration file for 720p
xres=1366
yres=720

or

# Usplash configuration file for 1080p
xres=1920
yres=1080

To install the pulsating logo, as an example, type the following:

xbmc:$ sudo apt-get install usplash-theme-xbmc-* -y
xbmc:$ sudo update-alternatives --config usplash-artwork.so
xbmc:$ sudo update-initramfs -u

1.2.9 Resume from Sleep with Remote

After installing in order to be able to allow the remote to trigger resume from suspend, you must add USB0 to /proc/acpi/wakeup, you can do this by one of two ways:

xbmc:$ sudo vi /etc/rc.local 

And add the following just before the exit 0 line:

echo USB0>/proc/acpi/wakeup

OR

xbmc:$ sudo wget http://nfye.com/EB1501/set_wakup.conf -O /etc/init/set_wakup.conf

1.2.10 Disable extra TTYs in upstart

By default ubuntu has 7 consoles, this uses memory and delays startup time. The console-setup defines how many ttys are created.

xbmc:$ sudo vi /etc/default/console-setup

Change

ACTIVE_CONSOLES="/dev/tty[1-6]" 

to the number of consoles you want. Lets say, 2 ttys, then change it to:

ACTIVE_CONSOLES="/dev/tty[1-2]" 
xbmc:$ sudo rm -Rf /etc/init/tty3.conf /etc/init/tty4.conf /etc/init/tty5.conf /etc/init/tty6.conf

NOTE: Even though you've reduced the tty number, X is still on Alt-F7.

1.3 ASUS Remote Control

The EB1501 comes with a MCE USB IR Receiver- Spinel plusf0r ASUS (0471:206c)

EB1501-remote.png

You don not need to use lirc, but then you will not have full functionality with it, if you want full control then configure the IR receiver and use lirc.

1.3.1 MCE USB IR Receiver

To see where the remote is located located type:

xbmc:$ cat /proc/bus/input/devices

There will be a lot of output but you want to look at this section:

I: Bus=0003 Vendor=0471 Product=206c Version=0100 
N: Name="PHILIPS MCE USB IR Receiver- Spinel plusf0r ASUS" 
P: Phys=usb-0000:00:04.0-1/input0 
S: Sysfs=/devices/pci0000:00/0000:00:04.0/usb3/3-1/3-1:1.0/input/input3 
U: Uniq= 
H: Handlers=kbd mouse1 event3 
B: EV=120017 
B: KEY=c0000 400 0 0 70000 0 58000 8001f8 4000c004 e0beffdf 1cfffff ffffffff fffffffe 
B: REL=103 
B: MSC=10 
B: LED=1f 

Ok so this means the remote is located at event3, but it can change if the controller is plugged into another usb port. Make an udev rule to link the event device which has the vendor-id and product id of the remote to /dev/input/irremote. The vendor id is 0471 and device id is 0206c so edit the following:

xbmc:$ sudo vi /etc/udev/rules.d/10-local.rules 

And add the following:

KERNEL=="event*",ATTRS{idVendor}=="0471",ATTRS{idProduct}=="206c",SYMLINK="input/irremote" 

Now restart udev:

xbmc:$ sudo service udev restart 

Detach and reattach the remote check it creates a symlink /dev/input/irremote

1.3.2 Install lircd

xbmc:$ sudo apt-get install lirc -y

This will bring up a configuration and will ask you what kind of remote you have. Select custom and point it to /dev/input/irremote, Select None for IR Transmitter.

If you make a mistake you can always reconfigure lirc using the following command:

sudo dpkg-reconfigure lirc-modules-source 

Edit hardware.conf so that it loads the correct remote template

xbmc:$ sudo vi /etc/lirc/hardware.conf

Set the REMOTE_LIRCD_CONF line to look like this:

REMOTE_LIRCD_CONF="devinput/lircd.conf.devinput"

Restart lirc:

xbmc:$ sudo /etc/init.d/lirc restart 

Now try using irw

xbmc:$ irw

Press buttons on the remote and check that its working. If its working proceed to make the remote work with xbmc

xbmc:$ wget http://nfye.com/EB1501/lircmap.xml -O ~/.xbmc/userdata/Lircmap.xml

The commented out keys are not working.

Here is what your hardware.conf & lircd.cong should look like:

xbmc:$ cat /etc/lirc/hardware.conf 
# hardware.conf for eb1501 
# 
REMOTE="Windows Media Center Transceivers/Remotes (all)" 
REMOTE_MODULES="lirc_dev" 
REMOTE_DRIVER="devinput" 
REMOTE_DEVICE="/dev/input/irremote" 
REMOTE_SOCKET="" 
REMOTE_LIRCD_CONF="devinput/lircd.conf.devinput" 
REMOTE_LIRCD_ARGS="" 
TRANSMITTER="None" 
TRANSMITTER_MODULES="" 
TRANSMITTER_DRIVER="" 
TRANSMITTER_DEVICE="" 
TRANSMITTER_SOCKET="" 
TRANSMITTER_LIRCD_CONF="" 
TRANSMITTER_LIRCD_ARGS="" 
START_LIRCD="true" 
LOAD_MODULES="true" 
LIRCMD_CONF="" 
FORCE_NONINTERACTIVE_RECONFIGURATION="false" 
START_LIRCMD="" 
REMOTE_MODULES="" 
REMOTE_LIRCD_CONF=""
xbmc:$ cat /etc/lirc/lircd.conf 
# lircd.conf for eb1501 
# 
include "/usr/share/lirc/remotes/devinput/lircd.conf.devinput"

1.4 Other

1.4.1 Disabling startup of a service

The procedure for disabling a service in Ubuntu is very simple: all you have to do is remove the symlinks from all the runlevel-specific directories, /etc/rc*.d, so that no links are pointing to the original /etc/init.d script for your service. That original script will be kept, so you can re-enable the startup/shutdown of the service whenever you feel like using it again. This example below shows how a service called "cups" was disabled on my system:

xbmc:$ sudo update-rc.d -f cups remove
Removing any system startup links for /etc/init.d/cups ...
 /etc/rc1.d/K80cups
 /etc/rc2.d/S50cups
 /etc/rc3.d/S50cups
 /etc/rc4.d/S50cups
 /etc/rc5.d/S50cups

1.4.2 Install build environment

If not already installed in previous steps, you may want to have a build environment in your system in order to allow the compilation of both custom applications and updated version of kernel modules and packages that are not available in Ubuntu repositories. The basic packages needed are installed by the following command:

xbmc:$ sudo apt-get install build-essential cdbs fakeroot dh-make debhelper debconf libstdc++5 dkms linux-headers-$(uname -r)

1.4.3 Install XBMC build environment and SVN tools

If you want to walk on the bleeding edge and follow daily development of XBMC you have to install subversion and all XBMC build dependencies:

xbmc:$ sudo apt-get install subversion
xbmc:$ sudo apt-get build-dep xbmc

1.4.4 Change SSH Welcome Banner

Every time you connect to your htpc via ssh, you will receive the motd message and if you get tired of seeing it, you can change the message to something else.

Here’s the message that you should get:

   Linux xbmc 2.6.20-16-generic #2 SMP Thu Jun 7 19:00:28 UTC 2007 x86_64

   The programs included with the Ubuntu system are free software;
   the exact distribution terms for each program are described in the
   individual files in /usr/share/doc/*/copyright.

   Ubuntu comes with ABSOLUTELY NO WARRANTY, to the extent permitted by
   applicable law.

   Last login: Mon Aug 13 01:05:46 2007 from ipaddress removed

Changing this message requires editing the motd:

xbmc:$ sudo vi /etc/motd

Now add something funky like the following:

       ___.                   
___  __\_ |__   _____   ____  
\  \/  /| __ \ /     \_/ ___\ 
 >    < | \_\ \  Y Y  \  \___ 
/__/\_ \|___  /__|_|  /\___  >
      \/    \/      \/     \/ 
             http://xbmc.org/

Yea, that looks cool...

If you also wish to get rid of the "Last Login" (which I don’t recommend doing) information do the following:

xbmc:$ sudo vi /etc/ssh/sshd_config

And set

PrintLastLog yes

To

PrintLastLog no
Personal tools
Namespaces

Variants
Actions
Navigation
Wiki help
Toolbox