LinuxQuestions.org
Welcome to the most active Linux Forum on the web.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie
User Name
Password
Linux - Newbie This Linux forum is for members that are new to Linux.
Just starting out and have a question? If it is not in the man pages or the how-to's this is the place!

Notices


Reply
  Search this Thread
Old 05-05-2010, 10:57 PM   #1
Peterjj
LQ Newbie
 
Registered: May 2010
Location: Sydney
Posts: 4

Rep: Reputation: 0
Talking Help - Cant login via ...


Hi LQ

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.

Thanks

Peterjj
 
Old 05-05-2010, 11:13 PM   #2
ajeetsinghraina
Member
 
Registered: May 2010
Location: India
Distribution: Ubuntu 7.04/8.04/8.10/10.04, RHEL 6, OpenSUSE,Mandriva,Fedora, CentOS, XandrOS, Slackware, OpenSolar
Posts: 155

Rep: Reputation: 55
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
Password:
Verify:
[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 !!

Last edited by ajeetsinghraina; 05-05-2010 at 11:14 PM.
 
Old 05-06-2010, 12:20 AM   #3
Peterjj
LQ Newbie
 
Registered: May 2010
Location: Sydney
Posts: 4

Original Poster
Rep: Reputation: 0
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 0.0.0.0:5801 0.0.0.0:* LISTEN 3510/Xvnc
tcp 0 0 0.0.0.0:5802 0.0.0.0:* LISTEN 4182/Xvnc
tcp 0 0 0.0.0.0:5901 0.0.0.0:* LISTEN 3510/Xvnc
tcp 0 0 0.0.0.0:5902 0.0.0.0:* LISTEN 4182/Xvnc
tcp 0 0 0.0.0.0:6001 0.0.0.0:* LISTEN 3510/Xvnc
tcp 0 0 0.0.0.0:6002 0.0.0.0:* LISTEN 4182/Xvnc
tcp 0 0 :::6001 :::* LISTEN 3510/Xvnc
tcp 0 0 :::6002
 
Old 05-06-2010, 01:47 AM   #4
Peterjj
LQ Newbie
 
Registered: May 2010
Location: Sydney
Posts: 4

Original Poster
Rep: Reputation: 0
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)

Last edited by Peterjj; 05-06-2010 at 05:58 PM.
 
Old 05-06-2010, 11:17 PM   #5
ajeetsinghraina
Member
 
Registered: May 2010
Location: India
Distribution: Ubuntu 7.04/8.04/8.10/10.04, RHEL 6, OpenSUSE,Mandriva,Fedora, CentOS, XandrOS, Slackware, OpenSolar
Posts: 155

Rep: Reputation: 55
Can you post the output of this command:
Code:
vncserver
 
Old 05-07-2010, 12:24 AM   #6
Peterjj
LQ Newbie
 
Registered: May 2010
Location: Sydney
Posts: 4

Original Poster
Rep: Reputation: 0
vncserver
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
 
Old 05-07-2010, 01:32 AM   #7
ajeetsinghraina
Member
 
Registered: May 2010
Location: India
Distribution: Ubuntu 7.04/8.04/8.10/10.04, RHEL 6, OpenSUSE,Mandriva,Fedora, CentOS, XandrOS, Slackware, OpenSolar
Posts: 155

Rep: Reputation: 55
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 :
http://www.unixmen.com/linux-tutoria...-centosrhel-5x

Last edited by ajeetsinghraina; 05-07-2010 at 01:33 AM.
 
  


Reply



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
Key repeat on graphical login screen is too fast, Its almost impossible to login. FC5 spacecoyote Fedora 8 05-13-2010 08:53 AM
[SOLVED] SSH login problem for additional users after password-less login setup uncle-c Linux - Newbie 3 02-10-2010 12:51 PM
Prevent Login by IP address / limit login attempts / remedial IP tables question whiskey06 Linux - Security 5 04-26-2009 03:48 AM
Eee PC 1000 Linux Laptop - Just setup a login account for privacy, now can't login!!! martinkettle Linux - Laptop and Netbook 3 10-28-2008 05:21 AM
Gnome: Cannot login as default user, sends back to login, works as root Danny-T Linux - Newbie 2 05-27-2006 03:44 AM

LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie

All times are GMT -5. The time now is 08:00 PM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration