pop-os / cosmic-greeter

libcosmic greeter for greetd, which can be run inside cosmic-comp
GNU General Public License v3.0
41 stars 19 forks source link

configured default user ‘cosmic-greeter’ not found #11

Closed ryanabx closed 4 months ago

ryanabx commented 4 months ago

With the current master branch of cosmic-greeter, the display manager won't launch with the error "configured default user ‘cosmic-greeter’ not found". I am building cosmic-epoch with all submodules updated using git submodule update --remote with a Containerfile for a Fedora ostree image. The Container file is here: https://github.com/ryanabx/fedora-cosmic-atomic/blob/876895d2e3bc2740631ad62c165fa7ad8178d0e2/containers/fedora-cosmic-atomic/Containerfile

To fix this, I have to run some of the postinstall script in https://github.com/pop-os/cosmic-greeter/blob/master/debian/cosmic-greeter.postinst manually.

I had to create a cosmic-greeter user with useradd (adduser doesn't exist on a Fedora base image), make sure it is in the cosmic-greeter group, and that it has a home directory at /var/lib/cosmic-greeter

I don't know if this should be a manual process on my part, so I'm writing this as an issue. GDM and SDDM automatically work from a regular install but then again I am installing them from the .rpm instead of building manually.

I'd also suggest if possible that some of the postinstall script instead use the more ubiquitous useradd and groupadd as opposed to adduser and addgroup.

jokeyrhyme commented 4 months ago

I wonder if it's worth defining a sysusers.d file for distributions that use that, so that the required users/groups can be created by systemd in a more declarative manner? https://www.freedesktop.org/software/systemd/man/latest/systemd-sysusers.html

I assume this would help Fedora, Arch, and various immutable distributions (possibly even Debian)

ryanabx commented 4 months ago

That would definitely fix this issue. Currently, I was having to mull over manually including some scripting into my Containerfile for the fedora cosmic atomic image, but they don't allow having anything in /var in the image and cosmic-greeter needs a home directory in /var/lib/cosmic-greeter