How to proper install ThinLinc Server on openSUSE Tumbleweed KDE and some hints that may help with other distros

Hi there

I’ve decided to create this guide because I had some problems when installing ThinLinc on openSUSE Tumbleweed KDE, but now I know what was wrong that prevented me to get it working out of box. The ThinLinc Remote Desktop should install fine on a lot of Linux Distros, but we need to pay attention to some details in case it doesn’t work. So, despite having rpm packages that install easily, tl-setup may encounter some problems and you won’t be able to start the ThinLinc server until you fix the problems.

ThinLinc on fresh openSUSE Tumbleweed: proper way to install

I got a new machine and decided to fresh install openSUSE Tumbleweed and set it up to use ThinLinc and VirtualGL for remote access. Despite being a long time openSUSE user and already having some experience on using ThinLinc and VirtualGL before, I had some struggles that I wasn’t expecting. So, I decided to document the problems encountered and what I had to do to fix them, because I was hoping it would work right out of the box and it was more tricky than I expected.

OpenSUSE Tumbleweed installation:

I got the NET Installer (on January 12th 2022) because Tumbleweed is a rolling release distro and I think that it makes no sense to download a full DVD installer if the packages will get old very fast… This way, the fresh installed system would be updated to the last packages out of the box.

Installed the system in Brazilian Portuguese (guess where I’m from) and chose the US International keyboard map because that’s the keyboard layout that I’m going to use.

I’m used to LXDE, but for this fresh install I decided to go with KDE Plasma to check how it would perform on the new machine… and that’s great because one of the struggles I think may be related to missing some GTK packages and default login manager SDDM.

Formatted the SSD to EFI partition plus swap and BTRFS root.

Enabled SSH and opened the SSH port on the installer last step (because ThinLinc is going to use it).

Out-of-box struggles
After the installation, I expected that installing ThinLinc and VirtualGL would be as simple as downloading and installing the ThinLinc server and installing VirtualGL from the openSUSE official repo. But then I found some problems that took me some time to fix. Here is a step by step installation with some advice on what to do and what not. Here we go:
Starting with ThinLinc installation because it’s the main program of our tutorial. It’s going to let us use our computer remotely as if we were sitting in front of it. On openSUSE Tumbleweed there’s some things to pay attention to.

ThinLinc Server installation from command line - CLI

  1. Download and unzip ThinLinc Server Installer. At Cendio’s ThinLinc Download page, is the button “Download ThinLinc Server bundle” under the “For Administrators - ThinLinc Server (Linux only)”. It comes as a zip file. Unzip it and there are two installers: one GUI and one CLI:
    1

  2. For the CLI installer, run the install-server script as root or with sudo. If you want the GUI installer, open a file browser and double-click the “Click to Install.desktop”. The GUI installer will have the same options listed here and the pictures are provided in the next chapter.
    2

  3. It will install the ThinLinc packages (rpm version because it detected that I’m running openSUSE):
    3

  4. After the screen above, it’s going to propose you to run the tl-setup and configure ThinLinc, but to save you some time say NO and run it afterwards because it won’t be able to successfully configure it and start the needed services. Why? Because the openSUSE team decided to move some parts of the system to the /usr/ folder on Tumbleweed. If you’re using Leap, I guess that it should be ok for you to just continue because Leap 15.3 still didn’t move parts of the system to under /usr/. Here’s the question and if you’re on Tumbleweed, say NO and let fix it first on the next step:
    4

  5. Here’s what you need to fix on Tumbleweed (and maybe Leap 16 or some Leap versions after 15.3): At some point, openSUSE devs decided that part of the system should be moved under /usr/ folder. In our case, the file /etc/pam.d/sshd was moved to /usr/etc/pam.d/sshd and ThinLinc’s tl-setup is searching for it in the wrong place. To workaround, create a “symlink” that points to the right file in the place where tl-setup thinks it is located by running “ln -s /usr/etc/pam.d/sshd /etc/pam.d/sshd”. Here’s what I did:
    5

  6. Now that the symlink exists, running tl-setup won’t give you any trouble. Run tl-setup as root (should be in your PATH, but you may also use the full path: /opt/thinlnc/sbin/tl-setup). There are few steps and it’s very quick to get it working, here you go: tl-setup as root on opensuse will open the text mode. If you want the GUI, maybe “xdg-su -c tl-setup” as a normal user will bring you the GUI version with the same options. Let’s use the CLI tl-setup for now:

  7. Accept the License Agreement

  8. For a simple installation, when you want to have a single machine being accessed remotely, install the Master and that’s it. Both the Master AND Agent roles will be running on the same machine. If you have more than one machine and want to build a distributed remote access cluster with more features such as load balance and other things, then you should have one Master and multiple agents that will work together with the master. In our case, This is the only machine, so, I’m choosing Master (and it will also have an Agent running, I’ll explain later when talking about machines under NAT). Default is Master

  9. Ok, so, here’s a catch: The CLI and GUI for installers and tl-setup should work the same, with same options and steps, but turns out that for openSUSE Tumbleweed KDE (and other non GTK based Window Managers maybe), there are some missing GTK+ dependency. The GUI installer and GUI tl-setup are going to warn you and ask you if it should install those dependencies for you, along with the command line that is going to be run. BUT the CLI installer and CLI tl-setup will just warn you about GTK+Dependency. I’ve tested without installing those dependencies and the only thing that I missed was the welcome screen when the client connects to the remote machine, but I’m not sure if there are other problems. To save you some time, for openSUSE Tumbleweed, the GTK+ dependencies that you have to install are: typelib-1_0-Gtk-3_0 and python3-gobject-Gdk and you may install both by running “sudo zypper install typelib-1_0-Gtk-3_0 python3-gobject-Gdk” on another terminal or after finishing tl-setup. The above package names will appear on the GUI version of tl-setup and it will ask you if it should install it for you. I’ll provide the GUI image later. Run “sudo zypper install typelib-1_0-Gtk-3_0 python3-gobject-Gdk” inside another terminal or after finishing tl-setup.

  10. The dependencies may vary from distro to distro… on openSUSE Tumbleweed you should get this another dependency warning… but this time, tl-setup will offer to install it for you. Accept it please.



  11. Fill in your e-mail for administrative messages. I’m not sure if this works for the ThinLinc Server to send messages or if Cendio is collecting your e-mail for the case if you’re buying a ThinLinc license. As a free user, they never sent me an e-mail or SPAM. ThinLinc is free for up to 5 simultaneously connected users per domain.

  12. ThinLinc has a web administration tool that provides you with some reports and configurations. It’ll run on port 1010 on your Master. You can set a password for the “admin” user or skip it.

  13. With ThinLinc, a client may print to their local printers from the remote machine and it also can detect the correct printer based on your location. I’ve never tested this feature, but it will add two printer queues that will show when you try to print (locally or remotely).


  14. If you’re using a supported firewall, it will offer to open ThinLinc needed ports: Accept it or check if the ports are open on your firewall.


  15. It will also offer to configure your AppArmor if you’re using it


  16. And now you should see this message saying that you’ve finished setup…

  17. … and it is going to start the services and confirm that it’s up and running

  18. If instead of the picture above you get an error message like this one below, check the tl-setup log to figure out what was the problem:

The log is located at “/var/log/tlsetup.log”.

For example: If you didn’t create the symlink for pam.d/sshd on step 5, your log will have a message like this one below:

For this error example above, to fix it, create the symlink for /etc/pam.d/sshd as described in step 5 and run tl-setup again. The reason for the failure is because ThinLinc is going to create a /etc/pam.d/thinlinc symlinking it to /etc/pam.d/sshd, which was moved to /usr/etc/pam.d/sshd on openSUSE Tumbleweed. Other distros may not have this problem. Here’s the log file for tl-setup if the sshd symlink was made (or if the distro didn’t move it elsewhere) and everything was ok:

ThinLinc Server installation from graphical user interface - GUI

  1. If instead of using the “install-server” CLI script you double-click the “Click to Install.desktop” file (that was extracted from the zip file at Cendio’s ThinLinc Download page, is the button “Download ThinLinc Server bundle” under the “For Administrators - ThinLinc Server (Linux only)”.

  2. On openSUSE Tumbleweed KDE (and maybe some distros/window manager combinations), the installer will complain about missing GTK+ Dependencies just like in CLI’s step 6, except that it will provide you the package names, the full zypper command to install them and also will offer to install it for you!

The only mistake is that after opening this terminal and installing the needed dependencies, It will ask you to restart install-server. Instead of install-server, double-click “Click to Install.desktop” again…



And now it should suggest that you continue as root…

  1. The following screens are going to have a corresponding CLI screen. Please go up and refer to the CLI installation guide: The screen below for example is equal to CLI’s installer step 2:


    And then the following screens will be the same as CLI’s step 3, 4, but in GUI.
    Please, pay attention to CLI’s installer step 5, as it is not done under ThinLinc installer, but at a Linux terminal. If your distro doesn’t have file /etc/pam.d/sshd, step 5 is about creating the symlink pointing to where your distro keeps sshd. As we are talking based on openSUSE Tumbleweed, it’s now located at /usr/etc/pam.d/sshd. ThinLinc needs /etc/pam.d/sshd because it’s going to create /etc/pam.d/thinlinc pointing to sshd. If your distro puts it elsewhere, it will result in an error.

  2. Continue the steps reading the info from the CLI guide as it should be the same. After finishing, You should have a working ThinLinc Server on your machine.

What happens if I don’t install the dependencies?
I’m not sure which dependencies are really needed and for what, but for example, if you don’t install the GTK+ dependencies, clients connecting to your ThinLinc Server won’t get the “ThinLinc Welcome Screen”. The Welcome Screen for example is where the user may choose the session’s desktop environment if more than one is provided. Please install the dependencies to avoid conflicts.

ThinLinc Server on other distros and desktop environments:
Both CLI and GUI installers should work with more or less the same steps. I’ve installed on openSUSE Leap 15.3 LXDE and Linux Mint 20.3 Cinnamon and the differences were minimal. Leap 15.3 for example still has sshd located at /etc/pam.d/sshd, so the symlink is not needed. Maybe in the future it moves it elsewhere, but for now, this CLI tutorial’s step 5 is not needed (it’s not going to let you replace the file for a symlink, don’t insist or try to remove the file before!). Also, I don’t remember that there were GTK+ dependencies, maybe because I’m using LXDE.
Mint 20.3 installed .deb packages instead of .rpm ones (because those are the kind of packages that it uses) and had other dependencies, but not GTK+. Also, the sshd symlink was not needed. I still didn’t try to install ThinLinc on a distro that uses another kind of package (i.e. not RPM or DEB).

How about the ThinLinc Client? How do I access my ThinLinc Server?
It’s not the main focus of this document, but Cendio provides you with ThinLinc Clients for WIndows, Mac and Linux machines at their download page, for different system architectures and package types. By default, your ThinLinc Server is also going to have a browser client running on it that you can reach at port 300 from any HTML5 capable browser without installing anything to your client, just open a web browser and try https://ThinLincServer’sIP:300 .
The installed clients however have more options. Just install, open and try to connect to your ThinLinc Master Server’s IP. If you’re on the same network or your Master has a public IP Address, it’s very simple. If you’re under NAT, please, read these links:
https://www.reddit.com/r/homelab/comments/qkrhv6/i_shared_the_better_computer_at_home_with_my/ My personal ThinLinc use case and some performance comparison
Both have my workaround using SSH Tunneling to reach a ThinLinc server under NAT and configuring the HOST_ALIASES parameter for the client. The reddit link also has a reference video that covers it in detail. You may also check Cendio’s official guide for servers under NAT: 3.3.  Preparing the Network for ThinLinc Installation .

And that’s it for now. Next I’m going to post a tutorial for VirtualGL on top of this same ThinLinc Server installation for hardware accelerated graphics on OpenGL applications over ThinLinc Remote Desktop.

Thanks

2 Likes

Hi @VirusABC! Thanks for sharing your experience here in the community. Great job! :slight_smile:

1 Like

Update

As promised, I’ve made a VirtualGL install and configuration guide based on this instalation, but may help with other distros. Check Here: VirtualGL Guide

Also, here’s a kind of testing and troubleshooting (sanity check) that I made:

Testing if everything is working fine
The easiest way to test is to go to another computer on the same network, install ThinLinc client and try to connect to your ThinLinc Server. If you were configuring it remotely through SSH and your machine is behind a NAT, you should read the “How about the ThinLinc Client? How do I access my ThinLinc Server?” section in this guide.

1. Open your ThinLinc Client in another computer and input the server address, username and password:

2. You should see the ThinLinc’s welcome screen:


If you instead only see a blue screen like below and then you log in to the system, possibly it means that you didn’t install the GTK+ Dependencies:

I don’t know if there are some other problems, but if you want to fix it, refer to the ThinLinc Server installation on this guide.

3. You now are remotely connected to your ThinLinc Server

What if it’s not working?
I’ve been through this and it took me some time to figure out what was wrong. Here are some screens that represent that something is wrong. If you can reproduce some of them, maybe you have to check if everything was installed according to this guide.

1. Missed to install GTK+ Dependencies for ThinLinc: You’re not going to be able to run Click to Install.desktop and use GUI Installer and you’re not going to see the ThinLinc’s Welcome screen. To fix it, refer to step 9 on the ThinLinc Server Installation CLI or step 2 on the ThinLinc Server Installation GUI on this guide.

2. No sound on local machine or remote machine: ThinLinc sets pulseaudio to forward the sound from the remote to the client machine. However I’ve experienced that a local login concurrently with a remote ThinLinc session for the same user could make the sound stop for the local user. To fix that, the local user could kill pulseaudio (pulseaudio -k) and restart it (pulseaudio -D). That happened a lot when I left the computer at the TV and remotely accessed it through ThinLinc using the same username simultaneously. I don’t recommend you to have a local and a remote graphical login to prevent those small bugs.

3. Some application refuses to open because it says that I don’t have a compatible GPU or game simply doesn’t work or FPS rate is very slow
OpenGL applications (including games) need that ThinLinc server machine has VirtualGL configured so that it can use hardware accelerated graphics properly. Check VirtualGL configuration for GPU hardware accelerated graphics on ThinLinc

How about Steam Games? Is it possible?
Some OpenGL games will work hardware-accelerated on VirtualGL and ThinLinc, but you have to set the “LAUNCH OPTIONS” for that game. You’re going to get some frameskips because of the way ThinLinc sends the images, but there is a workaround. I’ve made a Reddit post that teaches and demonstrates how to do it in detail - https://www.reddit.com/r/homelab/comments/qkrhv6/i_shared_the_better_computer_at_home_with_my/ and a video - ThinLinc+VirtualGL+Steam Link: Headless Remote Desktop Gaming Linux Machine - YouTube . Other games may also be playable, but I didn’t test it.

1 Like

Hi, first of all thanks a lot for the detailed guide.
I’ve followed every single step, including the pam.d symlink creation, but I still have the problem during setup (“Cannot find a suitable PAM Configuration file”).

Any help?

Thanks,
Mirko

Hi Mirko

Can you please doublecheck if

ls -lah /etc/pam.d/sshd

results into something like

lrwxrwxrwx 1 root root 19 set 16 2022 /etc/pam.d/sshd → /usr/lib/pam.d/sshd

Also, /usr/lib/pam.d/sshd should exist (it will not be red or another color indicating that it is pointing to a missing file. I’ve checked that file /usr/lib/pam.d/sshd on tumbleweed comes from package openssh-server: check if openssh-server is installed (sudo zypper in openssh-server)

If the symlink above is right and openssh-server is installed, can you try running tl-setup again? If it fails, can you show us your /usr/lib/pam.d/sshd contents and check your /var/log/tlsetup.log?

I’m still using and older version of ThinLinc server on this machine, if your problem persists after checking all the points above, I’ll try installing the most up-to-date version to see if TW changed something again.

1 Like