Find the answer to your Linux question:
Results 1 to 5 of 5
Good Evening Ladies and Gentlemen, i am currently trying to set up a server for scientific calculations. The general idea is that all users can log onto the machine via ...
Enjoy an ad free experience by logging in. Not a member yet? Register.
  1. #1
    Just Joined!
    Join Date
    Oct 2012
    Posts
    4

    Question Debian 6.0.6 - Running XDMCP + xinetd + tightVNC


    Good Evening Ladies and Gentlemen,

    i am currently trying to set up a server for scientific calculations. The general idea is that all users can log onto the machine via VNC and upon connecting see a normal Gnome login interface where they can log in with their individual accounts. So far this already works well.

    The problem is now that whenever the VNC session is closed the individual x-servers are also closed - including all the running software. The combination of multi day calculations and a forced windows update (from hell) on the client machines is just one scenario that underlines the absurdity of this situation.

    Now the solution for this problem obviously lies in the configuration of the xinetd super server that needs to create XDMCP sessions that dont terminate upon loosing the tcp connection from the VNC connection. Also this seems to be straight forward. Xinetd has a general config file /etc/xinetd.conf and individual configurations for the services that are stored in /etc/xinetd.d/

    My xinetd.conf looks like this:

    Code:
    # Simple configuration file for xinetd
    #
    # Some defaults, and include /etc/xinetd.d/
    
    defaults
    {
    
    log_type = SYSLOG daemon info
    log_on_success  = HOST PID USERID
    log_on_failure  = HOST USERID
    cps             = 200 5
    
    }
    
    includedir /etc/xinetd.d

    And my service configuration file called "vnc" looks like this
    Code:
    service vnc-1
    {
       disable     = no
       socket_type = stream
       protocol    = tcp
       wait        = yes
       flags       = NOLIBWRAP
       user        = standarduser
       server      = /usr/bin/Xvnc
       server_args = -inetd -query localhost -geometry 1024x768 -depth 16 -rfbauth /home/standarduser/.vnc/passwd
       type        = UNLISTED
       port        = 5900
    }
    The curx of the bisquit is there the entry "wait = yes". Without this entry everything works just fine - the sessions are just not resumable. Anyhow with it the server is not connectable anymore - but if working it would be resumable and i would be happy.

    The content of my /var/log/demon.log for starting the xinetd daemon:
    Code:
    Oct 22 23:26:13 atto-calc xinetd[2913]: Reading included configuration file: /etc/xinetd.d/chargen [file=/etc/xinetd.conf] [line=20]
    Oct 22 23:26:13 atto-calc xinetd[2913]: Reading included configuration file: /etc/xinetd.d/daytime [file=/etc/xinetd.d/daytime] [line=28]
    Oct 22 23:26:13 atto-calc xinetd[2913]: Reading included configuration file: /etc/xinetd.d/discard [file=/etc/xinetd.d/discard] [line=26]
    Oct 22 23:26:13 atto-calc xinetd[2913]: Reading included configuration file: /etc/xinetd.d/echo [file=/etc/xinetd.d/echo] [line=25]
    Oct 22 23:26:13 atto-calc xinetd[2913]: Reading included configuration file: /etc/xinetd.d/time [file=/etc/xinetd.d/time] [line=26]
    Oct 22 23:26:13 atto-calc xinetd[2913]: Reading included configuration file: /etc/xinetd.d/vnc [file=/etc/xinetd.d/vnc] [line=28]
    Oct 22 23:26:13 atto-calc xinetd[2913]: added service swat [file=/etc/inetd.conf] [line=39]
    Oct 22 23:26:13 atto-calc xinetd[2913]: removing chargen
    Oct 22 23:26:13 atto-calc xinetd[2913]: removing chargen
    Oct 22 23:26:13 atto-calc xinetd[2913]: removing daytime
    Oct 22 23:26:13 atto-calc xinetd[2913]: removing daytime
    Oct 22 23:26:13 atto-calc xinetd[2913]: removing discard
    Oct 22 23:26:13 atto-calc xinetd[2913]: removing discard
    Oct 22 23:26:13 atto-calc xinetd[2913]: removing echo
    Oct 22 23:26:13 atto-calc xinetd[2913]: removing echo
    Oct 22 23:26:13 atto-calc xinetd[2913]: removing time
    Oct 22 23:26:13 atto-calc xinetd[2913]: removing time
    Oct 22 23:26:13 atto-calc xinetd[2913]: xinetd Version 2.3.14 started with libwrap loadavg options compiled in.
    Oct 22 23:26:13 atto-calc xinetd[2913]: Started working: 7 available services
    and the content of the same log as soon as i try to connect to the server with "wait = yes" via "vncconnect localhost:5900"

    Code:
    Oct 22 23:27:08 atto-calc xinetd[2913]: START: vnc-1 pid=4352 from=<no address>
    Oct 22 23:27:08 atto-calc xinetd[2913]: START: vnc-1 pid=4353 from=<no address>
    Oct 22 23:27:08 atto-calc xinetd[2913]: START: vnc-1 pid=4354 from=<no address>
    
    (...to infinity and beyond ...)

    Some further information:



    The relevant parts of my /etc/gdm3/daemon.conf looks like this

    Code:
    # GDM configuration storage
    
    [security]
    DisallowTCP = false
    
    [xdmcp]
    Enable = 1
    MaxSessions = 30
    MaxPending = 60
    DisplaysPerHost = 4
    MaxWaitIndirect = 40
    MaxWait = 40
    
    [greeter]
    
    [chooser]
    Further i have explicitly added vnc-1 with 5900/tcp to /etc/services and made corresponding entries in /etc/hosts and /etc/hosts.allow

    I also tried several different VNC clients - like turboVNC, x11vnc and vnc4server but it workes with none of them (in combination with xinetd).

    There also might have been a few things i fixed on the way that i forgot to mention but. Thats the overall picture.

    I have no idea anymore what to do. Hopefully you guys can help me out here ...

    kind regards
    Aaron

  2. #2
    Linux Guru Rubberman's Avatar
    Join Date
    Apr 2009
    Location
    I can be found either 40 miles west of Chicago, in Chicago, or in a galaxy far, far away.
    Posts
    11,709
    It is possible to have the system start Xvnc processes for specific users, and keep them active even when they disconnect. You need to study a bit more how to configure the system for such activities. It has been a long time since I did this, but I did do it about 6 years ago...
    Sometimes, real fast is almost as good as real time.
    Just remember, Semper Gumbi - always be flexible!

  3. #3
    Just Joined!
    Join Date
    Oct 2012
    Posts
    4
    Quote Originally Posted by Rubberman View Post
    It is possible to have the system start Xvnc processes for specific users, and keep them active even when they disconnect. You need to study a bit more how to configure the system for such activities. It has been a long time since I did this, but I did do it about 6 years ago...
    Although true and probably wise this does not really help. I mean i came up with my version of how to handle things by stuying how other people did it.


    I got the basic idea from here:

    ibm.com/developerworks/opensource/library/os-multiuserloginsvnc/os-multiuserloginsvnc-pdf.pdf


    And here somebody posts about persistent sessions with my configuration (you have to scroll down a little):

    stuartellis.eu/articles/vnc-on-linux/#persistent-desktops


    Something tiny and stupid is wrong with my configuration - and i cant seem to figure it out.

  4. $spacer_open
    $spacer_close
  5. #4
    Just Joined!
    Join Date
    Oct 2012
    Posts
    4
    Update:

    I think im getting closer to the issue. From nmap localhost i get:


    Code:
    Starting Nmap 6.00 at 2012-10-23 10:50 CEST
    Nmap scan report for localhost (127.0.0.1)
    Host is up (0.0000090s latency).
    Not shown: 983 closed ports
    PORT      STATE SERVICE
    (...)
    5900/tcp  open  vnc
    5902/tcp  open  vnc-2
    5903/tcp  open  vnc-3
    (...)


    However if i do netstat -a
    Code:
    root@atto-calc:/home/standarduser# netstat -a | grep tcp
    (...)
    tcp        0      0 *:5902                  *:*                     LISTEN     
    tcp        0      0 *:5903                  *:*                     LISTEN        
    (...)


    Therefore nothing listening on 5900. Now what doesnt make any sense to me is this:
    Code:
    root@atto-calc:/home/standarduser# netstat -a | grep vnc*
    tcp        0      0 *:vnc-1                 *:*                     LISTEN     
    tcp        1      0 localhost:vnc-1         localhost:45520         CLOSE_WAIT 
    tcp        1      0 localhost:vnc-1         localhost:45518         CLOSE_WAIT
    Can anybody enlighten me what the above means?

    EDIT: Actually it means nothing. This is due to the fact that i added vnc-1 with 5900 to /etc/services. Back to square 0.

    regards
    /Aaron
    Last edited by Aaron_A_Anderson; 10-23-2012 at 10:22 AM.

  6. #5
    Just Joined!
    Join Date
    Oct 2012
    Posts
    4
    [RESOLVED] Well my bad. While trying all the other vnc servers yesterday in a 0-dark-30 manner i must have forgotten to relink Xvnc while doing the testing with vnc4server.

    Baseline: with the Xvnc supplied by vnc4server it works. With Xvnc supplied by TurboVNC, TightVNC i couldnt get it working. (x11vnc is a different story but also didnt work properly)

    /Cheers

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •