JezerM / web-greeter

A modern, visually appealing greeter for LightDM.
https://web-greeter-page.vercel.app
GNU General Public License v3.0
216 stars 12 forks source link

Themes should be able to access /usr/share/backgrounds #50

Closed Aakodal closed 2 years ago

Aakodal commented 2 years ago

Environment

Description of feature

With Antergos' web greeter, themes could access /usr/share/backgrounds, and thus suggest different backgrounds for themes that allow it (such as Litarvan's). However, it is no longer the case, according to the docs (and experience). It would be great to see that back.

Possible solutions

JezerM commented 2 years ago

It is possible, themes are allowed to access /usr/share/backgrounds as long as the background_images_dir property in /etc/lightdm/web-greeter.yml is set to /usr/share/backgrounds (which is the default):

# /etc/lightdm/web-greeter.yml

branding:
    background_images_dir: /usr/share/backgrounds
JezerM commented 2 years ago

Can you explain more your case? It is not expected that /usr/share/backgrounds cannot be accessed by default.

Aakodal commented 2 years ago

Weird. Effectively, I have background_images_dir property set to /usr/share/backgrounds, but I couldn't get Litarvan theme's background selector to get me different backgrounds. After some tries, I figured that only backgrounds in /usr/share/backgrounds seemed to appear, but not those in subfolders (such as /usr/share/backgrounds/gnome/). Could it be that themes do not check for subfolders?

JezerM commented 2 years ago

Yeah, effectively, Litarvan theme does not check for subfolders. Antergos theme can do it because of a theme only solution with Javascript, as well as Glorious theme and my Gruvbox theme.

I'm gonna create a PR in Litarvan theme to provide this functionality.

Aakodal commented 2 years ago

It's weird as on my laptop, which uses Litarvan master branch with Antergos greeter, actually checks for subfolders 🤔 But I'm going to trust you on that

JezerM commented 2 years ago

Oh, sure~ Actually, it does work with Antergos webkit2-greeter. However, it is a Litarvan bug I didn't solve back then when porting it to web-greeter 3.0. Both Antergos webkit2-greeter and web-greeter/nody-greeter/sea-greeter do essentially the same when accessing to /usr/share/backgrounds.

JezerM commented 2 years ago

I made the PR, it was just a minimal tweak~ You could wait until it is merged, or build it by yourself :D

Aakodal commented 2 years ago

Alright, thanks!

JezerM commented 2 years ago

Merged!