Firefox as Local App on Ubuntu Jaunty 9.04
LTSP: The possibility of running Local Apps on the Thin Client is part of Ubuntu since Jaunty (9.04). The most obvious choice is to run Firefox (inlcuding Adobe Flash) locally. As you might have experienced video (f.e. on YouTube or Vimeo) can be very slow on the thin client because the content gets decoded on the server and video is sent uncompressed over the network to the thin client. Kind of defeats the whole purpose of Flash. (Rant: Flash should be open sourced, it's a PITA on Ubuntu 64bit!)
On the Edubuntu website, it's advertised that it's very easy to install firefox as a local app. Well. It's kind of easy. See www.edubuntu.com/Download. In fact, my lts.conf looks like this:
$ cat /var/lib/tftpboot/ltsp/i386/lts.conf
# Global defaults for all clients
# if you refer to the local server, just use the
# "server" keyword as value
# see lts_parameters.txt for valid values
################
[default]
X_COLOR_DEPTH=16
LOCALDEV=True
SOUND=True
NBD_SWAP=True
SYSLOG_HOST=server
#XKBLAYOUT=de
LDM_DEBUG=no
LDM_DIRECTX=True
LOCAL_APPS_MENU=True
DNS_SERVER=10.0.0.1
#SCREEN_02 = shell
SCREEN_07 = ldm
By the way, I tried 'locate lts_parameters.txt' but found nothing.
alkisg on #ltsp says: zcat /usr/share/doc/ltsp-server/lts-parameters.txt.gz | less
So it's with a dash not and underscore. Someone should file a bug. Why not you!?
What I had to do to get firefox and flash installed:
sudo -s
chroot /opt/ltsp/i386
apt-get install firefox flashplugin-installer
exit
ltsp-update-image
exit
Firefox but no internet...
Firefox worked right away as local app. Not very fast (my thin client is not a powerhorse, that's what thin clients supposed to be: lean and mean, cheap, low RAM, etc. Be advised that Firefox and Flash need RAM and CPU and everything. No Pentium I with 64 MB that normally works fine as a thin client!
Okay, now how about some browsing? Sorry, you need to do a lot of things to make that possible. After some searching and with help of the kind people in #ltsp, I found this: wiki.ubuntu.com/ThinClientHowtoNAT
Dazzling uh?
My network has a firewall/squid proxy. The proxy is on 10.0.0.1:3128. My LTSP server is on 10.0.0.2 on the LAN side and on the Thin Client side it's 192.168.0.1. The thin clients are in the range 192.168.0.200 - 250, it's a seperate LAN (standard setup by the way).
Now can't I skip the whole ipforward and NAT? The NAT stuff is not that complicated but it opens a whole range of possibilities to get from the Thin Client LAN to the other LAN.
Maybe redir (a TCP redirector) will help? It's helped me many times, when migrating servers for example. Say your old POP3 server is on 1.2.3.4 and the new on on 1.2.3.5. After you changed your DNS there will be a period of time (up to 4 days with our local braindead provider) before all the DNS changes have propagated. Simply install redir on the old server and redirect all TCP traffic for port 110 to the new server. No one will notice any service outage, great!!!
So here's what I did:
sudo apt-get install redir
sudo redir --laddr=192.168.0.1 --lport=3128 --cport=3128 --caddr=10.0.0.1 --bind_addres=10.0.0.2
Here is an explanation of the options to redir:
--laddr: the local address of the LTSP server on the Thin Client side
--lport: arbitrary, but 3128 is the standard.
--cport: it's the port my squid proxy runs on by default
--caddr: the address of the firewall/proxy on the LAN
--bind_addr: the address of the LTSP server on the LAN side.
Be sure to make sure to ensure that redir is not quitting on you, it does that often, build some stuff around it that it will always restart.
The funny thing is that,after you told firefox to use 192.168.0.1:3128 as a http proxy, it also doesn't moan about not being able to resolve DNS. (See https://bugs.launchpad.net/ubuntu/+source/ltsp/+bug/348305 and https://help.ubuntu.com/community/UbuntuLTSP/LocalAppsResolvConf)
Of course it only works for http on port 80, but there are probably ways to make it work for https and other ports too. Is https really proxy-able? Hmm. Anyway, for simple requirements this is sufficient, and maybe Ubuntu 9.10 will have the NAT stuff all automated, that would be nice then this post will be absolutely obsolete. That'd be nice :-)
Oh, flash does give me sound but no image, but I guess that's some other problem.
See also https://wiki.ubuntu.com/ThinClientProxyRedirect