xserverbpp affects X11rdp and Xvnc, but not Xorg. No need to have
xserverbpp in the Xorg section where it has no effect. Add commented out
xserverbpp to Xvnc, some users may want to experiment with that setting.
The pixman library in not part of xrdp. If users see that "xrdp_pixman"
is not found, they might assume it is some xrdp specific library.
The Automake conditional is still XRDP_PIXMAN, but the pkg-config
variables become PIXMAN_LIBS and PIXMAN_CFLAGS.
If no domain is passed, self->session->client_info->domain is an empty
string that is incorrectly treated as if the domain were passed by the
client.
The regression was introduced in fc753a95, when an incorrect check for
non-empty domain was added. That check was removed in 67119ecc based on
coverity report, leaving no trace of the original intention.
Check domain both for '_' and '\0' as the initial character. In either
case, select the first session type section in xrdp.ini.
upper 16 bits of keylayout value indicates keyboard layout.
lower 16 bits of keylayout value indicates country/language.
If the keymap file doesn't match exactly to keylayout value,
the typical keyboard of the country/language should be used.
For example [1]:
0x00000409: US English
0x00010409: US Dvorak
0x00020409: US International
0x00030409: US Dvorak for left hand
0x00040409: US Dvorak for right hang
0x0000040e: Hungarian
0x0001040e: Hungarian 101-key
[1] https://msdn.microsoft.com/windows/hardware/commercialize/manufacture/desktop/windows-language-pack-default-values
Make section names equal to the names in the "name=" setting to avoid
confusion and the need to renumber sections. Avoid "sesman-" in the
names, it's not helpful to the user. Move "Xorg" just below "X11rdp",
that would give xorgxrdp more visibility.
AM_CPPFLAGS is a documented Automake variable for C preprocessor flags
that should not be overridden when compiling the package.
There is no need to have two additional variables that are ultimately
merged into AM_CPPFLAGS.
Their names are also confusing. EXTDA_DIST is a documented Automake
variable. Everything else that starts with "EXTRA" is not.
Specify display in the "login failed" message. Print the section name
that wasn't found. Remove stdout message about missing section,
xrdp_wm_log_msg() already writes to stdout.
For xrdp-sesman, don't report that the daemon is listening to a port if
it fails to attach to that port. Don't use LOG_LEVEL_ALWAYS for startup
message, it's not a critical error.
libdir is for shared and static libraries. Some xrdp libraries are loaded
dynamically from a non-standard directory, so they are used like modules.
Having separate libdir and moduledir would eventually allow to separate
dynamically loaded modules from shared libraries.
AM_CPPFLAGS is for flags passed to the preprocessor, such as defines and
includes. AM_CFLAGS is for flags affecting the compiler, such as debug
and optimization settings.
INCLUDES is an obsolete name. Users can pass INCLUDES and break
compilation. AM_CPPFLAGS is more explicit that the flags come from
Automake and should not be overridden.
To add flags to the compiler, CFLAGS, CPPFLAGS or LDFLAGS can be used on
the configure command line.
The need to add flags depends on the location of the headers and
libraries of the dependencies, which is orthogonal to the directory where
xrdp will be installed.
The implementation in configure.ac has a stray closing bracket, making
GOT_PREFIX true even if --prefix is not passed.
The implementation is inconsistent - the only affected makefiles are for
xrdp and libxrdp.
Changing rpath manually is wrong in most cases. Libtool should be able to
set rpath correctly on its own.
Using $(prefix)/lib ignores the libdir setting. For many 64-bit systems,
/usr/lib is used for 32-bit libraries. Adding 32-bit libraries to the
rpath slows down 64-bit executables, as the dynamic loader searches for
libraries in a wrong directory.
There is no way to disable GOT_PREFIX if --prefix has to be passed.
Fedora RPM patches configure.ac and needs to rerun autoconf and automake
after that.