Shlomi Fish (shlomif) wrote in shlomif_tech,
Shlomi Fish
shlomif
shlomif_tech

  • Location:
  • Mood:
  • Music:

Tech Tip: Setting up remote X11 over TCP to Xephyr

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.

The Xephyr man page omits the info in Xnest's man page and that in the "Xserver" man page. Xephyr supports most of the flags in all of them.

To facilitate customisation, we will declare and use the following shell constants:

xephyr_port="1"
remote_xephyr_ip_host="192.168.1.100"

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 xhost:

# 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

Licence

Copyright by Shlomi Fish, 2020.

You can reuse this entry under the Creative Commons Attribution 4.0 Unported licence, or at your option any later version of it. See the instructions on how to comply with it.

Whatever code given here is provided under the MIT / Expat licence.

Tags: foss, linux, open-source, tech, tech tip, tip
Subscribe
  • Post a new comment

    Error

    Anonymous comments are disabled in this journal

    default userpic

    Your reply will be screened

  • 0 comments