Difference between revisions of "Debian Galleon Media Server"

From NAS-Central Buffalo - The Linkstation Wiki
Jump to: navigation, search
(Step 2 – Load packages)
(Step 2 – Load packages)
Line 129: Line 129:
7.  Use a browser from another host and point to <nowiki>https://<kuro’s IP address>:10000</nowiki>
7.  Use a browser from another host and point to <nowiki>https://<kuro’s IP address>:10000</nowiki>. Login as root.
Follow the Configuring Samba: directions in the article if you like. The Webmin interface is really straightforward. Try sharing the /mnt/share directory listed above. Use a PC to see if the share is visible from another host.
Follow the Configuring Samba: directions in the article if you like. The Webmin interface is really straightforward. Try sharing the /mnt/share directory listed above. Use a PC to see if the share is visible from another host.

Revision as of 22:24, 28 April 2006


Galleon is a free open source media server that typically runs on a home computer and can serve your media collection, Internet content, and applications to your TV using your TiVo© DVR. This article describes how to install the Galleon server and the required packages used to run the server on your Kurobox.

For a complete description of Galleon’s capabilities, refer to http://www.galleon.tv


The following instructions have been tested on a Kurobox HG with the Debian, Java, and Galleon versions listed below. When using a wired Ethernet connection to a Series 2 TiVo©, near real-time .tivo file transfers are possible on the “high” quality setting of the DVR. Lower quality video transfers, the MP3 features, and other Galleon applications not requiring high data bandwidth should run well on the Kurobox HG.

Setting Up

These instructions assume a fresh Debian installation on a newly installed hard drive. Skip to Step 2 – Load Packages if Debian is currently loaded on your Kurobox. Previous distributions of Debian or other distributions have not been tested. Proceed at your own risk.

Get copies of the following files before you start. You will need to FTP these files to the Kurobox from another host during the installation process.

For the Kurobox HG: Debian/Linux Distro

debian-sarge- from http://genbako.vodapone.com/debian-


For the Kurobox: Debian/Linux Distro

debian-sarge- from http://genbako.vodapone.com/debian-

Java JRE for the 32 bit pSeries/J2SE 5.0

Registration with the IBM developers site is required before downloading

ibm-java2-jre-50-linux-ppc.tgz from http://www-128.ibm.com/developerworks/java/jdk/linux/download.html

Galleon 2.3.0 – TiVo Media Server

galleon-unix-2.3.0.zip from http://www.galleon.tv

Step 1 – Build Debian on the Kurobox

http://www.kurobox.com/mwiki/index.php/Debian_install is an excellent article for installing Debian on the Kurobox. The article is accurate but some common pitfalls to avoid are:

1. If the newly installed hard drive ever had a Linux or Windows partition, it confuses the Kurobox and it attempts to boot from it. The partitions need to be wiped out. One option is to install the hard drive in a PC and boot from a floppy. Run fdisk.exe and list the partitions. Delete any and all partitions found. Otherwise, wipe the partitions from another Linux box. Also, even though the partitions are wiped from another box, run the mfdisk –e /dev/hda step in the article listed above anyway.

2. Replace the debian_2004_12_26_dist.tgz file with the appropriate Debian/Linux distribution listed above.

3. Static IP addresses are preferred. Use ipconfig on a Windows box to get your gateway IP.

4. For etc/resolve.conf, log into your router’s web interface to get your ISP’s DNS IP address.

5. For etc/hosts.deny, comment out the ALL:ALL line (i.e. #ALL:ALL) otherwise you will be locked out.

6. Don’t forget to create a regular user (adduser). It will be used for running VNC and Galleon.

Follow all steps in the article including the first boot. If you can successfully get through the first boot, go to the next step.

Step 2 – Load packages

http://linkstationwiki.org/Articles/Debian is the base page for loading many Debian packages. What follows below is an adaptation of those articles suitable for Galleon. They should be loaded in the order described below. Note the comments for each step. Also note not all steps in the articles are used.

DebianKeyPackages – Install key packages.

1. Login (telnet) into the Kurbox and su to root

2. Install webget, GNU C compiler, bzip, deborphan, localepurge, logrotate, automatic script builder, unzip, zip, automatic makefile, autotools, GNU C library, libtools, and debfoster.

     apt-get install wget gcc bzip2 deborphan localepurge logrotate autoconf unzip zip automake autotools-dev libc6-dev libtool debfoster

3. Don’t do any additional steps listed in Linkstation wiki for the DebianKeyPackages.

DebianSamba - Set up a Windows-readable file share using Samba.

1. Install Samba as described in the article.

DebianWebmin - Install and use Webmin to remotely administer your Kurobox.

1. Install Webmin and its related packages. This will install the core features, the CPAN interface (for installing Perl modules), a java-based file manager, and firewall (iptables) manager.

     apt-get install webmin webmin-core webmin-cpan webmin-filemanager webmin-inetd webmin-logrotate webmin-firewall

2. For the Samba installation:

     apt-get install webmin-sshd

3. Edit /etc/webmin/miniserv.conf to allow your IP address (under the “allow” line). Note that this is the host that will communicate with the Kurobox, not the Kurobox’s IP address.

4. Stop and restart Webmin with the commands:


5. Create share directories as root on /mnt with:

     mkdir /mnt/share
     mkdir /mnt/share/Recordings

6. Open the directories up with the following commands. It does make the directory wide open but leave it that way for now. It will make setup easier. Tighten up permission later if you would like.

     chmod 777 /mnt/share
     chmod 777 /mnt/share/Recordings

7. Use a browser from another host and point to https://<kuro’s IP address>:10000. Login as root.

Follow the Configuring Samba: directions in the article if you like. The Webmin interface is really straightforward. Try sharing the /mnt/share directory listed above. Use a PC to see if the share is visible from another host.

8. The Samba sharing and Webmin isn’t a necessary step for Galleon but it’s handy if you want to manage files from a Windows host.

DebianVNC - Set up a Virtual Network Computing (VNC) Server

1. Download the free Real VNC viewer from http://www.realvnc.com if you currently don’t have a copy of it. This viewer runs on a remote desktop and allows access the Kurobox iceWM window manger.

2. Install the VNC server, remote desktop and related packages. Use the command:

     apt-get install vnc4server xfonts-base icewm menu grun iceme icewm-themes iceconf icemc icepref xfe

3. Although not required, grab a copy of Firefox. It will be used later to check out the VNC server.

     apt-get install mozilla-firefox

4. Configure a VNC password. This setting is unique for each user account on the Kurobox. Do this step as a regular user (the one that will run Galleon). Although not required, consider using your regular user password for the VNC password. Configure the VNC password with the command:


5. Start the VNC server with this command. Note that the command will come back with a host name followed by colon and a number. This will likely be a :1. (Remember this screen number).


6. From a VNC viewer running on another host, specify the IP address of the Kurobox followed by :1. For example:

The article directions specify a port address accessible by a web browser. Using the vncviwer program and the :1 screen number usually results in a faster screen refresh.

7. What starts up is a virtual iceWM window manger that you can use for Galleon’s GUI later. Just for fun, start up Firefox with the web browser button in the window manager.

8. Exit out of the window manager and kill the vncserver with:

     vncserver –kill :1

Step 3 – Load Java


1. A manual installation of the Java JRE is needed. The apt-get install java-package fakeroot never seemed to work properly as described in the wiki. su to root and do the following:

     cd /
     mkdir opt
     chmod 777 opt
     cd /opt

2. Move the ibm-java2-jre-50-linux-ppc.tgz file into the /opt directory and type the following command:

     tar –xvfz ibm-java2-jre-50-linux-ppc.tgz

The installation will be tested later when environment variables are set up.

3. Disable IPv6. This is a requirement for running the Galleon server. As root, edit /etc/modprobe.d/aliases and change

     alias net-pf-10 ipv6 


     alias net-pf-10 off 
     #alias net-pf-10 ipv6 

4. Reboot the Kurobox with the command:

     shutdown –r now

Step 4 – Load Galleon

1. If a Galleon server is currently running on another host on your network (i.e. another Linux box or PC), stop the server on the other host. Attempting to run two Galleon servers on the network appeared to cause problems for the Kurobox. This is an unconfirmed problem. Help on http://www.galleon.tv states that a headless Galleon server can be accessed by invoking the GUI plus IP address of the server on another host. This appeared to cause many problems with both the Kurobox server and the TiVo DVR itself. As a precaution, stop any Galleon servers on the network and don’t attempt the headless GUI access until Galleon is properly running on the Kurobox. It’s easier to troubleshoot one problem at a time. Access to the Kurobox Galleon server will be performed using the vncserver and GUI run from the Kurobux as described in the steps below.

2. Log out and log back in as a regular user. Don’t install Galleon as root.

3. From the regular users’s home directory, type the following command:

     mkdir galleon
     cd galleon

4. FTP the galleon-unix-2.3.0.zip file into the galleon directory and type:

     unzip galleon-unix-2.3.0.zip

In the galleon directory you should see the apps, bin, conf, data, hme, lib, and so forth directories from the zip extraction.

5. Move into the galleon/bin directory:

     cd ~/galleon/bin

6. Create a file called galleon_startup containing the following lines. Substitute the DISPLAY environment variable with your Kurobox IP:screen number. The PATH and JAVA_HOME variables are set where Java is installed.

     export PATH
     export JAVA_HOME
     export DISPLAY

7. Make the files executable:

     chmod +x galleon_startup run.sh gui.sh

Step 5 – First-Time Start of Galleon

1. If the VNC server isn’t running, start it by the command below. Look for the :# (typically :1) display number after invoking the command. If the number is different, adjust the DISPLAY environment variable in galleon/bin/galleon_startup accordingly. Starting the VNC server is a requirement only for the first time startup of the Galleon server. Subsequent startups of the Galleon server do not require VNC. Loading the VNC server appears to supply certain x11 modules required by Galleon for its initial setup.


2. In the galleon/bin directory, type the command to set the environment variables:


3. Next start the server with:


4. Once the message saying “Galleon is ready.” is displayed, set the process in the background by:


5. Next fire up the Galleon GUI from the bin directory with:


6. Invoke a vncviewer from another host to view your iceWM scrren. This takes a while but the Galleon logo and configuration windows should show up within a minute or two on your vncviewer program window.

7. Complete the configuration process using the GUI. Refer to the “Configure” instructions located in http://www.galleon.tv for additional details. The TiVo© should now see your Galleon server on the Kurobox. The /mnt/share/Recordings directory (created and opened up to 777 earlier in this article) should be a good location for Galleon’s ToGo Recordings directory.

8. Once the Galleon setup is complete, just exit the gui and kill the vncserver with the following command. The vncsever doesn’t need to run any longer.

     vncserver –kill :1

Step 6 – Subsequent Startups of Galleon

1. The Galleon server will continue to run until the telnet or ssh window used to invoke ./run.sh is closed. When the window is closed, a hangup signal is sent to Galleon and the server is stopped.

2. A slight modification to the ./run.sh command above can be used to avoid this:

     nohup ./run.sh &

The nohup and ampersand allows the telnet or ssh window to close without killing the Galleon server. When using nohup, stdout messages go to a log file called nohup.out.