# Need Galleon Linux Help



## Stormspace (Apr 13, 2004)

Sorry for the dup thread, but the linux thread seemed to be too sprawling and possibly not related to my environment. 

I'm trying to get Galleon installed at present and am having trouble. What I think I have done so far is:

Installed Java
changed Java_Home
DLed Galleon and did a make install.
I cannot get into the galleon bin directory, even using sudo to change the permissions on the sh files, so perhaps I need to start over. Any help would be appreciated! TIA!


----------



## tgmii (Feb 21, 2002)

can't tell a lot from your post, but the one thing that you should check is JAVA_HOME. Linux is case sensitive... you have mixed case in your post.

The other linux thread had a startup script (which I haven't tried, but from glancing at it, looked correct)... compare that to your setup, and differences might jump out at you.

Otherwise, please post the script you are using to start it. You may be starting it by hand, but its best to use a script.

Tom


----------



## Stormspace (Apr 13, 2004)

Currently I'm just looking to start it manually and yes I have the case correct on the JAVA_HOME.


----------



## windracer (Jan 3, 2003)

You're trying this on Ubuntu, right? It's strange that you can't even get _into_ the folder the 'make install' is creating.

I know I had issues with the initial make script when trying to install on Mandrake. I wonder if it needs to be tweaked for Ubuntu as well.

I still haven't gotten around to trying the install on Ubuntu. I might be able to give that a shot tomorrow and see what happens.


----------



## windracer (Jan 3, 2003)

Ok, I've run into some issues installing 2.5.1 on Ubuntu as well.

- I used 'sudo make install' to run the Makefile
- there's no chkconfig on Ubuntu (also discussed here) so I used 'update-rc.d galleon defaults' to get all the symbolic links for startup in the right places
- next, I didn't have java, so I used 'sudo apt-get install sun-java-6-jre' to install the latest JRE, updated JAVA_HOME
- the galleon startup script references /etc/rc.d/init.d/functions which also doesn't exist on Ubuntu, so I commented that line out

Now, when I try to start Galleon, I get this error in the wrapper.log:

Exception in thread "main" java.lang.NoClassDefFoundError: org/lnicholls/galleon/server/ServiceWrapper

So I'm not sure if this is a java problem or a wrapper problem or what. Still need to play around with it some more ...

_edit:_ nevermind, I got it. I changed the install directory in the Makefile to '/usr/local/galleon' but the wrapper.conf file was still pointing to '/usr/share/galleon' so it couldn't find the classfiles.


----------



## Stormspace (Apr 13, 2004)

You get your working with Ubuntu? If so would you mind posting a detailed How-to? I'm concerned that although I have done some of those tasks, such as JAVA_HOME, that it might not be set up exactly the same as yours.

TIA!


----------



## windracer (Jan 3, 2003)

I ran into one other strange problem after I fixed my wrapper issue: when I started Galleon, java went crazy and started putting this line into the log (several thousand per second!):

12:46:22,406 ERROR [JmDNS.ServiceResolver] Configurator - java.util.ConcurrentModificationException: Could not save tivo: Family Room

I did some Google searching and found someone with the exact same problem, albeit a long time ago, on the galleon.tv forums:

http://galleon.tv/component/option,com_joomlaboard/Itemid,26/func,view/id,12/catid,5/

The resolution was to put the wrapper log into DEBUG mode. So I tried that and it worked. It does appear Galleon is running on Ubuntu now, according to the log, and I was able to get into the GUI as well. I'm not at home, so I can't confirm my TiVos can _see_ the Galleon server, but I can check that out tonight.


----------



## Stormspace (Apr 13, 2004)

When you do I'd be cool if you could walk me through it via a quick tutorial?


----------



## windracer (Jan 3, 2003)

Yeah. I might uninstall Galleon and then start over (without changing the install path this time) to make sure I've got it all accounted for.

I think the only difference between us is that maybe you didn't install/run Galleon with sudo, but as your local account? That and having to comment out the /etc/init.d/functions line in the galleon startup script in the bin directory.


----------



## windracer (Jan 3, 2003)

Ok, I _totally_ forgot to try and test Galleon on Ubuntu from my TiVos yesterday night, thanks to the ALCS game (go Indians!! ). So I haven't confirmed the TiVo-side works yet, but Galleon _is_ running on my Ubuntu box and here's how I did it.


install the java runtime (JRE), if it's not already installed (http://packages.ubuntu.com/feisty/libs/sun-java6-jre). it should install to /usr/lib/jvm:

```
sudo apt-get install java-sun6-jre
```
Note: I didn't have to set JAVA_HOME anywhere after installing the java-sun6-jre package. if you have problems later on though, you might need to manually set that variable (if you used the package it should be /usr/lib/jvm/java-6-sun/jre). YMMV.

unzip the galleon archive to a temp directory

edit the Makefile. comment out the chkconfig line in the install: section and add the update-rc.d line instead

```
#chkconfig --add galleon
update-rc.d galleon defaults
```

if you plan on uninstalling Galleon at some point, replace the chkconfig line in the uninstall: section as well:

```
#chkconfig --remove galleon
update-rc.d -f galleon remove
```

do a 'sudo make install' to install the application. you should see the following output:

```
install -d /usr/share/galleon
install -d /var/cache/galleon
install -d /etc/galleon
install -d /usr/lib/galleon
install -d /var/log/galleon
install -d /var/lib/galleon/hme
install -d /var/lib/galleon/data
cp -rf bin media /usr/share/galleon
cp -f Makefile COPYING *.txt /usr/share/galleon
cp -f conf/*.* /etc/galleon
cp -rf lib/* /usr/lib/galleon
cp -rf apps skins /var/lib/galleon
cp -rf conf/templates /var/lib/galleon
chmod a+rwx /usr/share/galleon/bin/run.sh
chmod a+rwx /usr/share/galleon/bin/gui.sh
chmod a+rwx /usr/share/galleon/bin/galleon
chmod a+rwx /usr/share/galleon/bin/wrapper*
chmod +rw /etc/galleon/configure.xml
ln -sf /var/lib/galleon/apps /usr/share/galleon/apps
ln -sf /etc/galleon /usr/share/galleon/conf
ln -sf /var/lib/galleon/data /usr/share/galleon/data
ln -sf /var/lib/galleon/hme /usr/share/galleon/hme
ln -sf /usr/lib/galleon /usr/share/galleon/lib
ln -sf /var/log/galleon /usr/share/galleon/logs
ln -sf /var/lib/galleon/skins /usr/share/galleon/skins
ln -sf /var/lib/galleon/templates /etc/galleon/templates
ln -sf /usr/share/galleon/bin/galleon /etc/init.d/galleon
update-rc.d galleon defaults
 Adding system startup for /etc/init.d/galleon ...
   /etc/rc0.d/K20galleon -> ../init.d/galleon
   /etc/rc1.d/K20galleon -> ../init.d/galleon
   /etc/rc6.d/K20galleon -> ../init.d/galleon
   /etc/rc2.d/S20galleon -> ../init.d/galleon
   /etc/rc3.d/S20galleon -> ../init.d/galleon
   /etc/rc4.d/S20galleon -> ../init.d/galleon
   /etc/rc5.d/S20galleon -> ../init.d/galleon
```

cd to /usr/share/galleon/bin and edit the galleon script, commenting out the following line:

```
#. /etc/rc.d/init.d/functions
```

now at this point you can try and start galleon:

```
sudo ./galleon start
```
Note: on my box, however, at this point after galleon initialized, the log (under /usr/share/galleon/logs/log.txt) would start filling up with thousands of lines of:

```
10:14:59,098 ERROR [JmDNS.ServiceResolver] Configurator - java.util.ConcurrentModificationException: Could not save tivo: Family Room
```
If this happens to you, cd to /etc/galleon, edit wrapper.conf and change the logfile log level to DEBUG (instead of INFO, http://galleon.sourceforge.net/index.php?option=com_joomlaboard&Itemid=&func=view&catid=5&id=12#12/):

```
# Log Level for log file output.  (See docs for log levels)
wrapper.logfile.loglevel=DEBUG
```
Then try starting Galleon again. _Update:_ after upgrading to Hardy Heron, I was able to go back to the INFO loglevel without getting the jmDNS errors anymore.

as soon as you start Galleon, quickly cd to /usr/share/galleon/logs and then:

```
tail -f log.txt
```
so you can watch everything starting up

now that the server is running, it's time to try the GUI. cd to /usr/share/galleon/bin and then:

```
sudo ./gui.sh
```
(obviously you need to be in windowed environment for this to work ... for headless systems you can do what I do and use VNC over an SSH tunnel through PuTTY). the GUI should appear:










Note: if you had to set JAVA_HOME earlier, you might also need to edit gui.sh and uncomment and set the JAVA_HOME line in there too.

one more note ... when running Galleon on Mandrake Linux, I had to disable IPv6 in order to get Galleon to bind correctly to the network adapter. I don't know if this is still necessary, but I did it on my Ubuntu box too. edit /etc/modprobe.d/alias and change the following line as shown:

```
alias net-pf-10 off # ipv6
```
reboot to have the change take effect.

Good luck, I hope this helps!

_edit:_ added link to using VNC over SSH through PuTTY
_edit #2:_ updated jmDNS link to Galleon forums


----------



## Stormspace (Apr 13, 2004)

First, Thanks for the help! I can get the galleon service running however the gui keeps throwing up the connecting to server message. On the TiVo the server shows up in now playing, but not in music, photos, etc. 

Ideas?


----------



## windracer (Jan 3, 2003)

Check the log.txt and gui.txt files under /usr/share/galleon/logs. Anything of note in there?

Might want to check 'netstat -a' and see if you can "see" the Galleon service listening.

Glad the instructions helped, though!


----------



## Stormspace (Apr 13, 2004)

Checked Netstat and saw that galleon was listening on ipv6. Put a bad_list file with the off line in it and rebooted. Whoo hooo! I'm set.


----------



## windracer (Jan 3, 2003)

Excellent! :up:


----------



## ebeckhusen (Feb 15, 2007)

I'm a bit of a Linux newbie, especially to Ubuntu, and I'm having a hard time getting this to work. I tried to change the "aliases" file to alias net-pf-10 off # ipv6, but it wouldn't let me save because I don't own the file (it's a root file, and I don't know how to log in as root). So, is there some way to edit it from the terminal, using sudo, or some way to login as root so I can edit it?


----------



## windracer (Jan 3, 2003)

The whole point of Ubuntu is you _never_ login as root ... you can't. It's taking me some time to get used to this as well.

So, to edit the aliases file, you need to do 'sudo vi /etc/modprobe.d/aliases'.


----------



## ebeckhusen (Feb 15, 2007)

Thanks for the help, it's running fine now.

Yeah, there's quite a bit I'm getting used to with Ubuntu, not logging in as Root is one of them. But, I love it and I've already scrapped Windows


----------



## TiVoter123 (Jan 1, 2001)

Stormspace said:


> First, Thanks for the help! I can get the galleon service running however the gui keeps throwing up the connecting to server message. On the TiVo the server shows up in now playing, but not in music, photos, etc.
> 
> Ideas?


I am having the exact same problem (trying to get Galleon working on my THD).

I'm getting the following error:


```
22:04:49,677 ERROR [WrapperListener_start_runner] TiVoListener - java.io.IOExcep
tion: Operation not permitted
22:04:49,677 DEBUG [WrapperListener_start_runner] TiVoListener - java.io.IOExcep
tion: Operation not permitted
        at java.net.PlainDatagramSocketImpl.send(Native Method)
        at java.net.DatagramSocket.send(Unknown Source)
        at javax.jmdns.JmDNS.send(Unknown Source)
        at javax.jmdns.JmDNS.init(Unknown Source)
        at javax.jmdns.JmDNS.<init>(Unknown Source)
        at org.lnicholls.galleon.server.TiVoListener.<init>(TiVoListener.java:57
)
        at org.lnicholls.galleon.server.Server.start(Server.java:327)
        at org.lnicholls.galleon.server.ServiceWrapper.start(ServiceWrapper.java
:47)
        at org.tanukisoftware.wrapper.WrapperManager$12.run(WrapperManager.java:
2788)
```
ipv6 is in fact disabled (though I had to do it via a blacklist file, but lsmod | grep ipv6 confirms it's not loaded). I have my JAVA_HOME environmental pointed at /usr/java/jre1.6.0_03 -- I installed this manually from java's website). I am running as root.

This seems like the exact problem that Malibyte was having here --- any specific fix / obvious thing I'm doing wrong?


----------



## Stu_Bee (Jan 15, 2002)

Thanks for the guide Windracer. Mucho useful.


----------



## windracer (Jan 3, 2003)

Glad you found it helpful!


----------



## 77midget (Feb 14, 2008)

newb to linux (ubuntu 7.10) and also to Galleon. I have been putzing around, and can now get my run.sh to start up without any errors. I have had some gui.sh errors, and resolved some, but now am getting the following

Exception in thread "main" java.lang.NoClassDefFoundError: org/lnicholls/galleon/gui/Galleon

when I run. Now, this is obviously a java error, but I am lost as to how to resolve it. 
Any thoughts?


----------



## windracer (Jan 3, 2003)

Anything else in the log around the error?


----------



## 77midget (Feb 14, 2008)

nothing in the gui log. One thing I did see in the log.txt was:
20:59:57,076 ERROR [WrapperListener_start_runner] Cache - Unable to set localhost. This prevents creation of$
java.net.UnknownHostException

Now I set the hostname to the IP I have in the etc/hosts, but not localhost-would that cause a GUI startup error?

Also found-
20:59:52,423 ERROR [WrapperListener_start_runner] Server - java.net.UnknownHostException: CHARYBDIS

CHARYBDIS is the name of my machine (i blocked out FQDN since it is my work domain)

The top of my hosts file is:
127.0.0.1 localhost
192.168.1.102 CHARYBDIS.XXX.XXX.com

should I be changing this?


----------



## windracer (Jan 3, 2003)

Hmm ... so Galleon is running fine, it's just the GUI you can't get to start? Are you using 'sudo' to run gui.sh?


----------



## 77midget (Feb 14, 2008)

actually running in a sudo -i window that I ran run.sh in.


----------



## windracer (Jan 3, 2003)

Did you follow my steps above for installing on Ubuntu? You have a current JRE, disabled IPv6, stuff like that? 

Unless one of the guys who was working on Galleon chimes in here, I'm not sure what that error means.


----------



## 77midget (Feb 14, 2008)

I installed prior to finding this thread, but yeah-I have IPv6 disabled and the latest JRE. I had some issues since my ubuntu had a generic java embedded, but I installed the sun latest version, and changed the link to point to the sun version. I also made sure to update my path adding the path to the new jre before the path to the old one. That fixed a number of java errors that I was getting initially, and allowed me to get the server running, but the gui is still hosed. I suppose that it must be a java error, but I just can't dig it out.

edit-my IPv6 fix was not correct, so I redid that, and now I have a clean log.txt

but I am still getting the error for gui.sh startup. doh!


----------



## windracer (Jan 3, 2003)

Maybe check the JAVA_HOME in gui.sh?


----------



## 77midget (Feb 14, 2008)

should've said that eariler-added JAVA_HOME declaration to both run.sh and gui.sh for my java root.


----------



## 77midget (Feb 14, 2008)

will the GUI not start up if it cannot reach the tivo?


----------



## 77midget (Feb 14, 2008)

got it, and now not sure if I am an idiot, or an idiot. 

I have been running it from the directory taht I installed it to, which was /usr/bin/gal......et cetera

when I ran it from usr/share/galleon, it came right up

so, now it launched, at least. lets see what I can break now


----------



## 77midget (Feb 14, 2008)

Booyah-got connectivity and activity.

Thx all for the help. The bugs hardest to track down are the ones between the ears.


----------



## windracer (Jan 3, 2003)

Excellent. Glad I could "help."

Not sure I understand the problem though ... how did it get under /usr/bin?


----------



## 77midget (Feb 14, 2008)

let's just say that I am a linux newb and I am still learning the proper locations for everything. that is where I extracted everything. When I saw that the run and gui files were there, I thought that was where I was supposed to run it from. 

starting the service was fine, it was just that it was having real path issues w/ java when running from there. When I dug into some of the files, I kept seeing usr/share/ so I went poking around over there and voila...

anyhoo, I learned a lot, so mission accomplished, and my galleon works, so I am happy about that. it was late when I got it running though, so I will test drive it tonight, and I am sure that I will be back w/ more questions.


----------



## 11274 (Dec 1, 2001)

I'm also having trouble getting Galleon going on Ubuntu (Gutsy) running against an HD Tivo (running 9.2a)>. It's Galleon 2.5.2 with Java 1.6.

If I run the test from the properties menu it finds no Tivo's

If I use the "ToGo" feature it does not automatically find any tivo's.

If I snoop the wire with wireshark, I see "TiVoConn Discovery Beacon" packets being broadcast to the subnet by both the Galleon machine and the Tivo. However, the two never talk.

In text.log, once a minute I see

17:36:40,479 DEBUG [BroadcastThread] BroadcastThread - Sent broadcast: TiVoConnect=1
Method=Broadcast
Platform=pc/Linux
Machine=flinux
Identity=00:50:56:C0:00:08
Services=TiVoMediaServer:8081/http
swversion=2.5.2
to 192.168.10.255

and every few seconds

17:36:43,403 DEBUG [RMI TCP Connection(5)-192.168.10.30] FileSystemContainer - getItems:

Any ideas?


----------



## s2kdave (Jan 28, 2005)

Make sure the firewall isn't blocking port 8081 from the outside. Try browsing from another machine to http://<linux-ip-addr>:8081/TiVoConnect?Command=QueryContainer&Container=/

If it returns an xml document then your tivo should be seeing it.


----------



## 11274 (Dec 1, 2001)

s2kdave said:


> Make sure the firewall isn't blocking port 8081 from the outside. Try browsing from another machine to http://<linux-ip-addr>:8081/TiVoConnect?Command=QueryContainer&Container=/
> 
> If it returns an xml document then your tivo should be seeing it.


I did try it from a third machine on the same subnet, and it does return an xml document, so I don't think its a firewall issue on the galleon host.

I did an nmap to the Tivo and get

Starting Nmap 4.20 ( http://insecure.org ) at 2008-02-15 17:22 EST
Interesting ports on 192.168.10.14:
Not shown: 1695 filtered ports
PORT STATE SERVICE
80/tcp open http
443/tcp open https

are these the only ports that should be open?


----------



## s2kdave (Jan 28, 2005)

Do other HME apps work? or is it just the togo app that isn't being auto detected? Also make sure you disable ipv6 in your os as it causes problems and nothing will work.


----------



## 11274 (Dec 1, 2001)

s2kdave said:


> Do other HME apps work? or is it just the togo app that isn't being auto detected? Also make sure you disable ipv6 in your os as it causes problems and nothing will work.


I do have IPV6 disabled. I added several apps (weather, traffic, desktop) and the Tivo sees them and can invoke them properly.

However, if I Invoke Togo from the gui.sh file menu, I don't get much out of it. The ToGo Tivo screen shows a nameless Tivo at the correct IP with 40GB capacity (which seems wrong for a HD Tivo). The spinning cursor keeps spinning. If I move to the "recorded" screen it shows nothing.


----------



## 11274 (Dec 1, 2001)

Well, the question about whether it was just ToGo that was not working put me on the right path. It turns out I had never enabled transfers on the Tivo web site. I had gotten the media key from the web site, but didn't realize that there was more to it than that.

So ToGo is working for me now, almost. The problem is that gui.sh is kicking out a lot of awt/swing exceptions when trying to display the recording table. I can see whats supposed to display by passing a window over the table, forcing a refresh.

I've tried both 1.5 and 1.6 java jre's, but both give the same errors.

Any ideas? This is on Ubuntu/Gutsy.


----------



## jjburke77 (Jul 17, 2007)

Windracer, thanks so much for the great post on getting galleon up ans running. I like many of the other posters am new to both Galleon and Linux and am struggling with both a litle right now. I can get Galleon up but I keep getting an "cannot connect to server" error with the GUI. I checked the gui log and go the following error.

2


> 008-02-24 13:42:32,115 INFO [AWT-EventQueue-0] Galleon - Server address: start
> 2008-02-24 13:44:05,662 ERROR [AWT-EventQueue-0] Galleon - java.rmi.UnknownHostException: Unknown host: start; nested exception is:
> java.net.UnknownHostException: start: Could connect to server: start
> 2008-02-24 13:44:05,662 ERROR [AWT-EventQueue-0] Galleon - java.lang.NullPointerException: Could not get apps from server: start
> ...


rt

I followed your advice and commented out the the ipv6. I don't know where to go from here can you help please.


----------



## jjburke77 (Jul 17, 2007)

Windracer, never mind I found the problem. I had set the jre home incorrectly in gui.sh. Thanks again for the great guide.


----------



## windracer (Jan 3, 2003)

Glad it's helping people out!


----------



## jjburke77 (Jul 17, 2007)

Hello Windracer,
I am installing galleon on my new homeserver and I am getting the following error when I try to start it. I am using a 64bit amd system if that matters at all. I am pretty new to this stuff so keep it basic if this is a tough one.



> [email protected]:/usr/share/galleon/bin$ sudo ./galleon start
> Starting Galleon TiVo Application Server...
> eval: 1: /usr/share/galleon/bin/./wrapper-linux-x86-32: not found


Thanks in advance for your help.

I should point out that I followed your instructions exactly and have confirmed that file is in fact there in the bin folder.


----------



## windracer (Jan 3, 2003)

Galleon doesn't come with 64-bit binaries for the wrapper, that's probably the cause of your issue. See here:

http://www.tivocommunity.com/tivo-vb/showthread.php?p=5813358#post5813358

And then here:

http://www.tivocommunity.com/tivo-vb/showthread.php?p=5829387#post5829387


----------



## tivoq (Dec 1, 2002)

Is it possible to run the Galleon server on one Linux machine and gui.sh on another?


----------



## windracer (Jan 3, 2003)

tivoq said:


> Is it possible to run the Galleon server on one Linux machine and gui.sh on another?


I responded to your other post on this here:

http://www.tivocommunity.com/tivo-vb/showthread.php?p=6035927#post6035927


----------



## tivoq (Dec 1, 2002)

windracer said:


> I responded to your other post on this here:
> 
> http://www.tivocommunity.com/tivo-vb/showthread.php?p=6035927#post6035927


Thanks, I missed the first reply! That does work.

Another Galleon, but really HME question. Does HME have access to the ToDo list or anything else that would be in the direction of remote scheduling?

I'm a veteran of Tivoweb on series 1, and really prefer monitoring (and scheduling) from a web browser. The MyTivo web site scheduling is really lame, with no real time access to the box.


----------



## windracer (Jan 3, 2003)

I don't think the currently released HME APIs allow access to anything regarding scheduling.


----------



## s2kdave (Jan 28, 2005)

no, HME can't do anything directly with scheduling recordings or know what recordings are on the todo list. There is a hidden api to jump to the native schedule a program screen that swivel search uses, but it still can't get any of that info. All remote scheduling has to be done through the tivo website.


----------



## tivoq (Dec 1, 2002)

I have some mpeg4 videos. Can an HD Tivo play mpeg4 uploaded via Galleon, or do I have to convert them to mpeg2 first?


----------



## BluesKaj (Mar 15, 2008)

sudo ./galleon start
sudo: ./galleon: command not found
I followed the tutorial up to that point, everything before that seemed to work, but it appears it didn't install anywhere. What's next ?


----------



## windracer (Jan 3, 2003)

What directory are you in when you issued that command? Galleon should be under /usr/share/galleon and the scripts are under /usr/share/galleon/bin. The init script should be under /etc/init.d.

If everything installed properly, you should be able to do a:

# sudo /etc/init.d/galleon start

to start the server. Then cd to /usr/share/galleon/bin and do a:

# sudo ./gui.sh

to start the GUI.


----------



## Lurker1 (Jun 4, 2004)

windracer said:


> Galleon doesn't come with 64-bit binaries for the wrapper, that's probably the cause of your issue. See here:
> 
> Installing Galleon on Linux
> 
> ...


@windracer: A big thank you from the future. Your message from 2008 helped me solve the same problem in 2019.


----------



## windracer (Jan 3, 2003)

That's amazing, thanks!


----------

