You are not logged in.

#1 2023-08-29 20:53:11

liaminventions
Member
Registered: 2023-08-27
Posts: 57
Website

[SOLVED] How do I properly start Hyprland on startup?

Currently, I have an /etc/systemd/system/getty@tty1.service that runs on startup (though I just disabled it since it does not work). It logs in and then runs ~/.zprofile, which runs ~/hyprland.sh.

I'm pretty sure this isn't the correct way to do it. (considering it doesn't work)

Any suggestions?

Last edited by liaminventions (2023-08-30 00:00:31)

Offline

#2 2023-08-29 21:04:42

seth
Member
From: Don't DM me only for attention
Registered: 2012-09-03
Posts: 69,177

Re: [SOLVED] How do I properly start Hyprland on startup?

zprofile doesn't run hyprland.sh but Hyprland directly and you'd probably lift https://wiki.archlinux.org/title/Xinit# … X_at_login but exec hyprland.sh instead of startx.
WARNING: if hyprland.sh isn't hyprland.sh but "Hyprland" somewhere up the PATH (/usr/local/bin or ~/bin) running "Hyprland" there will just cause an infinite recursion.

Offline

#3 2023-08-29 21:31:57

liaminventions
Member
Registered: 2023-08-27
Posts: 57
Website

Re: [SOLVED] How do I properly start Hyprland on startup?

OK, I changed the zprofile to this

It still crashes though.

It sends out that error after hyprland runs fine for about ~8 seconds

Last edited by liaminventions (2023-08-29 21:33:22)

Offline

#4 2023-08-29 21:53:04

seth
Member
From: Don't DM me only for attention
Registered: 2012-09-03
Posts: 69,177

Re: [SOLVED] How do I properly start Hyprland on startup?

What's the source for the getty service?
Why is it not an override of the present one?
https://wiki.archlinux.org/title/Getty# … al_console
What's the point of

ExecStartPre=+/usr/sbin/rm -f /run/nologin 

?
Did you try to add a delay to the service? (as the IGP acts up on init)

Edit: if hyprland actually starts, do you have any errors recorded in the logs?

Last edited by seth (2023-08-29 21:55:22)

Offline

#5 2023-08-29 22:04:09

liaminventions
Member
Registered: 2023-08-27
Posts: 57
Website

Re: [SOLVED] How do I properly start Hyprland on startup?

What's the source for the getty service?

it came from here: https://www.reddit.com/r/hyprland/comme … _guide_to/

Why is it not an override of the present one?

I don't think I have the original "getty@tty1.service", could you possibly send it?

What's the point of

ExecStartPre=+/usr/sbin/rm -f /run/nologin 

?

not sure, it came from that reddit post

Did you try to add a delay to the service? (as the IGP acts up on init)

Yeah, I did.

Edit: if hyprland actually starts, do you have any errors recorded in the logs?

yes, it crashes at the end

EDIT: added .hyprland.err.log + fatal error
EDIT 2:
also, the  login service still crashes when .zprofile is empty.

Last edited by liaminventions (2023-08-29 22:16:18)

Offline

#6 2023-08-29 22:22:08

loqs
Member
Registered: 2014-03-06
Posts: 18,631

Re: [SOLVED] How do I properly start Hyprland on startup?

liaminventions wrote:

Why is it not an override of the present one?

I don't think I have the original "getty@tty1.service", could you possibly send it?

The original is /usr/lib/systemd/system/getty@.service although you do not need it to create the override.  Remove the replacement serverice file then follow Systemd#Drop-in_files.

liaminventions wrote:

What's the point of

ExecStartPre=+/usr/sbin/rm -f /run/nologin 

?

not sure, it came from that reddit post

/run/nologin  stops users from logging in during system startup or shutdown systemd-user-sessions.service.8.

Offline

#7 2023-08-29 22:50:37

liaminventions
Member
Registered: 2023-08-27
Posts: 57
Website

Re: [SOLVED] How do I properly start Hyprland on startup?

ok, here's the current file structure:

/etc/systemd/system
├── getty.target.wants
│   └── getty@tty1.service -> /usr/lib/systemd/system/getty@.service
├── getty@tty1.service.d
│   ├── autologin.conf
│   └── plymouth.conf

it's not erroring any more, instead it says "A start job is running for Hold until boot proccess finishes up (.../ no limit)"

Offline

#8 2023-08-30 00:00:13

liaminventions
Member
Registered: 2023-08-27
Posts: 57
Website

Re: [SOLVED] How do I properly start Hyprland on startup?

nevermind... I was able to get it to work by removing "plymouth.conf"

It's just that now plymouth doesn't have a smooth transition, but that's a much more minor, separate issue.

final tree:

/etc/systemd/system
├── getty.target.wants
│   └── getty@tty1.service -> /usr/lib/systemd/system/getty@.service
├── getty@tty1.service.d
│   └── autologin.conf

I also re-enabled "getty@tty1.service" and then it worked!


marking as solved.

Offline

Board footer

Powered by FluxBB