-
-
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
Support NetBSD, OpenIndiana, Gentoo Linux, and MacOS. #2803
Conversation
Update xrdp to support netbsd, openindiana, macos, gentoo linux.
Fix call to usleep for NetBSD, where value must be < 1000000
This pull request is large a bit. Could you separate into per operating system? |
|
||
LOG(LOG_LEVEL_TRACE, "g_mk_socket_path() returned 1"); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This seems to be indented inconsistently with the preceding statement
AC_ARG_ENABLE(pam, AS_HELP_STRING([--enable-pam], | ||
[Build PAM support (default: yes)]), | ||
[], [enable_pam=yes]) | ||
[Build PAM support (default: no)]), | ||
[], [enable_pam=no]) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think that on Linux, this should default to yes
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I'll probably change the option to --enable-native then, which will effectively disable pam. Since pam is the default I don't see a reason to have an --enable-pam option, correct me if I'm wrong. Pam works everywhere except OpenIndiana, it may be possible to get it working I can take a second look after the changes are merged.
<key>Disabled</key><true/> | ||
<key>KeepAlive</key><true/> | ||
</dict> | ||
</plist> |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This may be a dumb question, but why use this other binary instead of just writing a plist that works without the extra dependency? That would allow xrdp to work whether installed by MacPorts or Homebrew
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I can test this without the extra dependency, the macports daemondo handles launchctl strangeness, but I have seen many configs that don't use it.
{ | ||
const char msg[] = "\n<E>Timed out waiting for RandR outputs\n"; | ||
g_file_write(1, msg, g_strlen(msg)); | ||
exit(XW_STATUS_TIMED_OUT); | ||
} |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
{ | |
const char msg[] = "\n<E>Timed out waiting for RandR outputs\n"; | |
g_file_write(1, msg, g_strlen(msg)); | |
exit(XW_STATUS_TIMED_OUT); | |
} | |
{ | |
const char msg[] = "\n<E>Timed out waiting for RandR outputs\n"; | |
g_file_write(1, msg, g_strlen(msg)); | |
exit(XW_STATUS_TIMED_OUT); | |
} |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yep, I'll have to review the indentation.
if MACOS | ||
# must be tab below. Common out Xorg and Xvnc since they don't work on MacOs. | ||
install-data-hook: | ||
sed -i '' '235,249s/^/;/g' $(DESTDIR)$(sysconfdir)/xrdp/xrdp.ini |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
this breaks if the file changes in potentially minor ways
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I can bullet proof it by using grep to look for the [Xorg] and [Xvnc] blocks to get the line numbers.
if( gw_username != NULL ) | ||
{ |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
inconsistent indentation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yep, apologies, I really messed up indentation.
@@ -0,0 +1,4 @@ | |||
#!/sbin/openrc-run | |||
|
|||
command="/usr/local/sbin/xrdp-sesman" |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This shouldn't be hardcoded to '/usr/local' prefix.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Ahh I see. Yes, I believe there are some prefix replacements available in the other scripts, I'll look at this.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Anyway, could you separate your PR into per operating system? Gentoo changes seems easy so it can be merged soon if you separate PR into per operating system.
@mstone2001 - thanks very much for this. You've clearly put a lot of effort into it. I agree with @metalefty that a PR per operating system is necessary. This will make the reviewing a lot easier:-
Regarding the C source file formatting, I think all you need to do to fix this is run the |
Sure I can do that. Should I just fork the repo once for each operating system and submit a pull request for each? Or is there a better way? |
Sure, hopefully will have some time this week to break this up. I'll fork 4 versions and submit a pull request for each, unless you can suggest a better way. |
Thanks for that, wasn't aware you had a script. Yes, Oracle is not the most open source friendly company, so I just wanted to note that it "should work", since OpenIndiana is just a fork of Solaris 10, and I did my changes looking at the Solaris 10 documentation. I targeted this for OpenIndiana since that is what I use. |
You don't need to use 4 forks. You can create branches as many as you want in one fork. |
That makes sense, I'll do that then, a branch for each OS, and separate out the changes. |
Let me close this. Changes will be separated and raised as new PRs per operating system. |
I use XRDP extensively on many different machines I manage, but had a few platforms where I couldn't get it to work. So I went though the effort of getting these platforms to work, and wanted to offer the changes. Almost all of the changes were focused on the os_calls file, and also added some additional startup configs for each platform. I made these changes against the development branch, but I also have a working version against the last official release. I originally had problems with shared memory and xorgxrdp, but looks like the posix changes in the current development branch fixed all of that, great work! (Although OpenIndiana requires some build flags, will open a pull request for that ).
NetBSD:
OpenIndiana:
GentooLinux:
MacOS:
I believe I have summarized all of the changes. I also added some additional logging various places while I was identifying the issues. I can also offer to help support these in the future, since I plan to actively use xrdp on these platforms. If you have any questions let me know.