fairyglade / ly

display manager with console UI
Do What The F*ck You Want To Public License
5.23k stars 312 forks source link

SELinux permission issue on Fedora #494

Open Aaron-Uriel opened 1 year ago

Aaron-Uriel commented 1 year ago

Hi, I recently tried to use ly. I downloaded the code, compiled it and installed it. After enabling the systemd service, and restarted the computer, I tried to login but the only thing that happened was that a text saying 'logged out' appeared. I'm using Fedora 37 with Sway and GNOME installed. I tried to log in with Sway, GNOME and GNOME on Xorg.

Yonnji commented 1 year ago

I tried it too and got the same problem on Fedora Silverblue 38.

I liked the original idea and look of "ly" so I started rewriting it in python lol. I already got some progress and was able to do at least autologin into the shell with just a single python script. I had some problems during development so I added logging and figured out that execl is forbidden by selinux and it affects the original "ly" as well.

So it can be solved by setting the same context as GDM:

chcon system_u:object_r:xdm_exec_t:s0 /usr/bin/lypy

The gdm executable has the context "system_u:object_r:xdm_exec_t:s0", it can be checked with:

ls -Z /usr/sbin/gdm
fleurc commented 1 year ago

Thank you so much for the above comment, now it's working perfectly

GotaLoveFiraCode commented 8 months ago

I have the same issue using fedora 39 sway (wayland). Trying to log into other services results in a black screen (for example awesomewm).

nicknitride commented 7 months ago

Can confirm that the security policy change works, tested on Fedora 39 and Pop!_OS 22.04 LTS