Contents /
Previous /
Next
Start X
To Start an X server use the command:
startx.
startx initializes an X session it is a front end to xinit,
that provides a nicer user interface.
Display
Start an application on some X server (e.g., an xterm):
xterm -display host:0.0
host (e.g., localhost): machine on which the X server is running.
0.0 : Display and Screen.
X supports multiple physical screens in its specification.
To specify the default display for a session
use the DISPLAY environment variable:
DISPLAY=localhost:0.0
export DISPLAY
Access Rights
Fortunately not anyone on the Internet can
start an application on your display.
By default, X prohibits access from all machines
except your own. The xhost command enables access:
Example (enable access to anyone):
xhost +
A secure X connection with ssh
You may connect to an X-sever and transmit
data via ssh (secure shell):
ssh -X user@remote_host
Any X application that you open on remote_host
will be displayed on the machine where you opened
the ssh.