Skip to content
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

Add imlib2 support for login screen customisation #1962

Merged
merged 14 commits into from
Sep 1, 2021

Conversation

matt335672
Copy link
Member

@matt335672 matt335672 commented Aug 5, 2021

Fixes #1929 #1819

See also discussion #1931

This PR allows for more customization of the xrdp login screen. An example customised screen from an Ubuntu 20.04 VM is:-

Screenshot_2021-08-05_12-24-10

This is achieved by adding the following parameters to xrdp.ini:-

ls_background_image=/usr/share/backgrounds/ryan-stone-skykomish-river.jpg
ls_background_transform=zoom

ls_logo_filename=/usr/share/icons/hicolor/256x256/apps/ubuntu-logo-icon.png
ls_logo_transform=zoom
ls_logo_width=140
ls_logo_height=140
ls_logo_x_pos=105
ls_logo_y_pos=50

File types other than bmp files are supported by way of the imlib2 library which is available on all our currently supported platforms. Imlib2 support is optional. Without it, we fall back to the existing bmp only code. The existing code has been reworked to (hopefully) make it simpler to understand, and also to fix #1819.

Alpha blending of images onto the background colour behind them is supported - this can be seen on the Ubuntu logo in the screenshot above. On multi monitor setups, the background image is displayed on the primary monitor only.

A test suite has been added for the extended xrdp_bitmap_load() call, so that the correct operation of the external library can be checked.

This is a fairly significant PR, and so I suggest we hold off merging it until after the next release.

@matt335672 matt335672 linked an issue Aug 5, 2021 that may be closed by this pull request
@matt335672
Copy link
Member Author

Just re-read #1931. I've added an extra check so that wallpaper isn't loaded if the client has disabled wallpaper in the performance settings.

@metalefty
Copy link
Member

I've added an extra check so that wallpaper isn't loaded if the client has disabled wallpaper in the performance settings.

Awesome.

@metalefty
Copy link
Member

Overall, LGTM.

configure.ac Outdated Show resolved Hide resolved
AC_SUBST([IMLIB2_CFLAGS])
use_imlib2=yes
esac

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Auto-detection is generally very nice but autodetected libraries will not appear in xrdp -v. I want an easy way to tell users if your compiled xrdp supports png/jpg images on the login screen. ldd /usr/sbin/xrdp sounds a little bit guru's way.

If we introduce more auto-detection, we might need to invent a new way to show which libraries/features compiled with.

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

That's a really good point - I hadn't thought of that but it's a feature I use a lot when triaging problems. I'll remove the auto-detect.

@matt335672
Copy link
Member Author

xrdp -v now works OK for imlib2.

I also noticed I'd not added CI support for i386 legacy. It's a small thing, but it's in now.

@metalefty
Copy link
Member

so I suggest we hold off merging it until after the next release.

I agree.

@metalefty metalefty added this to the v0.9.18 milestone Aug 10, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
2 participants