Click here to Skip to main content
15,886,199 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
Hello all!

I'm trying to use VNC to remotely connect to my linux server.

Since today I've been able to use a prepared session ":10" in order to connect to it and it worked like charm.

The problem with that is that I've decided to virtualize a server and to use VMWARE player to launch it. Then it is important for me to be able to monitor the vmware player software, to be able to search for updates and so... relaunch it if needed...

If I executer the VMWare player remotely from the session :10 then I would not be able to see the vmware player from the physical computer and I would like to avoid it.

I've thought on connecting remotely to my : 0 session, but it only works meanwhile the user is logged in the physical machine so it has no sense for me.

As it works meanwhile the user is logged in, then I guess that the network permissions, ports and others are well configured...

Any idea?

As always thank you in advance!
Posted

I don't understand the question.

But some possibilities follow...

You have computer (physical) called A.

A has a VM running on it which creates virtual server B.

Excluding some specific API in the VM software itself B doesn't know that it is running in VM.

If you want to know something about A then you must run something on A. You can't run anything on B that knows about A (excluding some specific API.)

And the same applies to B.
 
Share this answer
 
Comments
Joan M 3-Jan-12 2:17am    
This is not my problem, after searching a lot I've found a solution that solves my problems in the internet, you can take a look at my own solution... thank you for trying. :thumbsup:
After searching a lot, I've found this post in LinuxQuestions.org:

http://www.linuxquestions.org/questions/red-hat-31/how-to-enable-vnc-console-on-rhel-5-server-635622/[^]

Thank you Pratul!

Here's an excerp that shows exactly how to do what I need:

This is to setup VNC to provide access to the local default X console as if you are sitting on the physical console. (These instructions are not for providing level 5 display for individual users):

CONFIGURING VNC FOR RHEL 5 SERVERS
Pratul – 04/14/2008

To set up VNC to control the native X server, follow these steps: 

****STEP1. On the system you want to control with VNC, run the program vncpasswd as root to set a VNC password. You will use this password when connecting with vncviewer or another VNC remote control program. 

****STEP2. Edit the file /etc/X11/xorg.conf on RHEL 5 

[A] Create the section called Module in the end of the file and add following lines: 
Section "Module"
Load "glx"
Load "dbe"
Load "extmod"
Load "freetype"
Load "type1"
Load "dri"
Load "vnc"
EndSection
Make sure this is on a new line before EndSection.

[B] In section called Screen, add this line: 
Option "passwordFile" "/root/.vnc/passwd"

Make sure this is on a new line before EndSection. 


****STEP3 – Allow the ports in Firewall

1. SSH to the server and Run the following tool: 
2. # system-config-securitylevel
3. In the "Other ports", please add a range as in below example. Note that those will be TCP ports as below: 

5900-5904:tcp

4. Save and close the tool then restart firewall: 
# service iptables restart

****STEP4: Make sure using chkconfig that vncserver is enabled for level 2,3,4,5. Then RESTART the machine. 

Note: If you suspect the firewall blocking, then disable the firewall altogether and test VNC if it works. I use tightVNC to test.

VNC will typically use port 59xx, where "xx" is the console number. Use the command netstat -na | less to see the ports that are open on the system. Look in the 5xxx range for VNC.


:thumbsup:
 
Share this answer
 

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900