Linux - Server This forum is for the discussion of Linux Software used in a server related context. |
Notices |
Welcome to LinuxQuestions.org, a friendly and active Linux Community.
You are currently viewing LQ as a guest. By joining our community you will have the ability to post topics, receive our newsletter, use the advanced search, subscribe to threads and access many other special features. Registration is quick, simple and absolutely free. Join our community today!
Note that registered members see fewer ads, and ContentLink is completely disabled once you log in.
Are you new to LinuxQuestions.org? Visit the following links:
Site Howto |
Site FAQ |
Sitemap |
Register Now
If you have any problems with the registration process or your account login, please contact us. If you need to reset your password, click here.
Having a problem logging in? Please visit this page to clear all LQ-related cookies.
Get a virtual cloud desktop with the Linux distro that you want in less than five minutes with Shells! With over 10 pre-installed distros to choose from, the worry-free installation life is here! Whether you are a digital nomad or just looking for flexibility, Shells can put your Linux machine on the device that you want to use.
Exclusive for LQ members, get up to 45% off per month. Click here for more info.
|
 |
11-27-2010, 12:39 AM
|
#1
|
LQ Newbie
Registered: Dec 2009
Location: Mexico city
Distribution: Debian, CentOS, openSuSe
Posts: 19
Rep:
|
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...
|
|
|
11-28-2010, 02:41 PM
|
#2
|
Member
Registered: Mar 2008
Location: Denver, CO
Distribution: Red Hat Enterprise Linux
Posts: 52
Rep:
|
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.
|
11-29-2010, 03:02 PM
|
#3
|
LQ Newbie
Registered: Dec 2009
Location: Mexico city
Distribution: Debian, CentOS, openSuSe
Posts: 19
Original Poster
Rep:
|
well... nope, didn't work :S
the fact that I cannot find any log or something is the most frustrating thing...
|
|
|
11-29-2010, 03:16 PM
|
#4
|
LQ Guru
Registered: Jun 2004
Location: Piraeus
Distribution: Slackware
Posts: 13,220
|
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.
|
11-29-2010, 04:59 PM
|
#5
|
LQ Newbie
Registered: Dec 2009
Location: Mexico city
Distribution: Debian, CentOS, openSuSe
Posts: 19
Original Poster
Rep:
|
Quote:
Originally Posted by bathory
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...
|
|
|
11-29-2010, 05:18 PM
|
#6
|
Senior Member
Registered: Oct 2009
Location: Wroclaw, Poland
Distribution: Arch, Kubuntu
Posts: 1,281
|
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
}
|
|
|
11-29-2010, 05:25 PM
|
#7
|
LQ Guru
Registered: Jun 2004
Location: Piraeus
Distribution: Slackware
Posts: 13,220
|
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.
|
11-29-2010, 05:55 PM
|
#8
|
LQ Newbie
Registered: Dec 2009
Location: Mexico city
Distribution: Debian, CentOS, openSuSe
Posts: 19
Original Poster
Rep:
|
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:
(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 05:57 PM.
Reason: code tags were wrong
|
|
|
11-29-2010, 06:25 PM
|
#9
|
Senior Member
Registered: Oct 2009
Location: Wroclaw, Poland
Distribution: Arch, Kubuntu
Posts: 1,281
|
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?
|
|
|
11-29-2010, 07:14 PM
|
#10
|
LQ Guru
Registered: Jun 2004
Location: Piraeus
Distribution: Slackware
Posts: 13,220
|
Take a look at this howto that is written for tightvnc
Regards
|
|
1 members found this post helpful.
|
11-29-2010, 11:52 PM
|
#11
|
LQ Newbie
Registered: Dec 2009
Location: Mexico city
Distribution: Debian, CentOS, openSuSe
Posts: 19
Original Poster
Rep:
|
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 12:13 PM.
Reason: privacy on my username
|
|
|
11-30-2010, 12:08 PM
|
#12
|
LQ Newbie
Registered: Dec 2009
Location: Mexico city
Distribution: Debian, CentOS, openSuSe
Posts: 19
Original Poster
Rep:
|
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 04:48 PM.
Reason: added more info
|
|
|
All times are GMT -5. The time now is 05:59 AM.
|
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.
|
Latest Threads
LQ News
|
|