Page 1 of 2 12 LastLast
Results 1 to 10 of 18

Thread: Ubuntu server, multi-user remote desktop access

  1. #1
    Join Date
    Oct 2009
    Beans
    2

    Ubuntu server, multi-user remote desktop access

    I am having difficulty setting up vnc on a ubuntu server so that multiple authorised users can log to establish remote desktop sessions, without anyone needing to be logged in at the console. While we can easily get remote command line access (putty / ssh), we need the graphical interface e.g. for eclipse.
    An attempt to log in from Windows using RealVNC's VncViewer, connecting to port 5901, 5902, or 5903, fails with an immediate message "The connection closed unexpectedly". Attempts to connect to other unconfigured ports fail as expected with a "connection refused" error.
    I did succeed in getting remote desktop access using xming, but it was far too slow to be practical. In my previous job there was the kind of setup I'm trying to get working here and it was very successful. That was under Centos 5.

    I've described below what I did. I'm sorry for the verbose description, but since I'm not sure where it's going wrong, I don't know which detail to leave out. I've tried searching the internet and found lots of threads dealing with similar difficulties with some solutions, but none seem to deal with exactly my situation, and the solutions refer to files not present on my system.

    I'm a newbe to ubuntu, and a comparative newbe to linux. I would appreciate any help, or directions to elsewhere I might try.
    ----------------------------------------------------------

    My system is Ubunto 9.04 64-bit server
    From uname -a I get
    Linux dh15k 2.6.28-16-server #55-Ubuntu SMP Tue Oct 20 20:37:10 UTC 2009 x86_64 GNU/Linux
    For now at least, I'm trying all of this within a local network.

    Here's what I did:
    1. Using the Synaptic Package Manager, I installed the vnc4server (installed
    version 4.1.1+x.org 1.0.2-0ubuntu7)

    2. To /etc/services, I added the following lines:
    #----------------------------------------------------
    vnc-1 5901/tcp
    vnc-2 5902/tcp
    vnc-3 5903/tcp
    #----------------------------------------------------

    3. I added a file /etc/xinetd.d/xnvserver with the following content:
    #-------------------------------------------
    service vnc-1
    {
    disable = no
    socket_type = stream
    protocol = tcp
    wait = no
    user = nobody
    server = /usr/bin/Xvnc
    server_args = -inetd -query localhost -once -geometry 640x480 -depth 8 securitytypes=none log_on_failure += USERID IdleTimeout=604800
    }

    service vnc-2
    {
    disable = no
    socket_type = stream
    protocol = tcp
    wait = no
    user = nobody
    server = /usr/bin/Xvnc
    server_args = -inetd -query localhost -once -geometry 800x600 -depth 16 securitytypes=none log_on_failure += USERID IdleTimeout=604800
    }


    service vnc-3
    {
    disable = no
    socket_type = stream
    protocol = tcp
    wait = no
    user = nobody
    server = /usr/bin/Xvnc
    server_args = -inetd -query localhost -once -geometry 1000x760 -depth 16 securitytypes=none log_on_failure += USERID IdleTimeout=604800
    }
    #-------------------------------------------------------------------------------
    4. I started System/Administration/Login Window and on the Remote tab, set style to be "Same as Local". I clicked on the "Configure XDMCP" button and ticked the box "Honor indirect requests".
    Using ctrl-backspace I restarted GDM.

    5. I restarted xinetd:
    sudo /etc/init.d/xinetd restart
    * Stopping internet superserver xinetd
    * Starting internet superserver xinetd

    Using the log viewer, from Syslog I can see that xinet.d has restarted. The log entries include the following:
    Oct 27 15:31:01 dh15k xinetd[17031]: Reading included configuration file: /etc/xinetd.d/vncservers [file=/etc/xinetd.d/vncservers] [line=28]
    and
    Oct 27 15:31:01 dh15k xinetd[17031]: xinetd Version 2.3.14 started with libwrap loadavg options compiled in.
    Oct 27 15:31:01 dh15k xinetd[17031]: Started working: 3 available services

    6. To verify that my network or my vncviewer are not the source of the problem, I enabled a remote desktop:
    /System/Preferences/Remote Desktop
    I ticked the "Allow other users to view your desktop" and the "Allow other users to control your desktop".
    Having done so, using vncviewer on the Windows system I was able to connect to my ubuntu system (xxx.xxx.xxx:0)and got the full desktop as expected.

    This is probably the wrong place to be asking this, and no doubt it's a problem already well solvedin ubuntu, but I can't find what to do.

    What next ??

    Thanks in advance.


  2. #2
    Join Date
    May 2006
    Location
    Switzerland
    Beans
    2,907
    Distro
    Ubuntu 20.04 Focal Fossa

    Re: Ubuntu server, multi-user remote desktop access

    Why not X-over-SSH ??
    Code:
    ssh -X remote-user@server /usr/bin/eclipse
    You could even launch a full desktop session that way if you like ...
    Code:
    ssh -X remote-user@server /usr/bin/gnome-session

    In our own environment @work we use this professional solution from Sun:
    http://wikis.sun.com/display/VDI3dot1/Home

    That way everyone gets their own private Ubuntu VM and they can do in there whatever they like.

    But maybe such a solution would be overkill for you ... ?

  3. #3
    Join Date
    May 2006
    Location
    Switzerland
    Beans
    2,907
    Distro
    Ubuntu 20.04 Focal Fossa

    Re: Ubuntu server, multi-user remote desktop access

    BTW ... you said you're a "newbie to Ubuntu" and "newbie to Linux" ... Is there any particular reason why you use Ubuntu?

    Because this VNC remote access stuff that you want to achieve here is way easier to achieve in e.g. OpenSUSE. There all it takes is a mouse click:
    • enable VNC remote access [X]


    And that's it. The rest is done for you automatically.

    Maybe you'd like to try that? You can still use Ubuntu for other jobs ...

  4. #4
    Join Date
    Oct 2005
    Location
    Lab, Slovakia
    Beans
    10,799

    Re: Ubuntu server, multi-user remote desktop access

    Hmm, VNC is mainly a Windows XP Home Edition thing. On Linux, VNC is almost always the WRONG solution.

    As suggested above, you should rather use SSH. Install the SSH server package and then use the following magical incantation from the other desktop systems:
    $ ssh -X -C -c blowfish user@server gnome-panel

    This also works with Xming and PuTTY from Windows. Do run Xming first of course, then PuTTY.

    Cheers,

    Herman

  5. #5
    Join Date
    Sep 2006
    Beans
    8,627
    Distro
    Ubuntu 14.04 Trusty Tahr

    watching xinetd run

    I'd second what HermanAB says about VNC and the suggestion for X forwarding. Additionally, VNC normally needs to be tunneled over SSL or SSH anway, but with insecure clients, that is moot. I'm not sure which is slower over high-latency (slow) nets, X over SSH or RFB (or something) over SSH.

    If you're just running a single program on the remote machine, then Scorp123's suggestion works.

    Regarding suggestions about other distros, no need. Especially for ones without a good history of working with or for the open source community. If you do want to try an RPM-based distro, Fedora is the most in line with Free Software goals and its parent company (Red Hat) has contributed to the community, even defending it on occasion.

    Ubuntu works well.

    What you are describing sounds like a matter of configuring xinetd since you are trying to have it govern the connections.

    To get more useful feedback from VNC while you play with it, stop it, then run it in debug mode to watch the messages.

    Code:
    sudo /etc/init.d/xinetd stop
    sudo /usr/sbin/xinetd -d -dontfork
    Also make sure that tcpd doesn't have anything blocking you in /etc/hosts.deny and /etc/hosts.allow.

  6. #6
    Join Date
    Oct 2009
    Beans
    2

    Re: watching xinetd run

    Thanks for your feedback.
    I did succeed in running eclipse on the Ubuntu server system from Ms Windows using putty and xming (thanks for the suggestions from Scorp123 and HermanAB), but like my earlier experience with xming running the whole gnome desktop, screen response, while better, is still just too slow to be a practical solution. Also, despite my best efforts, the fonts all looked a bit crude. I could live with the fonts, but the speed ...
    Anyway, I tried your (Lars Nooden) suggestion about starting xinetd in debug mode. The two files hosts.allow and hosts.deny only have comments.
    Below I have included what look to me like the important sections of the debug output of xinetd. Everything looks OK to my untrained eye, so I suspect that the problem may lie with the vnc4server setup. Is there any way that I can turn on debug or log output for vnc as well as for xinetd?
    By the way, thanks again to the three of you who have answered my query. This kind of altruistic behaviour is one of the more wonderful aspects of the Internet, and gives the lie to those who say that old-fashioned values like kindness and courtesy have no room in the modern world.
    ;=======================================
    Service defaults
    Bind = All addresses.
    Only from: All sites
    No access: No blocked sites
    No logging

    Service configuration: vnc-1
    id = vnc-1
    flags = IPv4
    socket_type = stream
    Protocol (name,number) = (tcp,6)
    port = 5901
    wait = no
    user = 65534
    Groups = no
    PER_SOURCE = -1
    Bind = All addresses.
    Server = /usr/bin/Xvnc
    Server argv = Xvnc -inetd -query localhost -once -geometry 640x480 -depth 8 securitytypes=none log_on_failure += USERID IdleTimeout=604800
    Only from: All sites
    No access: No blocked sites
    No logging

    Service configuration: vnc-2 .....

    09/10/28@18:39:51: DEBUG: 20919 {cnf_start_********** Started service: vnc-1
    09/10/28@18:39:51: DEBUG: 20919 {cnf_start_********** Started service: vnc-2
    09/10/28@18:39:51: DEBUG: 20919 {cnf_start_********** Started service: vnc-3
    09/10/28@18:39:51: DEBUG: 20919 {cnf_start_********** mask_max = 8, services_started = 3
    09/10/28@18:39:51: NOTICE: 20919 {main} xinetd Version 2.3.14 started with libwrap loadavg options compiled in.
    09/10/28@18:39:51: NOTICE: 20919 {main} Started working: 3 available services
    09/10/28@18:39:51: DEBUG: 20919 {main_loop} active_services = 3


    09/10/28@18:40:14: DEBUG: 20919 {main_loop} select returned 1
    09/10/28@18:40:14: DEBUG: 20919 {server_start} Starting service vnc-1
    09/10/28@18:40:14: DEBUG: 20919 {main_loop} active_services = 3
    09/10/28@18:40:14: DEBUG: 21083 {exec_server} duping 9
    09/10/28@18:40:14: DEBUG: 20919 {main_loop} active_services = 3
    09/10/28@18:40:14: DEBUG: 20919 {main_loop} select returned 1
    09/10/28@18:40:14: DEBUG: 20919 {check_pipe} Got signal 17 (Child exited)
    09/10/28@18:40:14: DEBUG: 20919 {child_exit} waitpid returned = 21083
    09/10/28@18:40:14: DEBUG: 20919 {server_end} vnc-1 server 21083 exited
    09/10/28@18:40:14: INFO: 20919 {conn_free} freeing connection
    09/10/28@18:40:14: DEBUG: 20919 {child_exit} waitpid returned = -1
    09/10/28@18:40:14: DEBUG: 20919 {main_loop} active_services = 3

  7. #7
    Join Date
    Sep 2006
    Beans
    8,627
    Distro
    Ubuntu 14.04 Trusty Tahr

    vncserver

    Quote Originally Posted by Seamus Farrell View Post
    09/10/28@18:40:14: DEBUG: 20919 {server_start} Starting service vnc-1
    09/10/28@18:40:14: DEBUG: 20919 {main_loop} active_services = 3
    09/10/28@18:40:14: DEBUG: 21083 {exec_server} duping 9
    09/10/28@18:40:14: DEBUG: 20919 {main_loop} active_services = 3
    09/10/28@18:40:14: DEBUG: 20919 {main_loop} select returned 1
    09/10/28@18:40:14: DEBUG: 20919 {check_pipe} Got signal 17 (Child exited)
    09/10/28@18:40:14: DEBUG: 20919 {child_exit} waitpid returned = 21083
    It seems to choke on trying to run vnc server, in this case Xvnc according to the configuration you posted.
    It looks like there is a start up script wrapper for Xvnc called vncserver. Those wrappers tend to exist when it is difficult to launch manually.

    Try getting that (Xvnc direct or via the vncserver wrapper) set up standalone first, then when it is working try transferring the settings to xinetd.

  8. #8
    Join Date
    May 2006
    Location
    Switzerland
    Beans
    2,907
    Distro
    Ubuntu 20.04 Focal Fossa

    Re: Ubuntu server, multi-user remote desktop access

    Quote Originally Posted by HermanAB View Post
    Hmm, VNC is mainly a Windows XP Home Edition thing. On Linux, VNC is almost always the WRONG solution.
    You keep repeating that misinformation. It doesn't get true because of that, you know?

    VNC was developed on Unix-like OS. Look it up. And it's not "always the wrong" solution. It can do things X-over-SSH can't, e.g. survive disconnects without having the applications die.

    If you know what you want and what you do then VNC is an OK solution too. And it has nothing to do with "Windows XP Home" ... it seems you still keep mixing up VNC and RDP ???

  9. #9
    Join Date
    May 2006
    Location
    Switzerland
    Beans
    2,907
    Distro
    Ubuntu 20.04 Focal Fossa

    Re: watching xinetd run

    Quote Originally Posted by Lars Noodén View Post
    Especially for ones without a good history of working with or for the open source community.
    Ever heard of "technical merits" and all that? You know ... some people don't care about politics and pick their distro based on "what works". And like it or not but in many areas Novell's products do a better job than the Debian/Ubuntu crowd. Sad but true.

    (and nope, I don't like Novell's stupid deal with Microsoft either but that doesn't stop me from using their products if they fit my needs ...)

  10. #10
    Join Date
    Aug 2008
    Beans
    285
    Distro
    Ubuntu 10.04 Lucid Lynx

    Re: Ubuntu server, multi-user remote desktop access

    Ok, not really helping solve the problem at hand, but I thought I'd throw out another solution that hasn't been mentioned..

    I'd check out FreeNX. I've used it in the past and it's almost as responsive as RDP in my experience.

Page 1 of 2 12 LastLast

Tags for this Thread

Bookmarks

Posting Permissions

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