LWN.net Logo

Remote desktop vs. remote display

Remote desktop vs. remote display

Posted Feb 14, 2013 22:55 UTC (Thu) by madscientist (subscriber, #16861)
In reply to: Remote desktop vs. remote display by daglwn
Parent article: LCA: The ways of Wayland

It's super-easy. I run Emacs in daemon mode (start "emacs --daemon") but this isn't required; if you don't do that you need to start the Emacs server yourself in your ~/.emacs file, or run M-x start-server by hand.

Then if your system running Emacs is named "server", just run:

ssh -X server emacsclient -c

The -c tells Emacs to create a new graphical frame, and since you're using ssh it will forward the display securely back to your local desktop.


(Log in to post comments)

Remote desktop vs. remote display

Posted Feb 15, 2013 14:16 UTC (Fri) by hummassa (subscriber, #307) [Link]

This is actually a nice and useful tip. Thanks and kudos!

Remote desktop vs. remote display

Posted Feb 15, 2013 23:39 UTC (Fri) by jimparis (subscriber, #38647) [Link]

Typo: the command is M-x server-start

Remote desktop vs. remote display

Posted Feb 17, 2013 6:14 UTC (Sun) by daglwn (subscriber, #65432) [Link]

Well, almost:

Waiting for Emacs...X11 connection rejected because of wrong authentication.

*ERROR*: Display localhost:30.0 can't be opened

Any ideas?

Remote desktop vs. remote display

Posted Feb 18, 2013 16:15 UTC (Mon) by madscientist (subscriber, #16861) [Link]

I'm not sure LWN comments are the best place for a support conversation :-), but can you run other remote X operations (for example, can you run "ssh -X server xterm" and have the xterm show up locally)?

Remote desktop vs. remote display

Posted Feb 18, 2013 21:01 UTC (Mon) by daglwn (subscriber, #65432) [Link]

Yep, xterm works fine remotely.

Remote desktop vs. remote display

Posted Feb 18, 2013 21:03 UTC (Mon) by daglwn (subscriber, #65432) [Link]

Ah, I found this, which looks useful:

https://groups.google.com/forum/?fromgroups=#!topic/gnu.e...

Remote desktop vs. remote display

Posted Feb 19, 2013 13:26 UTC (Tue) by madscientist (subscriber, #16861) [Link]

Hm. The original problem definitely sounded exactly like yours. However following the links to the recommended solution, I don't see how tramp is related. Anyway this looks way more complex; I certainly have never needed to copy a file like ~/.emacs.d/server/server to my local host. Things Just Work, with no extra help. If xterm works then it's probably not an issues with Xauthority etc. It seems bizarre to me but I suppose it could be a hostname thing. If on the server you say "ping server" does it work and give you a real IP address (not 127.0.0.1)? If on your client you say "ping server" does that work and give back the same IP address?

Have you tried starting Emacs in --daemon mode rather than using start-server? What version of Emacs do you have?

We may need to move this to the Emacs help mailing list: https://lists.gnu.org/mailman/listinfo/help-gnu-emacs

Copyright © 2013, Eklektix, Inc.
Comments and public postings are copyrighted by their creators.
Linux is a registered trademark of Linus Torvalds