![]() |
![]() |
| CONTENTS A-Z | SEARCH | CHANGE YOUR PASSWORD | ANNOUNCEMENTS | STATUS MESSAGES |
Users often encounter problems when they try to run X based applications on remote machines and have them display on their local workstations. Typically, they encounter either of the two following types of error message:
Xlib: connection to "serdlm41:0.0" refused by server
Xlib: Client is not authorized to connect to Server
Error: Can't open display: serdlm41:0
or Error: Can't open display:
|
Before you can run remote X applications, you must first ensure that your local workstation allows the remote machine to connect to its display, and secondly you must tell the remote machine to which X display it should be directing its output. To allow the remote machine to connect to your local machine, you use the xhost command. To direct the remote machine's output to your workstation you must set the DISPLAY environment variable on the remote host.
For example, suppose user fred is sitting at the workstation serdlc22, is logged in remotely to the machine solb1, and wants to run the program xfoobar which is only available on solb1. Firstly, in a local window (xterm or DECterm) on serdlc22, fred would issue the xhost command.
serdlc22-fred-22-% xhost + solb1 |
Then in a window on the remote machine fred would set the DISPLAY variable and start the remote program.
solb1-fred-16-% setenv DISPLAY serdlc22:0 |
(note the :0 appended to the local host's name in the setenv command). At this point the remote X application should be able to successfully connect to your local X display. Finally, it is a good idea to revoke the remote host's access to your local display as soon as the remote application has started. You can do this with the xhost command again.
serdlc22-fred-23-% xhost - solb1 |