I am using an application that is computationally intensive and requires X11 to run. I want to run it on a remote server (that is obviously running X11).
I don't need to forward X11, I just need it to run on the server.
If I run the application from the server (i.e. I use the keyboard that is physically connected to the machine), then everything works fine. My problem is that I want to start this application remotely (from an SSH connection) because I cannot always access the server physically.
I am not completely sure how it works, but when I run the following command from the machine (i.e. using its keyboard):
$ xhost +
then I can run my app (
$ DISPLAY=:0 ./run-my-app) without problem from SSH. Now, I cannot run
xhost + from SSH, and anyway it sounds like a bad idea in terms of security.
If I don't run
xhost +, I get the following output:
No protocol specified
xauth: (argv):1: unable to open display ":0".
In conclusion, it looks like there is some security feature (access control) that prevents me from running the app on X11 remotely. But the point is that I don't want to have more than what happens when I start the app from the server (with the keyboard connected to the physical machine); I just want to start/stop it remotely, without any forwarding.
Is there a way to do that?
It looks similar to X11 on server without forwarding and How can I run Firefox on Linux headlessly (i.e. without requiring libgtk-x11-2.0.so.0)?, but in these situations they can use a virtual server like Xvfb, which does not work in my case. Moreover, I do have an X server running on the server, and I do need it.