Displaying Remote X Clients
Last Updated: 11-Jul-2004
This page shows how to setup a remote X display between a PC running Cygwin/X and a Linux (Redhat 9) machine. Using this setup the user can remotely display Precision/Modelsim/HDL_Designer etc from a Linux box. There are several advantages of doing this, the first one is that the user can remotely share a (powerful) PC and the second one is that a node-locked license can be used as a floating one (note: in the strictest sense this is in breach of your node-locked license agreement).
For the following installation procedure it is assume that the client is running Windows and the server is a Redhat 9.0 machine. Obviously the client can also be a Linux box and the server can be any Linux distro.
On the Windows machine:
- Download and install Cygwin/X
- Start the X server (<drive>\cygwin\usr\X11R6\bin\startxwin.bat)
- When you get the terminal window try to ping your Linux box, for example:
bash-2.05b$ ping rhserver
Pinging rhserver [192.168.0.192] with 32 bytes of data:
Reply from 192.168.0.192: bytes=32 time<1ms
TTL=64
Reply from 192.168.0.192: bytes=32 time<1ms TTL=64
Reply from
192.168.0.192: bytes=32 time<1ms TTL=64
Reply from 192.168.0.192: bytes=32
time<1ms TTL=64
If this fails try using the IP address of the Linux Box (/sbin/ifconfig). If this works than optionally add the Linux Box machine name + ip address to /etc/hosts
bash-2.05b$ more /etc/hosts
127.0.0.1 localhost
192.168.0.192
rhserver #
Linux Box IP address and name
On the Linux machine:
- Enable SSH daemon.
SSH (Secure SHell) is a suite of tools for logging into and executing commands on a remote machine. SSH replaces telnet, ftp, rlogin, rsh, and rcp with secure, encrypted network connectivity tools. SSH is installed by default on most modern distro's so the installation procedure will not be described here.
It is recommended you use SSH (encrypted link) between your PC and Linuxbox. However, if you are behind a firewall and running on a 10Mbps network you might want to try Telnet instead which provides a faster link that SSH. However, be aware that Telnet communications are unencrypted and provide no security from network snooping.
The SSH daemon (sshd) is normally disabled by default. You can enable it by running the graphical "services" program (System Settings->Server Settings->services) or use the root command line as shown below:
[root@rhserver hans]# /sbin/service sshd start
Starting
sshd: [
OK
]
On the Windows machine:
- type ssh -X -l <username> <servername>
replace <username> with your Linux box login name and <servername> with the Linux box name (uname -n).
bash-2.05b$ ssh -X -l hans rhserver
The authenticity of host 'rhserver' can't be established.
DSA
key fingerprint is 94:68:3a:3a:bc:f3:9a:9b:01:5d:b3:07:38:e2:11:0c.
Are you
sure you want to continue connecting (yes/no)?
The first time you use the ssh command a DSA key will be generated, type yes when you get this question. The servername will be added to a list of known (approved) hosts (see the xhost command for more info).
Next, you will see a prompt asking for your password for the remote machine. After entering your password, you will be at a shell prompt for the remote machine.
The X11 display is automatically forwarded to your Cygwin machine (-X argument on ssh), if you get an error message that no $DISPLAY variable is set you can set it manually (it shouldn't be necessary though unless you use telnet), for example:
bash-2.05b$ export DISPLAY=PC104:0.0

Figure: HDL Designer running under Linux and remotely displayed on a PC running Cygwin/X
Tip1: To change the terminal fonts size simply open a new terminal with the -fn argument, for example
bash-2.05b$ xterm -fn 10x20 &
You can also add this command line option to the default xterm command (see your <install_dir>\cygwin\usr\X11R6\bin\startxwin.bat file).
Tip2: You can change the HDL_Designer fonts by modifying the Xdefaults file (<install_dir>/resources/misc/Xdefaults).
Update 11 July 2004 : Precision 2004a fails to display remotely. I suspect this is caused by the mainwin layer. Mainwin is a Windows API which Mentor uses to port windows programs to Linux. Modelsim and HDL Designer do not use this layer and work fine hence I assume this layer is the cause of the problem.
