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

Documentation on "How can I use Hyprlock as a login screen when I start my computer" #564

Open
sand4rt opened this issue Nov 17, 2024 · 7 comments
Labels
enhancement New feature or request

Comments

@sand4rt
Copy link

sand4rt commented Nov 17, 2024

Description

First of all, thank your for you work!

Asahi Linux comes with Fedora+SDDM by default, and it took me some time to figure out how to set up a unified login. Would it be beneficial to add this info to the documentation? as i've seen several questions on this topic

What i ended up doing was configuring SDDM to auto login (also possible with greetd) and then exec-once hyprlock:

Add this to /etc/sddm.config.d/kde_settings.conf:

[Autologin]
Session=hyprland
User=MY_USER_NAME

NOTE: run whoami and replace the output with MY_USER_NAME

Add exec-once=hyprlock || hyprctl dispatch exit to ~/.config/hypr/hyprland.conf

@sand4rt sand4rt added the enhancement New feature or request label Nov 17, 2024
@sand4rt
Copy link
Author

sand4rt commented Nov 17, 2024

There is a splash though as described in: hyprwm/Hyprland#5832 (comment) (even with a empty config + a color as background to minimize computation). Not sure if there is an solution to this?

@PaideiaDilemma
Copy link
Contributor

A display manager has the difficult and nuanced task of creating and managing a user session.
The login method is just a very small part of it.

This method works ok, if you want to use hyprlock as a login screen when you start your computer.
But it does not replace the display manager.

If you think this should be in the wiki (I am not sure if it is necessary), feel free to create a pull request in https://github.com/hyprwm/hyprland-wiki yourself.

@PaideiaDilemma
Copy link
Contributor

There is a splash though as described in: hyprwm/Hyprland#5832 (comment) (even with a empty config + a color as background to minimize computation). Not sure if there is an solution to this?

@sand4rt you can try the --immediate-render flag to start hyprlock. Could make this a bit smoother.

@sand4rt
Copy link
Author

sand4rt commented Nov 18, 2024

@PaideiaDilemma thanks for the replies

A display manager has the difficult and nuanced task of creating and managing a user session.
The login method is just a very small part of it. This method works ok, if you want to use hyprlock as a login screen when you start your computer. But it does not replace the display manager.

Good to know! I don't mind having SDDM installed, just wanted to have a single login screen and login once when i boot. Not sure how secure this is BTW?

you can try the --immediate-render flag to start hyprlock. Could make this a bit smoother.

It does make it a little bit smoother but the splash is still there unfortunately

@PaideiaDilemma
Copy link
Contributor

Not sure how secure this is BTW?

I can think of two security relevant problems:

  • SDDM autologin launches you into the session right away. This is a risk in and of itself.
  • There is a timeframe where hyprlock has not locked the session yet and Hyprland accepts normal keybinds and input. That is obviously bad, as you could theoretically kill hyprlock before it actually locks.

@sand4rt
Copy link
Author

sand4rt commented Nov 18, 2024

I was already concerned about your second point. Is there a possibility that Hyprlock can deal with this?

@sand4rt sand4rt changed the title Documentation on how to replace a display manager Documentation on "How can I use Hyprlock as a login screen when I start my computer" Nov 18, 2024
@PaideiaDilemma
Copy link
Contributor

No, the compositor would need to implement a way to basically start locked, which would be out of protocol.

It would also introduce relevant side effects for startup that might beak stuff.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

2 participants