Getting XRDP working?

Thanks for the suggestion Plodder,

Yes, I am sure the Firewall is open. In fact, in situations like this, the Firewall is the first thing to get turned off. The testbench is in a “sheltered environment”.

Regards, Martin

this sounds almost like the same problem that I had when 11.1 first came out. since nothing else has worked check this solution out, it might help

Hi Swerdna,

Despite the tetchy tone to an earlier posting, I haven’t given up yet!
I to have done several more “clean” installs: including SLES 11, openSUSE 11.1-M8 & 11.2.

My interim conclusion is, if I include LDAP (on any of the platforms I’ve tested), it won’t work.
Now, whether this information is of any use to anyone, I don’t know.

But unfortunately, it is important to me that both XRDP and LDAP should work on the same host.

But it does stop working if I add both Desktop Environments (KDE and Gnome) concurrently and try to switch from one to the other.

I only have KDE installed.

Xrdp in openSUSE as crafted for the “Nomad” project has some wrinkles to be got out yet.

Interesting… “as crafted for”? Does that mean that there are other implementations of this (MS RDP client to SuSE host) technology. Forgive the naive question - I’m new to this field :wink:

Regards, Martin

Check gnome-rdp and krdc (rpd clients). Presumably these run with xrdp from the standard repo rather than the Nomad repo. I haven’t tried those combinations of client and server.

Sorry, couldn’t have defined the question properly?
In my situation, the client has to be the MSTSC (Microsoft Terminal Server Client) as used on our Wise ThinTerms and XP workstations.

Martin

Thank you for the advice Tom?

The second suggestion seems(?)something along the lines of the advice in Nomad - openSUSE - in that an extra file is needed in the /etc/pam.d folder? As a newbee, I wonder… “why”?

In snaiperis suggestion the additional file is called sesman and the Nomad folk call it gdm? If the name is important, both fixes couldn’t work. If the name is not important, why won’t xrd-sesman do the job? Or does it?

Because, being a mere automaton, I did as Nomad suggest (copy xrdp-sesman to gdm, as part of the initial install) and it worked (with caveats).
If I now rename gdm, it still works? So what are these pam.d files doing? In fact, if you take it to the next stage and rename xrd-sesman, the logon fails! Therefore (in my situation?), both fixes are not needed but xrdp-sesman is?

Confused… Martin

I’ve been playing around with xrdp on 11.2RC1. I get the same authentication problem martin reported in the beginning.

Is there some documentation around somewhere that describes how the session authentication is meant to work??

Clearly I don’t have the packages proven to work, since they aren’t available for 11.2 yet.

Curiously, the xorg-x11-server-extra-7.4.60.1.x86_64 says in Yast that is contains Xdmx, but no Xdmx is listed in installed files.

I presume Xdmx is needed and am going to build from source…more later.

Hi guys,
Has anyone got Nomad working on opensuse 11.2? I installed yast-rdp but it tries to install xrdp but cannot find it. I search for xrdp for 11.2 and cannot find it either?
Thanks,
Nick

RPMs haven’t been produced for general consumption in 11.2 – but I notice the OBS search contains factory RPMs: xorg-X11-server-dmx and xorg-X11-server-rdp and xrdp. You could try them out.

Thanks swerdna. I’ll probably wait till they become available as part of 11.2. In 11.1, there was a lot of talk about nomad. In 11.2, I haven’t heard anything. Sometimes its hard to know what is going on, what improvements are planned and so forth.

I have installed xrdp and dependencies (rdesktop, xorg-x11-server-dmx and xorg-x11-server-rdp) from Nomad repo in openSUSE 11.2(KDE)

I am able to do connect to openSUSE from a remote Windows machine(mstsc) using a new session.

I want to connect to an existing session on openSUSE from windows.

For this i installed x11vnc.

A post in ubuntu forum mentions of modifying startwm.sh.
( XRDP working with GNOME - howto (HACK) - Ubuntu Forums )

Modified startwm.sh contains the following:

#!/bin/bash
x11vnc -display :0 -localhost &
sleep 5
vncviewer localhost:0 -fullscreen

I am still not able to connect to an existing session.

Anybody has got this working? Am i missing something?
Thanks in advance.

PS: My apologies if this post is redundant.

Step 1:Install x11vnc
in a terminal as root enter

zypper in x11vnc

Step 2:Set the vnc password
in a terminal enter

vncpasswd

Step 3:Add a script to your kde autostart folder
in a terminal enter

echo "#! /bin/sh" >~/.kde4/Autostart/x11vnc
echo "x11vnc -rfbauth ~/.vnc/passwd -bg -rfbport 5900 -forever -noxdamage &" >>~/.kde4/Autostart/x11vnc
chmod +x ~/.kde4/Autostart/x11vnc

Note 1:Adjust path to match your KDE Autostart folder
Note 2:-rfbport is used to set the TCP port x11vnc connects to your session through.
Use any open port examples
5900 default vnc port
3389 RDP XRDP port
5631 pcAnywhere port
Just make sure the port is open and for outside connections if behind a router forwarded to the correct pc

if you want on-screen notification and confirmation that someone has logged on to your KDE session, install “tk” - Graphical User Interface Toolkit for Tcl if it is not already installed
as root enter in a terminal

zypper in tk

then do the following instead of Step 3 above
for a popup on the host computer to allow or disallow a connection and display a tray icon notification of a connection to the host
in a terminal enter

echo "#! /bin/sh" >~/.kde4/Autostart/x11vnc
echo "x11vnc -rfbauth ~/.vnc/passwd -bg -accept "popup" -gone "popup" -rfbport 5900 -gui tray=minimal,iconfont=14x17 -forever -noxdamage &" >>~/.kde4/Autostart/x11vnc
chmod +x ~/.kde4/Autostart/x11vnc

or
for just a tray icon notification of a connection to the host
in a terminal enter

echo "#! /bin/sh" >~/.kde4/Autostart/x11vnc
echo "x11vnc -rfbauth ~/.vnc/passwd -bg -rfbport 5900 -gui tray=minimal,iconfont=14x17 -forever -noxdamage &" >>~/.kde4/Autostart/x11vnc
chmod +x ~/.kde4/Autostart/x11vnc

Tested with openSuse 11.0,11.1 using KDE 3.5,KDE 4.3

@tom_enos

Thank You so much for the quick response.

The above solution helps me to login to a existing session from windows using vnc client.

Suppose i access a locked machine remotely, this leaves the server machine unlocked. All the operations are visible on the server machine monitor.

Is it possible to keep the server machine locked?

Also, is it possible to make xrdp use x11vnc?

The default startwm.sh in xdrp has the foll:


#!/bin/bash
#
# startwm.sh for SuSE Linux
#

. /etc/sysconfig/windowmanager

test -z "$DEFAULT_WM" && DEFAULT_WM=twm
WINDOWMANAGER="`type -p ${DEFAULT_WM##*/}`"
unset DEFAULT_WM

exec /etc/X11/xdm/Xsession $WINDOWMANAGER

exit 1

I have not tried so I do not know.

No, you have to unlock the session, but if the monitor supports DPMS you can keep it in or put it in that state when a client connects by adding these options to your x11vnc start up script

-forcedpms             If the system supports the DPMS (Display Power
                       Management Signaling) extension, then try to keep the
                       monitor in a powered off state.  This is to prevent
                       nosey people at the physical display from viewing what
                       is on the screen.  Be sure to lock the screen before
                       disconnecting.

                       This method is far from bullet proof, e.g. suppose
                       someone attaches a non-DPMS monitor, or loads the
                       machine so that there is a gap of time before x11vnc
                       restores the powered off state?  On many machines if
                       he floods it with keyboard and mouse input he can see
                       flashes of what is on the screen before the DPMS off
                       state is reestablished.  For this to work securely
                       there would need to be support in the X server to do
                       this exactly rather than approximately with DPMS.

-clientdpms            As -forcedpms but only when VNC clients are connected.

and also use these options to lock the host keyboard and mouse

-grabkbd               When VNC viewers are connected, attempt to the grab
                       the keyboard so a (non-malicious) user sitting at the
                       physical display is not able to enter keystrokes.
                       This method uses XGrabKeyboard(3X11) and so it is
                       not secure and does not rule out the person at the
                       physical display injecting keystrokes by flooding the
                       server with them, grabbing the keyboard himself, etc.
                       Some degree of cooperation from the person at the
                       display is assumed.  This is intended for remote
                       help-desk or educational usage modes.
-grabptr               As -grabkbd, but for the mouse pointer using
                       XGrabPointer(3X11).  Unfortunately due to the way the X
                       server works, the mouse can still be moved around by the
                       user at the physical display, but he will not be able to
                       change window focus with it.  Also some window managers
                       that call XGrabServer(3X11) for resizes, etc, will
                       act on the local user's input.  Again, some degree of
                       cooperation from the person at the display is assumed.

Thank You again

Hi,
This is how I network on XRDP. My clients are just zero clients. I use this on ubuntu but, hope it works for you:
Follow these steps:
Please use straight LAN cables and not cross over cables.
Goto Applications -> Accesories -> Terminal
PART-I. Updating and Installing Components.

  1. sudo apt-get update
  2. sudo apt-get upgrade
  3. RESTART COMPUTER
  4. sudo apt-get install build-essential
  5. sudo apt-get install libpam0g-dev
  6. sudo apt-get install libssl-dev
  7. sudo apt-get install tightvncserver
    Part - II
    Download xrdp-0.4.1.tar.gz from xrdp.org
  8. cd ~/Desktop
  9. tar xvzf xrdp-0.4.1.tar.gz
  10. cd xrdp-0.4.1
  11. make
  12. sudo make install
    Part - III
  13. On terminal type the command gconf-editor
  14. Go to apps -> gnome_settings_daemon -> plugins -> keyboard
  15. under Name = Active, Untick the value check box.(Disable).
    close Conf-editor window.
  16. Goto system -> Administration -> Users and Groups
  17. Unlock - give password - add new user - allot password
  18. logout. login as new user and do step 1,2,3 of Part III to new user, or any number of users you may later add.
    Part - IV
  19. Logout and login as the user who installed ubuntu.
  20. Start xrdp by the command sudo /usr/local/xrdp/xrdp_control.sh start
    Part - V
  21. Right click the network icon on right of top menu bar.
  22. Click Edit Connection.
  23. Select Auto eth1 (or eth0 if you have only one nic card) . Click Edit. select IPV4 settings. put method to manual. click add. input Address as 192.168.1.1, Netmask as 255.255.255.0, DNS as 0.0.0.0.
  24. Close network connections window.
    Part VI
  25. Connect the thin client and switch it on.
  26. Connect using the server IP. If you can assigh IP address to terminal give a Static IP address.
    Local IP - 192.168.1.2
    Gateway - 192.1.1.1 ( Same as Host)
    Sub Mask - 255.255.255.0
  27. Save.
    Restart the thin Client and you should LOG in to Linux. Enjoy the experience.
    This works like a song in ubuntu, but may be you will need to adapt commands for suse.
    Hope it helps:)
    If you need to buy a thin client please visit Buy Purchase Thin Clients India Hyderabad Best Thinclients
    Butterflies are free and so are we…
    vmemmanuel@hotmail.com

I have xrdp running, but when I connect to it with krdc, I always get IceWM session. How do I change it?

As thre’s “DefaultWindowManager=startwm.sh” in sesman.ini, I set /etc/xrdp/startwm.sh to:


#!/bin/sh
startxfce4
exit 0

But it does not change anything :frowning:

When looking at xrdp-sesman.log, I see there this line: “starting Xdmx session…” - do I need to change Xdmx configuration instead?

Hmm, looks like ~/.xinitrc executes the desired Window Manager. But I’d like to not use xrdp’s window manager as default. Any other way for setting window manager for xrdp?