<page xmlns="http://projectmallard.org/1.0/"
      xmlns:ui="http://projectmallard.org/ui/1.0/"
      xmlns:its="http://www.w3.org/2005/11/its"
      type="topic" style="task" version="1.0 ui/1.0"
      id="sharing-desktop">

  <info>
    <link type="guide" xref="sharing"/>
    <link type="guide" xref="prefs-sharing"/>

    <revision pkgversion="3.33.3" date="2019-07-21" status="review"/>
    <revision version="gnome:42" status="final" date="2022-04-09"/>
    <revision version="gnome:46" status="final" date="2024-03-02"/>
    <revision version="gnome:46" status="draft" date="2024-04-21"/>
    <credit type="author">
      <name>Marie Stará</name>
      <email>413827@mail.muni.cz</email>
    </credit>
    <credit type="author">
      <name>Ekaterina Gerasimova</name>
      <email>kittykat3756@gmail.com</email>
    </credit>
    <credit type="editor">
      <name>Michael Hill</name>
      <email>mdhillca@gmail.com</email>
    </credit>
    <credit type="author">
      <name>Jim Campbell</name>
      <email>jcampbell@gnome.org</email>
    </credit>
    <include href="legal.xml" xmlns="http://www.w3.org/2001/XInclude"/>

    <desc>Let other people view and interact with your desktop using RDP.</desc>
  </info>

  <title>Share your desktop</title>

  <comment>
    <cite date="2022-07-27">Andre Klapper</cite>
    <p>GNOME 42 moved from VNC to RDP in https://gitlab.gnome.org/GNOME/gnome-control-center/-/merge_requests/1205</p>
    <p>TODO: See also https://gitlab.gnome.org/GNOME/gnome-user-docs/-/issues/135</p>
  </comment>
  <comment>
    <cite date="2022-04-09">Michael Hill</cite>
    <p>Referencing Pascal Nowack's comments on #135 (above) and the RDP setup
    guide, https://gitlab.gnome.org/-/snippets/1778, particularly his comment of
    2022-02-26.</p>
    <p>TODO: Add Connections, the GNOME client, to the Connecting: Linux
    section when it's ready for RDP.</p>
  </comment>
  <comment>
    <cite date="2024-04-22">Marie Stará</cite>
    <p>I've added Connections. It might need a reality check.</p>
  </comment>

  <p>You can let other people view and control your desktop from another
  device with a desktop viewing application. Configure <gui>Desktop Sharing
  </gui> to allow others to access your desktop and set the security
  preferences.</p>

  <p>If you want to log in to your user account remotely, see
  <link xref="remote-login">Remote Login</link>.</p>

  <steps>
    <item>
      <p>Open the <gui xref="shell-introduction#activities">Activities</gui>
      overview and start typing <gui>System</gui>.</p>
    </item>
    <item>
      <p>Select <guiseq><gui>Settings</gui><gui>System</gui></guiseq> from the
      results. This will open the <gui>System</gui> panel.</p>
    </item>
    <item>
      <p>Select <gui>Remote Desktop</gui> to open the
      <gui>Desktop Sharing</gui> panel.</p>
    </item>
    <item>
      <p>To let others view your desktop, switch on <gui>Desktop Sharing</gui>.
      This means that others will be able to try and connect to your device and view
      your screen.</p>
    </item>
    <item>
      <p>To let others interact with your desktop switch on <gui>Remote Control</gui>.
      This may allow the other person to move your cursor, run applications, and
      browse your files, depending on the security settings which you are currently
      using.</p>
    </item>
  </steps>

  <section id="connecting">
  <title>Connecting</title>

  <p>The <gui>How to Connect</gui> section displays the
  <gui>Hostname</gui> and <gui>Port</gui> that can be used
  on the connecting device. Click the button next to each entry if you want to
  place it in the clipboard. A connection can also be established using your
  <link xref="net-findip">IP address</link>.</p>

  <note style="important">
    <p>If you also enable <link xref="remote-login">Remote Login</link>, it will set its port
    number to 3389. This means <gui>Desktop Sharing</gui> will use a different port, for
    example, 3390.</p>
    <p>If the port number is not 3389, specify it when connecting.</p>
  </note>


  <p>When the other device is successfully connected to your desktop, you
  will see the <gui>Screen is being shared</gui> icon
  <media its:translate="no" type="image" src="figures/topbar-screen-shared.svg" style="floatend"/> in your system status area.</p>

  <note style="info"><p>If the text set as <gui>Device Name</gui> can be edited,
  you can <link xref="about-hostname">change</link>
  the name of your device on the network.</p></note>

  </section>

  <section id="authentication">
  <title>Authentication</title>

  <p>The <gui>Login Details</gui> section displays the user name and password to be used in the
  client software used for connecting to your desktop.</p>

  <note style="tip">
    <p>Click <gui>Verify Encryption</gui> to display the encryption
    fingerprint. Compare it with the value displayed by the client when
    connecting: they should be identical.</p>
  </note>
  </section>

  <section id="clients">
  <title>Clients</title>

  <p>To connect to your desktop from another device, the following clients are
  known to work.</p>
  <terms>
    <item>
      <title>From Linux:</title>
      <list>
        <item><p><app>Remmina</app>, a GTK client, is available as a package in
        most distributions, and also as a
        <link href="https://flathub.org/apps/details/org.remmina.Remmina">flatpak</link>.
        Use default settings, particularly <gui>Color depth</gui> “Automatic”
        in the connection profile settings.</p>
        </item>
        <item><p><app>Connections</app>, a GTK client, is available as a package
        in most distributions, and also as a <link href="https://flathub.org/apps/org.gnome.Connections">flatpak</link>.</p>
        </item>
        <item><p><app>xfreerdp</app> is a command line client available as a
        package in most distributions. The option <cmd>/network:auto</cmd>
        should be passed to the client on the command line.</p>
        </item>
      </list>
    </item>
    <item>
      <title>From Microsoft Windows:</title>
      <list>
        <item><p><app>mstsc</app> is the built-in Windows client. Default
        settings are recommended.</p>
        </item>
      </list>
    </item>
    <item>
      <title>From Linux, Windows, or macOS:</title>
      <list>
        <item><p><app>Thincast</app> is a proprietary client. The Linux version
        is available as a <link href="https://flathub.org/apps/details/com.thincast.client">flatpak</link>.
        Default settings are recommended.</p>
        </item>
      </list>
    </item>
  </terms>
  </section>

  <section id="checking-connection">
  <title>Checking connection</title>
  <steps>
    <item>
      <p>In your chosen client, enter the <gui>Hostname</gui> or IP address.</p>
     <note style="tip">
      <p>If the port number differs from 3389, specify it (address:port).</p>
      <p>On many networks you need to add a “.local” suffix to the computer's name
      for the connection to work.</p>
    </note>
    </item>
    <item>
      <p>Fill in the user name and password for Desktop Sharing.</p>
    </item>
  </steps>
  </section>

  <section id="disconnect">
  <title>Stop sharing your desktop</title>

  <p>To disconnect someone who is viewing your desktop, follow the steps below.</p>

  <steps>
    <item>
      <p>Click the system menu on the right side of the top bar.</p>
    </item>
    <item>
      <p>Click <gui>Screen is being shared</gui>.</p>
    </item>
    <item>
      <p>Click <gui>Turn off</gui>.</p>
    </item>
  </steps>

  </section>

  <section id="advanced" ui:expanded="false">
  <title>Advanced Topics</title>

  <terms>
    <item>
      <title>Command line configuration</title>
      <p>The <cmd>grdctl</cmd> utility allows you to configure your host
      settings in a console window. For usage details, type
      <cmd>grdctl --help</cmd>.</p>
    </item>
    <item>
      <title>H.264</title>
      <p>H.264 video encoding heavily reduces bandwidth.
      <app>GNOME Remote Desktop</app> will use H.264 when: the graphics pipeline
      is used (a requirement of the protocol), the client supports it, and
      NVENC (NVIDIA's encoder) is available.</p>
    </item>
  </terms>
  </section>

</page>
