VMWare Horizon Client - Dedicated Thin Client
Revision as of 14:32, 23 August 2017 by Michael.mast (talk | contribs)
With the cost of zero clients being as much as a standard computer, it made more sense to purchase commodity hardware and build from scratch.
This is my endeavor into building a poor man's zero client.
Requirements
- Audio, Video, and user input must work.
- USB Redirection must work for webcam usage.
- The only window the user's see is the Horizon Client.
- If the client is closed, it must auto-open again.
Install Script
WIP
Still need to work out the automated install of the client (there are two prompts at the end of installation), and the xorg.conf portion to allow for dual monitors without having to sit down at each unit.
##Install packeges yum -y install epel-release yum clean all yum makecache yum -y update yum -y install chrony wget yum-cron firewalld fail2ban oddjob oddjob-mkhomedir sssd samba-common realmd bind-utils htop bzip2 nano setroubleshoot setools openbox gdm xorg-x11-* gnome-terminal alsa-utils pcsc-lite-libs-1.8.8-6.el7 glibmm24-2.42.0-1.el7 gstreamer-plugins-base-0.10.36-10.el7 libpng12 libXScrnSaver ##Configure auto-login user and display manager systemctl enable gdm systemctl set-default graphical.target useradd publicuser mv /etc/gdm/custom.conf /etc/gdm/custom.conf.bak cat << EOF > /etc/gdm/custom.conf # GDM configuration storage [daemon] AutomaticLogin=publicuser AutomaticLoginEnable=True [security] [xdmcp] [greeter] [chooser] [debug] EOF ##Install VDI Client ln -s /usr/lib64/libudev.so.1 /usr/lib64/libudev.so.0 ln -s /usr/lib64/libffi.so.6 /usr/lib64/libffi.so.5 wget https://download3.vmware.com/software/view/viewclients/CART17Q1/VMware-Horizon-Client-4.4.0-5167967.x64.bundle ./VMware-Horizon-Client-4.4.0-5167967.x64.bundle --eulas-agreed --required
Notes
From the most awesome technical resource in these projects, Tanner said
Okay, I just thought of a much more minimal way to handle this. Let's systemctl disable gdm and directly modify the getty service to autologin your user at the TTY level. You'll need to install the Xorg xinit package. Then in the user's .bash_profile we run startx upon login. This way you can use xrandr to configure the display in the user's ~/.xinitrc. Let me break it down: First we override the getty systemd service with /etc/systemd/system/getty@tty1.service.d/override.conf: [Service] ExecStart= ExecStart=-/usr/bin/agetty --autologin user_name --noclear %I $TERM Then we add these lines to the end of /home/user_name/.bash_profile: if [[ -z $DISPLAY ]] && [[ $(tty) = /dev/tty1 ]]; then # Check if we have a display and we're on TTY1 startx fi And finally, make /home/user_name/.xinitrc look like this: xrandr --output HDMI2 --whatever_other_options_you_need --right-of HDMI1 exec openbox # or whatever DE/WM you use This method will use less resources and IMO XrandR is *much* better at configuring displays than xorg.conf. Also, I would uninstall the xorg-x11-drv-intel, the modesetting drivers work with intel display thingies just fine
Display Script
This is used for checking the currently detected displays and sorting them left to right based on the connection used. VGA -> DVI -> HDMI -> DP (the script is currently looking for dual monitors)
#!/bin/bash displaycheck () { if grep -qi $1 <<<$line; then if grep -qi $1\1 <<<$line; then if [ -z "$d1" ]; then d1=$1\1 elif [ -z "$d2" ]; then d2=$1\1 fi fi if grep -qi $1\2 <<<$line; then if [ -z "$d1" ]; then d1=$1\2 elif [ -z "$d2" ]; then d2=$1\2 fi fi fi } xrandr > /tmp/xout adisplay=$(sed '/disconnected/ d; /LVDS/ d' /tmp/xout | grep connected | awk '{print $1}') while read line do displaycheck VGA displaycheck DVI displaycheck HDMI displaycheck DP done <<<$adisplay xrandr --output $d1 --left-of $d2 exit 0 ####For Reference Screen 0: minimum 8 x 8, current 3360 x 1050, maximum 32767 x 32767 LVDS1 connected (normal left inverted right x axis y axis) 1280x800 60.05 + 1024x768 60.00 800x600 60.32 56.25 640x480 59.94 640x400 60.00 DP1 disconnected (normal left inverted right x axis y axis) DP2 disconnected (normal left inverted right x axis y axis) DP3 disconnected (normal left inverted right x axis y axis) HDMI1 connected 1680x1050+0+0 (normal left inverted right x axis y axis) 474mm x 296mm 1680x1050 59.88*+ 1280x1024 75.02 60.02 1152x864 75.00 1024x768 75.03 60.00 800x600 75.00 60.32 640x480 75.00 59.94 720x400 70.08 HDMI2 connected 1680x1050+1680+0 (normal left inverted right x axis y axis) 474mm x 296mm 1680x1050 59.88*+ 1280x1024 75.02 60.02 1152x864 75.00 1024x768 75.03 60.00 800x600 75.00 60.32 640x480 75.00 59.94 720x400 70.08 VGA1 disconnected (normal left inverted right x axis y axis) VIRTUAL1 disconnected (normal left inverted right x axis y axis)