Difference between revisions of "Diskless LTSP Frontend"

From MythTV Official Wiki
Jump to: navigation, search
m (formatting cleanup)
Line 76: Line 76:
  
 
   root@ltsp-server:~# service isc-dhcpd-server restart
 
   root@ltsp-server:~# service isc-dhcpd-server restart
 +
 +
== Build client settings ==
 +
 +
  vi /etc/ltsp/ltsp-build-client.conf
 +
{{code_box|ltsp-build-client.conf|<pre>
 +
 +
# ubuntu-desktop and edubuntu-desktop are tested.
 +
# Ubuntu 12.04 LTS working perfectly with Unity and Unity 2D.
 +
FAT_CLIENT_DESKTOPS="ubuntu-desktop"
 +
 +
# This uses the server apt cache to speed up downloading.
 +
# This locks the servers dpkg, so you can't use apt on
 +
# the server while building the chroot.
 +
MOUNT_PACKAGE_DIR="/var/cache/apt/archives/"
 +
</pre>}}
 +
 +
  vi /etc/ltsp/ltsp-update-image.conf
 +
 +
{{code_box|ltsp-update-image.conf|<pre>
 +
#configuration file for ltsp-update-image
 +
# Do not compress the client image. Comment out the line below to enable again.
 +
NO_COMP="-noF -noD -noI -no-exports"
 +
</pre>}}
 +
 +
== Set up Thin Client user ==
 +
 +
  root@ltsp-server:~# useradd -m mythltsp -G sudo mythtv
 +
  root@ltsp-server:~# passwd mythltsp
 +
  root@ltsp-server:~# su - mythltsp
 +
  $ mkdir .mythtv
 +
  $ cd .mythtv
 +
  $ ln -s /etc/mythtv/mysql.txt mysql.txt
 +
  $ ln -s /etc/mythtv/config.xml config.xml
 +
  $ exit
 +
 +
=Start of 32 bit LTSP Client Instructions=
 +
 +
==Create the initial client image==
 +
 +
  root@ltsp-server:~# ltsp-build-client --arch i386
 +
 +
==Boot the LTSP client==
 +
 +
Try to login, if you get an error that gnome failed to load
 +
 +
  root@ltsp-server:~# ltsp-chroot
 +
  root@ltsp-server-chroot:/# apt-get install gnome
 +
  root@ltsp-server-chroot:/# exit
 +
 +
==Create a new image==
 +
 +
  root@ltsp-server:~# ltsp-update-image --arch=i386
 +
 +
==Boot the LTSP client==
 +
 +
Client boots and can now login.  MythTV is not installed
 +
 +
==Update repositories the client can use==
 +
 +
  root@ltsp-server:~# cp /etc/apt/sources.list /opt/ltsp/i386/etc/apt/sources.list
 +
  root@ltsp-server:~# cp /etc/apt/sources.list.d/* /opt/ltsp/i386/etc/apt/sources.list.d/
 +
 +
==Install MythTV Frontend==
 +
 +
  root@ltsp-server:~# ltsp-chroot
 +
  root@ltsp-server-chroot:/# apt-get update
 +
  root@ltsp-server-chroot:/# apt-get install mythtv-frontend
 +
  root@ltsp-server-chroot:/# exit
 +
 +
==Create a new image==
 +
 +
  root@ltsp-server:~# ltsp-update-image --arch=i386
 +
 +
==Boot the LTSP client==
 +
 +
This time mythtv frontend will be available
 +
 +
Now configure it
 +
 +
  root@ltsp-server:~# ltsp-chroot
 +
 +
Update the settings for your backend, DBHostName and DBPassword will have to be changed.
 +
 +
  root@ltsp-server-chroot:/# vi /etc/mythtv/mysql.txt
 +
 +
This assumes you have a link from your local user home dir to the /etc/mythtv config dir
 +
 +
eg.
 +
 +
  /home/mythltsp/.mythtv/mysql.txt -> /etc/mythtv/mysql.txt
 +
 +
  root@ltsp-server-chroot:/# exit
 +
 +
==Create a new image==
 +
 +
  root@ltsp-server:~# ltsp-update-image --arch=i386
 +
 +
==Boot the LTSP client==
 +
 +
This time, mythtv frontend should connect to the backend.
 +
 +
==Enable auto login==
 +
 +
  root@ltsp-server:~# vi /var/lib/tftpboot/ltsp/i386/lts.conf
 +
 +
{{code_box|lts.conf|<pre>
 +
[Default]
 +
# Auto Login
 +
LDM_AUTOLOGIN = True
 +
LOCAL_APPS = True
 +
LDM_SESSION = "lightdm-gtk-greeter"
 +
 +
[192.168.92.120]
 +
LDM_USERNAME = mythltsp
 +
LDM_PASSWORD = mythltsp
 +
</pre>}}
 +
 +
==Boot the LTSP client==
 +
 +
This time, mythtv frontend should automatically login and connect to the backend.
 +
 +
=End of 32 bit LTSP Client Intructions=
 +
 +
 +
 +
 +
=Start of 64 bit LTSP Client Instructions=
 +
 +
==Create the initial client image==
 +
 +
  root@ltsp-server:~# ltsp-build-client --arch amd64
 +
 +
==Boot the LTSP client==
 +
 +
Try to login, if you get an error that gnome failed to load
 +
 +
  root@ltsp-server:~# ltsp-chroot
 +
  root@ltsp-server-chroot:/# apt-get install gnome
 +
  root@ltsp-server-chroot:/# exit
 +
 +
==Create a new image==
 +
 +
  root@ltsp-server:~# ltsp-update-image --arch amd64
 +
 +
==Boot the LTSP client==
 +
 +
Client boots and can now login.  MythTV is not installed
 +
 +
==Update repositories the client can use==
 +
 +
  root@ltsp-server:~# cp /etc/apt/sources.list /opt/ltsp/amd64/etc/apt/sources.list
 +
  root@ltsp-server:~# cp /etc/apt/sources.list.d/* /opt/ltsp/amd64/etc/apt/sources.list.d/
 +
 +
==Install MythTV Frontend==
 +
 +
  root@ltsp-server:~# ltsp-chroot
 +
  root@ltsp-server-chroot:/# apt-get update
 +
  root@ltsp-server-chroot:/# apt-get install mythtv-frontend
 +
  root@ltsp-server-chroot:/# exit
 +
 +
==Create a new image==
 +
 +
  root@ltsp-server:~# ltsp-update-image --arch amd64
 +
 +
==Boot the LTSP client==
 +
 +
This time mythtv frontend will be available
 +
 +
Now configure it
 +
 +
  root@ltsp-server:~# ltsp-chroot
 +
 +
Update the settings for your backend, DBHostName and DBPassword will have to be changed.
 +
 +
  root@ltsp-server-chroot:/# vi /etc/mythtv/mysql.txt
 +
 +
This assumes you have a link from your local user home dir to the /etc/mythtv config dir
 +
 +
eg.
 +
 +
  /home/mythltsp/.mythtv/mysql.txt -> /etc/mythtv/mysql.txt
 +
 +
  root@ltsp-server-chroot:/# exit
 +
 +
==Create a new image==
 +
 +
  root@ltsp-server:~# ltsp-update-image --arch amd64
 +
 +
==Boot the LTSP client==
 +
 +
This time, mythtv frontend should connect to the backend.
 +
 +
==Enable auto login==
 +
 +
  root@ltsp-server:~# vi /var/lib/tftpboot/ltsp/amd64/lts.conf
 +
 +
{{code_box|lts.conf|<pre>
 +
[Default]
 +
# Auto Login
 +
LDM_AUTOLOGIN = True
 +
LOCAL_APPS = True
 +
LDM_SESSION = "lightdm-gtk-greeter"
 +
 +
[192.168.92.120]
 +
LDM_USERNAME = mythltsp
 +
LDM_PASSWORD = mythltsp
 +
</pre>}}
 +
 +
==Boot the LTSP client==
 +
 +
This time, mythtv frontend should automatically login and connect to the backend.
 +
 +
==Optional: Install NVIDIA drivers==
 +
 +
Note: if your main LTSP server is 64 bit and your LTSP client is also 64 bit this step will work.  If your LTSP client is 32 bit you will need to work out how to install the 32 bit version of the nvidia driver.
 +
 +
  root@ltsp-server:~# ltsp-chroot
 +
 +
You must mount proc or you will get errors when you install the nvidia drivers
 +
 +
  root@ltsp-server-chroot:/# mount -t proc proc /proc
 +
  root@ltsp-server-chroot:/# apt-get install linux-headers-`uname -r`
 +
  root@ltsp-server-chroot:/# apt-get install nvidia-current nvidia-settings
 +
  root@ltsp-server-chroot:/# nvidia-xconfig
 +
 +
==Boot the LTSP client==
 +
 +
This time, the LTSP client should be using the NVIDIA drivers.  If you can't see the edges of your screen, you have a condition called "overscan".
 +
 +
Edit /etc/X11/Sxorg.conf
 +
 +
Add this to the bottom of the "Screen" section
 +
 +
    Option        "metamodes" "DFP-0: nvidia-auto-select +0+0,DFP-1: 1920x1080 { ViewPortIn=1920x1080, ViewPortOut=1820x1020+45+30 }"
 +
 +
  root@ltsp-server-chroot:/# exit
 +
 +
==Create a new image==
 +
 +
  root@ltsp-server:~# ltsp-update-image --arch amd64
 +
 +
==Boot the LTSP client==
 +
 +
You should now see the full menus on around the edges of your screen.
 +
 +
=End of 64 bit LTSP Client Instructions=
 +
 +
 +
 +
 +
= Troubleshooting =
 +
 +
==Make MythTV use the full screen when it launches==
 +
 +
There is a known issue with mythtv launching and not using the full screen.  A Compiz bug that was reported here:
 +
 +
  http://code.mythtv.org/trac/ticket/9589
 +
 +
Run these commands to implement a fix
 +
 +
  root@ltsp-server-chroot:/# apt-get install compizconfig-settings-manager
 +
  root@ltsp-server-chroot:/# exit
 +
 +
==Create a new image==
 +
 +
  root@ltsp-server:~# ltsp-update-image --arch=i386
 +
or
 +
  root@ltsp-server:~# ltsp-update-image --arch amd64
 +
 +
After the LTSP client has booted, login using the mythltsp user
 +
 +
Run the ccsm tool.
 +
 +
Under CompizConfig Settings Manager, go to "Utility"
 +
Go to "Work arounds"
 +
Check "Legacy Full Screen" support.
 +
 +
Navigate to utility/workarounds and then tick "Legacy Fullscreen support"
 +
 +
==Create a new image==
 +
 +
  root@ltsp-server:~# ltsp-update-image
 +
 +
==Boot the LTSP client==
 +
 +
Mythtv should now use the full screen.

Revision as of 00:46, 28 December 2013

This guide is based on Ubuntu 12.04

There are two parts to this guide. One part will have commands to install a 32-bit client, the other part will have commands to install a 64-bit client.

When you see this

 root@ltsp-server:~#

It means the commands should be executed on the LTSP server.

When you see this

 root@ltsp-server-chroot:/#

It means the commands should be executed on the LTSP server, but after you have run the chroot command ltsp-chroot. Chroot is type of isolated environment.

Assumptions

  1. Your mythtv server has an IP address of 192.168.1.100
  2. Your mythtv frontend is diskless, it will use a dhcp client address of 192.168.1.150
  3. You will create a new user called mythltsp
  4. Your mythtv server resolves DNS queries
  5. Your default router IP is 192.168.1.1
  6. Your mythtv server is not already serving DHCP
  7. You mythtv frontend has a mac address of 87:01:2a:ab:08:56


Install the LTSP Server Software

root@ltsp-server:~# apt-get install ltsp-server-standalone

Configure DHCP

Installing the ltsp server software will create a dhcpd config file /etc/ltsp/dhcpd.conf

You already have dhcpd running, this new file will override it.

Dhcpd is used to provide the client frontend with an IP address.


Script.png dhcpd.conf
authoritative;

# This will be the subnet your client will use.  Your server must have an interface serving this range.
subnet 192.168.1.0 netmask 255.255.255.0 {
    range 192.168.1.150 192.168.1.200;
    option domain-name "example.com";
    option domain-name-servers 192.168.1.100;
    option broadcast-address 192.168.1.255;
    option routers 192.168.1.1;
#    next-server 192.168.0.1;
#    get-lease-hostnames true;
    option subnet-mask 255.255.255.0;
    option root-path "/opt/ltsp/i386";
    if substring( option vendor-class-identifier, 0, 9 ) = "PXEClient" {
        filename "/ltsp/i386/pxelinux.0";
    } else {
        filename "/ltsp/i386/nbi.img";
    }

  host mythfront {
  # tftp client hardware address
  hardware ethernet 87:01:2a:ab:08:56;
  fixed-address 192.168.1.150;
  # Uncomment the line below if your client is 32-bit
  # filename "/ltsp/i386/pxelinux.0";
  # Uncomment the line below if your client is 64-bit
  filename "/ltsp/amd64/pxelinux.0";

 }

}

Restart DHCP

 root@ltsp-server:~# service isc-dhcpd-server restart

Build client settings

 vi /etc/ltsp/ltsp-build-client.conf
Script.png ltsp-build-client.conf

# ubuntu-desktop and edubuntu-desktop are tested.
# Ubuntu 12.04 LTS working perfectly with Unity and Unity 2D.
FAT_CLIENT_DESKTOPS="ubuntu-desktop"

# This uses the server apt cache to speed up downloading.
# This locks the servers dpkg, so you can't use apt on
# the server while building the chroot.
MOUNT_PACKAGE_DIR="/var/cache/apt/archives/"
 vi /etc/ltsp/ltsp-update-image.conf


Script.png ltsp-update-image.conf
#configuration file for ltsp-update-image
# Do not compress the client image. Comment out the line below to enable again.
NO_COMP="-noF -noD -noI -no-exports"

Set up Thin Client user

 root@ltsp-server:~# useradd -m mythltsp -G sudo mythtv
 root@ltsp-server:~# passwd mythltsp
 root@ltsp-server:~# su - mythltsp
 $ mkdir .mythtv
 $ cd .mythtv
 $ ln -s /etc/mythtv/mysql.txt mysql.txt
 $ ln -s /etc/mythtv/config.xml config.xml
 $ exit

Start of 32 bit LTSP Client Instructions

Create the initial client image

 root@ltsp-server:~# ltsp-build-client --arch i386

Boot the LTSP client

Try to login, if you get an error that gnome failed to load

 root@ltsp-server:~# ltsp-chroot
 root@ltsp-server-chroot:/# apt-get install gnome
 root@ltsp-server-chroot:/# exit

Create a new image

 root@ltsp-server:~# ltsp-update-image --arch=i386

Boot the LTSP client

Client boots and can now login. MythTV is not installed

Update repositories the client can use

 root@ltsp-server:~# cp /etc/apt/sources.list /opt/ltsp/i386/etc/apt/sources.list
 root@ltsp-server:~# cp /etc/apt/sources.list.d/* /opt/ltsp/i386/etc/apt/sources.list.d/

Install MythTV Frontend

 root@ltsp-server:~# ltsp-chroot
 root@ltsp-server-chroot:/# apt-get update
 root@ltsp-server-chroot:/# apt-get install mythtv-frontend
 root@ltsp-server-chroot:/# exit

Create a new image

 root@ltsp-server:~# ltsp-update-image --arch=i386

Boot the LTSP client

This time mythtv frontend will be available

Now configure it

 root@ltsp-server:~# ltsp-chroot

Update the settings for your backend, DBHostName and DBPassword will have to be changed.

 root@ltsp-server-chroot:/# vi /etc/mythtv/mysql.txt

This assumes you have a link from your local user home dir to the /etc/mythtv config dir

eg.

 /home/mythltsp/.mythtv/mysql.txt -> /etc/mythtv/mysql.txt
 root@ltsp-server-chroot:/# exit

Create a new image

 root@ltsp-server:~# ltsp-update-image --arch=i386

Boot the LTSP client

This time, mythtv frontend should connect to the backend.

Enable auto login

 root@ltsp-server:~# vi /var/lib/tftpboot/ltsp/i386/lts.conf


Script.png lts.conf
[Default]
# Auto Login
LDM_AUTOLOGIN = True
LOCAL_APPS = True
LDM_SESSION = "lightdm-gtk-greeter"

[192.168.92.120]
LDM_USERNAME = mythltsp
LDM_PASSWORD = mythltsp

Boot the LTSP client

This time, mythtv frontend should automatically login and connect to the backend.

End of 32 bit LTSP Client Intructions

Start of 64 bit LTSP Client Instructions

Create the initial client image

 root@ltsp-server:~# ltsp-build-client --arch amd64

Boot the LTSP client

Try to login, if you get an error that gnome failed to load

 root@ltsp-server:~# ltsp-chroot
 root@ltsp-server-chroot:/# apt-get install gnome
 root@ltsp-server-chroot:/# exit

Create a new image

 root@ltsp-server:~# ltsp-update-image --arch amd64

Boot the LTSP client

Client boots and can now login. MythTV is not installed

Update repositories the client can use

 root@ltsp-server:~# cp /etc/apt/sources.list /opt/ltsp/amd64/etc/apt/sources.list
 root@ltsp-server:~# cp /etc/apt/sources.list.d/* /opt/ltsp/amd64/etc/apt/sources.list.d/

Install MythTV Frontend

 root@ltsp-server:~# ltsp-chroot
 root@ltsp-server-chroot:/# apt-get update
 root@ltsp-server-chroot:/# apt-get install mythtv-frontend
 root@ltsp-server-chroot:/# exit

Create a new image

 root@ltsp-server:~# ltsp-update-image --arch amd64

Boot the LTSP client

This time mythtv frontend will be available

Now configure it

 root@ltsp-server:~# ltsp-chroot

Update the settings for your backend, DBHostName and DBPassword will have to be changed.

 root@ltsp-server-chroot:/# vi /etc/mythtv/mysql.txt

This assumes you have a link from your local user home dir to the /etc/mythtv config dir

eg.

 /home/mythltsp/.mythtv/mysql.txt -> /etc/mythtv/mysql.txt
 root@ltsp-server-chroot:/# exit

Create a new image

 root@ltsp-server:~# ltsp-update-image --arch amd64

Boot the LTSP client

This time, mythtv frontend should connect to the backend.

Enable auto login

 root@ltsp-server:~# vi /var/lib/tftpboot/ltsp/amd64/lts.conf


Script.png lts.conf
[Default]
# Auto Login
LDM_AUTOLOGIN = True
LOCAL_APPS = True
LDM_SESSION = "lightdm-gtk-greeter"

[192.168.92.120]
LDM_USERNAME = mythltsp
LDM_PASSWORD = mythltsp

Boot the LTSP client

This time, mythtv frontend should automatically login and connect to the backend.

Optional: Install NVIDIA drivers

Note: if your main LTSP server is 64 bit and your LTSP client is also 64 bit this step will work. If your LTSP client is 32 bit you will need to work out how to install the 32 bit version of the nvidia driver.

 root@ltsp-server:~# ltsp-chroot

You must mount proc or you will get errors when you install the nvidia drivers

 root@ltsp-server-chroot:/# mount -t proc proc /proc
 root@ltsp-server-chroot:/# apt-get install linux-headers-`uname -r`
 root@ltsp-server-chroot:/# apt-get install nvidia-current nvidia-settings
 root@ltsp-server-chroot:/# nvidia-xconfig

Boot the LTSP client

This time, the LTSP client should be using the NVIDIA drivers. If you can't see the edges of your screen, you have a condition called "overscan".

Edit /etc/X11/Sxorg.conf

Add this to the bottom of the "Screen" section

   Option         "metamodes" "DFP-0: nvidia-auto-select +0+0,DFP-1: 1920x1080 { ViewPortIn=1920x1080, ViewPortOut=1820x1020+45+30 }"
 root@ltsp-server-chroot:/# exit

Create a new image

 root@ltsp-server:~# ltsp-update-image --arch amd64

Boot the LTSP client

You should now see the full menus on around the edges of your screen.

End of 64 bit LTSP Client Instructions

Troubleshooting

Make MythTV use the full screen when it launches

There is a known issue with mythtv launching and not using the full screen. A Compiz bug that was reported here:

 http://code.mythtv.org/trac/ticket/9589

Run these commands to implement a fix

 root@ltsp-server-chroot:/# apt-get install compizconfig-settings-manager
 root@ltsp-server-chroot:/# exit

Create a new image

 root@ltsp-server:~# ltsp-update-image --arch=i386

or

 root@ltsp-server:~# ltsp-update-image --arch amd64

After the LTSP client has booted, login using the mythltsp user

Run the ccsm tool.

Under CompizConfig Settings Manager, go to "Utility" Go to "Work arounds" Check "Legacy Full Screen" support.

Navigate to utility/workarounds and then tick "Legacy Fullscreen support"

Create a new image

 root@ltsp-server:~# ltsp-update-image

Boot the LTSP client

Mythtv should now use the full screen.