Take the 2-minute tour ×
Super User is a question and answer site for computer enthusiasts and power users. It's 100% free, no registration required.

I am trying to get Real VNC server on Ubuntu 10.04 LTS 64 bit.

I tried 2 options. First, I got Real VNC free edition and got it working after getting all requires 32 bit libraries, configuration hacking etc. It's almost good with one little problem, after I disconnect client, server prints Aborted and exits. I tried many combination of parameters and could not figure it.

This is roughly a command line I used (but I tried many parameter combinations).

Xvnc :2 -desktop user-desktop -query localhost -geometry 1920x1200 -depth 16 -AcceptCutText -SendCutText -rfbauth /home/user/.vnc/passwd -SecurityTypes None -DisconnectClients

Second option. I got trial version of Real VNC Enterprise 4.6.1 and installed it. Now I can happily start it as standalone server and my clients can disconnect without killing server but when I try to use it with -inetd option it just silently exits. When I try free edition it would go into stdio mode and print handshake message

RFB 003.008

Not the case with enterprise edition. It just exits. No message and no logs.

So does anyone have any idea on how to get either option work?


Per recommendation from @grawity I run strace and ltrace. Here is most interesting output from ltrace (I collected data in file called abc and only pasted lines that I find interesting):

$cat abc | egrep 'strchr|print'

fprintf(0x7f330223e860, "\n%s", "Sun Jul 10 13:07:30 2011\n") = 26
strchr("inetd client gone, exiting", ' ')        = " client gone, exiting"
strchr("client gone, exiting", ' ')              = " gone, exiting"
strchr("gone, exiting", ' ')                     = " exiting"


$ cat abc | egrep 'strchr|print' | grep socket
strchr("getpeername: Socket operation on"..., ' ') = " Socket operation on non-socket "...
strchr("Socket operation on non-socket ("..., ' ') = " operation on non-socket (88)"
strchr("operation on non-socket (88)", ' ')      = " on non-socket (88)"
strchr("on non-socket (88)", ' ')                = " non-socket (88)"
strchr("non-socket (88)", ' ')                   = " (88)" 
share|improve this question

1 Answer 1

up vote 1 down vote accepted

Try running it under ltrace or strace.

It could be that the inetd mode requires that stdin and stdout be sockets – for example, this is required for determining the client's IP address. It's likely that RealVNC isn't prepared for getpeername() to return failure.

Alternatively, use Xvnc.

share|improve this answer
    
Thanks for mentioning strace and ltrace. You may be right about sockets. I updated my question with output of ltrace. But what do I do next to solve it? –  Alex Gitelman Jul 10 '11 at 20:20
    
@Alex: The problem shouldn't happen when running RealVNC under real xinetd. Have you tried that already? –  grawity Jul 10 '11 at 21:16
    
I tried from real xinetd. I can connect, see X screen for a second and then it dies. I also can't figure how to get log from vnc. –  Alex Gitelman Jul 10 '11 at 22:08
    
Try a packet sniffer; error messages usually go to stderr, which is sent over the same socket by xinetd. Also check dmesg for program crashes, and /var/log/messages|/var/log/syslog|/var/log/everything.log for VNC logs. –  grawity Jul 10 '11 at 22:24
    
Actually, I accidentally :( found vnc log. Not sure why my attempts to direct it to specific place fail. It always just says that inetd client is gone. But anyway, apparently there is a permission issue. I changed user in xinetd config file to myself and now I can connect. However, it still dies once I disconnect client. I think there was an option to xinetd that controls it. I am browsing through docs and will probably find it, but do you remember on top of your head? –  Alex Gitelman Jul 10 '11 at 22:31

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.