Professional Documents
Culture Documents
Remember, If you use a Windows PC, then you need to install an X server, before
you can get anyware.
The x clients are running on the Host (the remote Unix machine).
If you logon to that Host with a terminal, using some account like "winstonc", y
ou will enter
the prompt.
In this example, you are using the "environment" of the user "winstonc", and typ
ically a lot
of "environment" variables are set.
The "DISPLAY" environment variable stores the address for X clients to connect t
o.
So, this value specifies some XServer address that's running on your PC.
So, if you want to start some x client application, it should communicate to you
r PC's X server.
That's why you need to check if your DISPLAY variable is correctly set.
For checking, you might use;
$ set | grep DISPLAY
which shows you the presently set value (if present it all).
If it's not ok, set the environment variable (in sh or ksh shells) like so:
$ export DISPLAY=<IPaddress_or_hostname>:number1.number2
20.15:0.0
Since you might have running multiple XServers on your PC, the "number1" usually
discriminates between them.
But usually it will be simply "0".
In principle, multiple display's are possible per XServer, and that's usually de
termined by "number2".
So, here are a few examples:
$ export DISPLAY=192.168.220.15:0.0
$ export DISPLAY=192.168.220.15:0.1
Usually 0.0 should work.
If you now run a simple x client application, like xclock, the xclock should be
shown on your PC.
This way, you should be able to run almost all x client graphical applications.
~/.Xauthority:
-------------There are multiple implementations to secure X, and one popular method is using
the ".Xauthority" file.
It's probably best if an X server does not accept connections from just anywhere
.
You don't want everyone to be able to display windows on your screen. Or possibl
cd ~
chmod 755 .
DISPLAY=192.168.220.15:10.0
- As user user2 (from the same terminal):
$ cd ~
$ export DISPLAY=192.168.220.15:10.0
$ xauth merge /home/user1/.Xauthority
Or if mkxauth must be used:
As user2, merging Keys from the Local .Xauthority file of user1:
$ mkxauth -m user1
here, mkxauth adds the keys in user1/.Xauthority to user2/.Xauthority, replacing
any keys which already exist.
The ~user1/.Xauthority file, ofcourse must be readable by the user running mkxa
uth.