2019-12-08 Linux VPS with TeamViewer

In 2017, I blogged about setting up a Linux VPS at Vultr, then installing TeamViewer. This is an admittedly uncommon thing to do; most Linux servers are administrated over SSH. However for remoting into a desktop usage, I find TeamViewer extremely user friendly on the client side. The client itself is excellent, includes copy/paste, file transfer, chat, and a host of features. And it works on multiple platforms.

Today I tried once more to set up a VPS at Vultr.com, with a Fedora 31 desktop and TeamViewer. Unfortunately, I can no longer get it working; TeamViewer installs fine but the client hangs upon connecting. I hope to update once I get it working.

Updated instructions for CentOS 8 are as follows. Note this fails for unknown reasons, see below.

Log in as root. First install the desktop, enable GUI to start after reboot, and download and install TeamViewer:

 # dnf groupinstall workstation
 # systemctl set-default graphical.target
 # wget "https://download.teamviewer.com/download/teamviewer.i686.rpm"
 # yum -y install ./teamviewer.i686.rpm

Edit the file /etc/gdm/custom.conf and remove the hash sign # before the line "WaylandEnable=false" so GDM uses X.org.

Add swapspace:

 # fallocate -l 1G /swapfile1
 # chmod 600 /swapfile1
 # mkswap /swapfile1
 # swapon /swapfile1

Add the following line to /etc/fstab:

 /swapfile1   swap    swap    sw  0   0

Add a user for yourself:

 # useradd -m -U mynewusername
 # passwd mynewusername

Add this new user to the sudo'ers file and reboot:

 # visudo
 # reboot

When done, reboot and log in at the Vultr website, because there, you can use your browser to access the graphical console. From there you can log into Gnome. It's important that you do this correctly; first click on the username. Now the password prompt appears. Next to the Sign In button, a settings icon appears. Click this icon, and make sure one of the options with "X11 display server" is selected! Continue to log in and you'll see the desktop. From here, you can start and configure TeamViewer.

Or at least, you should be able to. TeamViewer can be started, however the GUI never actually is displayed. The client will eternally hang in the "Connecting to <hostname>..." screen.