<main>
<article class="userContent">
<p><em>This article applies to all TeamViewer IoT users and requires TeamViewer client version 14 or higher.</em></p><h2 data-id="general">General</h2><p>TeamViewer's IoT remote screen feature allows a user to access the screen attached to a remotely accessed device with the TeamViewer IoT agent installed on it.</p><p>TeaViewer IoT currently enables screen grabbing in 3 ways</p><ol><li>By accessing the session of an X11 server</li><li>By accessing the framebuffer</li><li>By providing access of <a href="https://community.teamviewer.com/t5/TeamViewer-IoT-Knowledge-Base/Remote-screen-grabbing-for-Qt-applications/ta-p/73237" rel="nofollow noreferrer ugc">QT applications</a> through an SDK which can be included in the app.</li></ol><p>Access can be either read or write depending on the configuration. For framebuffer only read access is possible.</p><p><strong>Note</strong>: To use this feature TeamViewer 14 or a higher version must be used to connect to the device</p><p> </p><h2 data-id="x11-server">X11 Server</h2><p>Connect with the <em>TeamViewer</em> client to the device and use <em>Remote Terminal</em></p><div class="embedExternal embedImage display-large float-none">
<div class="embedExternal-content">
<a class="embedImage-link" href="https://us.v-cdn.net/6032394/uploads/lithium_attachments/11938iF10A0D24A108BEC3.jpg" rel="nofollow noreferrer noopener ugc" target="_blank">
<img class="embedImage-img" src="https://us.v-cdn.net/6032394/uploads/lithium_attachments/11938iF10A0D24A108BEC3.jpg" alt="1.png" height="180" width="320" loading="lazy" data-display-size="large" data-float="none"></img></a>
</div>
</div>
<p> </p><p>Run these commands:</p><pre class="code codeBlock" spellcheck="false" tabindex="0">sudo apt update
sudo apt install xvfb
</pre><div class="embedExternal embedImage display-large float-none">
<div class="embedExternal-content">
<a class="embedImage-link" href="https://us.v-cdn.net/6032394/uploads/lithium_attachments/11940i00515EE990B97183.jpg" rel="nofollow noreferrer noopener ugc" target="_blank">
<img class="embedImage-img" src="https://us.v-cdn.net/6032394/uploads/lithium_attachments/11940i00515EE990B97183.jpg" alt="2.png" height="180" width="320" loading="lazy" data-display-size="large" data-float="none"></img></a>
</div>
</div>
<p><br></p><p> </p><p> </p><p><em> </em></p><p><br></p><pre class="code codeBlock" spellcheck="false" tabindex="0">Xvfb -ac :1 -screen 0 1280x1024x24 &
</pre><p>This will start virtual x with specified display parameters</p><div class="embedExternal embedImage display-large float-none">
<div class="embedExternal-content">
<a class="embedImage-link" href="https://us.v-cdn.net/6032394/uploads/lithium_attachments/11941iD3CBADF87DBD5006.jpg" rel="nofollow noreferrer noopener ugc" target="_blank">
<img class="embedImage-img" src="https://us.v-cdn.net/6032394/uploads/lithium_attachments/11941iD3CBADF87DBD5006.jpg" alt="3.png" height="180" width="320" loading="lazy" data-display-size="large" data-float="none"></img></a>
</div>
</div>
<p> </p><p>For this command to run after the restart of the device you can add a crontab. From remote terminal run:</p><pre class="code codeBlock" spellcheck="false" tabindex="0">sudo nano /etc/crontab
</pre><p>add these lines:</p><p><em>#X virtual desktop</em></p><p><a href="https://community.teamviewer.com/t5/user/viewprofilepage/user-id/172110" rel="nofollow noreferrer ugc"><em>@reboot</em></a><em> pi Xvfb -ac :1 -screen 0 1280x1024x24</em></p><div class="embedExternal embedImage display-large float-none">
<div class="embedExternal-content">
<a class="embedImage-link" href="https://us.v-cdn.net/6032394/uploads/lithium_attachments/11943i67DBC36EDBA8B3F2.jpg" rel="nofollow noreferrer noopener ugc" target="_blank">
<img class="embedImage-img" src="https://us.v-cdn.net/6032394/uploads/lithium_attachments/11943i67DBC36EDBA8B3F2.jpg" alt="4.png" height="180" width="320" loading="lazy" data-display-size="large" data-float="none"></img></a>
</div>
</div>
<p> </p><p>After you write down the commands press Ctrl + X and input character Y to save the file and then hit enter.</p><p>Next, from remote terminal run:</p><pre class="code codeBlock" spellcheck="false" tabindex="0">export DISPLAY=:1
</pre><div class="embedExternal embedImage display-large float-none">
<div class="embedExternal-content">
<a class="embedImage-link" href="https://us.v-cdn.net/6032394/uploads/lithium_attachments/11945i8742F0F7C2B029B4.jpg" rel="nofollow noreferrer noopener ugc" target="_blank">
<img class="embedImage-img" src="https://us.v-cdn.net/6032394/uploads/lithium_attachments/11945i8742F0F7C2B029B4.jpg" alt="5.png" height="180" width="320" loading="lazy" data-display-size="large" data-float="none"></img></a>
</div>
</div>
<p><br></p><p> </p><p><strong>NOTE</strong>: If you logout from session the export DISPLAY=:1 command will be gone and you will have to execute the command again once you logged in. If you restart the device the process of virtual X will be lost and must be executed again once logged in.</p><p>To always run the command from remote terminal:</p><pre class="code codeBlock" spellcheck="false" tabindex="0">sudo nano /home/pi/.bashrc
</pre><p>add these lines:</p><p>#run export display</p><p>export DISPLAY=:1</p><div class="embedExternal embedImage display-large float-none">
<div class="embedExternal-content">
<a class="embedImage-link" href="https://us.v-cdn.net/6032394/uploads/lithium_attachments/11947i10398A813123D8C3.jpg" rel="nofollow noreferrer noopener ugc" target="_blank">
<img class="embedImage-img" src="https://us.v-cdn.net/6032394/uploads/lithium_attachments/11947i10398A813123D8C3.jpg" alt="6.png" height="180" width="320" loading="lazy" data-display-size="large" data-float="none"></img></a>
</div>
</div>
<p> </p><p> </p><p> </p><p>After you write down the commands press Ctrl + X and input character Y to save the file and then hit enter.</p><p>From command line add:</p><pre class="code codeBlock" spellcheck="false" tabindex="0">sudo teamviewer-iot-agent configure set EnableRemoteScreen 1
sudo teamviewer-iot-agent configure set RemoteScreenChannels \"X11\"
sudo reboot
</pre><div class="embedExternal embedImage display-large float-none">
<div class="embedExternal-content">
<a class="embedImage-link" href="https://us.v-cdn.net/6032394/uploads/lithium_attachments/12092i86C7BD54142C8344.jpg" rel="nofollow noreferrer noopener ugc" target="_blank">
<img class="embedImage-img" src="https://us.v-cdn.net/6032394/uploads/lithium_attachments/12092i86C7BD54142C8344.jpg" alt="7.png" height="180" width="320" loading="lazy" data-display-size="large" data-float="none"></img></a>
</div>
</div>
<p><br></p><p> </p><p><em> </em></p><p> </p><p><strong>NOTE</strong>: If the server has multiple displays, you must specify display number and user like this:</p><p><em>RemoteScreenChannels = \"X11:1:root\"</em></p><p><em>X11 - protocol</em></p><p><em>1 - display number</em></p><p><em>root - user</em></p><p><strong>Example accessing the Firefox browser with X11 grabbing</strong></p><p>Open the <em>TeamViewer</em> client and select <em>Remote Terminal</em></p><div class="embedExternal embedImage display-large float-none">
<div class="embedExternal-content">
<a class="embedImage-link" href="https://us.v-cdn.net/6032394/uploads/lithium_attachments/12096iB3816B807EE927BF.jpg" rel="nofollow noreferrer noopener ugc" target="_blank">
<img class="embedImage-img" src="https://us.v-cdn.net/6032394/uploads/lithium_attachments/12096iB3816B807EE927BF.jpg" alt="1.png" height="180" width="320" loading="lazy" data-display-size="large" data-float="none"></img></a>
</div>
</div>
<p> </p><p> </p><p> </p><p> </p><p>Install <em>Mozilla Firefox</em> using this command:</p><pre class="code codeBlock" spellcheck="false" tabindex="0">sudo apt-get install firefox-esr
</pre><div class="embedExternal embedImage display-large float-none">
<div class="embedExternal-content">
<a class="embedImage-link" href="https://us.v-cdn.net/6032394/uploads/lithium_attachments/12097iBC8906C89AF0A4B8.jpg" rel="nofollow noreferrer noopener ugc" target="_blank">
<img class="embedImage-img" src="https://us.v-cdn.net/6032394/uploads/lithium_attachments/12097iBC8906C89AF0A4B8.jpg" alt="9.png" height="180" width="320" loading="lazy" data-display-size="large" data-float="none"></img></a>
</div>
</div>
<p> </p><p> </p><p> </p><p> </p><p> </p><p> </p><p> </p><p>Then from remote terminal run:</p><pre class="code codeBlock" spellcheck="false" tabindex="0">/usr/bin/firefox www.teamviewer.com
</pre><p>In the <em>TeamViewer</em> client click on <em>Remote control</em> and here you will see <em>Mozilla Firefox</em> with the <em>teamviewer.com</em> website open.</p><div class="embedExternal embedImage display-large float-none">
<div class="embedExternal-content">
<a class="embedImage-link" href="https://us.v-cdn.net/6032394/uploads/lithium_attachments/12098i6EFB94748261D22D.jpg" rel="nofollow noreferrer noopener ugc" target="_blank">
<img class="embedImage-img" src="https://us.v-cdn.net/6032394/uploads/lithium_attachments/12098i6EFB94748261D22D.jpg" alt="10.png" height="180" width="320" loading="lazy" data-display-size="large" data-float="none"></img></a>
</div>
</div>
<p> </p><p> </p><p> </p><p> </p><p> </p><p> </p><p> </p><p> </p><p> </p><h3> </h3><h2 data-id="accessing-the-framebuffer">Accessing the Framebuffer</h2><p>In the <em>TeamViewer</em> client connect to the device and use <em>Remote Terminal</em></p><div class="embedExternal embedImage display-large float-none">
<div class="embedExternal-content">
<a class="embedImage-link" href="https://us.v-cdn.net/6032394/uploads/lithium_attachments/12099iC47AE9407865014A.jpg" rel="nofollow noreferrer noopener ugc" target="_blank">
<img class="embedImage-img" src="https://us.v-cdn.net/6032394/uploads/lithium_attachments/12099iC47AE9407865014A.jpg" alt="1.png" height="180" width="320" loading="lazy" data-display-size="large" data-float="none"></img></a>
</div>
</div>
<p> </p><p> </p><p> </p><p> </p><p> </p><p> </p><p> </p><p>You have to find the number of <em>framebuffer</em> therefore enter this command:</p><p> </p><p><br></p><pre class="code codeBlock" spellcheck="false" tabindex="0">ls /dev/ | grep fb
</pre><p> </p><p><br></p><div class="embedExternal embedImage display-large float-none">
<div class="embedExternal-content">
<a class="embedImage-link" href="https://us.v-cdn.net/6032394/uploads/lithium_attachments/12101iBF695C016BD06758.jpg" rel="nofollow noreferrer noopener ugc" target="_blank">
<img class="embedImage-img" src="https://us.v-cdn.net/6032394/uploads/lithium_attachments/12101iBF695C016BD06758.jpg" alt="11.png" height="180" width="320" loading="lazy" data-display-size="large" data-float="none"></img></a>
</div>
</div>
<p> </p><p> </p><p>In this example, our <em>framebuffer</em> is <em>fb0</em></p><p>Then, from command line add:</p><p> </p><p><br></p><pre class="code codeBlock" spellcheck="false" tabindex="0">sudo teamviewer-iot-agent configure set EnableRemoteScreen 1
sudo teamviewer-iot-agent configure set RemoteScreenChannels \"FBD:/dev/fb0\"
sudo teamviewer-iot-agent restart
sudo reboot
</pre><p> </p><div class="embedExternal embedImage display-large float-none">
<div class="embedExternal-content">
<a class="embedImage-link" href="https://us.v-cdn.net/6032394/uploads/lithium_attachments/12102i9B3A76575AAEE5A7.jpg" rel="nofollow noreferrer noopener ugc" target="_blank">
<img class="embedImage-img" src="https://us.v-cdn.net/6032394/uploads/lithium_attachments/12102i9B3A76575AAEE5A7.jpg" alt="12.png" height="180" width="320" loading="lazy" data-display-size="large" data-float="none"></img></a>
</div>
</div>
<p><br></p><p> </p><p><strong>Note</strong>: <em>fb</em> number could be different, so please check with the command above</p><p> </p><p>To test it, open the <em>TeamViewer </em>client, select your device click on<em> Remote control</em> and here you will see the desktop interface of the <em>Raspberry.</em></p><p> </p><p><strong>Note</strong>: <em>framebuffer</em> only read access is possible so, you will not get control of the desktop using mouse or keyboard</p><div class="embedExternal embedImage display-large float-none">
<div class="embedExternal-content">
<a class="embedImage-link" href="https://us.v-cdn.net/6032394/uploads/lithium_attachments/12103iB8E1053E8E6D0687.jpg" rel="nofollow noreferrer noopener ugc" target="_blank">
<img class="embedImage-img" src="https://us.v-cdn.net/6032394/uploads/lithium_attachments/12103iB8E1053E8E6D0687.jpg" alt="13.png" height="180" width="320" loading="lazy" data-display-size="large" data-float="none"></img></a>
</div>
</div>
<p> </p><p> </p><p> </p><p> </p><p> </p><p> </p><p> </p><p> </p><p> </p><h3 data-id="-1"> </h3><h3 data-id="-2"> </h3><h3 data-id="-3"> </h3><h3 data-id="-4"> </h3><h3 data-id="-5"> </h3><p> </p><p><strong>Note</strong>: If you want use framebuffer grabbing on a <em>Raspberry Pi 4</em> follow the extra steps .</p><p>Run from Remote terminal:</p><pre class="code codeBlock" spellcheck="false" tabindex="0">sudo nano /boot/config.txt
</pre><p>Go down until you found this line d<em>toverlay=vc4-kms-v3d</em> and add # in front of them</p><div class="embedExternal embedImage display-large float-none">
<div class="embedExternal-content">
<a class="embedImage-link" href="https://us.v-cdn.net/6032394/uploads/lithium_attachments/12104i72CC860531D1131B.jpg" rel="nofollow noreferrer noopener ugc" target="_blank">
<img class="embedImage-img" src="https://us.v-cdn.net/6032394/uploads/lithium_attachments/12104i72CC860531D1131B.jpg" alt="14.png" height="180" width="320" loading="lazy" data-display-size="large" data-float="none"></img></a>
</div>
</div>
<p> </p><p> </p><h2 data-id="logo-positioning">Logo positioning</h2><p>When using X11 in the channel definition a logo is shown when a remote control is running as user feedback. This is done to prevent that a user is being monitored without his notice.</p><p>To configure the placement of the logo you can use this command to set the position:</p><p> </p><pre class="code codeBlock" spellcheck="false" tabindex="0">sudo teamviewer-iot-agent configure set RemoteScreenLogoPosition "TopLeft"
</pre><p><br></p><p>Valid values are: </p><ul><li>TopLeft</li><li>TopRight</li><li>BottomRight</li><li>BottomLeft</li></ul><h2 data-id="data-protection">Data protection</h2><p>To avoid that users can be surveilled without being notified the following measurements have been implemented</p><ol><li>An icon is shown in grabbed X11 and framebuffer sessions</li><li>For QT applications TeamViewer's EULA requires that this being handled by the application TeamViewer's Remote screen is implemented</li><li>In X11 session only non-users sessions can be grabbed, also login screens are not shown</li></ol>
</article>
</main>