remote 

 

remote worker

most x11 programs can be run with a remote display.
a program running on a machine can have its window displayed on another machine desktop.

worker file manager works really well as a way managing a remote machine on a lan.

it is better convenient using the remote instance with a local display, than using a local instance on a remote directory.
most filesystem operations as filetypes check will stay on the remote machine side, only the interface gfx are going through the network.

remote x11 operation is really efficient with most programs having modular gfx made with small pics that are staying the same, as gui.
it doesn't work as well with program displaying big graphical elements changing often, as pictures or so, since most those pictures will have to go though the network to be displayed.

this page describe ways to configure the systems to run worker file manager remotely on a lan, displaying its interface on another machine. 

 

terminology

on this page example commands are using user and domain names:

-local machine domain is localdomain.lan
-remote machine domain being remotedomain.lan
-user account running x11 being named xuser on both machine  

 

requirements

2+ PCs on a lan

X11 is required on both local and remote machine.
the remote machine doesn't require a screen, yet it should run an Xserver

worker installed on the remote machine
apt install worker  

 

configure X11

the xservers should allow listen on tcp port on each machines

edit /etc/X11/xinit/xserverrc add -listen tcp on the exec line.
something like so:
exec /usr/bin/X -listen tcp "$@"
restart X11 on each machines the usual way,
startx
next restarting X, x11 should listen on port 6000, verify with:
lsof -i :x11 -S should return something as:
COMMAND PID USER FD TYPE DEVICE SIZE/OFF NODE NAME Xorg 1784 root 5u IPv6 16839 0t0 TCP *:x11 (LISTEN) Xorg 1784 root 6u IPv4 16840 0t0 TCP *:x11 (LISTEN)
being careful to let only lan connections.
with most distribs it probably would be ok though, and the ports are closed to the internet as a default.
yet better verify.
ways to verify and/or configure some filtering depend on the distrib /the programs installed / the internet box.


X11 has some ways filtering, named access control:
 

 

access control

to run remote programs the xservers should allow remote connections with lan adresses of each machines involved
so configuring access control is required.

while it can be changed live, it also can be added to .xinitrc so it will be set each time rebooting/restarting X.
file is usually found as /home/xuser/.xinitrc so adding there, on each machines:
# allow lan connections xhost - xhost +local: xhost +localhost xhost +inet:127.0.0.1 xhost +inet6:::1 xhost +inet:localdomain.lan xhost +inet:192.168.1.2 # lan ip of localdomain.lan xhost +inet:remotedomain.lan xhost +inet:192.168.1.3 # lan ip of remotedomain.lan then restart X11 , or run the same xhost commands in the cli

verify with
xhost should return something as:
access control enabled, only authorized clients can connect .../... INET:localdomain.lan INET:remotedomain.lan INET6:ip6-localhost INET:localhost.localdomain LOCAL: there should be both machines domain names
 

 

trying

on the remote machine run
export DISPLAY=localdomain.lan:0.0; worker &
if it works well,
worker is now running on remotedomain.lan
yet displaying its interface on localdomain.lan display :0 , the desktop. 

 

if cookie error

if there is a cookie error around as:
Invalid MIT-MAGIC-COOKIE-1 keyError: cannot open display ':0'
try to run on each machine as xuser
xauth list it should return something as
remotedomain.lan/unix:0 MIT-MAGIC-COOKIE-1 dacbc5765ec54a1d7115a172147866aa if it is missing on a machine, copy it from the other machine then add it with xauth, command would look like:
xauth add remotedomain.lan/unix:0 MIT-MAGIC-COOKIE-1 dacbc5765ec54a1d7115a172147866aa
or find the cookie in either machine /home/xuser/.Xauthority
and copy/paste the same line directly on the other machine

then retry  

 

start remotely

to start a remote worker displaying on the local machine, without having to move to the remote machine,

if having ssh running on the lan, on the local machine, the program can be started remotely with:
ssh xuser@remotedomain.lan 'export DISPLAY=localdomain.lan:0.0; worker &' it would be running on the remote machine xuser account.

if wanting to remotely administer a machine, it could be better convenient to run worker as root.
ssh root@remotedomain.lan 'export DISPLAY=localdomain.lan:0.0; worker &'


 

 

encrypting

if wanting increasing network / internet safety, the entire data exchange could be encrypted.

there are many internet pages describing how to run an x11 program remotely , tunneling the entire x11 connection with ssh, also named 'X-forwarding'.

so I will not describe it :)