[Home]History of EMCDisplayOnWindows

LinuxCNCKnowledgeBase | RecentChanges | PageIndex | Preferences | LinuxCNC.org

Revision 9 . . (edit) December 9, 2005 5:37 am by Kreed
Revision 7 . . December 7, 2005 9:39 pm by Kreed
Revision 4 . . (edit) November 3, 2005 5:33 pm by Stephen Wille Padnos
  

Difference (from prior major revision) (minor diff, author diff)

Changed: 1c1,5
Background notes: this method is based on the X Window System (aka X11 or simply X) client/server model. The language of X11 is somewhat counterintuitive. The X11 client runs on the remote machine (the host running EMC in our case) and the X11 server runs on the local machine (the host running Microsoft Windows in our case). This method also depends on secure shell (SSH) technology for secure communications. The language of SSH is more intuitive. The SSH server (sshd) runs on the remote machine and the SSH client runs on the local machine. Finally, although there are a few points in the following that are specific to Microsoft Windows, this method will work with any local machine possessing an X11 server and an SSH client, notably, an Apple Macintosh running OS/X.
Background notes: this method is based on the X Window System (aka X11 or simply X) client/server model. The language of X11 is somewhat counterintuitive. The X11 client runs on the remote machine (the host running EMC in our case) and the X11 server runs on the local machine (the host running Microsoft Windows in our case). This method also depends on secure shell (SSH) technology for secure communications. The language of SSH is more intuitive. The SSH server (sshd) runs on the remote machine and the SSH client runs on the local machine.

Note: Although there are a few points in the following that are specific to Microsoft Windows, this method will work with any local machine possessing an X11 server and an SSH client, notably, an Apple Macintosh running OS/X.

Note: Several of the commands used here allow the use of either a numeric IP address or a symbolic hostname. Using the IP address is guaranteed to work. Using the symbolic name requires the presence of either an appropriately configured DNS server or an appropriate /etc/hosts file.

Changed: 15c19
Step 2: test the SSH connection using an SSH client on your local machine. This could be a 3rd-party Microsoft Windows application such as PuTTY or Tera Term Pro with the TTSSH plugin. If you've installed the full cygwin environment, then from a cygwin prompt, type ssh -l your_emc_user_name {IP address / hostname of EMC machine}. In any case, say yes when asked if you want to add the server's key to your known_hosts file. Enter your emc_user_password at the Password: prompt and you should find yourself looking at the command prompt as if you were sitting at the console of the remote machine.
Step 2: test the SSH connection using an SSH client on your local machine. This could be a 3rd-party Microsoft Windows application such as PuTTY or Tera Term Pro with the TTSSH plugin. If you've installed the full cygwin environment, then from a cygwin prompt, type ssh -l your_emc_user_name {IP_address / hostname of EMC machine}. In any case, say yes when asked if you want to add the server's key to your known_hosts file. Enter your emc_user_password at the Password: prompt and you should find yourself looking at the command prompt as if you were sitting at the console of the remote machine.

Changed: 19c23
Step 3: Start the X11 Server on the local machine. The Cygwin folks have thoughtfully provided a Microsoft Windows batch file startxwin.bat (look in the cygwin subdirectory ./usr/X11R6/bin). You can invoke this batch file in any of the usual ways to start the server. Alternatively. you can invoke startx or other X11-ish things from within the cygwin environment.
Step 3: Start the X11 Server on the local machine. The Cygwin folks have thoughtfully provided a Microsoft Windows batch file startxwin.bat (look in the cygwin subdirectory ./usr/X11R6/bin). You can invoke this batch file in any of the usual ways to start the server. Alternatively. you can invoke startx or do other X11-ish things from within the cygwin environment.

Changed: 23c27,29
From the xterm, type xhost +{IP address / hostname of remote EMC machine}
Note: This next xhost command has proved to be necessary in tests with the BDI-4.30 installation running on the remote machine. It has proved not to be necessary in tests with Red Hat Enterprise Linux running on the remote machine. Both machines were running OpenSSH. Go figure.

From the xterm, type xhost +{IP_address / hostname of remote EMC machine}

Changed: 26c32
ssh -Y -l your_emc_user_name {IP address / hostname of remote EMC machine}
ssh -X -l your_emc_user_name {IP_address / hostname of remote EMC machine}

Changed: 28c34
The -Y option tells ssh to accept incoming X connections.
The -X option tells ssh to forward X11 packets from the remote machine.

Changed: 30c36
From your new ssh shell (within the xterm), you need to set the DISPLAY environment variable so that any programs you run on the remote EMC machine know where to send their display data:
Note: In some installations, using the -Y option instead of the -X option may be necessary, but try -X first.

Changed: 32c38,42
export DISPLAY=IP.OF.WIN.MACHINE:0.0
Note: This next command to set the DISPLAY environment variable on the remote machine has proved to be necessary in tests with the BDI-4.30 installation running on the remote machine. It has proved not to be necessary in tests with Red Hat Enterprise Linux running on the remote machine. Both machines were running OpenSSH. Go figure.

From your new ssh shell (within the xterm), set the DISPLAY environment variable so that any programs you run on the remote EMC machine know where to send their display data:

export DISPLAY={IP_address / hostname of local machine}:0.0

Changed: 36c46
Note: Neglecting to set the displaynumber (e.g., the :0.0) leads to the mysterious failure "Error: Can't open display: IP.OF.WIN.MACHINE" when you subsequently try to invoke a remote X-client process.
Note: Neglecting to set the displaynumber according to the configuration of your local X11 server (in this case, the :0.0) can lead to the mysterious failure "Error: Can't open display: IP.OF.WIN.MACHINE" when you subsequently try to invoke a remote X-client process.

Changed: 40c50
Try it; for example, run kate:
Try it. For example, run kate:

Changed: 46c56
For a little fun, invoke xeyes or xclock on the remote machine and watch the graphics on your local machine.
For a little fun, invoke xeyes on the remote machine and watch the graphics on your local machine track your mouse cursor around the desktop.

Removed: 55d64


LinuxCNCKnowledgeBase | RecentChanges | PageIndex | Preferences | LinuxCNC.org
Search:
Published under a Creative Commons License