0

In a multiseat desktop system with the /tmp directory polyinstantiated, the /tmp/.X11-unix/ directory and Xn instances are still created under root's /tmp not a user's.

ssh -Ying into or out of the box and trying to run X11 applications (via X-forwarding) generates connect /tmp/.X11-unix/X0: No such file or directory

Presumably this is because the session is created by a root or system user account that isn't being instantiated, so ends up in the traditional /tmp location.

Would there be any way around this or are they just not compatible?

The system currently uses lightdm as the login manager so the Xorg session is run by root.

1 Answer 1

1

A workaround, not a full blown solution is to wrap ssh in a script that creates a relay.

~/bin/ssh:

# Do we have a display?
# Does our display relay exist?
if [ ! -z $DISPLAY ] && \
   [ ! -e "/tmp/.X11-unix/X${DISPLAY#*:}*" ]
then
    # Create X11-unix dir if need be.
    mkdir -p /tmp/.X11-unix

    # Create reusable display relay
    socat \
     UNIX-LISTEN:/tmp/.X11-unix/X${DISPLAY#*:},fork,reuseaddr \
     ABSTRACT-CONNECT:/tmp/.X11-unix/X${DISPLAY#*:} \
     &>/dev/null &
fi

# Do the useful thing...
/usr/bin/ssh $@

You must log in to answer this question.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.