-   Linux - Newbie (
-   -   Help - Cant login via ... (

Peterjj 05-05-2010 11:57 PM

Help - Cant login via ...

My first post. So be nice. :)

Got a question. I am trying to login to a redhat server via VNC. This used to work until I reloaded the box. Although I had previously logged in directly to the box, then I could vnc to it remotely. The service is running, netstat states the ports are open and listening. I can ssh to the box, and ran the usual commands to start the services.

So my question is. Do I need to have a local user logged in before I can VNC, if so how can I do that via the command line.

If this is not required for a local user to be logged in, what am I missing. Other than VNC, which other services do I need to start.



ajeetsinghraina 05-06-2010 12:13 AM

You will need several things to get started:

root privledges
VNC client software (tightVNC, you can download it here.)
A good password!
this example is done with RHEL, which comes standard with VNCserver installed.

To start the vncserver simply invoke the following commands:
[root@ajeet etc]# service vncserver start
Starting VNC server: [ OK ]
[root@ajeet etc]#
[root@ajeet etc]# vncpasswd
[root@ajeet etc]#
[root@ajeet etc]# vncserver

New 'ajeet:1 (root)' desktop is roswell:1

Starting applications specified in /root/.vnc/xstartup
Log file is /root/.vnc/ajeet:1.log

[root@ajeet etc]#

Now access the VNC Server from Windows/ any Distros through supplying the above password.
Hope it helps !!

Peterjj 05-06-2010 01:20 AM

Thanks Matey, but I followed that exact process after a few google searches. No luck. When I try and VNC is states the connection is refused.

netstat -nalpt | grep vnc
tcp 0 0* LISTEN 3510/Xvnc
tcp 0 0* LISTEN 4182/Xvnc
tcp 0 0* LISTEN 3510/Xvnc
tcp 0 0* LISTEN 4182/Xvnc
tcp 0 0* LISTEN 3510/Xvnc
tcp 0 0* LISTEN 4182/Xvnc
tcp 0 0 :::6001 :::* LISTEN 3510/Xvnc
tcp 0 0 :::6002

Peterjj 05-06-2010 02:47 AM

Just to add the server has no monitor or keyboard attached since it was reloaded.

lsof -i | grep vnc
Xvnc 3510 user 0u IPv6 14573 TCP *:6001 (LISTEN)
Xvnc 3510 user 1u IPv4 14574 TCP *:6001 (LISTEN)
Xvnc 3510 user 4u IPv4 14579 TCP *:5901 (LISTEN)
Xvnc 3510 user 5u IPv4 14580 TCP *:5801 (LISTEN)
Xvnc 4000 root 0u IPv6 17242 TCP *:6002 (LISTEN)
Xvnc 4000 root 1u IPv4 17243 TCP *:6002 (LISTEN)
Xvnc 4000 root 4u IPv4 17248 TCP *:5902 (LISTEN)
Xvnc 4000 root 5u IPv4 17249 TCP *:5802 (LISTEN)

ajeetsinghraina 05-07-2010 12:17 AM

Can you post the output of this command:


Peterjj 05-07-2010 01:24 AM

xauth: (stdin):1: bad display name "Redhat_Server:4" in "add" command

New 'Redhat_Server:4 (root)' desktop is Redhat_Server:4

Starting applications specified in /root/.vnc/xstartup
Log file is /root/.vnc/Redhat_S

ajeetsinghraina 05-07-2010 02:32 AM

My *guess* is the X session isn't starting on the RH box, and it's got
something to do with that xinit file.
Can you post what steps you followed.
I recommend you to follow these complete steps and see if no error gets displayed :

All times are GMT -5. The time now is 08:50 AM.