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

feat(greetd): use greetd instead of sddm #26

Merged
merged 20 commits into from
Jan 7, 2024
Merged

feat(greetd): use greetd instead of sddm #26

merged 20 commits into from
Jan 7, 2024

Conversation

HerrNaN
Copy link
Collaborator

@HerrNaN HerrNaN commented Dec 29, 2023

No description provided.

@HerrNaN
Copy link
Collaborator Author

HerrNaN commented Dec 30, 2023

After adding greetd, gtkgreet along with a sample config for this combination from the wiki it still doesn't work.

When looking into the logs I see:

...
fedora greetd[1444]: error: configured default session user `greeter` is not found
...

Some further investigation shows me that the greeter user doesn't exist on the system and when trying to create it like so: sudo useradd -M -G video greeter I get an error saying the video group doesn't exist either.

@HerrNaN
Copy link
Collaborator Author

HerrNaN commented Dec 30, 2023

I read that the video group is a pre-systemd thing and thought that could maybe explain why the system doesn't have it, so I tried adding the user without the video group. This got me past the previous problem but into a new one: we don't have cage installed on the system.

Since we will need to add cage for this purpose only, and it could run with sway instead (which we already have installed) I think we should look into running the greeter with sway instead.

@HerrNaN
Copy link
Collaborator Author

HerrNaN commented Dec 30, 2023

Seems like using cage or sway with the user setup as described above works for starting the greeter. However both suffer from the same problem when the greeter in turn wants to start the user session, dropping you into a black screen with the following error message:

unable to set working directory: No such file or directory (os error 2)

I am yet to find out exactly what 'file or directory' it is referring to.

Note: the black screen in question doesn't allow you to switch tty so reboot seems like the only option to get out of the situation.

@HerrNaN
Copy link
Collaborator Author

HerrNaN commented Dec 30, 2023

Are we running SELinux because that is known to block greetd?

@williamleven
Copy link
Member

@HerrNaN
Copy link
Collaborator Author

HerrNaN commented Jan 7, 2024

Two ways to go here as of now:

  1. Disable SELinux (tempting, but let's not throw it out as soon as it get a little windy)
  2. Apply the workaround mentioned here

I have tested the workaround locally (see below) and it solves our problem. It also appears consistent across boots, which is nice!

The workaround:

sudo cp /usr/bin/greetd /usr/local/bin/greetd
sudo mount --bind /usr/local/bin/greetd /usr/bin/greetd
sudo semanage fcontext -a -t xdm_exec_t /usr/bin/greetd
sudo restorecon /usr/bin/greetd

It seems that the reason it is consistent (although the mount isn't) is because the new binary that was created just so happens to live in a directory that appears earlier in the systemd users PATH.
This should imply that the mount part of the workaround in our situation is unnecessary.

@HerrNaN HerrNaN merged commit 27cbf9f into live Jan 7, 2024
1 check passed
@HerrNaN HerrNaN deleted the feat/greetd branch January 7, 2024 14:05
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants