<type>documentation</type>
<domain>intro</domain>
<id>linux-remote-display</id>
<title>Remote Display on Linux</title>
<date>$Date: 2014-05-14 15:07:19 -0400 (Wed, 14 May 2014) $</date>
<version>$Revision: 31376 $</version>
<product>all</product>

Wing for Linux can be displayed remotely by enabling X11 forwarding in ssh as
`described here
<https://unix.stackexchange.com/questions/12755/how-to-forward-x-over-ssh-from-ubuntu-machine>`__.

In summary:  You need to send the ``-X`` option to ssh when you connect from the
machine where you want windows to display to the machine where Wing will be running,
and you need to add ``X11Forwarding yes`` to your ssh configuration (usually
in ``~/.ssh/config``) on the machine where Wing will be running.

**XKEYBOARD extension needed**

The graphics toolkit that Wing uses, Qt 5, requires the XKEYBOARD extension for
the keyboard to work properly. This is an extension to the X11 protocol but has
been available for 20+ years. However, there are X11 servers that do not
support it including a few used for vnc.

If the keyboard isn't working correctly with Wing,
check to see if the X11 server supports XKEYBOARD; sometimes it can be enabled
in the server configuration. If it can't be enabled, consider switching to a 
server that does support the XKEYBOARD extension or try executing 
``export XKB_DEFAULT_RULES=base`` before starting 
wing. Setting other environment variables is possible according to a bug report
at https://bugreports.qt.io/browse/QTBUG-44938

**Speeding up the Connection**

To improve performance, in most cases you should avoid using the ``-C`` option for
ssh, even though it is often mentioned in instructions for setting up X11
forwarding. The compression that is enabled with ``-C`` is only useful over
extremely slow connections and otherwise increases latency and reduces
responsiveness of the GUI.

Another option to try is ``-Y`` (trusted X11 port forwarding) instead of ``-X``
(untrusted X11 port forwarding) as this may reduce overhead as well.  However,
this disables security options so it's a good idea to understand what it does
before using it.

If you are displaying to Windows, the choice of X11 server software running on
Windows can make a huge difference in performance. If the GUI seems very slow,
try a different X11 server.

**Other Options**

Other options for displaying Wing remotely from Linux include:

* `XRDP <http://www.xrdp.org/>`__ -- implements the protocol for Windows Remote Desktop.

* `NoMachine <https://www.nomachine.com/>`__ -- Another free remote desktop toolkit.

~~~if WINGPRO:
* In Wing Pro, another option is not to display Wing remotely but instead to
  use the `remote development <ref:proj/remote-hosts>`__ feature to access
  the remote host from Wing running on another machine.
~~~
