1

I want to remotely start xserver on the remote machine.

If I type "startx" directly on the host machine (i.e. using physical keyboard), the xserver starts as expected. However, when I try to do that over ssh with the same user this does not work.

I get the following server error:

      (EE) xf86OpenConsole: Cannot open virtual console 7 (Permission denied)

sudo startx still works even remotely.

What is preventing xserver to start on remote connections? And how to go around this?

  • i think it's simply the two things are mutually incompatible. ssh has text-only support no remote desktop support. startx is probably trying to send somthing over the connection that a text-only pipe cannot support. – tatsu Mar 25 at 14:37
  • I'd use input methods of the physical host then. I just want to have a possibility to remotely start X. The only reasonable explanation would be that remote user can't trigger access to host's input/output devices on kernel level. – smihael Mar 25 at 15:11
0

Read man ssh, and use either the -X or -Y options.

https://manpages.ubuntu.com/manpages/bionic/en/man1/ssh.1.html

  • -X Enables X11 forwarding. This can also be specified on a per-host basis in a configuration file. -Y Enables trusted X11 forwarding. Trusted X11 forwardings are not subjected to the X11 SECURITY extension controls. – saleetzo Mar 25 at 17:50
  • 2
    This does not solve my problem. I do not want to forward X. I only want to remotely turn on X via ssh. From that point on, X server should run locally on the host machine. My workaround is currently to start one of display managers as root and then login. – smihael Mar 26 at 8:16
  • -X is great for forwarding an existing X server, but does nothing toward starting a remote X server. – Limited Atonement Apr 30 at 14:34

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.