GnuEmacs on Desktop to edit on Debian server (no XWindows)

Posted on

Problem :

I am have a hard time figuring out the best way open files on a headless server. I have never used Emacs tramp feature, and it’s syntax to open remote files seems strange as well as I’m wondering how to browse files (e.g., ls) via the emacs shell feature then open file via tramp.

Can I install some sort of basic XWindows functionality on the Debian server (no X Windows currently) to allow me to very simply open a terminal on remote server, browse files then fire up my local emacs?

Sooo confused?

Solution :

I strongly suggest you to use tramp. I edit files with tramp over ssh to headless centos server everyday.

Its syntax is actually very simple. It is just /PROTOCOL:[REMOTEIP]:FILE. For example /ssh: means edit /root/ file on over ssh. You also browse files on remote server with dired. /ssh: will open /root folder in a dired buffer.

Advantages of tramp:

  • You don’t need to install emacs (or anything) on server

  • You don’t need to synchronize your configuration files across different machines

  • dired and eshell over ssh