I work for a manufacturer of Styrofoam products. On our production floors it can be a very hostile environment for a full fledged PC, so we have always made heavy use of WYSE terminals and Terminal Servers. As you may know, WYSE terminals are not the cheapest things to buy, so when faced with the need to replace our 100+ aging terminals I started looking into alternatives. After a bit of research and trying out some products that failed miserably.. I decided to give the Pi3 a shot. With just a little bit of work, I now have several perfectly functional Raspberry Terminal Clients in our plants. So I thought I would share with you my setup. That way you too can recreate this cost saving tool for your own workplaces, or even your home... Assuming you have a Windows terminal Server at home.
So what is the benefit of going this route? Cost savings and a device that can withstand harsh environments and high temps. With this setup you have a Windows Desktop for under $90 that can be deployed in a matter of minutes. My scripts are setup to automatically connect to the Terminal server upon boot up. Also, if the user logs off the session on the terminal server, they will be instantly reconnected! Same if it loses internet connection at any point. Once the connection comes back, it reconnects.
So without further ado, here are the complete steps to recreate this on your own Pi3 running the latest Raspbian with Pixel.
Setup VNC Server for remote connections
Under Start>Preferences>Raspberry Pi Configuration
Go to interfaces and turn on VNC. This will autostart it. While there go to localization and set up all options there for timezone, keyboard, wireless, etc etc etc.
Then right click on the VNC icon in the toolbar and select options.
Set authentication to VNC password and encryption to prefer off. Click apply. Type in what you want for the password.
Under privacy, uncheck notify when user connects.
Under updates, uncheck allow VNC to check automatically.
Install RDesktop and configure it to auto launch at startup and to auto reconnect.
Sudo apt-get install rdesktop
To auto start terminal on boot from command line:
sudo nano .config/lxsession/LXDE-pi/autostart
add this line to the bottom
This will open the terminal upon login
To change what user it logs into, or to change what TS it logs into,
Sudo nano /home/pi/rdpstart
Put the following line in this new file, -d is the Domain -u is the username -p is the password -f tells it to go full screen. Change the Domain, username, password and terminal server name to match your setup.
while true; do rdesktop –d yourdomain –u username –p password –f terminalserverName; done
Sudo chmod +x /home/pi/rdpstart
Create the script to run rdpstart
Sudo nano superscript
In this file put ./rdpstart and save it
Sudo chmod 755 superscript
Next link this file to the ./bashrc so it runs when terminal is opened.
Sudo nano .bashrc
Go to the end of the file and put this line
Save and exit.
To get out of the rdp loop, to change functions.. Log off the Terminal server, then hit CTRL-C as soon as you see the terminal window and the linux desktop. This will cancel the script until the terminal is closed and opened again.
To disable Screen Sleep
sudo nano /etc/lightdm/lightdm.conf
Add the following lines to the [SeatDefaults] section:
# don't sleep the screen
xserver-command=X -s 0 dpms
To change the admin password
Sudo passwd root
Disable the sleep function on the wireless card.
sudo nano /etc/network/interfaces
Add new line with wireless-power off right BELOW the line iface wlan0 inet manual
Save and reboot your Pi. It will now connect to your terminal server and log in, so long as you put in the right info for the domain, username, password and terminal server name.
Thank you and I hope this helps someone,