Set up the remote screen via X11 - TeamViewer Support
<main>
<article class="userContent">
<p><br></p><p>The <strong>Remote Screen via X11</strong> 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.</p><p>📌<strong>Note:</strong> Using this feature disables the Remote Screen to monitor.</p><p><br></p><h3></h3><h2 data-id="what-you-will-need">What you will need</h2><p>Make sure that you have prepared the following points:</p><ul><li>The edge device is set up with a TeamViewer IoT Agent.</li><li><a href="https://community.teamviewer.com/English/kb/articles/109829-access-the-edge-device-via-remote-terminal" rel="nofollow noreferrer ugc">Access the Edge Device via Remote Terminal</a>.</li><li>Basic knowledge of the editor <a href="https://www.nano-editor.org/" rel="nofollow noreferrer ugc">nano</a>.</li></ul><p><br></p><h3 data-id="-1"></h3><h2 data-id="setup">Setup</h2><p>1. Access the edge device remotely (<a href="https://community.teamviewer.com/English/kb/articles/109829-access-the-edge-device-via-remote-terminal" rel="nofollow noreferrer ugc">Access the Edge Device via Remote Terminal</a>).</p><p>2. Install the <strong>virtual framebuffer</strong>. Type in the following command and press return.</p><pre class="code codeBlock" spellcheck="false" tabindex="0">sudo apt update && sudo apt install xvfb -y
</pre><p>3. Run the virtual framebuffer with a display port <code class="code codeInline" spellcheck="false" tabindex="0">1</code> resolution of <code class="code codeInline" spellcheck="false" tabindex="0">1280x1024</code> pixels and a color depth of <code class="code codeInline" spellcheck="false" tabindex="0">24</code> bit. Type in the following command and press return.</p><pre class="code codeBlock" spellcheck="false" tabindex="0">Xvfb -ac :1 -screen 0 1280x1024x24 &
</pre><p>4. To run the virtual framebuffer on every reboot of the edge device modify the <strong>global crontab file</strong> with the <strong>nano</strong> editor.</p><pre class="code codeBlock" spellcheck="false" tabindex="0">sudo nano /etc/crontab
</pre><p>5. Add the following lines at the end of the file:</p><pre class="code codeBlock" spellcheck="false" tabindex="0">#X virtual desktop
@reboot pi Xvfb -ac :1 -screen 0 1280x1024x24
</pre><p>6. Save the file and close the nano editor.</p><p>7. To use the display port on every login to the edge device modify the <strong>personal session file</strong> with the <strong>nano</strong> editor.</p><pre class="code codeBlock" spellcheck="false" tabindex="0">sudo nano /home/pi/.bashrc
</pre><p>8. Add the following lines at the end of the file:</p><pre class="code codeBlock" spellcheck="false" tabindex="0">#run export display
export DISPLAY=:1
</pre><p>9. Save the file and close the nano editor.</p><p>10. Activate the modifications. Type in the following command and press return.</p><pre class="code codeBlock" spellcheck="false" tabindex="0">source ~/.bashrc
</pre><p>11. Restart the TeamViewer IoT Agent. Type in the following commands and press return:</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 teamviewer-iot-agent restart
</pre><p>The setup is complete. You can <a href="https://community.teamviewer.com/English/kb/articles/109824-remote-control" rel="nofollow noreferrer ugc">access the edge device</a> with your TeamViewer Client now.</p><p>When accessing the edge device, the user who works on the said device gets a notification. You can <a href="https://community.teamviewer.com/English/kb/articles/109827-customize-the-user-notification-when-accessing-the-remote-screen" rel="nofollow noreferrer ugc">customize the notification</a>.</p><p><br></p><h3 data-id="-2"></h3><h2 data-id="troubleshoot">Troubleshoot</h2><h3 data-id="no-screen-the-wrong-screen-is-displayed">No screen / the wrong screen is displayed</h3><p>After accessing the edge device via TeamViewer client no screen or the wrong screen is displayed.</p><p>This occurs when your device uses multiple displays.</p><ol><li>Access the edge device remotely (<a href="https://community.teamviewer.com/English/kb/articles/109829-access-the-edge-device-via-remote-terminal" rel="nofollow noreferrer ugc">Access the Edge Device via Remote Terminal</a>).</li><li>Replace <strong>12</strong> with the correct display number. Type in the following commands and press return:</li></ol><pre class="code codeBlock" spellcheck="false" tabindex="0">sudo teamviewer-iot-agent configure set RemoteScreenChannels "X11:12:pi"
sudo teamviewer-iot-agent restart
</pre><p><br></p><h3 data-id="-3"></h3>
</article>
</main>