core: add a greetd login backend#731
Conversation
|
This is my setup on nixos: https://github.com/PaideiaDilemma/dotnix/blob/main/host/sessions.nix |
|
I personally use greetd autologin and have hyprlock as an exec-once in my hl config. I would use a proper greeter but the transition isn't seamless. That being said, I'm not opposed to this change. |
3efcb66 to
87000be
Compare
vaxerski
left a comment
There was a problem hiding this comment.
maybe consider adding pointer support first so that people can click on session entries
Yeah there is always a gpu reset when starting the actual session. |
a monitor modeset, not a gpu reset... |
b9d3295 to
0a91ad5
Compare
I have the Ryzen 5800U iGPU. About the same generation, but launching is pretty choppy. I'm curious how KDE/Gnome handle this with SDDM/GDM. |
|
Current status of this draft ? @vaxerski edit: sorry for the ping. Thought this was years ago . |
|
not my draft? |
|
Been running this for the past week or so and it is so far working great on my end! Would it be possible to add an option to preselect a session type, or even force a particular one? Didn't find such an option being there yet in the diff. I don't really want to show the session picker (as I only have a hl session) but at the moment it chooses the And maybe we'd also want to disable the arrow keys for switching sessions if the session picker is not shown, so people don't accidentally change the session without noticing. |
eb008ea to
e9644ef
Compare
Yep. Right now you can tell hyprlock where to search for wayland sessions (as .desktop files), but you can also manually specify a session in the config with
Good point! The session is now fixed at 0, or the default session if it's configured, when there is no session-picker widget in the config. Next I will add click support and text align for the session-picker widget. |
|
Thanks for adding the default session option, can confirm that it works as expected. Here's a couple of minor issues I noticed while testing my own config, but nothing breaking or really important:
What also would be nice would be a proper way to test a greetd configuration, without having to go into a greetd session. I did my testing by running
While I myself don't really plan on using a session picker, here's some ideas anyways. What I like about the session picker as it is currently implemented is how convenient it is. You can just add one widget to your config, tweak a couple of colors and have a nice looking and functional setup. So I'd suggest keeping it for that reason. For users which might want something different or more customizable, we could do two things, 1. adding a new substitution variable which shows the currently selected session name, and 2. some kind of special keyword you could set an |
|
It works great! The only issue I found is that I'm unable to use the fingerprint when launched with Right now, I have installed this version using nix. |
|
@VirtCode @MalpenZibo Extra great feedback thanks!!! I will address it soonish. |
|
Sadly fingerprint won't work with greetd. Thant being said, it's probably best. When you log in initially you shouldn't be able to use biometrics. That opens up a bunch of potential attacks. |
|
Just gave this a try and I just wanted to say that you've been doing great work @PaideiaDilemma ! |
e9644ef to
4dc9129
Compare
|
any updates on this? |
|
So I am currently working on porting hyprlock to hyprtoolkit. The user is currently static and can be set in the config like that. But I do want to add a way to select the user in the future for sure. |
* animation: migrate PHLANIMVAR from SP to UP * use create2 * bump hyprutils and flake update
…yprwm#961) Properly lock AWP<IWidget> weak pointers before calling onAssetUpdate() to prevent use-after-free when widgets are destroyed during shutdown or output removal. Guard timer callback against null g_asyncResourceManager. Fix destruction order to join threads before resetting globals.
|
Would parrallel auth still be possible, there are basicaly no dm's that do this? |
* pam: fix username race by using getpwuid_r instead of getpwuid getpwuid() returns a pointer into a static buffer shared across all threads. Any getpw*/getpwent call from another thread — including those made internally by PAM modules during authentication — will overwrite it before pam_start() reads pw_name, causing hyprlock to authenticate as a random system user (root, bin, systemd-network) or fail with 'user unknown'. Replace with getpwuid_r(), which writes into a caller-supplied buffer, and copy pw_name into a std::string before calling pam_start(). * pam: get username once Instead of retrieving the username via getpwuid_r as in a69f526, get the username once when initializing CPam and save it in a string. This should be sufficent for making sure there are no problems with the static buffer returned by getpwuid and is simpler. * misc: clang-format --------- Co-authored-by: mcgi5sr2 <[email protected]>
* core: use Hyprutils::CLI::CLogger * core: use Hyprutils::CLI::CArgumentParser and validate config exists
exit belongs in the config
|
No this would need to be done within greetd itself. |
This MR allows hyprlock to function as a greeter.
Hyprlock would be usable as a login frontend for greetd as well as a wayland lockscreen application.
Some details:
Currently only support a single static user.
TODO:
Related issue: #564