ARCHIVED: In the X Window System, how do I run Emacs from a remote host?
If you have an SSH client installed on your computer, and the
remote host you want to run Emacs from has an SSH server, enter
the following in an xterm
terminal:
ssh -X -f username@host emacs
Replace username
and host
with your username
and the address of the remote host. The -X
option won't be necessary in all cases.
Note: Pay attention to the version of SSH installed on both your computer and the remote hosts. Servers that run version 1 of the SSH protocol cannot communicate with clients that can only use version 2. Likewise, many SSH version 2 servers will refuse clients communicating with version 1 of the protocol due to security concerns.
If you do not have an SSH client or there is no compatible SSH server installed on the remote host, it may still be possible to run Emacs. Follow the steps below:
Note: This alternative method is not secure, and thus is frequently not available. The UITS central systems at Indiana University, for example, do not allow it.
- Make sure the remote host is in your
xhost
file. To do this, inxterm
, enter:xhost hostname
Replace
hostname
with the name of the remote host. - Log into the remote host and, in Emacs, set the display to the
host computer. If you are using
sh
,ksh
, orbash
, enter:DISPLAY=host:0.0 ; export DISPLAY
If you are using
csh
ortcsh
, enter:setenv DISPLAY host:0.0
- Start Emacs. Equivalently, to set the display for one Emacs
session, enter:
emacs -display host:0.0
Replace
host
with the IP number or hostname of the local host (i.e., your workstation). For example, if you usetcsh
and are logged intorebel.net
, and you want to run Emacs in X on a workstation whose name isvader.empire.gov
, you would enter:setenv DISPLAY vader.empire.gov:0.0
At Indiana University, for personal or departmental Linux or Unix systems support, see Get help for Linux or Unix at IU.
This is document acxu in the Knowledge Base.
Last modified on 2018-01-18 10:41:38.