Please note, while this topic would require the separate document (and probably not only one), to be covered in details, we decided to pull a single section devoted to most frequently asked questions at our mailing list related to X Windows. For more details please refer to X Window links in another section.
There are many ways to do this. The simplest would be. to run Xserver on hostB. Then allow displaying on this machine from hostA using, for example,
xhost +
then log into hostA machine (using telnet, secure shell, or rsh), and set
display variable to point to display at hostB machine:
DISPLAY="hostB:0.0"; export DISPLAY
Now, when you run an X window application on hostA, the output will be
directed to hostB display. For more details please refer to X window manual
pages.
By default, xterm doesn't start shell as your login shell, that's why these files are not processed. To tell xterm doing so, you will have to use -ls switch:
xterm(1)
-ls This option indicates that the shell that is
started in the xterm window will be a login shell
(i.e., the first character of argv[0] will be a
dash, indicating to the shell that it should read
the user's .login or .profile).