I have installed VMWare workstation on a Windows 7 host machine. The guest operating system on my VMWare workstation is RHEL 6 64-bit (call it virtual_redhat). I have a remote RHEL 6 machine (call it native_remote_redhat) that I use heavily. I SSH to the native_remote_redhat via my virtual_redhat machine. However, I cannot use X-Windows to open an application window on the virtual_redhat machine. Can I even do this? I can do it if I used a native linux machine to connect to the remote machine. I ran the following commands [Note the virtual machine's IP address here is 333.444.55.66]:
$ xhost +
$ ssh uname@123.456.78.90 -X
$ export DISPLAY=333.444.55.66:0.0
$ gedit
$ (gedit:6683): Gtk-WARNING **: cannot open display: 333.444.55.66:0.0
I have also edited the /etc/gdm/custom.conf file to look as follows:
# GDM configuration storage
[daemon]
[security] DisallowTCP=false
[xdmcp] Enable=true
[greeter]
[chooser]
[debug]
Note: Xterm is not available on the Virtual machine.
I was able to resolve this issue when I found out that the DISPLAY variable was set to localhost:13.0
I also agree with @Andrey%bSidorov that we don't need to explicitly set the DISPLAY variable for a VM. It is set on it's own.