-
-
Notifications
You must be signed in to change notification settings - Fork 1.7k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
macOS Monterey stays on login window after entering credentials #2184
Comments
Hi @paulb39 You'll need a copy of Xorg on your system, along with the xorgxrdp module. The idea is that sesman starts |
Hey, The wiki has us install XQuartz - is that what you mean for Xorg? The wiki also has us compile xorgxrdp and I have that installed. One thing I noticed is the sesman config has this set: param=/usr/lib/xorg/Xorg |
I have no idea whether xorgxrdp will work with XQuartz - I don't have a Mac. Set sesman to run XQuartz instead of Xorg. It will either work or it wont'. |
Updated config: I get a different error now: scp_process_msg failed isn't really helpful, any idea how I can look into this more? |
That's from a reconnect - sesman thinks a session is already running which I don't think is the case. I think the Suggest stopping any remote sessions and restarting sesman (a reboot will obviously do it), and then seeing what's in the log. |
Well this is very frustrating, I seem to have a catch-22 situation. For the life of me I can't get launchd to work so that xrdp and xrdp-sesman run at the login screen. Regardless if I could get that to work, the main problem seems to be I can't get the X server to run until I log in. If on the login screen I SSH in and do So if I try to remote in I get the xrd-sesman error "Did not find a running X server" Has no one ever been able to get Xorg to work on OSX? |
What happens when you run this command (which is the command sesman would use):-
it might give us a few clues as to whether this can be got working or not. |
Getting closer. My xrdp-sesman config has: param=/opt/X11/bin/Xorg So I am guessing you wanted me to run Xorg instead of Xquartz? If I run: sudo /opt/X11/bin/Xorg :10 -auth .Xauthority -config xrdp/xorg.conf -noreset -nolisten tcp -logfile .xorgxrdp.%s.log It fails to load modules: and ends with: In the xrdp.ini I had to update lib=libxup.so to lib=libxup.dylib, so I am not sure why it is trying to load .so file - from my limited understanding .so files are for linux |
Xorg allows a user config to be specified. We use that to load the xorgxrdp module. You'll need to find out a way to do that to even try this with Xquartz Your log file tells you that Xorg has at least found the modules, and why they aren't being loaded:-
To get around this, the little searching I've done tells me you'll either need an Apple developer ID or you'll need to disable library validation. Again, that's not an area I can help you with I'm afraid. |
So disabling library validation let me get past those error messages. I ran csrutill disable in recovery console. This would probably have been a better way of doing it, but doing it system wide was easier. Now I get a new error: Researching it looks like this is from the device config being wrong: What sucks if I can't figure out what that section should be. I was hoping to find some guide with commands I could run to get the correct values, but I can't find anything helpful. The best I could find to get info about my system is: But that's not really helpful, I have no idea how to find out what the BusID should be. But I get the same error. I tried "Internal" as well since its just using the integrated graphics, but I still get the error. |
What does the whole log look like? |
See also #2194, if you haven't already! |
Thanks. I don't think the PCI ID of your graphics card is relevant here. In the configuration we need, the xrdpdev driver is the main graphics card - there isn't anything else. Solving this is probably going to need stepping through the X server and figuring out why the check in |
Hey, I am happy to look into this, but I'm a C#/java dev and a little out of my element. I looked at the xorgxrdp and xrdp repos but couldn't find xf86PostProbe() anywhere, I also checked the XQuartz repo but didn't see it there either. What do I need to step through? |
This repo is what you're looking for: https://gitlab.freedesktop.org/xorg/xserver As to coming from C#/Java -- Me too! It took some work, but I did eventually learn to work in the XRDP code base. It's incredibly challenging, and many days you want to bang your head against the wall/throw things, and give up! I've gotten frustrated and stopped working on this for several months, but the desire to have solid remote desktop on Linux OSes keeps drawing me back. It's a space that is in need of talented motivated devs. If you want to ask further questions on the Gitter, we're happy to help. I learned a lot of what I know the hard way. I think getting this to work on Mac OS could be a really fun challenge. |
@paulb39 - what exactly is the Xorg you are using? Is it an Apple special built to run with XQuartz, or is it a completely separate build of Xorg? If it's the former, you could be having trouble because of this code:- https://gitlab.freedesktop.org/xorg/xserver/-/blob/master/hw/xfree86/common/xf86Bus.c#L557-L574 If neither XSERVER_PLATFORM_BUS or XSERVER_LIBPCIACCESS are defined, the error condition will always trigger with xorgxrdp. That's the bit of code you'd need to step through. |
So this has been extremely frustrating. My Xorg is located /opt/X11/bin, I believe its from XQuartz. What values should those env variables be? As a quick test I set XSERVER_PLATFORM_BUS to true with an export command, no change, I then cleared it and did XSERVER_LIBPCIACCESS=true, but no change there either. I am trying to make sure I can compile the project first, (using instructions from https://www.xquartz.org/Developer-Info.html). The logs showed this: ld: warning: The i386 architecture is deprecated for macOS (remove from the Xcode build setting: ARCHS) After some googling it looks like it is because they removed the ability to compile 32 bit projects in Xcode 10 (thanks Apple!) configure:5172: checking whether the C compiler works I have no idea how to get past that. If I try to open the 9.4 version of Xcode it says it can't run on Monterey, so maybe that's the problem? |
They aren't environment variables - they are macros set at compilation time. If you can build the X server, you can at least disable the check completely - that might be interesting. I can't help you much with the Apple compilation side, except to make a few comments on the above:-
|
Okay, so with some modification I was able to compile the xorg-server project, but I am really confused. I ran: And that compiles fine, but it only made /opt/X12/bin/Xquartz Any idea how I can compile xfree86? |
Sorry - no. You'll need to ask in a Mac forum I think. Sounds like progress though. |
Finally had some time to look at this again. I noticed I had the missing file under /opt/X11/include/xorg, so I moved it to the project folder and tried to make again. Still fails: error log I noticed the project also allows meson for building, so I installed that build system and tried it. Fails as well. build log. I can't get passed this. |
Posted on their gitlab, xfree86 can't be compiled on a Mac: https://gitlab.freedesktop.org/xorg/xserver/-/issues/1348 |
I am trying to connect from Windows 10 to my mac. Following the wiki I was able to build and install xrdp on the mac.
I am able to connect to the Mac via the remote desktop client, but after I add my credentials, the username/password page disappears and I am left with a teal background.
Steps:
Restart mac, when at login page SSH in to run:
sudo /usr/local/sbin/xrdp
sudo /usr/local/sbin/xrdp-sesman
Disconnect from SSH and try to to remote in from Windows machine
Expected results:
After selecting Xorg profile and entering credentials, mac desktop should be shown
Actual results:
After entering credentials I am stuck on the login window with a teal background.
Logs:
[20220319-23:54:44] [INFO ] ++ created session (access granted): username paul, ip 192.168.0.14:11178 - socket: 11
[20220319-23:54:44] [INFO ] starting Xorg session...
[20220319-23:54:44] [DEBUG] Did not find a running X server at /tmp/.X11-unix/X10
[20220319-23:54:44] [DEBUG] Did not find a running X server at /tmp/.X10-lock
[20220319-23:54:44] [DEBUG] Closed socket 12 (AF_INET 0.0.0.0:5910)
[20220319-23:54:44] [DEBUG] Did not find a running X server at 5910
[20220319-23:54:44] [DEBUG] Closed socket 12 (AF_INET 0.0.0.0:6010)
[20220319-23:54:44] [DEBUG] Did not find a running X server at 6010
[20220319-23:54:44] [DEBUG] Closed socket 12 (AF_INET 0.0.0.0:6210)
[20220319-23:54:44] [DEBUG] Did not find a running X server at 6210
[20220319-23:54:44] [DEBUG] Did not find a running X server at /tmp/.xrdp/xrdp_chansrv_socket_10
[20220319-23:54:44] [DEBUG] Did not find a running X server at /tmp/.xrdp/xrdp_chansrv_audio_out_socket_10
[20220319-23:54:44] [DEBUG] Did not find a running X server at /tmp/.xrdp/xrdp_chansrv_audio_in_socket_10
[20220319-23:54:44] [DEBUG] Did not find a running X server at /tmp/.xrdp/xrdpapi_10
[20220319-23:54:44] [INFO ] Starting session: session_pid 774, display :10.0, width 4480, height 1440, bpp 24, client ip 192.168.0.14:11178 - socket: 11, user name paul
[20220319-23:54:44] [ERROR] sesman_data_in: scp_process_msg failed
[20220319-23:54:44] [INFO ] [session start] (display 10): calling auth_start_session from pid 774
[20220319-23:54:44] [ERROR] sesman_main_loop: trans_check_wait_objs failed, removing trans
[20220319-23:54:44] [DEBUG] Closed socket 11 (AF_INET 127.0.0.1:3350)
[20220319-23:54:44] [INFO ] xrdp_wm_log_msg: login successful for user paul on display 10
[20220319-23:54:44] [INFO ] login successful for user paul on display 10
[20220319-23:54:44] [INFO ] loaded module 'libxup.dylib' ok, interface size 10296, version 4
[20220319-23:54:44] [DEBUG] xrdp_wm_log_msg: started connecting
[20220319-23:54:44] [INFO ] started connecting
[20220319-23:54:44] [INFO ] lib_mod_connect: connecting via UNIX socket
[20220319-23:54:47] [DEBUG] Closed socket 24 (AF_UNIX)
xrdp and sesman configs:
https://gist.github.com/paulb39/41bfd36b2eaedca06f5800bdc868ca6d
https://gist.github.com/paulb39/e4c36ab447eb42928c75dc2e9a6c9c9f
Note that I know this issue is common in Linux and the solution is to not be logged in when trying to connect, but I get the same result if I connect when the mac is on the login page or is already logged in.
Also note that I can use the vnc profile no problem.. but vnc sucks which is why I am trying to get xorg working.
The text was updated successfully, but these errors were encountered: