Difference between revisions of "Debian Galleon Media Server"

From NAS-Central Buffalo - The Linkstation Wiki
Jump to: navigation, search
(Step 1 – Build Debian on the Kurobox)
m (Updated references to run.sh. Current owner of Galleon source has modified ./run.sh script to be x86 specific. Kurobox users must use older ./run.sh scirpt for now.)
 
(34 intermediate revisions by 5 users not shown)
Line 1: Line 1:
 
==Background==
 
==Background==
  
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.
+
Galleon is a free open source server that can serve your media collection to your TV using a TiVo® DVR and a Kurobox on a home network. This article describes how to install the server and the required packages on a Kurobox HG.  
  
For a complete description of Galleon’s capabilities, refer to http://www.galleon.tv
+
 
 +
'''Features include:'''
 +
 
 +
''GoBack/ToGo'' - transfers video files between a TiVo® and the server for later viewing on the DVR or computer.
 +
 
 +
''Music'' - plays and organizes mp3 music collections using the DVR.
 +
 
 +
''Photos'' - allows viewing of photo collections.
 +
 
 +
 
 +
For a complete description of Galleon’s capabilities, refer to http://www.galleon.tv.
 +
 
  
 
==Performance==
 
==Performance==
  
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.
+
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 run well on the Kurobox HG.
  
 
==Setting Up==
 
==Setting Up==
Line 21: Line 32:
  
 
debian-sarge-2.6.16.9-KUROHG-20060422.tgz from  
 
debian-sarge-2.6.16.9-KUROHG-20060422.tgz from  
http://genbako.vodapone.com/debian-2.6.16.9/
+
http://www.genbako.com/debian-2.6.16.9/
  
 
OR
 
OR
Line 29: Line 40:
  
 
debian-sarge-2.6.16.9-KUROBOX-20060422.tgz from  
 
debian-sarge-2.6.16.9-KUROBOX-20060422.tgz from  
http://genbako.vodapone.com/debian-2.6.16.9/
+
http://www.genbako.com/debian-2.6.16.9/
  
  
Line 36: Line 47:
 
Registration with the IBM developers site is required before downloading
 
Registration with the IBM developers site is required before downloading
  
ibm-java2-jre-50-linux-ppc.tgz from  
+
 
 +
ibm-java2-jre-5.0-5.1-linux-ppc.tgz from  
 
http://www-128.ibm.com/developerworks/java/jdk/linux/download.html
 
http://www-128.ibm.com/developerworks/java/jdk/linux/download.html
  
  
'''Galleon 2.3.0 – TiVo Media Server'''
+
'''Galleon – TiVo Media Server'''
  
galleon-unix-2.3.0.zip from
+
galleon-2.4.1-linux.zip from
http://www.galleon.tv
+
http://sourceforge.net/projects/galleon
  
 +
(Development has re-started on a limited basis. Versions 2.3 and higher have been used successfully. Versions 2.5 and above use a modified ./run.sh script only suitable for x86-based architectures. Use a ./run.sh script from previous versions when running 2.5 and above).
  
 
== Step 1 – Build Debian on the Kurobox ==
 
== 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:
+
[[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.  Don’t forget to create a regular user (adduser). It will be used for running VNC and Galleon.
+
  
 +
# 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.
 +
# Replace the debian_2004_12_26_dist.tgz file with the appropriate Debian/Linux distribution listed above.
 +
# Static IP addresses are preferred. Use ipconfig on a Windows box to get your gateway IP.
 +
# For etc/resolve.conf, log into your router’s web interface to get your ISP’s DNS IP address.
 +
# For etc/hosts.deny, comment out the ALL:ALL line (i.e. #ALL:ALL) otherwise you will be locked out.
 +
# 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.
 
Follow all steps in the article including the first boot. If you can successfully get through the first boot, go to the next step.
Line 72: Line 76:
  
  
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.
+
The following packages should be loaded in the order described below. Samba and Webmin are optional but can be useful if access to media files on the Kurobox is needed from a Windows-based host.
 
+
  
'''DebianKeyPackages – Install key packages.'''
+
===KeyPackages===
 +
Install key packages.
 
 
 
1.  Login (telnet) into the Kurbox and su to root
 
1.  Login (telnet) into the Kurbox and su to root
Line 85: Line 89:
  
  
3.  Don’t do any additional steps listed in Linkstation wiki.
+
===Samba===
 +
Set up a Windows-readable file share using Samba.'''
  
 +
1.  Install the Samba server.
  
'''DebianSamba - Set up a Windows-readable file share using Samba.'''
+
      apt-get install samba smbfs
  
1.  Install Samba as described in the article.
 
  
 +
2.  Enter your domain/workgroup when prompted. The Windows XP default workgroup is MSHOME.
  
'''DebianWebmin - Install and use Webmin to remotely administer your Kurobox.'''
+
 
 +
3.  If prompted, select yes to creating a password database.
 +
 
 +
 
 +
===Webmin===
 +
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.
 
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.
Line 102: Line 113:
 
2.  For the Samba installation:
 
2.  For the Samba installation:
  
       apt-get install webmin-sshd
+
       apt-get install webmin-samba
  
  
Line 126: Line 137:
  
  
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.
+
The Webmin interface is really straightforward. Select the "Servers" tab followed by the "Samba Windows File Sharing" icon and share the /mnt/share directory listed above. Use a PC to see if the share is visible from another host.
  
  
8The 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.
+
===VNC===
 +
Set up a Virtual Network Computing (VNC) Server'''
 +
 +
1Download and install 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 (i.e. a Linux or Windows host) and allows access to the Kurobox iceWM window manger. Download the correct binary for your remote host type.
  
  
'''DebianVNC - Set up a Virtual Network Computing (VNC) Server'''
+
2If not currently logged in as root to the KuroBox, telnet and su to root.
+
1Download 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:
+
3.  Install the VNC server and related packages on the KuroBox. Use the command:
  
 
       apt-get install vnc4server xfonts-base icewm menu grun iceme icewm-themes iceconf icemc icepref xfe
 
       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.
+
4.  Although not required, grab a copy of Firefox. It will be used later to check out the VNC server.
  
 
       apt-get install mozilla-firefox
 
       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.  Log out of the telnet session and log back in as a regular user.
 +
 +
 +
6.  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 and respond to the prompts:
  
 
       vncpasswd
 
       vncpasswd
  
  
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).
+
7.  Start the VNC server as a regular user with this command. Note that the command will come back with your host name followed by colon and a number. This will likely be a :1. (Remember this screen number).
  
 
       vncserver
 
       vncserver
 
  
6From a VNC viewer running on another host, specify the IP address of the Kurobox followed by :1. For example:
+
 
 +
8Start the VNC viewer installed on a another host and specify the IP address of the Kurobox followed by :1. For example:
  
 
       192.168.0.15:1
 
       192.168.0.15:1
  
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.
 
  
 +
9. What starts up is a virtual iceWM window manger desktop running on the Kurobox. This same desktop is used for Galleon’s GUI later. Just for fun, start up Firefox with the Mozilla Firefox browser button in the window manager.
  
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.
 
  
 +
10. Exit out of the window manager from the remote host and kill the vncserver with the following command on the Kurobox:
  
8.  Exit out of the window manager and kill the vncserver with:
+
      vncserver –kill :1
  
      vncserver –kill :1
 
 
  
 
== Step 3 – Load Java ==
 
== Step 3 – Load Java ==
  
  
'''DebianJava'''
+
'''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:
+
1.  A manual installation of the Java JRE is needed. Telnet into the Kurobox and su to root.
  
 
       cd /
 
       cd /
Line 187: Line 200:
  
  
2.  Move the ibm-java2-jre-50-linux-ppc.tgz file into the /opt directory and type the following command:
+
2.  Move the ibm-java2-jre-5.0-4.0-linux-ppc.tgz file to the Kurobox from a remote host by either using FTP or the Samba share if installed. Then move the file into the /opt directory and type the following command:
  
       tar –xvfz ibm-java2-jre-50-linux-ppc.tgz
+
       tar xvfz ibm-java2-jre-5.0-4.0-linux-ppc.tgz
  
 
The installation will be tested later when environment variables are set up.
 
The installation will be tested later when environment variables are set up.
Line 208: Line 221:
 
       shutdown –r now
 
       shutdown –r now
  
   
+
5. Power-up the Kurobox with the front panel button if required.
  
 
== Step 4 – Load Galleon ==
 
== 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.
+
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 setup problems for the Kurobox.  
  
 +
2.  Copy the galleon-unix-2.3.0.zip file to the Kurobox from a remote host using FTP or Samba if installed.
  
2.  Log out and log back in as a regular user. Don’t install Galleon as root.
 
  
 +
3.  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:
+
 
 +
4.  From the regular users’s home directory, type the following command:
  
 
       mkdir galleon
 
       mkdir galleon
 
       cd galleon
 
       cd galleon
  
 
+
4.  Copy the galleon-unix-2.3.0.zip file to the newly created galleon directory and type:
4.  FTP the galleon-unix-2.3.0.zip file into the galleon directory and type:
+
  
 
       unzip galleon-unix-2.3.0.zip
 
       unzip galleon-unix-2.3.0.zip
Line 237: Line 251:
  
  
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.
+
6.  Create a file called galleon_startup containing the following lines. Substitute the DISPLAY environment variable with your Kurobox IP:screen number. Use the screen number provided by the VNC server startup (usually :1). The PATH and JAVA_HOME variables are set where Java is installed.
  
  
Line 255: Line 269:
  
  
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.
+
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 for configuring and running the Galleon server and GUI.  
  
 
       vncserver
 
       vncserver
Line 262: Line 276:
 
2.  In the galleon/bin directory, type the command to set the environment variables:
 
2.  In the galleon/bin directory, type the command to set the environment variables:
  
       ./galleon_startup
+
       source ./galleon_startup
  
  
3.  Next start the server with:
+
3.  Next start the server with the following command. Note that the initial server startup takes about 3-4 minutes as databases are initialized.
  
 
       ./run.sh
 
       ./run.sh
Line 284: Line 298:
  
  
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.
+
7.  Complete the configuration process using the GUI. Refer to the “Configure” instructions located in http://www.galleon.tv for additional details.  
  
  
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.
+
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.  
  
      vncserver –kill :1
 
  
+
As a minimum, File ... Properties ... Media Access Key and Recordings Path must be filled in as described on the Galleon site. The TEST button in the Properties dialog box will check if the server can find your DVR. Finally, add at least one application (ToGo for example) to the server. Click the APPLY button as needed and exit the GUI.
  
== Step 6 – Subsequent Startups of Galleon ==
 
  
 +
The server is not fully set up and will not function correctly until the steps below are followed.
 +
 +
 +
8.  Bring ./run.sh to the foreground with
 +
 +
      fg
 +
 +
 +
9.  Control-C to stop the server. The server must be stopped and restarted before the TiVo© will see the Galleon server on the Kurobox.
 +
 +
 +
      <ctrl>-C
 +
      ./run.sh
 +
 +
 +
10. When the “Galleon is ready.” message is displayed, the server should be accessible by the DVR.
 +
 +
 +
11.  In general, prior to invoking the Galleon server or GUI, source the galleon_startup file as described above and start the VNC server if it isn't already running. Even though the primary display is the TiVo itself, X11 resources are needed on the server that are provided by VNC.
 +
 +
 +
== 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.
 
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.
Line 303: Line 337:
 
       nohup ./run.sh &
 
       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.
+
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.  
 +
 
 +
 
 +
== Notes & Tips ==
 +
 
 +
1. The VNC server will continue to run until the system is shut down. If the Kurobox is restarted, re-start Galleon as described in step 6. above.
 +
 
 +
2. Once initially configured and running on your Kurobox, Galleon can be accessed by invoking the GUI plus IP address of the Kurobox server on another host such as a PC or Linux host. This headless GUI access is much faster than using the vncviewer and running the GUI app on the Kurobox itself.
 +
 
 +
3. An even faster way to re-configure Galleon to open a telnet or ssh session into the Kurobox and directly edit the configure.xml file to add or remove rules for downloading shows. The format of this .xml file is easily readable by a text editor. After writing updates to this file, kill any of the java process threads to stop the server. Re-start using step 6. Galleon will re-read the updated configure.xml file at startup. Note that the first-time setup does require the VNC server and GUI as described above. Subesquent startups do not and performance will be much better when the VNC server is not running.
 +
 
 +
4. Galleon at startup builds databases and appears to index files for it's use. Doing a "top" shortly after starting the server will show 100% CPU utilization for 5-10 minutes. After this period, CPU utilization is bursty and infrequent. Server performance improves once indexing completes.
 +
 
 +
Article ToDo:
 +
auto-start on boot instructions
 +
{{Articles|Kurobox|Debian}}

Latest revision as of 14:41, 25 October 2007

Contents

Background

Galleon is a free open source server that can serve your media collection to your TV using a TiVo® DVR and a Kurobox on a home network. This article describes how to install the server and the required packages on a Kurobox HG.


Features include:

GoBack/ToGo - transfers video files between a TiVo® and the server for later viewing on the DVR or computer.

Music - plays and organizes mp3 music collections using the DVR.

Photos - allows viewing of photo collections.


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


Performance

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 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-2.6.16.9-KUROHG-20060422.tgz from http://www.genbako.com/debian-2.6.16.9/

OR

For the Kurobox: Debian/Linux Distro

debian-sarge-2.6.16.9-KUROBOX-20060422.tgz from http://www.genbako.com/debian-2.6.16.9/


Java JRE for the 32 bit pSeries/J2SE 5.0

Registration with the IBM developers site is required before downloading


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


Galleon – TiVo Media Server

galleon-2.4.1-linux.zip from http://sourceforge.net/projects/galleon

(Development has re-started on a limited basis. Versions 2.3 and higher have been used successfully. Versions 2.5 and above use a modified ./run.sh script only suitable for x86-based architectures. Use a ./run.sh script from previous versions when running 2.5 and above).

Step 1 – Build Debian on the Kurobox

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

The following packages should be loaded in the order described below. Samba and Webmin are optional but can be useful if access to media files on the Kurobox is needed from a Windows-based host.

KeyPackages

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


Samba

Set up a Windows-readable file share using Samba.

1. Install the Samba server.

     apt-get install samba smbfs 


2. Enter your domain/workgroup when prompted. The Windows XP default workgroup is MSHOME.


3. If prompted, select yes to creating a password database.


Webmin

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-samba


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:

     /etc/webmin/stop
     /etc/webmin/start


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.

The Webmin interface is really straightforward. Select the "Servers" tab followed by the "Samba Windows File Sharing" icon and share the /mnt/share directory listed above. Use a PC to see if the share is visible from another host.


VNC

Set up a Virtual Network Computing (VNC) Server

1. Download and install 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 (i.e. a Linux or Windows host) and allows access to the Kurobox iceWM window manger. Download the correct binary for your remote host type.


2. If not currently logged in as root to the KuroBox, telnet and su to root.


3. Install the VNC server and related packages on the KuroBox. Use the command:

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


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

     apt-get install mozilla-firefox


5. Log out of the telnet session and log back in as a regular user.


6. 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 and respond to the prompts:

     vncpasswd


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

     vncserver


8. Start the VNC viewer installed on a another host and specify the IP address of the Kurobox followed by :1. For example:

     192.168.0.15:1


9. What starts up is a virtual iceWM window manger desktop running on the Kurobox. This same desktop is used for Galleon’s GUI later. Just for fun, start up Firefox with the Mozilla Firefox browser button in the window manager.


10. Exit out of the window manager from the remote host and kill the vncserver with the following command on the Kurobox:

     vncserver –kill :1


Step 3 – Load Java

Java

1. A manual installation of the Java JRE is needed. Telnet into the Kurobox and su to root.

     cd /
     mkdir opt
     chmod 777 opt
     cd /opt


2. Move the ibm-java2-jre-5.0-4.0-linux-ppc.tgz file to the Kurobox from a remote host by either using FTP or the Samba share if installed. Then move the file into the /opt directory and type the following command:

     tar xvfz ibm-java2-jre-5.0-4.0-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 

to

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


4. Reboot the Kurobox with the command:

     shutdown –r now

5. Power-up the Kurobox with the front panel button if required.

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 setup problems for the Kurobox.

2. Copy the galleon-unix-2.3.0.zip file to the Kurobox from a remote host using FTP or Samba if installed.


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


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

     mkdir galleon
     cd galleon

4. Copy the galleon-unix-2.3.0.zip file to the newly created 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. Use the screen number provided by the VNC server startup (usually :1). The PATH and JAVA_HOME variables are set where Java is installed.


     PATH=/usr/local/bin:/usr/bin:/bin:/usr/bin/X11:/usr/games:/opt/ibm-java2-ppc-50/jre/bin
     export PATH
     JAVA_HOME=/opt/ibm-java2-ppc-50/jre
     export JAVA_HOME
     DISPLAY=192.168.0.15:1
     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 for configuring and running the Galleon server and GUI.

      vncserver


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

      source ./galleon_startup


3. Next start the server with the following command. Note that the initial server startup takes about 3-4 minutes as databases are initialized.

      ./run.sh


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

     <ctrl>-Z
     bg


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

     ./gui.sh


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 /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.


As a minimum, File ... Properties ... Media Access Key and Recordings Path must be filled in as described on the Galleon site. The TEST button in the Properties dialog box will check if the server can find your DVR. Finally, add at least one application (ToGo for example) to the server. Click the APPLY button as needed and exit the GUI.


The server is not fully set up and will not function correctly until the steps below are followed.


8. Bring ./run.sh to the foreground with

     fg


9. Control-C to stop the server. The server must be stopped and restarted before the TiVo© will see the Galleon server on the Kurobox.


     <ctrl>-C
     ./run.sh


10. When the “Galleon is ready.” message is displayed, the server should be accessible by the DVR.


11. In general, prior to invoking the Galleon server or GUI, source the galleon_startup file as described above and start the VNC server if it isn't already running. Even though the primary display is the TiVo itself, X11 resources are needed on the server that are provided by VNC.


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.


Notes & Tips

1. The VNC server will continue to run until the system is shut down. If the Kurobox is restarted, re-start Galleon as described in step 6. above.

2. Once initially configured and running on your Kurobox, Galleon can be accessed by invoking the GUI plus IP address of the Kurobox server on another host such as a PC or Linux host. This headless GUI access is much faster than using the vncviewer and running the GUI app on the Kurobox itself.

3. An even faster way to re-configure Galleon to open a telnet or ssh session into the Kurobox and directly edit the configure.xml file to add or remove rules for downloading shows. The format of this .xml file is easily readable by a text editor. After writing updates to this file, kill any of the java process threads to stop the server. Re-start using step 6. Galleon will re-read the updated configure.xml file at startup. Note that the first-time setup does require the VNC server and GUI as described above. Subesquent startups do not and performance will be much better when the VNC server is not running.

4. Galleon at startup builds databases and appears to index files for it's use. Doing a "top" shortly after starting the server will show 100% CPU utilization for 5-10 minutes. After this period, CPU utilization is bursty and infrequent. Server performance improves once indexing completes.

Article ToDo: auto-start on boot instructions