Warning! The instructions given here may decrease your systems' security and may make it more vulnerable. Use at your own risk.
I recently wanted to set up a remote X.org / X11 connection to a Xephyr server, which is an X server that runs inside a window. I only found partial information in web searches, so I wanted to provide a top-to-bottom guide for accomplishing this task.
To facilitate customisation, we will declare and use the following shell constants:
You may need to stop the firewalls on both client and server using something like:
sudo systemctl stop firewalld.service
Or the stop-iptables script.
Now start Xephyr on the local desktop:
Xephyr -listen tcp -listen unix -listen local -screen 1024x768 :"$xephyr_port"
Then connect to it and use
# On the X server export DISPLAY=":$xephyr_port" xterm & xhost +
Now you should be able to connect to the Xephyr X server from the remote box:
# On the remote machine export DISPLAY="$remote_xephyr_ip_host":"$xephyr_port" xterm & # Or a different window manager. starticewm
Copyright by Shlomi Fish, 2020.
Whatever code given here is provided under the MIT / Expat licence.