(emacs)Display X


Next: Font X Prev: Resume Arguments Up: Command Arguments

Specifying the Display Name
===========================

   The environment variable `DISPLAY' tells all X clients where to
display their windows.  Its value is set up by default in ordinary
circumstances, when you start an X server and run jobs locally.
Occasionally you may need to specify the display yourself; for example,
if you do a remote login and want to run a client program remotely,
displaying on your local screen.

   With Emacs, the main reason people change the default display is to
let them log into another system, run Emacs on that system, but have the
window displayed at their local terminal.  You might need to use login
to another system because the files you want to edit are there, or
because the Emacs executable file you want to run is there.

   The syntax of the `DISPLAY' environment variable is:

     HOST:DISPLAY.SCREEN

where HOST is the host name of the X Window System server machine,
DISPLAY is an arbitrarily-assigned number that distinguishes your
server (X terminal) from other servers on the same machine, and SCREEN
is a rarely-used field that allows an X server to control multiple
terminal screens.  The period and the SCREEN field are optional.  If
included, SCREEN is usually zero.

   If your host is named `glasperle' and your server is the first (or
perhaps the only) server listed in the configuration, your `DISPLAY' is
`glasperle:0.0'.

   You can specify the display name explicitly when you run Emacs,
either by changing the `DISPLAY' variable, or with the option `-d
DISPLAY' or `-display DISPLAY'.  These are initial options; they must
come at the beginning of the command line.  Note: Initial Options.
Here is an example:

     emacs -display glasperle:0 &

   You can inhibit the direct use of X with the `-nw' option.  This is
also an initial option.  This option tells Emacs to display using
ordinary ASCII on its controlling terminal.

   Sometimes, security arrangements prevent a program on a remote system
from displaying on your local system.  In this case, trying to run Emacs
produces messages like:

     Xlib:  connection to "glasperle:0.0" refused by server

   You might be able to overcome this problem by using the `xhost'
command on the local system to give permission for access from your
remote machine.


automatically generated by info2www