LinuxQuestions.org
Review your favorite Linux distribution.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Server
User Name
Password
Linux - Server This forum is for the discussion of Linux Software used in a server related context.

Notices

Reply
 
Search this Thread
Old 11-26-2010, 11:39 PM   #1
jstitch
LQ Newbie
 
Registered: Dec 2009
Location: Mexico city
Distribution: Debian, CentOS, openSuSe
Posts: 19

Rep: Reputation: 1
VNC over xinetd doesn't starts vncserver


Hi,

in Debian Lenny, using TightVNC 1.3.9 I can setup a VNC server manually by using

Code:
vncserver -query localhost -once -geometry 1024x768 -depth 16 :1
But then, as I have read is a better option, I use xinetd with the following configuration:

Code:
service vnc-1024x768x16
 {
    protocol = tcp
    socket_type = stream
    wait = no
    user = nobody
    server = /usr/bin/vncserver
    server_args = -inetd -query localhost -once -geometry 1024x768 -depth 16
 }
I have open port 5901 to connect to the server. With first way (vncserver alone) I manage to connect to my server succesfully.

But with xinetd way I just can't connect.

Externally I can see that port 5901 is open and even that VNC service is available. Looking at VNC log generated for the :1 display I haven't found anything.

In fact, I was considering that the problem was with xinetd, but I have other services setted up with it (telnet & ftp for example) and I can use them correctly.

So now I'm lost with this, what else am I not considering with VNC service through xinetd? Where can I find logs or useful information to get a clue about this problems?

Any ideas?

Thanks for reading...
 
Old 11-28-2010, 01:41 PM   #2
Ehtetur
Member
 
Registered: Mar 2008
Location: Atlanta, GA
Distribution: Red Hat Enterprise Linux, Scientific Linux
Posts: 52

Rep: Reputation: 16
The first thing that caught my eye was that in RHEL, the VNC config file for xinetd needs the following lines that are missing from your Debian example:
Code:
    disable = no
    port = 5901
Insert them and restart xinetd to see if it fixes your problem.
 
1 members found this post helpful.
Old 11-29-2010, 02:02 PM   #3
jstitch
LQ Newbie
 
Registered: Dec 2009
Location: Mexico city
Distribution: Debian, CentOS, openSuSe
Posts: 19

Original Poster
Rep: Reputation: 1
well... nope, didn't work :S

the fact that I cannot find any log or something is the most frustrating thing...
 
Old 11-29-2010, 02:16 PM   #4
bathory
Guru
 
Registered: Jun 2004
Location: Piraeus
Distribution: Slackware
Posts: 10,885

Rep: Reputation: 1322Reputation: 1322Reputation: 1322Reputation: 1322Reputation: 1322Reputation: 1322Reputation: 1322Reputation: 1322Reputation: 1322Reputation: 1322
Hi,

Replace "server = /usr/bin/vncserver" with:
Code:
server = /usr/bin/Xvnc
set "disable = no" and see if it works

Regards
 
1 members found this post helpful.
Old 11-29-2010, 03:59 PM   #5
jstitch
LQ Newbie
 
Registered: Dec 2009
Location: Mexico city
Distribution: Debian, CentOS, openSuSe
Posts: 19

Original Poster
Rep: Reputation: 1
Quote:
Originally Posted by bathory View Post
Hi,

Replace "server = /usr/bin/vncserver" with:
Code:
server = /usr/bin/Xvnc
set "disable = no" and see if it works

Regards
ummmm well, now I got a prompt asking me for a password!
the fact is that I write the password I normally use when I run VNC but it doesn't works here.
This password is stored in $HOME/.vnc/passwd file...

BTW, Xvnc is not Xtightvnc as far as I recon, vncserver is the wrapper for Xtightvnc to run, but Xvnc in fact points to a program called Xvnc4 (can't remember installed this one) - In the above line I changed Xvnc for Xtightvnc but with no results...
 
Old 11-29-2010, 04:18 PM   #6
eSelix
Senior Member
 
Registered: Oct 2009
Location: Wroclaw, Poland
Distribution: Kubuntu
Posts: 1,190

Rep: Reputation: 301Reputation: 301Reputation: 301Reputation: 301
You need option "-rfbauth /home/username/.vnc/passwd".
This config works for me:
Code:
service VNC_0
    {
    disable         = no
    type            = UNLISTED
    socket_type     = stream
    protocol        = tcp
    port            = 5900
    user            = root
    server          = /usr/bin/x11vnc
    server_args     = -inetd -o /var/log/x11vnc.log -display -shared -norc -cursor arrow -pointer_mode 4 -rfbauth /root/.vnc/passwd -alwaysshared -xdamage
    wait            = no
    }
 
Old 11-29-2010, 04:25 PM   #7
bathory
Guru
 
Registered: Jun 2004
Location: Piraeus
Distribution: Slackware
Posts: 10,885

Rep: Reputation: 1322Reputation: 1322Reputation: 1322Reputation: 1322Reputation: 1322Reputation: 1322Reputation: 1322Reputation: 1322Reputation: 1322Reputation: 1322
Hi,

You can:
Add "-SecurityTypes None" in the server_args, so it doesn't prompt for a password.

Or change the user, from nobody to the user that has a ~/.vnc/passwd file and use the -rfbauth option to specify the password file if necessary

Regards
 
1 members found this post helpful.
Old 11-29-2010, 04:55 PM   #8
jstitch
LQ Newbie
 
Registered: Dec 2009
Location: Mexico city
Distribution: Debian, CentOS, openSuSe
Posts: 19

Original Poster
Rep: Reputation: 1
wow, I've used both the option of 'SecurityTypes', and also changing the user for the rfbauth option.
It now half works...

I can enter the password file as I've been using it, and now I get a sort of X window, but with no login screen, nor even a terminal or something...

Mmmm as far as I'm understanding this, when I use the 'not xinetd' way, with vncserver, I manage to start with something called XDMCP, and so as I've configured it I get even a login screen, as if sitting at my computer just about to login...

This vncserver program accepts another parameter:

Code:
-query localhost
(as I've wrote it at the beginning of this thread)

Anyway, I've noticed that
Code:
vncserver -query localhost
gives me XDMCP and so the login screen...
I try to use
Code:
Xvnc -query localhost
too. Doing it manually (not xinetd), I manage to get a login screen! but anyway is a little bit laggy (I really prefer Xtightvnc, it's working fine for me...)
Using
Code:
Xvnc -query localhost
from xinetd doesn't works for me now... this is pretty strange...


AND! now I've got a new problem! while testing, using a command line for Xvnc, I've got the following error message:

XDMCP fatal error: Session declined Maximum number of open sessions from your host reached

and can't start a VNC server any more :/
I know this is a collateral problem, but what should I do about it now? Googling a little I've found it's related to the number of XDMCP sessions allowed, but only found how to make this maximum greater, and perhaps what I need is to kill the current ones? I'm lost now...

BTW, eSelix, your configuration is for x11vnc, which isn't quite what I need right now: x11vnc allows me to control the current X display, usually named :0 , but I need a virtual one, not to control the current one.

Last edited by jstitch; 11-29-2010 at 04:57 PM. Reason: code tags were wrong
 
Old 11-29-2010, 05:25 PM   #9
eSelix
Senior Member
 
Registered: Oct 2009
Location: Wroclaw, Poland
Distribution: Kubuntu
Posts: 1,190

Rep: Reputation: 301Reputation: 301Reputation: 301Reputation: 301
Oh yes, sorry, I forgot that I am using it for current display. As for not working "Xvnc -query localhost" - did you killed all Xvnc processes and restarted xinetd?
 
Old 11-29-2010, 06:14 PM   #10
bathory
Guru
 
Registered: Jun 2004
Location: Piraeus
Distribution: Slackware
Posts: 10,885

Rep: Reputation: 1322Reputation: 1322Reputation: 1322Reputation: 1322Reputation: 1322Reputation: 1322Reputation: 1322Reputation: 1322Reputation: 1322Reputation: 1322
Take a look at this howto that is written for tightvnc

Regards
 
1 members found this post helpful.
Old 11-29-2010, 10:52 PM   #11
jstitch
LQ Newbie
 
Registered: Dec 2009
Location: Mexico city
Distribution: Debian, CentOS, openSuSe
Posts: 19

Original Poster
Rep: Reputation: 1
ok, thanks!

look, I restarted my computer, to clean that XDMCP problem basically, but using the following configuration:

Code:
service vnc-1024x768x16
{
  protocol = tcp
  socket_type = stream
  wait = no
  user = user_name
  server = /usr/bin/Xvnc
  server_args = -inetd -query localhost -once -geometry 1024x768 -depth 16 -rfbport=5901 -rfbauth=/home/user_name/.vnc/passwd
  disable = no
}
I managed to connect remotely using VNC and with a login screen and all... don't know what changed, perhaps just the reboot process.
I just can connect once to it, I mean I can't start more than one session at a time.

Now I'll take a look at your tightvnc howto to see what else can I achieve

Thanks to all of you!



PS further questions I'll post them here tomorrow, that's why I'll wait till then to mark this as solved, ok?

Last edited by jstitch; 11-30-2010 at 11:13 AM. Reason: privacy on my username
 
Old 11-30-2010, 11:08 AM   #12
jstitch
LQ Newbie
 
Registered: Dec 2009
Location: Mexico city
Distribution: Debian, CentOS, openSuSe
Posts: 19

Original Poster
Rep: Reputation: 1
Ok...

following the TightVNC tutorial, I noticed the following:

-the tutorial uses Xvnc so as I've been using it in the last posts.
-man page for vncserver in fact says that it is a wrapper for Xvnc program
-but when I run vncserver alone, no xinetd, with a ps aux | grep vnc , I notice that the program that is called is Xtightvnc, not Xvnc
-but when I use Xtightvnc in xinetd.conf, I can't get any connections...
-using Xvnc I get a connection, but it is rather a little bit slow, maybe I'll have to live with it (unless I can get Xtightvnc to be run instead of Xvnc)

I'll keep experimenting with this a little... At least I think now I can handle it a lot better...

BTW, I discovered that Xvnc is in fact RealVNC for my machine, not TightVNC as I desired, guess I'll have to look more on how to redirect things well, also on how to use Xtightvnc as I desire...

thanks again

I'll mark this one as solved, but any further ideas are welcomed



-- UPDATE --
just as a colophon...
I finally got to get Xtightvnc to work.
The problem?
In the xinetd server_args configuration line doesn't accepts the '=' character for assigning value to parameters!
so the final result is:

Code:
service vnc-1024x768x16
{
  protocol = tcp
  socket_type = stream
  wait = no
  user = user_name
  server = /usr/bin/Xvnc
  server_args = -inetd -query localhost -once -geometry 1024x768 -depth 16 -rfbport 5901 -rfbauth /home/user_name/.vnc/passwd
  disable = no
}
I also had to change the Xvnc soft link, which was pointing to Xvnc4 (realvnc) so it finally pointed to Xtightvnc...

Last edited by jstitch; 11-30-2010 at 03:48 PM. Reason: added more info
 
  


Reply

Tags
inetd, tightvnc, vnc, xinetd


Thread Tools Search this Thread
Search this Thread:

Advanced Search

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
unable to connect to the vnc session on vncserver which is running chaitanya1982 Linux - Server 2 07-01-2010 07:41 PM
Trying to use VNC on Mandriva One 2008 and cannot get vncserver to run once ready... zurkeyon Linux - Newbie 12 10-08-2008 12:28 PM
trying to run vnc using xinetd on fedora 9 JSLayton Linux - General 2 09-16-2008 12:09 PM
VNCServer help: proxy not blocking the port, but VNC still not coming through MikeOfAustin Linux - Software 3 05-09-2008 02:33 PM
start VNC through xinetd in RH9 UltraSoul Linux - Networking 0 07-28-2005 02:12 PM


All times are GMT -5. The time now is 07:17 AM.

Main Menu
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
identi.ca: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration