Set up the Remote Screen via X11

Set up the Remote Screen via X11

October 9, 2020
TeamViewer IoT Documentation

The Remote Screen via X11 allows you to see what is displayed on the screen of the edge device and to control it. This is helpful to maintain the device without connecting a monitor or other peripherals.

Using this feature disables the Remote Screen to monitor.

What you will need

Make sure that you have prepared the following points:

Setup

  1. Access the edge device remotely (Access the Edge Device via Remote Terminal).
  2. Install the virtual framebuffer. Type in the following command and press return.
sudo apt update && sudo apt install xvfb -y
  1. Run the virtual framebuffer with a display port 1 resolution of 1280x1024 pixels and a color depth of 24 bit. Type in the following command and press return.
Xvfb -ac :1 -screen 0 1280x1024x24 & 
  1. To run the virtual framebuffer on every reboot of the edge device modify the global crontab file with the nano editor.
sudo nano /etc/crontab
  1. Add the following lines at the end of the file:
#X virtual desktop
@reboot pi Xvfb -ac :1 -screen 0 1280x1024x24
  1. Save the file and close the nano editor.
  2. To use the display port on every login to the edge device modify the personal session file with the nano editor.
sudo nano /home/pi/.bashrc
  1. Add the following lines at the end of the file:
#run export display
export DISPLAY=:1
  1. Save the file and close the nano editor.
  2. Activate the modifications. Type in the following command and press return.
source ~/.bashrc
  1. Restart the TeamViewer IoT Agent. Type in the following commands and press return:
sudo teamviewer-iot-agent configure set EnableRemoteScreen 1
sudo teamviewer-iot-agent configure set RemoteScreenChannels "X11"
sudo teamviewer-iot-agent restart

The setup is complete. You can access the edge device with your TeamViewer Client now.

When accessing the edge device, the user who works on said device gets a notification. You can customize the notification.

Troubleshoot

No screen / the wrong screen is displayed

After accessing the edge device via TeamViewer client no screen or the wrong screen is displayed.

This occurs when your device uses multiple displays.

  1. Access the edge device remotely (Access the Edge Device via Remote Terminal).
  2. Replace 12 with the correct display number. Type in the following commands and press return:
 sudo teamviewer-iot-agent configure set RemoteScreenChannels "X11:12:pi"
sudo teamviewer-iot-agent restart

Related posts

Want more? Exclusive deals, the latest news: Our Newsletter!