Xrdp: [MASTER ISSUE] - Add Mac OS Support

Created on 8 Feb 2018  路  6Comments  路  Source: neutrinolabs/xrdp

I will be working on adding support for Mac OS to xrdp (_but I don't promise anything_) and I'm opening this issue to track what's left to do and what's done.

Action items

The following list does not necessarily contains all the action items to make XRDP work on Mac OS but are the ones I currently know of:

  • Make xrdp generate _dylib_ files (issue #790)

    • Fixed with pull request #1015

  • Add PAM configuration

    • Fixed with pull request #1021

  • Make _xrdp.ini_ have libraries with _dylib_ extension rather than _so_ in mac

    • Fixed on pull request #1036

  • Add launchd files for _xrdp_ and _xrdp-sesman_ (see related issue #1019)
  • (Optional) Add _sesman/verify_user_macos.m_ with the implementation of _sesman/auth.h_ to use native Mac OS logic to login rather than relying on PAM
  • (Optional) Migrate _xrdp.ini_ to be a _plist_ file
  • Generate an installer with the working software

Most helpful comment

OK, I just express my opinion about xrdp on macOS. I'm also a user of macOS but I don't want to use desktop environment such as GNOME in X11 because it works on Mac but not a Mac native desktop. Nothing's more useful than using it on GNU/Linux.

Therefore, I focus on getting Mac native desktop via xrdp so Xvnc and Xorg in xrdp.ini are out of scope. To get Mac native desktop via xrdp, I think xrdp could be configured like this. Unfortunately, this is the only way for now.

2018-02-19 17 12 23

; Built-in screen sharing must be turned on
[connect-to-mac-built-in-vnc]
name=Built-in VNC server
lib=libvnc.so
ip=127.0.0.1
port=5900
username=na
password=ask ; screen sharing password

With this config, I can get the Mac native desktop via xrdp.

xrdp-mac

If we develop a new library for Mac, perhaps we can get Mac native desktop without built-in VNC. The disadvantage of this way is you still need to use the horrible VNC.

All 6 comments

After patching v0.9.5 with pull requests #1015 #1021 and #1036, installing to a temporal dir connecting via RDP to mac OS is still not possible:

  • When trying to connect with Xorg the screen does nothing from client and I get the following errors in xrdp.log:

    [20180218-23:20:29] [DEBUG] xrdp_wm_log_msg: connecting to sesman ip 127.0.0.1 port 3350
    [20180218-23:20:29] [INFO ] xrdp_wm_log_msg: sesman connect ok
    [20180218-23:20:29] [DEBUG] xrdp_wm_log_msg: sending login info to session manager, please wait...
    [20180218-23:20:29] [DEBUG] return value from xrdp_mm_connect 0
    [20180218-23:20:29] [INFO ] xrdp_wm_log_msg: login successful for display 11
    [20180218-23:20:29] [DEBUG] xrdp_wm_log_msg: started connecting
    [20180218-23:20:33] [DEBUG] Closed socket 18 (AF_UNIX)
    [20180218-23:20:36] [DEBUG] Closed socket 18 (AF_UNIX)

  • Trying to connect with Xvnc I get the following errors in xrdp.log:

    [20180218-23:17:50] [INFO ] xrdp_wm_log_msg: login successful for display 10
    [20180218-23:17:50] [DEBUG] xrdp_wm_log_msg: VNC started connecting
    [20180218-23:17:50] [DEBUG] xrdp_wm_log_msg: VNC connecting to 127.0.0.1 5910
    [20180218-23:17:53] [DEBUG] VNC error 1 after security negotiation
    [20180218-23:17:53] [DEBUG] VNC error before sending share flag
    [20180218-23:17:53] [DEBUG] VNC error before receiving server init
    [20180218-23:17:53] [DEBUG] VNC error before receiving pixel format
    [20180218-23:17:53] [DEBUG] VNC error before receiving name length
    [20180218-23:17:53] [DEBUG] VNC error before receiving name
    [20180218-23:17:53] [DEBUG] xrdp_wm_log_msg: VNC error - problem connecting
    [20180218-23:17:53] [DEBUG] Closed socket 18 (AF_INET 127.0.0.1:50222)
    [20180218-23:17:53] [DEBUG] xrdp_wm_log_msg: some problem
    [20180218-23:17:53] [DEBUG] xrdp_mm_module_cleanup
    [20180218-23:17:53] [DEBUG] VNC mod_exit
    [20180218-23:17:53] [DEBUG] Closed socket 17 (AF_INET 127.0.0.1:50221)

What's the goal of xrdp on macOS?

To connect Mac's desktop via RDP?
or
have X desktop such as GNOME, KDE, Xfce, etc on Mac?

To simply connect to Mac's Desktop via RDP. I know some of the connection libraries may not work (I think I should be using X11), but I'm very rusty on all this X server stuff. I'm just posting here to keep track of what I am testing, but any help is greatly appreciated.

I just want to stop using the horrible built in VNC.

OK, I just express my opinion about xrdp on macOS. I'm also a user of macOS but I don't want to use desktop environment such as GNOME in X11 because it works on Mac but not a Mac native desktop. Nothing's more useful than using it on GNU/Linux.

Therefore, I focus on getting Mac native desktop via xrdp so Xvnc and Xorg in xrdp.ini are out of scope. To get Mac native desktop via xrdp, I think xrdp could be configured like this. Unfortunately, this is the only way for now.

2018-02-19 17 12 23

; Built-in screen sharing must be turned on
[connect-to-mac-built-in-vnc]
name=Built-in VNC server
lib=libvnc.so
ip=127.0.0.1
port=5900
username=na
password=ask ; screen sharing password

With this config, I can get the Mac native desktop via xrdp.

xrdp-mac

If we develop a new library for Mac, perhaps we can get Mac native desktop without built-in VNC. The disadvantage of this way is you still need to use the horrible VNC.

So I guess we will need to dig on how to build the library for Mac, live caught me up thought so I haven't had a chance to dig on this

I am getting the same "error" (nothing happens, same result in the log). The VNC approach works for me only with Full HD resolution, with anything higher it'll crash. Any ideas?

Was this page helpful?
0 / 5 - 0 ratings

Related issues

jsorg71 picture jsorg71  路  7Comments

Jerry-kiwi picture Jerry-kiwi  路  4Comments

monken picture monken  路  4Comments

MoonMoon1919 picture MoonMoon1919  路  5Comments

joakim-tjernlund picture joakim-tjernlund  路  9Comments