Chris Lee | 12 Nov 20:51 2013
Picon

xrdp/freerds on FreeBSD

Hello All,

I am attempting to get a rdp service *without vnc* working on FreeBSD 9.2-RELEASE.

If I use the sesman-Xvnc configuration I can connect and use my desktop through RDC just fine but vnc seems to make the desktop very sluggish.  If I comment out all of the vnc configuration sections, leaving only the rdp sections I can still connect with RDC but I just get a black screen with a mouse cursor and I don't see any X server running on the system.

I also tried to build FreeRDP/FreeRDS but I'm stuck at:
Linking C executable freerds
/usr/bin/ld: cannot find -lfreerdp-server

I do realize that FreeRDS is bleeding-edge-unstable, but if it gets me to my desktop without vnc I may actually be interested in contributing to the project.

Would anyone please help me get this working?

--

Thank you,
Chris Lee
------------------------------------------------------------------------------
DreamFactory - Open Source REST & JSON Services for HTML5 & Native Apps
OAuth, Users, Roles, SQL, NoSQL, BLOB Storage and External API Access
Free app hosting. Or install the open source package on any LAMP server.
Sign up and see examples for AngularJS, jQuery, Sencha Touch and Native!
http://pubads.g.doubleclick.net/gampad/clk?id=63469471&iu=/4140/ostg.clktrk
_______________________________________________
xrdp-devel mailing list
xrdp-devel@...
https://lists.sourceforge.net/lists/listinfo/xrdp-devel
Jay Sorg | 13 Nov 23:12 2013
Picon

Re: xrdp/freerds on FreeBSD

Hi Chris,

FreeRDS is Marc's fork of xrdp.  We don't support it.  I can't even
understand why he is doing this.

If you want "no VNC" RDP on BSD, use X11rdp and xrdp.  It should be
pretty easy to get compiling.

Get the latest git from github.com/FreeRDP/xrdp
or even the latest devel fork here
git clone git://github.com/neutrinolabs/xrdp

It should be the must efficient remote desktop solution out there.

Let me know if you have problems.

Jay

> I am attempting to get a rdp service *without vnc* working on FreeBSD
> 9.2-RELEASE.
>
> If I use the sesman-Xvnc configuration I can connect and use my desktop
> through RDC just fine but vnc seems to make the desktop very sluggish.  If I
> comment out all of the vnc configuration sections, leaving only the rdp
> sections I can still connect with RDC but I just get a black screen with a
> mouse cursor and I don't see any X server running on the system.
>
> I also tried to build FreeRDP/FreeRDS but I'm stuck at:
> Linking C executable freerds
> /usr/bin/ld: cannot find -lfreerdp-server
>
> I do realize that FreeRDS is bleeding-edge-unstable, but if it gets me to my
> desktop without vnc I may actually be interested in contributing to the
> project.
>
> Would anyone please help me get this working?

------------------------------------------------------------------------------
DreamFactory - Open Source REST & JSON Services for HTML5 & Native Apps
OAuth, Users, Roles, SQL, NoSQL, BLOB Storage and External API Access
Free app hosting. Or install the open source package on any LAMP server.
Sign up and see examples for AngularJS, jQuery, Sencha Touch and Native!
http://pubads.g.doubleclick.net/gampad/clk?id=63469471&iu=/4140/ostg.clktrk
Chris Lee | 14 Nov 00:36 2013
Picon

Re: xrdp/freerds on FreeBSD

Hi Jay,

Thanks for the response.

I realized after my first email that there was a separate ML for freerds and made a post there as well.

Koichiro responded to that email, suggesting that I try his guide and port at http://w.vmeta.jp/tdiary/?date=20131015 for xrdp with x11rdp.  I tried this and I'm right back to the issue I was having before.

I don't see any errors in the logs, xrdp.log has:
[20131113-16:59:13] [WARN ] [init:47] libscp initialized
[20131113-16:59:13] [CORE ] starting sesman with pid 32182
[20131113-16:59:13] [INFO ] listening...
and when I try to connect with RDC from my win 7 machine it's just a black background and mouse cursor.
It does appear that xrdp-sesman started a new xrdp process, but no X server.

This is with xrdp-devel from ports, which I believe is 0.7.0 version.  I'm continuing to try to analyze the failure, but I'm running out of things to check.


On Wed, Nov 13, 2013 at 4:12 PM, Jay Sorg <jay.sorg-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org> wrote:
Hi Chris,

FreeRDS is Marc's fork of xrdp.  We don't support it.  I can't even
understand why he is doing this.

If you want "no VNC" RDP on BSD, use X11rdp and xrdp.  It should be
pretty easy to get compiling.

Get the latest git from github.com/FreeRDP/xrdp
or even the latest devel fork here
git clone git://github.com/neutrinolabs/xrdp

It should be the must efficient remote desktop solution out there.

Let me know if you have problems.

Jay



> I am attempting to get a rdp service *without vnc* working on FreeBSD
> 9.2-RELEASE.
>
> If I use the sesman-Xvnc configuration I can connect and use my desktop
> through RDC just fine but vnc seems to make the desktop very sluggish.  If I
> comment out all of the vnc configuration sections, leaving only the rdp
> sections I can still connect with RDC but I just get a black screen with a
> mouse cursor and I don't see any X server running on the system.
>
> I also tried to build FreeRDP/FreeRDS but I'm stuck at:
> Linking C executable freerds
> /usr/bin/ld: cannot find -lfreerdp-server
>
> I do realize that FreeRDS is bleeding-edge-unstable, but if it gets me to my
> desktop without vnc I may actually be interested in contributing to the
> project.
>
> Would anyone please help me get this working?



--

Thank you,
Chris Lee
------------------------------------------------------------------------------
DreamFactory - Open Source REST & JSON Services for HTML5 & Native Apps
OAuth, Users, Roles, SQL, NoSQL, BLOB Storage and External API Access
Free app hosting. Or install the open source package on any LAMP server.
Sign up and see examples for AngularJS, jQuery, Sencha Touch and Native!
http://pubads.g.doubleclick.net/gampad/clk?id=63469471&iu=/4140/ostg.clktrk
_______________________________________________
xrdp-devel mailing list
xrdp-devel@...
https://lists.sourceforge.net/lists/listinfo/xrdp-devel
Chris Lee | 14 Nov 01:53 2013
Picon

Re: xrdp/freerds on FreeBSD

Btw, when I try this with the xrdp (0.6.0) from ports the only difference is that xrdp-sesman does not start another xrdp process.


On Wed, Nov 13, 2013 at 5:36 PM, Chris Lee <labmonkey42-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org> wrote:
Hi Jay,

Thanks for the response.

I realized after my first email that there was a separate ML for freerds and made a post there as well.

Koichiro responded to that email, suggesting that I try his guide and port at http://w.vmeta.jp/tdiary/?date=20131015 for xrdp with x11rdp.  I tried this and I'm right back to the issue I was having before.

I don't see any errors in the logs, xrdp.log has:
[20131113-16:59:13] [WARN ] [init:47] libscp initialized
[20131113-16:59:13] [CORE ] starting sesman with pid 32182
[20131113-16:59:13] [INFO ] listening...
and when I try to connect with RDC from my win 7 machine it's just a black background and mouse cursor.
It does appear that xrdp-sesman started a new xrdp process, but no X server.

This is with xrdp-devel from ports, which I believe is 0.7.0 version.  I'm continuing to try to analyze the failure, but I'm running out of things to check.


On Wed, Nov 13, 2013 at 4:12 PM, Jay Sorg <jay.sorg-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org> wrote:
Hi Chris,

FreeRDS is Marc's fork of xrdp.  We don't support it.  I can't even
understand why he is doing this.

If you want "no VNC" RDP on BSD, use X11rdp and xrdp.  It should be
pretty easy to get compiling.

Get the latest git from github.com/FreeRDP/xrdp
or even the latest devel fork here
git clone git://github.com/neutrinolabs/xrdp

It should be the must efficient remote desktop solution out there.

Let me know if you have problems.

Jay



> I am attempting to get a rdp service *without vnc* working on FreeBSD
> 9.2-RELEASE.
>
> If I use the sesman-Xvnc configuration I can connect and use my desktop
> through RDC just fine but vnc seems to make the desktop very sluggish.  If I
> comment out all of the vnc configuration sections, leaving only the rdp
> sections I can still connect with RDC but I just get a black screen with a
> mouse cursor and I don't see any X server running on the system.
>
> I also tried to build FreeRDP/FreeRDS but I'm stuck at:
> Linking C executable freerds
> /usr/bin/ld: cannot find -lfreerdp-server
>
> I do realize that FreeRDS is bleeding-edge-unstable, but if it gets me to my
> desktop without vnc I may actually be interested in contributing to the
> project.
>
> Would anyone please help me get this working?



--

Thank you,
Chris Lee



--

Thank you,
Chris Lee
------------------------------------------------------------------------------
DreamFactory - Open Source REST & JSON Services for HTML5 & Native Apps
OAuth, Users, Roles, SQL, NoSQL, BLOB Storage and External API Access
Free app hosting. Or install the open source package on any LAMP server.
Sign up and see examples for AngularJS, jQuery, Sencha Touch and Native!
http://pubads.g.doubleclick.net/gampad/clk?id=63469471&iu=/4140/ostg.clktrk
_______________________________________________
xrdp-devel mailing list
xrdp-devel@...
https://lists.sourceforge.net/lists/listinfo/xrdp-devel
Koichiro IWAO | 14 Nov 02:39 2013
Picon

Re: xrdp/freerds on FreeBSD

On Tue, Nov 12, 2013 at 01:51:33PM -0600, Chris Lee wrote:
> Hello All,
> 
> I am attempting to get a rdp service *without vnc* working on FreeBSD
> 9.2-RELEASE.

I've already suggested you X11rdp but I have some updates after that.
X11rdp from master branch has been built successfully.  Could you try it
again?  I'd like to help you if you're interested in X11rdp on FreeBSD
and make them better.  It works fine for me.

I have xrdp/x11rdp ports which has "-devel" suffix and no suffix.
No suffixed ports are xrdp from v0.6 branch and x11rdp 0.5.0. Suffixed
ports are xrdp from v0.7 branch and x11rdp from master branch.

Whichever is OK but v0.6 is stable.

v0.6:
https://svn.redports.org/meta/net/xrdp/
https://svn.redports.org/meta/x11-servers/x11rdp/

v0.7:
https://svn.redports.org/meta/net/xrdp-devel/
https://svn.redports.org/meta/x11-servers/x11rdp-devel/

Bleeding-edge:
https://svn.redports.org/meta/net/xrdp-head/

> If I use the sesman-Xvnc configuration I can connect and use my desktop
> through RDC just fine but vnc seems to make the desktop very sluggish.  If
> I comment out all of the vnc configuration sections, leaving only the rdp
> sections I can still connect with RDC but I just get a black screen with a
> mouse cursor and I don't see any X server running on the system.

Quick diagnosis, run "/usr/local/bin/X11rdp :15" and paste the result.

> I also tried to build FreeRDP/FreeRDS but I'm stuck at:
> Linking C executable freerds
> /usr/bin/ld: cannot find -lfreerdp-server

Possibly, FreeRDP 1.1 (beta) is required to build FreeRDS.  FreeRDP has
drastically been restructured after 1.0.0 release.  This is one of the
reasons why Jay forked FreeRDP as neutrinordp.  Current FreeBSD port
version is 1.0.2.

--

-- 
`whois vmeta.jp | nkf -w`
meta <meta@...>

------------------------------------------------------------------------------
DreamFactory - Open Source REST & JSON Services for HTML5 & Native Apps
OAuth, Users, Roles, SQL, NoSQL, BLOB Storage and External API Access
Free app hosting. Or install the open source package on any LAMP server.
Sign up and see examples for AngularJS, jQuery, Sencha Touch and Native!
http://pubads.g.doubleclick.net/gampad/clk?id=63469471&iu=/4140/ostg.clktrk
Chris Lee | 14 Nov 04:05 2013
Picon

Re: xrdp/freerds on FreeBSD

Hi Koichiro,


On Wed, Nov 13, 2013 at 7:39 PM, Koichiro IWAO <meta <at> vmeta.jp> wrote:
On Tue, Nov 12, 2013 at 01:51:33PM -0600, Chris Lee wrote:
> Hello All,
>
> I am attempting to get a rdp service *without vnc* working on FreeBSD
> 9.2-RELEASE.

I've already suggested you X11rdp but I have some updates after that.
X11rdp from master branch has been built successfully.  Could you try it
again?  I'd like to help you if you're interested in X11rdp on FreeBSD
and make them better.  It works fine for me.


I did build xrdp from ports and x11rdp from your ports branch and have the same black screen issue.
When I attach to the xrdp and xrdp-sesman processes I see nothing happening on xrdp-sesman and only threads starting/stopping on xrdp as I connect and disconnect:

[New Thread 801807c00 (LWP 100627/xrdp)]
[Thread 801807c00 (LWP 100627/xrdp) exited]
[New Thread 801808000 (LWP 100631/xrdp)]

I have xrdp/x11rdp ports which has "-devel" suffix and no suffix.
No suffixed ports are xrdp from v0.6 branch and x11rdp 0.5.0. Suffixed
ports are xrdp from v0.7 branch and x11rdp from master branch.


At one point I was trying xrdp-devel with x11rdp but realized the mistake and went back to xrdp (without -devel).  Same issue currently.
 
Whichever is OK but v0.6 is stable.

v0.6:
https://svn.redports.org/meta/net/xrdp/
https://svn.redports.org/meta/x11-servers/x11rdp/

v0.7:
https://svn.redports.org/meta/net/xrdp-devel/
https://svn.redports.org/meta/x11-servers/x11rdp-devel/

Bleeding-edge:
https://svn.redports.org/meta/net/xrdp-head/


I will give x11rdp-devel with xrdp-devel a try and see what happens.
 
> If I use the sesman-Xvnc configuration I can connect and use my desktop
> through RDC just fine but vnc seems to make the desktop very sluggish.  If
> I comment out all of the vnc configuration sections, leaving only the rdp
> sections I can still connect with RDC but I just get a black screen with a
> mouse cursor and I don't see any X server running on the system.

Quick diagnosis, run "/usr/local/bin/X11rdp :15" and paste the result.


$ /usr/local/bin/X11rdp :15

X11rdp, an X server for xrdp
Version 0.5.0
Copyright (C) 2005-2008 Jay Sorg
See http://xrdp.sf.net for information on xrdp.
Underlying X server release 70100000, The X.Org Foundation
Xorg Release 7.1
Screen width 800 height 600 depth 24 bpp 32
dpix 100 dpiy 100
buffer size 1920000
error opening security policy file /etc/X11/xserver/SecurityPolicy
Could not init font path element /usr/local/lib/X11/fonts/CID, removing from list!

and when I ^C I get:
FreeFontPath: FPE "/usr/local/lib/X11/fonts/misc" refcount is 2, should be 1; fixing.
 
> I also tried to build FreeRDP/FreeRDS but I'm stuck at:
> Linking C executable freerds
> /usr/bin/ld: cannot find -lfreerdp-server

Possibly, FreeRDP 1.1 (beta) is required to build FreeRDS.  FreeRDP has
drastically been restructured after 1.0.0 release.  This is one of the
reasons why Jay forked FreeRDP as neutrinordp.  Current FreeBSD port
version is 1.0.2.


FreeRDP/FreeRDS pretty much gets the same results but when I attach to it with gdb I can see that it's breaking on GetModuleFileName() which Marc-Andre mentioned was not ported yet anyway.

I will keep freerdp/freerds-related discussions on the freerdp-devel list just to (hopefully) avoid stepping on toes here. :)
 
--
`whois vmeta.jp | nkf -w`
meta <meta-37av2iX2Cc8@public.gmane.org>

Thanks again for everyone's help.

--

Thank you,
Chris Lee
------------------------------------------------------------------------------
DreamFactory - Open Source REST & JSON Services for HTML5 & Native Apps
OAuth, Users, Roles, SQL, NoSQL, BLOB Storage and External API Access
Free app hosting. Or install the open source package on any LAMP server.
Sign up and see examples for AngularJS, jQuery, Sencha Touch and Native!
http://pubads.g.doubleclick.net/gampad/clk?id=63469471&iu=/4140/ostg.clktrk
_______________________________________________
xrdp-devel mailing list
xrdp-devel@...
https://lists.sourceforge.net/lists/listinfo/xrdp-devel
Koichiro IWAO | 15 Nov 05:11 2013
Picon

Re: xrdp/freerds on FreeBSD

On Wed, Nov 13, 2013 at 09:05:29PM -0600, Chris Lee wrote:
> $ /usr/local/bin/X11rdp :15

I saw you output, it seems X11rdp binary can be run correctly.

> I did build xrdp from ports and x11rdp from your ports branch and have the
> same black screen issue.
> When I attach to the xrdp and xrdp-sesman processes I see nothing happening
> on xrdp-sesman and only threads starting/stopping on xrdp as I connect and
> disconnect:
> 
> [New Thread 801807c00 (LWP 100627/xrdp)]
> [Thread 801807c00 (LWP 100627/xrdp) exited]
> [New Thread 801808000 (LWP 100631/xrdp)]

Running xrdp and sesman in foreground give us futrher information.
# xrdp --nodaemon
# xrdp-sesman --nodaemon

Please show me the result of "pstree -s xrdp".  My environment, for example, 
xrdp 0.6.1 and x11rdp 0.5.0 runs Xfce4 session. Processes are like this.

-+= 00001 root /sbin/init --
 |--- 01033 root /usr/local/sbin/xrdp
 \-+- 01035 root /usr/local/sbin/xrdp-sesman
   \-+- 02511 root /usr/local/sbin/xrdp-sesman
     \-+= 02512 root /usr/local/sbin/xrdp-sessvc 2514 2513
       |-+- 02513 meta /bin/sh /usr/local/etc/xrdp/startwm.sh
       | \-+- 02518 meta /bin/sh /usr/local/etc/xdg/xfce4/xinitrc
       |   \--- 02523 meta xfce4-session
       |--- 02514 meta X11rdp :10 -geometry 1600x900 -depth 24 (snip)
       \--- 02515 root xrdp-chansrv

> At one point I was trying xrdp-devel with x11rdp but realized the mistake
> and went back to xrdp (without -devel).  Same issue currently.

Yes, -devel should be used together with -devel.

> I will give x11rdp-devel with xrdp-devel a try and see what happens.

Try xrdp-devel from my svn. I've already submitted update to sync
official ports to my xrdp-devel branch but not committed yet.

--

-- 
`whois vmeta.jp | nkf -w`
meta <meta@...>

------------------------------------------------------------------------------
DreamFactory - Open Source REST & JSON Services for HTML5 & Native Apps
OAuth, Users, Roles, SQL, NoSQL, BLOB Storage and External API Access
Free app hosting. Or install the open source package on any LAMP server.
Sign up and see examples for AngularJS, jQuery, Sencha Touch and Native!
http://pubads.g.doubleclick.net/gampad/clk?id=63469471&iu=/4140/ostg.clktrk
Chris Lee | 16 Nov 06:18 2013
Picon

Re: xrdp/freerds on FreeBSD

Hi again Koichiro,



On Thu, Nov 14, 2013 at 10:11 PM, Koichiro IWAO <meta-37av2iX2Cc8@public.gmane.org> wrote:
On Wed, Nov 13, 2013 at 09:05:29PM -0600, Chris Lee wrote:
> $ /usr/local/bin/X11rdp :15

I saw you output, it seems X11rdp binary can be run correctly.

> I did build xrdp from ports and x11rdp from your ports branch and have the
> same black screen issue.
> When I attach to the xrdp and xrdp-sesman processes I see nothing happening
> on xrdp-sesman and only threads starting/stopping on xrdp as I connect and
> disconnect:
>
> [New Thread 801807c00 (LWP 100627/xrdp)]
> [Thread 801807c00 (LWP 100627/xrdp) exited]
> [New Thread 801808000 (LWP 100631/xrdp)]

Running xrdp and sesman in foreground give us futrher information.
# xrdp --nodaemon
# xrdp-sesman --nodaemon


xrdp shows a bunch of activity such as the following when I connect from Win7 RDC
libxrdp_process_data code 7
xrdp_rdp_process_data code 28
in xrdp_rdp_process_data_input 11 events
xrdp_rdp_process_data_input event 0004 flags 8000 param1 15 param2 0 time 919267637

xrdp-sesman only shows the startup information, the last line of which is
[20131115-23:02:10] [INFO ] listening...
 
Please show me the result of "pstree -s xrdp".  My environment, for example,
xrdp 0.6.1 and x11rdp 0.5.0 runs Xfce4 session. Processes are like this.

-+= 00001 root /sbin/init --
 |--- 01033 root /usr/local/sbin/xrdp
 \-+- 01035 root /usr/local/sbin/xrdp-sesman
   \-+- 02511 root /usr/local/sbin/xrdp-sesman
     \-+= 02512 root /usr/local/sbin/xrdp-sessvc 2514 2513
       |-+- 02513 meta /bin/sh /usr/local/etc/xrdp/startwm.sh
       | \-+- 02518 meta /bin/sh /usr/local/etc/xdg/xfce4/xinitrc
       |   \--- 02523 meta xfce4-session
       |--- 02514 meta X11rdp :10 -geometry 1600x900 -depth 24 (snip)
       \--- 02515 root xrdp-chansrv


[chris <at> redacted ~]$ pstree -s xrdp
-+= 00001 root /sbin/init --
 \-+= 01192 root /usr/sbin/sshd
   |-+= 01513 root sshd: chris [priv] (sshd)
   | \-+- 01517 chris sshd: chris <at> pts/0 (sshd)
   |   \-+= 01520 chris -bash (bash)
   |     \-+= 01523 root sudo tail -f xrdp.log xrdp-sesman.log
   |       \--- 03267 root tail -f xrdp.log xrdp-sesman.log
   |-+= 01524 root sshd: chris [priv] (sshd)
   | \-+- 01527 chris sshd: chris <at> pts/1 (sshd)
   |   \-+= 01528 chris -bash (bash)
   |     \-+= 84786 root sudo xrdp --nodaemon
   |       \--- 84787 root xrdp --nodaemon
   \-+= 03268 root sshd: chris [priv] (sshd)
     \-+- 03271 chris sshd: chris <at> pts/2 (sshd)
       \-+= 03272 chris -bash (bash)
         \-+= 84790 root sudo xrdp-sesman --nodaemon
           \--- 84791 root xrdp-sesman --nodaemon
 
> At one point I was trying xrdp-devel with x11rdp but realized the mistake
> and went back to xrdp (without -devel).  Same issue currently.

Yes, -devel should be used together with -devel.

> I will give x11rdp-devel with xrdp-devel a try and see what happens.

Try xrdp-devel from my svn. I've already submitted update to sync
official ports to my xrdp-devel branch but not committed yet.


So x11rdp-devel required xorg-server >= 1.9.3 and setting WITH_NEW_XORG in make.conf bumped me to 1.12.4 (I think) after I removed and upgraded a bunch of other stuff like libdrm, dri, libGL, libGLU, and so on.

xrdp-devel and x11rdp-devel are both installed and it appears to be the same situation.

Is it possible that I just have some configuration completely wrong?
My xrdp.ini is modified as per your guide, putting sesman-X11rdp in the first entry and setting crypt_level to high.
I don't think I've changed anything in sesman.ini at all.
I *did* change /usr/local/etc/pam.d/xrdp-sesman to import everything from system because I have system configured to authenticate users through winbind (Active Directory).  This works properly with sshd and console login and until I updated the xrdp-sesman entry all of my connections from my AD user were being logged as invalid user.
I set SESSIONS="startfluxbox" in ~/.profile and I also have ~/.xsession trying to exec startfluxbox.  If those conflict I'll just remove one of them.
Since that hasn't worked so far I've also added a ~/startwm.sh which only has startfluxbox.
 
--
`whois vmeta.jp | nkf -w`
meta <meta-37av2iX2Cc8@public.gmane.org>

Any additional suggestions you may have would be greatly appreciated.  And thank you once again for all your help thus far. :)

--

Thank you,
Chris Lee
------------------------------------------------------------------------------
DreamFactory - Open Source REST & JSON Services for HTML5 & Native Apps
OAuth, Users, Roles, SQL, NoSQL, BLOB Storage and External API Access
Free app hosting. Or install the open source package on any LAMP server.
Sign up and see examples for AngularJS, jQuery, Sencha Touch and Native!
http://pubads.g.doubleclick.net/gampad/clk?id=63469471&iu=/4140/ostg.clktrk
_______________________________________________
xrdp-devel mailing list
xrdp-devel@...
https://lists.sourceforge.net/lists/listinfo/xrdp-devel
Koichiro IWAO | 17 Nov 02:30 2013
Picon

Re: xrdp/freerds on FreeBSD


Ah, the VM's password are:
  root: (nopassword)
  xrdp: xrdp

Boot it and connect from RD client with user named xrdp.

--

-- 
`whois vmeta.jp | nkf -w`
meta <meta@...>

------------------------------------------------------------------------------
DreamFactory - Open Source REST & JSON Services for HTML5 & Native Apps
OAuth, Users, Roles, SQL, NoSQL, BLOB Storage and External API Access
Free app hosting. Or install the open source package on any LAMP server.
Sign up and see examples for AngularJS, jQuery, Sencha Touch and Native!
http://pubads.g.doubleclick.net/gampad/clk?id=63469471&iu=/4140/ostg.clktrk
Koichiro IWAO | 17 Nov 02:08 2013
Picon

Re: xrdp/freerds on FreeBSD

On Fri, Nov 15, 2013 at 11:18:34PM -0600, Chris Lee wrote:
> [chris <at> redacted ~]$ pstree -s xrdp
> -+= 00001 root /sbin/init --
>  \-+= 01192 root /usr/sbin/sshd
>    |-+= 01513 root sshd: chris [priv] (sshd)
>    | \-+- 01517 chris sshd: chris <at> pts/0 (sshd)
>    |   \-+= 01520 chris -bash (bash)
>    |     \-+= 01523 root sudo tail -f xrdp.log xrdp-sesman.log
>    |       \--- 03267 root tail -f xrdp.log xrdp-sesman.log
>    |-+= 01524 root sshd: chris [priv] (sshd)
>    | \-+- 01527 chris sshd: chris <at> pts/1 (sshd)
>    |   \-+= 01528 chris -bash (bash)
>    |     \-+= 84786 root sudo xrdp --nodaemon
>    |       \--- 84787 root xrdp --nodaemon
>    \-+= 03268 root sshd: chris [priv] (sshd)
>      \-+- 03271 chris sshd: chris <at> pts/2 (sshd)
>        \-+= 03272 chris -bash (bash)
>          \-+= 84790 root sudo xrdp-sesman --nodaemon
>            \--- 84791 root xrdp-sesman --nodaemon

Okay,  X11rdp binary is not executed for some reasons.  I doubt
xrdp-sesman is not listening tcp port 3350 or another
process grabs the port.  Could you see "netstat -a -f inet" ?
And you can also test sesman using xrdp-sestest instead of connectting
from RD client

> So x11rdp-devel required xorg-server >= 1.9.3 and setting WITH_NEW_XORG in
> make.conf bumped me to 1.12.4 (I think) after I removed and upgraded a
> bunch of other stuff like libdrm, dri, libGL, libGLU, and so on.

You're right. x11rdp-devel port requires WITH_NEW_XORG.

> Is it possible that I just have some configuration completely wrong?
> My xrdp.ini is modified as per your guide, putting sesman-X11rdp in the
> first entry and setting crypt_level to high.
> I don't think I've changed anything in sesman.ini at all.

Your xrdp.ini configuration seems all right but simplifying is a good way to
make the issue clearer.  I made a virtual machine image which have xrdp and
x11rdp are properly configured. Run it on VirtualBox or something and
then compare differences between my VM and yours.

http://www.club.kyutech.ac.jp/~meta/temp/xrdp-sample.vdi.xz

> I *did* change /usr/local/etc/pam.d/xrdp-sesman to import everything from
> system because I have system configured to authenticate users through
> winbind (Active Directory).  This works properly with sshd and console
> login and until I updated the xrdp-sesman entry all of my connections from
> my AD user were being logged as invalid user.

I think it will work if sshd properly works but also try local user
written in master.passwd too.

> Any additional suggestions you may have would be greatly appreciated.  And
> thank you once again for all your help thus far. :)

No problem, there's lots of xrdp users on Linux but few on FreeBSD. I'd
like to collect knowledge xrdp on FreeBSD.

--

-- 
`whois vmeta.jp | nkf -w`
meta <meta@...>

------------------------------------------------------------------------------
DreamFactory - Open Source REST & JSON Services for HTML5 & Native Apps
OAuth, Users, Roles, SQL, NoSQL, BLOB Storage and External API Access
Free app hosting. Or install the open source package on any LAMP server.
Sign up and see examples for AngularJS, jQuery, Sencha Touch and Native!
http://pubads.g.doubleclick.net/gampad/clk?id=63469471&iu=/4140/ostg.clktrk
Chris Lee | 19 Nov 19:32 2013
Picon

Re: xrdp/freerds on FreeBSD

Hello again everyone,

I have determined that my connection issues may be related to my Active Directory setup on FreeBSD.

When I disable 'winbind enum users' due to a warning in the documentation that the setting may adversely affect performance some things like 'getent passwd' do not seem to know about AD users.  So I have re-enabled that option in smb.conf.  Additionally, when I connect to xrdp from win7 rdc with the domain name *not* specified I get further than the black screen.

However, what I do see is the connection log dialog for xrdp as in the attached.


The session does appear to be started:
==> xrdp.log <==
[20131119-18:21:33] [WARN ] local keymap file for 0x0409 found and dosen't match built in keymap, using local keymap file

==> xrdp-sesman.log <==
[20131119-18:21:33] [INFO ] scp thread on sck 9 started successfully

==> debug.log <==
Nov 19 18:21:33 redacted XRDP-sesman[1041]: pam_winbind(xrdp-sesman): getting password (0x00000188)

==> xrdp-sesman.log <==
[20131119-18:21:34] [INFO ] ++ created session (access granted): username chris, ip redacted:51141 - socket: 8
[20131119-18:21:34] [INFO ] starting X11rdp session...
[20131119-18:21:34] [INFO ] X11rdp start:X11rdp :12 -geometry 1680x960 -depth 24 -bs -ac -nolisten tcp
[20131119-18:21:35] [INFO ] starting xrdp-sessvc - xpid=1386 - wmpid=1385

I even have my window manager running:
-+- 01041 root /usr/local/sbin/xrdp-sesman
 \-+- 01383 root /usr/local/sbin/xrdp-sesman
   \-+= 01384 chris /usr/local/sbin/xrdp-sessvc 1386 1385
     |-+- 01385 chris /bin/sh /usr/local/etc/xrdp/startwm.sh
     | \--- 01389 chris fluxbox
     |--- 01386 chris X11rdp :12 -geometry 1680x960 -depth 24 -bs -ac -nolisten tcp
     \--- 01388 chris xrdp-chansrv

I just don't understand why xrdp is having all of this trouble just because I'm connecting with an AD user.  Connections from the AD user work completely fine with sshd.

Btw, previously someone mentioned using xrdp-sestest to verify whether it is working...  From what I can tell, xrdp-sestest is hard coded to attempt a session with vnc.



On Sat, Nov 16, 2013 at 7:08 PM, Koichiro IWAO <meta-37av2iX2Cc8@public.gmane.org> wrote:
On Fri, Nov 15, 2013 at 11:18:34PM -0600, Chris Lee wrote:
> [chris <at> redacted ~]$ pstree -s xrdp
> -+= 00001 root /sbin/init --
>  \-+= 01192 root /usr/sbin/sshd
>    |-+= 01513 root sshd: chris [priv] (sshd)
>    | \-+- 01517 chris sshd: chris <at> pts/0 (sshd)
>    |   \-+= 01520 chris -bash (bash)
>    |     \-+= 01523 root sudo tail -f xrdp.log xrdp-sesman.log
>    |       \--- 03267 root tail -f xrdp.log xrdp-sesman.log
>    |-+= 01524 root sshd: chris [priv] (sshd)
>    | \-+- 01527 chris sshd: chris <at> pts/1 (sshd)
>    |   \-+= 01528 chris -bash (bash)
>    |     \-+= 84786 root sudo xrdp --nodaemon
>    |       \--- 84787 root xrdp --nodaemon
>    \-+= 03268 root sshd: chris [priv] (sshd)
>      \-+- 03271 chris sshd: chris <at> pts/2 (sshd)
>        \-+= 03272 chris -bash (bash)
>          \-+= 84790 root sudo xrdp-sesman --nodaemon
>            \--- 84791 root xrdp-sesman --nodaemon

Okay,  X11rdp binary is not executed for some reasons.  I doubt
xrdp-sesman is not listening tcp port 3350 or another
process grabs the port.  Could you see "netstat -a -f inet" ?
And you can also test sesman using xrdp-sestest instead of connectting
from RD client

> So x11rdp-devel required xorg-server >= 1.9.3 and setting WITH_NEW_XORG in
> make.conf bumped me to 1.12.4 (I think) after I removed and upgraded a
> bunch of other stuff like libdrm, dri, libGL, libGLU, and so on.

You're right. x11rdp-devel port requires WITH_NEW_XORG.

> Is it possible that I just have some configuration completely wrong?
> My xrdp.ini is modified as per your guide, putting sesman-X11rdp in the
> first entry and setting crypt_level to high.
> I don't think I've changed anything in sesman.ini at all.

Your xrdp.ini configuration seems all right but simplifying is a good way to
make the issue clearer.  I made a virtual machine image which have xrdp and
x11rdp are properly configured. Run it on VirtualBox or something and
then compare differences between my VM and yours.

http://www.club.kyutech.ac.jp/~meta/temp/xrdp-sample.vdi.xz

> I *did* change /usr/local/etc/pam.d/xrdp-sesman to import everything from
> system because I have system configured to authenticate users through
> winbind (Active Directory).  This works properly with sshd and console
> login and until I updated the xrdp-sesman entry all of my connections from
> my AD user were being logged as invalid user.

I think it will work if sshd properly works but also try local user
written in master.passwd too.

> Any additional suggestions you may have would be greatly appreciated.  And
> thank you once again for all your help thus far. :)

No problem, there's lots of xrdp users on Linux but few on FreeBSD. I'd
like to collect knowledge xrdp on FreeBSD.

--
`whois vmeta.jp | nkf -w`
meta <meta-37av2iX2Cc8@public.gmane.org>



--

Thank you,
Chris Lee
------------------------------------------------------------------------------
Shape the Mobile Experience: Free Subscription
Software experts and developers: Be at the forefront of tech innovation.
Intel(R) Software Adrenaline delivers strategic insight and game-changing 
conversations that shape the rapidly evolving mobile landscape. Sign up now. 
http://pubads.g.doubleclick.net/gampad/clk?id=63431311&iu=/4140/ostg.clktrk
_______________________________________________
xrdp-devel mailing list
xrdp-devel@...
https://lists.sourceforge.net/lists/listinfo/xrdp-devel
Koichiro IWAO | 20 Nov 08:46 2013
Picon

Re: xrdp/freerds on FreeBSD

On Tue, Nov 19, 2013 at 12:32:45PM -0600, Chris Lee wrote:
> Hello again everyone,
> 
> I have determined that my connection issues may be related to my Active
> Directory setup on FreeBSD.

You should have tell us that first.  It could save the time.  You shuold try
it on Linux and confirm if the issue is FreeBSD specific or not. xrdp is
a software originally developed for Linux, most of developers are
familiar with Linux but FreeBSD.  You will get more advices if it fails
on Linux.

I still doubt the issue FreeBSD specific.  If you confirmed the issue
FreeBSD specific, please let me know. I will look for that.

> I just don't understand why xrdp is having all of this trouble just because
> I'm connecting with an AD user.  Connections from the AD user work
> completely fine with sshd.

Probably I have already asked you before ... xrdp w/vnc does work even if you
were the AD user? Only xrdp w/x11rdp fails?

--

-- 
`whois vmeta.jp | nkf -w`
meta <meta@...>

------------------------------------------------------------------------------
Shape the Mobile Experience: Free Subscription
Software experts and developers: Be at the forefront of tech innovation.
Intel(R) Software Adrenaline delivers strategic insight and game-changing 
conversations that shape the rapidly evolving mobile landscape. Sign up now. 
http://pubads.g.doubleclick.net/gampad/clk?id=63431311&iu=/4140/ostg.clktrk
Bruce Marriner | 29 May 20:48 2014
Picon

Re: xrdp/freerds on FreeBSD


  I would like to follow up with this and see if there are any changes 
recommended now (since it's a half year + later).

In the FreeBSD 10 ports collection there is xrdp (0.6.1), xrdp-devel 
(0.7.0) and x11rdp which appears the be the 5.0 r299 version.

However, it looks like on github that the 0.6 branch last update was 
last year, the 0.7 branch was also last year, the 0.8 branch has fairly 
recent changes and then there is a head branch updated very very 
recently :)

I have the xrdp 0.6.1 and x11rdp from ports installed and it seems to 
work so far :)

My question, is 0.7 considered stable?  How about 0.8?  What major (if 
any) difference exist with these newer versions?  Are they faster? More 
secure? etc.. Is my current setup from ports the best/recommended 
solution?  Would it be worth it to pull the newer code from github and 
compile them manually?

I also noticed that xrdp-devel from ports does not work with the x11rdp 
in ports, right?  How do I use the version from redports or is there now 
a better way?

Thanks!  I'm happy to help out and test a few things if it helps the 
project.  I've got a test box setup and I'm toying with a few ideas and 
this is part of that project..

------ Original Message ------
From: "Koichiro IWAO" <meta@...>
To: "Chris Lee" <labmonkey42@...>
Cc: xrdp-devel@...
Sent: 11/13/2013 7:39:57 PM
Subject: Re: [Xrdp-devel] xrdp/freerds on FreeBSD

>On Tue, Nov 12, 2013 at 01:51:33PM -0600, Chris Lee wrote:
>>  Hello All,
>>
>>  I am attempting to get a rdp service *without vnc* working on FreeBSD
>>  9.2-RELEASE.
>
>I've already suggested you X11rdp but I have some updates after that.
>X11rdp from master branch has been built successfully. Could you try it
>again? I'd like to help you if you're interested in X11rdp on FreeBSD
>and make them better. It works fine for me.
>
>I have xrdp/x11rdp ports which has "-devel" suffix and no suffix.
>No suffixed ports are xrdp from v0.6 branch and x11rdp 0.5.0. Suffixed
>ports are xrdp from v0.7 branch and x11rdp from master branch.
>
>Whichever is OK but v0.6 is stable.
>
>v0.6:
>https://svn.redports.org/meta/net/xrdp/
>https://svn.redports.org/meta/x11-servers/x11rdp/
>
>v0.7:
>https://svn.redports.org/meta/net/xrdp-devel/
>https://svn.redports.org/meta/x11-servers/x11rdp-devel/
>
>Bleeding-edge:
>https://svn.redports.org/meta/net/xrdp-head/
>
>>  If I use the sesman-Xvnc configuration I can connect and use my 
>>desktop
>>  through RDC just fine but vnc seems to make the desktop very 
>>sluggish. If
>>  I comment out all of the vnc configuration sections, leaving only the 
>>rdp
>>  sections I can still connect with RDC but I just get a black screen 
>>with a
>>  mouse cursor and I don't see any X server running on the system.
>
>Quick diagnosis, run "/usr/local/bin/X11rdp :15" and paste the result.
>
>>  I also tried to build FreeRDP/FreeRDS but I'm stuck at:
>>  Linking C executable freerds
>>  /usr/bin/ld: cannot find -lfreerdp-server
>
>Possibly, FreeRDP 1.1 (beta) is required to build FreeRDS. FreeRDP has
>drastically been restructured after 1.0.0 release. This is one of the
>reasons why Jay forked FreeRDP as neutrinordp. Current FreeBSD port
>version is 1.0.2.
>
>--
>`whois vmeta.jp | nkf -w`
>meta <meta@...>
>
>------------------------------------------------------------------------------
>DreamFactory - Open Source REST & JSON Services for HTML5 & Native Apps
>OAuth, Users, Roles, SQL, NoSQL, BLOB Storage and External API Access
>Free app hosting. Or install the open source package on any LAMP 
>server.
>Sign up and see examples for AngularJS, jQuery, Sencha Touch and 
>Native!
>http://pubads.g.doubleclick.net/gampad/clk?id=63469471&iu=/4140/ostg.clktrk
>_______________________________________________
>xrdp-devel mailing list
>xrdp-devel@...
>https://lists.sourceforge.net/lists/listinfo/xrdp-devel

------------------------------------------------------------------------------
Time is money. Stop wasting it! Get your web API in 5 minutes.
www.restlet.com/download
http://p.sf.net/sfu/restlet
Koichiro IWAO | 30 May 02:51 2014
Picon

Re: xrdp/freerds on FreeBSD

Hi,

Thank you for interested in xrdp on FreeBSD.

> I would like to follow up with this and see if there are any changes
> recommended now (since it's a half year + later).
> 
> In the FreeBSD 10 ports collection there is xrdp (0.6.1), xrdp-devel
> (0.7.0) and x11rdp which appears the be the 5.0 r299 version.
> 
> However, it looks like on github that the 0.6 branch last update was
> last year, the 0.7 branch was also last year, the 0.8 branch has
> fairly recent changes and then there is a head branch updated very
> very recently :)
> 
> I have the xrdp 0.6.1 and x11rdp from ports installed and it seems to
> work so far :)

Yes, I also use the combination. Most tested, most stable.

> My question, is 0.7 considered stable?

Talking about FreeBSD, I think no. Porting xrdp 0.7 to FreeBSD is not 
done yet.
The reason xrdp FreeBSD port stay on 0.7 is not the stability but Just 
because of
my time.  0.6 code is simple so it was easy to make it work on FreeBSD 
but 0.7
and later versions contain Linux specific code for new features.  I 
still
working on porting later versions to FreeBSD but I need help.

>  How about 0.8?

I've made 0.8 port. But very experimental. I haven't test well. Probably 
it doesn't work.
https://svn.redports.org/meta/net/xrdp-head/

> What major (if any) difference exist with these newer versions?  Are 
> they faster?
> More secure? etc..

Jay knows well about the questions which are not FreeBSD specific.

> Is my current setup from ports the best/recommended solution?  Would it 
> be worth
> it to pull the newer code from github and compile them manually?

Currently, your solution (xrdp 0.6.1 w/ x11rdp 0.5.0.299) is still the 
best.  The newer
code will not compile on FreeBSD but volunteer to make it work on 
FreeBSD is very very
worth and welcome.

> I also noticed that xrdp-devel from ports does not work with the
> x11rdp in ports, right?  How do I use the version from redports or is
> there now a better way?

Yes. xrdp-devel and x11rdp port is not work together.  Please use with 
x11rdp-devel on my
redports repo. x11rdp-devel is considered stable but xrdp-devel is not 
stable yet. That's
why I do not submit x11rdp-devel to official port. I think that is 
premature. I also
work on making xorg rdp driver port.

> Thanks!  I'm happy to help out and test a few things if it helps the
> project.  I've got a test box setup and I'm toying with a few ideas
> and this is part of that project..

Thanks!

--

-- 
`whois vmeta.jp | nkf -w`
meta <meta@...>

------------------------------------------------------------------------------
Time is money. Stop wasting it! Get your web API in 5 minutes.
www.restlet.com/download
http://p.sf.net/sfu/restlet
Bruce Marriner | 6 Jun 18:04 2014
Picon

Re: xrdp/freerds on FreeBSD

  Great, thanks for the response!  I'll stick with the working setup.

I don't know how to port software, or well.. I'm not that much of a 
programmer :(.  I would be happy to help test anything though if that 
helps.  I would definitely love to see the newer version of xrdp to work 
on FreeBSD so I am willing to help in anyway that I can.

Also, one other question.  How secure is xrdp?  Is it considered safe on 
public networks?

------ Original Message ------
From: "Koichiro IWAO" <meta@...>
To: "Bruce Marriner" <bruce@...>
Cc: xrdp-devel@...
Sent: 5/29/2014 7:51:27 PM
Subject: Re: [Xrdp-devel] xrdp/freerds on FreeBSD

>Hi,
>
>Thank you for interested in xrdp on FreeBSD.
>
>>  I would like to follow up with this and see if there are any changes
>>  recommended now (since it's a half year + later).
>>
>>  In the FreeBSD 10 ports collection there is xrdp (0.6.1), xrdp-devel
>>  (0.7.0) and x11rdp which appears the be the 5.0 r299 version.
>>
>>  However, it looks like on github that the 0.6 branch last update was
>>  last year, the 0.7 branch was also last year, the 0.8 branch has
>>  fairly recent changes and then there is a head branch updated very
>>  very recently :)
>>
>>  I have the xrdp 0.6.1 and x11rdp from ports installed and it seems to
>>  work so far :)
>
>Yes, I also use the combination. Most tested, most stable.
>
>>  My question, is 0.7 considered stable?
>
>Talking about FreeBSD, I think no. Porting xrdp 0.7 to FreeBSD is not
>done yet.
>The reason xrdp FreeBSD port stay on 0.7 is not the stability but Just
>because of
>my time. 0.6 code is simple so it was easy to make it work on FreeBSD
>but 0.7
>and later versions contain Linux specific code for new features. I
>still
>working on porting later versions to FreeBSD but I need help.
>
>>   How about 0.8?
>
>I've made 0.8 port. But very experimental. I haven't test well. 
>Probably
>it doesn't work.
>https://svn.redports.org/meta/net/xrdp-head/
>
>
>>  What major (if any) difference exist with these newer versions? Are
>>  they faster?
>>  More secure? etc..
>
>Jay knows well about the questions which are not FreeBSD specific.
>
>
>>  Is my current setup from ports the best/recommended solution? Would 
>>it
>>  be worth
>>  it to pull the newer code from github and compile them manually?
>
>Currently, your solution (xrdp 0.6.1 w/ x11rdp 0.5.0.299) is still the
>best. The newer
>code will not compile on FreeBSD but volunteer to make it work on
>FreeBSD is very very
>worth and welcome.
>
>
>>  I also noticed that xrdp-devel from ports does not work with the
>>  x11rdp in ports, right? How do I use the version from redports or is
>>  there now a better way?
>
>Yes. xrdp-devel and x11rdp port is not work together. Please use with
>x11rdp-devel on my
>redports repo. x11rdp-devel is considered stable but xrdp-devel is not
>stable yet. That's
>why I do not submit x11rdp-devel to official port. I think that is
>premature. I also
>work on making xorg rdp driver port.
>
>
>>  Thanks! I'm happy to help out and test a few things if it helps the
>>  project. I've got a test box setup and I'm toying with a few ideas
>>  and this is part of that project..
>
>Thanks!
>
>--
>`whois vmeta.jp | nkf -w`
>meta <meta@...>
>
>------------------------------------------------------------------------------
>Time is money. Stop wasting it! Get your web API in 5 minutes.
>www.restlet.com/download
>http://p.sf.net/sfu/restlet
>_______________________________________________
>xrdp-devel mailing list
>xrdp-devel@...
>https://lists.sourceforge.net/lists/listinfo/xrdp-devel

------------------------------------------------------------------------------
Learn Graph Databases - Download FREE O'Reilly Book
"Graph Databases" is the definitive new guide to graph databases and their 
applications. Written by three acclaimed leaders in the field, 
this first edition is now available. Download your free book today!
http://p.sf.net/sfu/NeoTech

Gmane