I want to forward an Xsession over ssh to another system, but I get this error:

Fatal server error:
Server is already active for display 0
    If this server is no longer running, remove /tmp/.X0-lock
    and start again.

I don't want to kill the currently running Xsession. How can I start a new Xsession for ssh forwarding?

Running Ubuntu 12.04 on both client and server.

  • You used to be able to drop to a command line and run startx :1 to start a second session. – Mordoc Aug 23 '13 at 17:52
  • @Mordoc, I found I can start a new xsession over ssh using startx -- :1, though I still couldn't figure out how to forward GUI applications. – Rucent88 Aug 27 '13 at 14:56

As an alternative solution to your problem, you can reuse the existing display :0 for running applications.

DISPLAY=:0 ssh -X username@


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.