VMware Horizon View Linux Ubuntu LTSP Thinclient

Focus here is not how tho setup a LTSP infrastructure but how to build a LTSP image to be used as a thin client for VMware Horizon View. PXE, tftp NBD is not discussed here.

We use the standard LTSP setupĀ process, since this is the fastest way to get up and running . You need also to download the vmware linux view client. Some steps could contain errors, but you can use this as a guideline. I used 12.04 LTS for the ltsp image and 14.04 for the server.

Many ideas and code borrowed hereĀ https://github.com/leschartreux/ltsp-vmview , thank you!

Download the latest x86 VMware View Client bundle for linux


ltsp-build-client --arch i386 --kiosk --skipimage --dist precise --chroot ltsp-vmview
chmod a+x VMware-Horizon-Client-xxxxx.x86.bundle
cp VMware-Horizon-Client-xxxxx.x86.bundle /opt/ltsp/ltsp-vmview/root/
ltsp-chroot --arch ltsp-vmview /root/VMware-Horizon-Client-xxxxx.x86.bundle

You should get an output similar to this one and I did choose those options:

Smart Card(The Smart Card component enables Smart Card device
redirection from your local computer to the remote desktop.) [yes]: no

Real-Time Audio-Video(The Real-Time Audio-Video component allows you
to use local computer's webcam or microphone on the remote desktop.)
[yes]: no

Client Drive Redirection (Tech Preview)(The Client Drive Redirection
component enables folder redirection from your local computer to the
remote desktop.) [no]:

USB Redirection(The USB component enables USB device redirection from
your local computer to the remote desktop.) [yes]:

Virtual Printing(The Virtual Printing component allows you to use
local or network printers from a remote desktop without requiring that
additional print drivers be installed in the remote desktop.) [yes]: no

The product is ready to be installed:
USB Redirection
PCoIP
Horizon Client

Proceed the with some additional packages and setup:


ltsp-chroot --arch ltsp-vmview apt-get install libxss1 openssl openssh-server hsetroot matchbox flashplugin-nonfree libv4l-0 libudev0 libv4l-0 libudev0 libudev0 dvsource libv4l-dev acpid --yes

ltsp-chroot --arch ltsp-vmview ln -s /usr/lib/vmware/view/usb/libssl.so.1.0.1 /lib/i386-linux-gnu/libssl.so.1.0.1
ltsp-chroot --arch ltsp-vmview ln -s /usr/lib/vmware/view/usb/libcrypto.so.1.0.1 /lib/i386-linux-gnu/libcrypto.so.1.0.1
ltsp-chroot --arch ltsp-vmview ln -s /lib/i386-linux-gnu/libexpat.so.1 /usr/local/lib
ltsp-chroot --arch ltsp-vmview adduser --disabled-password view
ltsp-chroot --arch ltsp-vmview adduser view audio
ltsp-chroot --arch ltsp-vmview adduser view pulse
ltsp-chroot --arch ltsp-vmview adduser view pulse-access

ltsp-chroot --arch ltsp-vmview mv /etc/rc2.d/S50vmware-USBArbitrator /etc/rc2.d/S90vmware-USBArbitrator
ltsp-chroot --arch ltsp-vmview mv /etc/rc2.d/S55vmware-view-USBD /etc/rc2.d/S99vmware-view-USBD

Now it’s time to create some files:

ltsp-chroot --arch ltsp-vmview vi /etc/vmware/.xinitrc

matchbox-window-manager &
xset s off         # don't activate screensaver
xset -dpms         # disable DPMS (Energy Star) features.
xset s noblank     # don't blank the video device
exec /usr/bin/vmware-view  --allmonitors -l -s https://brooker.fqdn -d LOGINDOMAIN
shutdown -h now

ltsp-chroot --arch ltsp-vmview vi /etc/lts.conf

[default]
XKBLAYOUT="de"
CONSOLE_KEYMAP="de"
SCREEN_02="vmview"
KEEP_SYSTEM_SERVICES="acpid upstart-socket-bridge"

ltsp-chroot --arch ltsp-vmview vi /usr/share/ltsp/screen.d/vmview

#!/bin/sh
#
# The following script works for LTSP5 and was tested in Ubuntu 9.10 (Karmic Koala) Linux.
# Original rdesktop script by James A. McQuillan,
# modified for LTSP5 by Colin Osterhout of SERRC (www.serrc.org).
# modified for VMWare View Open Client by
#   Mikael Fridh 
#
# This software is licensed under the Gnu General Public License.
# The full text of which can be found at http://www.LTSP.org/license.txt


PATH=/bin:$PATH; export PATH
. /usr/share/ltsp/screen-x-common

if [ -x /usr/share/ltsp/xinitrc ]; then
    xinitrc=/usr/share/ltsp/xinitrc
fi

mkdir /home/view/
cp /etc/vmware/.xinitrc /home/view/
chown -R view  /home/view/
su - view -c "xinit" >/dev/null

ltsp-chroot --arch ltsp-vmview chmod a+x /usr/share/ltsp/screen.d/vmview

ltsp-chroot --arch ltsp-vmview vi /etc/vmware/view-mandatory-config

view.kbdLayout="de"
view.sslVerificationMode="3"
view.autoConnectBroker="https://brooker.fqdn" 

Now build the image
ltsp-update-image ltsp-vmview
And you are ready to deploy