I’ve recently got my local camera working through thinlinc to my server so that I can use video conferencing software within my thinlinc session. The sharing of serial devices in thinlinc doesn’t work for USB webcams as they require special support. As far as I can tell there is no direct support for sharing your webcam/USB camera through thinlinc. I’m putting this guide here to help others get it working.
Assuming your client is running linux (debian) and so is your server here is the solution I came up with;
Setup client with camera sharing
a. Install USBIP
: sudo apt install usbip
b. Load USBIP host kernel module
: sudo modprobe usbip_host
Add to /etc/modules in the LTSP-buster-fat-client image.
: usbip_host
c. Scan using usbip and take note of the BUSID
: sudo usbip list -l
Take note of the busid of the camera
d. Share camera
: sudo usbip bind --busid=
eg;
: sudo usbip bind --busid=1-2
NOTE: The busid can change if you move around the USB slot. So
might be best to label the slot on staff computers for 'camera'
so it doesn't move.
e. Start daemon
: sudo usbipd
Setup Server to link to camera
a. Install usbip
: sudo apt install usbip
b. Start vhci-hcd driver
: sudo modprobe vhci-hcd
Add to /etc/modules
: vhci-hcd
c. Connect to camera on client
: sudo usbip attach -r -b
eg;
: sudo usbip attach -r 192.168.0.77 -b 1-2
Please note that my thinlinc clients are diskless workstations which are on the LAN, for this to work remotely you would need to port forward the relevant ports back to your client so that the server could attach to the USB directly.
I hope this tutorial will help people and maybe help Cendio create a more integrated solution for this problem.
Currently I’m using ssh with X11 forwarding back to the persons workstation instead of the USBIP as I’ve found it more reliable.
EG;
$ ssh -YC zoom
Again with bandwidth this is not an issue at work, we run a 10Gbps lan and we only have 10 computers so it’s pretty good. You could however use trickle to limit bandwidth and I’ve used it in the past for wrapping other applications. Example of limiting to 1.5Mbps;
Might do the trick but I haven’t tested these two commands.
NOTE: I’ve even created a little wrapper for each program so that users can click on a zoom invitation within thinlinc and it will automatically start the zoom application on the thinclient and display that within their thinlinc desktop;
Wrapper;
#!/usr/bin/env bash
#
# Author: Michael Pope
# Date: 29/07/2021
#
# Description: This is a shell wrapper which starts zoom on staff's
# thinclient instead of LTSP. The original zoom binary is called
# /usr/bin/zoom.original
LOG="/home/$USER/zoom.log"
# Escape characters from link
printf -v link "%q" "$1"
echo $link >> ~/diagnostics.log
# Get IP address of thinclient from thinlinc session
IP=`tl-session-param /client_ip`
echo "Using the following to connect" > $LOG
echo "ssh -Y $USER@$IP zoom $link" >> $LOG
# Call zoom passing the link to my thinclient
ssh -Y $USER@$IP zoom $link
This same wrapper is used for other video conferencing programs such as skype, ms teams and jitsi (through google-chrome on the users machine).
We have a 10Gbp link to our server and only run 6 thinlinc sessions to fast thin clients (with i7 processors and 16GB RAM) and run Logitech C720 USB cameras through a nice HP managed switch. So our system is over-specced.
If you are having issues with audio latency I would recommend using the compression ‘-YC’ flags on the ssh, measuring performance of your network using iperf, test with just one person connected to your thinlinc server on a fast client with a fast network to see if it has problems.
I use Debian 10 64bit with XFCE WM over PXE boot using the LTSP software. I’ve been using it at multiple locations now for over 10 years. The build image which is created has the thinlinc client installed and it’s very easy to maintain. The LTSP team are very welcoming and have helped me a lot over the years through the IRC channel.
@map7 What version of TL server and clients were you running in 2021 and what version are you running now? Has TL 4.14 improved the process you offered above?
We’re looking to enable Zoom for our practice manager with an HP conference monitor, certified for Zoom. Running the TL client on an HP ThinPro OS T530 thin client.
I’m using TL 4.14 on the server. I still use ssh with X11 forwarding and it’s reliable and works well. Not the ultimate solution I’m after, it would be better if Thinlinc offered this as part of the package.
The ssh solution I’m currently using will only work when at the office, when working remote we don’t have direct access to ssh back to. This could be done with port forwarding or tailscale or something but I haven’t had the need.