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

Thread: Xrdp works for RDP w/o prelaunched vncserver!!

  1. #1
    Join Date
    Jan 2006
    Location
    USA
    Beans
    332
    Distro
    Xubuntu

    Xrdp works for RDP w/o prelaunched vncserver!!

    Solution – XRDP works multiple RDP sessions without vncserver involvement!

    The Need:
    I am helping a local genealogy society set up their research center. They want three workstations and a single data server. The genealogy program of choice was GRAMPS, which I have used for years – a Wonderful program! No data is going to be input on the workstations – the users are simply researching existing data on the server.

    Since several RDP-based Wyse thin client units were available for free as were monitors and keyboards, the decision was quickly made to use an RDP based client/server system. Using VNC was unacceptable due to its speed and latency issues, plus, it isn't supported by the Wyse thin client units – ONLY RDP and Cytrix.

    Using Microsoft's server OS and Terminal Server package was far, far beyond the society's budget. We briefly considered equipping a Windows XP box with a copy ThinSoft's RDP server package, WinConnect Server XP, but its $300 price tag was still too much for the society.

    The decision was to use Linux for the server. At first we considered LTSP but it is oriented towards PXE net boots and, while this may have worked, its complexity scared us off and we opted for what, we initially thought, was a much simpler solution – XRDP.

    We were right and wrong at the same time. It is simple to set up – very simple, but the lack of documentation places many pitfalls in front of you, PLUS the solution is distribution dependent.

    I spent many hours on this issue. There are numerous sources on the web citing solutions to running XRDP. Unfortunately, they all involve running vncserver against the destination logins. This is NOT what we desired. We wanted to be able to boot up the host system but not login at all, yet still be able to connect to a session via RDP. I tried numerous distributions and eventually spending a lot of time going through the xrdp source code and planting out my own debug messages in /etc/xrdp/startsm.sh to output to a file in /tmp. Putting in “ps -eS >> /tmp/xrdp.txt” was particularly useful because it showed that xrdp/sesman DID launch an Xvnc, meaning that it was unnecessary to pre-launch vncserver, as most pundits recommend. The solution was figuring out how to connect to the Xvnc session created by sesman.

    I discovered the solution somewhat by accident. It seems that the files created in the destination user's .vnc folder by vncserver were interfering with xrdp/sesman. Here is what worked.

    1. 1.Starting with a nearly virgin install of Ubuntu 10.04 beta 1, installed two users intended to be accessed for remote login via RDP. That is ALL that I did – I never even logged into them.
    2. 2.My first entry xrdp.ini was unmodified except that “ask” was deleted from “username=”. Everything was unmodified.
    3. 3.Using tsclient on another machine, with the desired username, that was NOT logged in, and password pre-filled, I connected and received a nice Gnome desktop.
    4. 4.The session was on 5910.
    5. 5.While keeping this session active, I logged into the next login created for remote access and received my second nice Gnome sesktop on port 5911 – automatically. Xrdp-sesman DOES automatically launch Xvnc in a useful way!


    Ok, everything isn't roses. I can ONLY get this to work on Ubuntu version 10.04 e/w Gnome. It fails on CentOS 5.2, Xubuntu 9.10, SuperOS 9.10 and Lubuntu 10.04. In all cases xrdp was version 4.1.1, so the issue is not with xrdp/sesman – it lies within the OS – what, I do not know. I did not test KDE at all.
    ---------------
    Code:
    The system is running Ubuntu 10.04 LTS beta - the Lucid Lynx, amd64:
    uname -a
    Linux ubu910 2.6.32-16-generic #25-Ubuntu SMP Tue Mar 9 16:33:12 UTC 2010 x86_64 GNU/Linux
    ---------------------------------
    Contents of /etc/xrdp/sesman.ini:
    ---------------------------------
    [Globals]
    ListenAddress=127.0.0.1
    ListenPort=3350
    EnableUserWindowManager=1
    UserWindowManager=/etc/xrdp/startwm.sh
    DefaultWindowManager=/etc/xrdp/startwm.sh
    
    [Security]
    AllowRootLogin=1
    MaxLoginRetry=4
    TerminalServerUsers=tsusers
    TerminalServerAdmins=tsadmins
    
    [Sessions]
    MaxSessions=10
    KillDisconnected=0
    IdleTimeLimit=0
    DisconnectedTimeLimit=0
    
    [Logging]
    LogFile=/var/log/sesman.log
    LogLevel=DEBUG
    EnableSyslog=0
    SyslogLevel=DEBUG
    
    [X11rdp]
    param1=-bs
    param2=-ac
    
    [Xvnc]
    param1=-bs
    param2=-ac
    
    ----------------------------
    Contents of /etc/xrdp/startwm.sh:
    ----------------------------
    #!/bin/sh
    
    if [ -r /etc/default/locale ]; then
      . /etc/default/locale
      export LANG LANGUAGE
    fi
    
    . /etc/X11/Xsession
    ----------------------------
    Contents of /etc/xrdp/xrdp.ini:
    ----------------------------
    
    [globals]
    bitmap_cache=yes
    bitmap_compression=yes
    port=3389
    crypt_level=low
    channel_code=1
    
    [xrdp1]
    name=remote
    lib=libvnc.so
    username=
    password=ask
    ip=127.0.0.1
    port=-1
    
    ---------------------------------
    The user "remoc1" contains a .vnc folder that was created by sesman NOT vncserver. It only contains one file "sesman_passwd".
    ----
    Linux user since before Yggdrasil, Unix before that while with the real AT&T.

  2. #2
    Join Date
    Jan 2006
    Location
    USA
    Beans
    332
    Distro
    Xubuntu

    Re: Xrdp works for RDP w/o prelaunched vncserver!!

    Just tested via VirtualBox images - PCLinuxOS 2009.2 fails but Ylmf v1.0 works. Ylmf is based on Ubuntu 10.04
    ----
    Linux user since before Yggdrasil, Unix before that while with the real AT&T.

  3. #3
    Join Date
    Jan 2006
    Location
    USA
    Beans
    332
    Distro
    Xubuntu

    Re: Xrdp works for RDP w/o prelaunched vncserver!!

    Just tested via VirtualBox images - antiX-M8.5-68, Linux 2.6.32-mepis-smp using the iceWM. This release uses version 5.0 of xrdp. Results were a partial success. I am presented with a desktop e/w conky but only a partial menu wherein I can change the desktop background and the RUN dialog, but not much else.
    ----
    Linux user since before Yggdrasil, Unix before that while with the real AT&T.

  4. #4
    Join Date
    Jan 2006
    Location
    USA
    Beans
    332
    Distro
    Xubuntu

    Re: Xrdp works for RDP w/o prelaunched vncserver!!

    Final update! All was working well and I could open and close mamny sessions from multiple terminals without problems - then something happened. After I changed screen resolutions AND removed the Quit button - things got bad. From that point on if I quit a session, sesmon died. I don't know what happened but I have run out of time to figure it out and have shifted over to FreeNX as my second choice.

    ----
    Linux user since before Yggdrasil, Unix before that while with the real AT&T.

  5. #5
    Join Date
    Jan 2006
    Location
    USA
    Beans
    332
    Distro
    Xubuntu

    Re: Xrdp works for RDP w/o prelaunched vncserver!!

    Yet another update.
    Some significant success with lubuntu 10.04 Beta.
    My xrdp sessions work perfectly connecting, disconnecting, reconnecting, etc. This is looking very promising. To work the /etc/xrdp/startwm.sh file must be edited to correctly start the window manager. I also stuck a ps command in there so that I could capture the Xvnc session just after it invoked and before the RDP session actually started. I have pasted below both the current contents of my lubuntu's startwm.sh and also the relevant portion of the ps -Af output:

    startwm.sh:
    Code:
    #!/bin/sh
    
    if [ -r /etc/default/locale ]; then
      . /etc/default/locale
      export LANG LANGUAGE
    fi
    
    ps -Af >/tmp/xrdp.txt
    
    exec /usr/bin/lxsession -s Lubuntu -e LXDE
    #. /etc/X11/Xsession
    ps -Af output:
    Code:
    UID        PID  PPID  C STIME TTY          TIME CMD
    root         1     0  0 15:45 ?        00:00:00 /sbin/init
    ...
    xrdp       638     1  0 15:45 ?        00:00:17 /usr/bin/xrdp
    root       644     1  0 15:45 ?        00:00:03 /usr/bin/sesman
    ...
    root      1575   644  1 16:57 ?        00:00:00 /usr/lib/xrdp/sessvc 1577 1576
    remoc1    1576  1575  2 16:57 ?        00:00:00 /bin/sh ///etc/xrdp/startwm.sh
    remoc1    1577  1575  4 16:57 ?        00:00:00 Xvnc :10 -geometry 800x600 -depth 16 -rfbauth /home/remoc1/.vnc/sesman_passwd -bs -ac
    remoc1    1578  1576  0 16:57 ?        00:00:00 ps -Af
    Last edited by celem; April 21st, 2010 at 02:21 AM.
    ----
    Linux user since before Yggdrasil, Unix before that while with the real AT&T.

  6. #6
    Join Date
    Dec 2006
    Beans
    13

    Re: Xrdp works for RDP w/o prelaunched vncserver!!

    THANK YOU! I tried your script in Lubuntu 10.04 and it works perfectly. I'm setting up a machine on some old hardware that needed remote GUI access and this finally did the trick.

    Edit: I'm logging in from Windows 7, so I had to get the Windows XP RDP client. I downloaded it from the MS website, let it self-extract to %temp%, extracted a .exe from there with 7zip, and copied/renamed the relevant .exe and .dll from a .cab file. They don't make it easy.

  7. #7
    Join Date
    Aug 2006
    Location
    Castle Rock, CO USA
    Beans
    118
    Distro
    Ubuntu 10.04 Lucid Lynx

    Re: Xrdp works for RDP w/o prelaunched vncserver!!

    Wow, I am curious if you tried suse? I have previously had the most luck with xrdp on suse using their "nomad" packages. if so what did you find wrong with it.. did it use vnc?

    I swear I have set this up in suse 11.1 using the nomad repo. http://opensuse.swerdna.org/suserdp111.html

    Anyway, thank you for documenting this and doing a lot of the troubleshooting. I will certainly try this out.
    Last edited by amlucent23; September 8th, 2010 at 05:56 AM.
    Dell XPS m1530 | My Custom PC- Intel Core Quad 9550 | EVGA 750i FTW Mobo | 750GB Seagate SATA HDD | 4GB Corsair XMS2 DDR2 Memory | Antec 900 Case | Antec 650w TruPowerTrio PS

  8. #8
    Join Date
    Jan 2006
    Location
    USA
    Beans
    332
    Distro
    Xubuntu

    Re: Xrdp works for RDP w/o prelaunched vncserver!!

    I did not try SUSE - I stuck with Lubuntu, since it works. Maybe, if I ever have any spare time, I'll devote some more effort on XRDP. For Linux to not have a viable RDP solution borders on being criminal. The only truly viable solutions are Micro$oft based and that really needs to be remedied. I would really love to better dissect the XRDP source and see if I can determine how to eliminate the distro dependencies - someday!
    Last edited by celem; September 8th, 2010 at 03:31 PM.
    ----
    Linux user since before Yggdrasil, Unix before that while with the real AT&T.

  9. #9
    Join Date
    Aug 2006
    Location
    Castle Rock, CO USA
    Beans
    118
    Distro
    Ubuntu 10.04 Lucid Lynx

    Re: Xrdp works for RDP w/o prelaunched vncserver!!

    Ok, I gave suse 11.3 a spin last night and tried to set this up but its horrible.. I tell you the easiest time I ever had was with suse 11.1 using their Nomad repo. I install 3 packages and it just worked... they even made a admin utility for yast.

    I agree, its criminal. All the linux remote admin/desktop stuff kind of sucks (excluding ssh of course). VNC just needs to be put out to pasture. NX is promising but just not there yet.. and probably never will be. I see no active development on googles Neatx which I was so excited about when I first saw it.
    Dell XPS m1530 | My Custom PC- Intel Core Quad 9550 | EVGA 750i FTW Mobo | 750GB Seagate SATA HDD | 4GB Corsair XMS2 DDR2 Memory | Antec 900 Case | Antec 650w TruPowerTrio PS

  10. #10
    Join Date
    Sep 2010
    Beans
    1

    Re: Xrdp works for RDP w/o prelaunched vncserver!!

    What is the current status? I am trying to set this up as well and for the same reason! GRAMPS. wow. I've spent many many hours and have had partial success. Right now, from the windows vista 64bit box, I can start an rdp connection, but, all I get is a black screen. I know I am missing something somewhere... session files? config files?... I don't know. I think I am close.

    by the way, I am a noob. I can post details if you are interested in the bumblings of an amateur, but maybe my mistakes might give you something usefull. the basic setup is an Ubuntu 10.04 studio box and a windows vista 64bit box.

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
  •