"Terje J. Hanssen"
I try to set up a distributed X computing environment on a network envolving 3 hosts and need some advice from some X gurus:
Configuration: -------------- hostA runs my local X server (X display where I sit working) hostB runs my remote Window Manager (GDM login&session host) hostC runs my remote X client application (execution host)
HostA is set up to boot directly into X mode querying and presenting the login screen from hostB (like a X terminal without local login first). HostB and HostC have both individual home directories and passwd for the same users, and both use /etc/hosts and /etc/hosts.equiv.
Command dialog: --------------- On hostA I log in to hostB and enter the following commands:
hostB-> xhost hostC hostB-> rlogin hostC
hostC % setenv DISPLAY hostA:0 hostC % XclientApp
The following typical error messages are displayed and theXclientApp doesn't start up or is not displayed on hostA:
Xlib: connection to hostA:0 refused by the server Xlib: Invalid MIT-MAGIC-COOKIE-1 key
Your steps make sense but, apparently, the host access control mechanism is not considered. You can check that it is enabled by running (the output is from my local KDE session) hostB-> xhost access control enabled, only authorized clients can connect Anyway, you can copy the MIT-MAGIC-COOKIE-1 from hostB to hostC via the xauth command, see the example in "man xauth".
hostB-> rlogin hostA hostA % xhost hostC
This cannot work since clients on hostA (e.g. the command xhost) are not authorized to connect to the server. Anyway, "ssh -X" may make your life easier since it handles the authorization issues automatically. -- A.M.