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

Regreet not detecting greetd at boot #75

Open
wikiker opened this issue Jun 28, 2024 · 4 comments
Open

Regreet not detecting greetd at boot #75

wikiker opened this issue Jun 28, 2024 · 4 comments
Labels
question Further information is requested

Comments

@wikiker
Copy link

wikiker commented Jun 28, 2024

When updating my NixOS, which included upgrading greetd to the latest version, I noticed a problem with regreet. When started by greetd at boot, I get the following error:

ERROR regreet: panicked at src/client.rs:42:13:
Missing environment variable 'GREETD_SOCK'. Is greetd running?

But when I restart the greetd service, regreet starts just fine; so the problem is only at boot.

My greetd config is this:

	services.greetd =
		let
			sway-config = pkgs.writeText "greetd-sway-config" ''
				exec dbus-update-activation-environment --systemd DISPLAY WAYLAND_DISPLAY SWAYSOCK

				bindsym Mod4+m exec swaynag \
					-t warning \
					-m 'What do you want to do?' \
					-b 'Poweroff' 'systemctl poweroff' \
					-b 'Reboot' 'systemctl reboot'

				input * {
					xkb_layout "cz"
				}

				output DP-1 pos 0 0
				output HDMI-A-2 disable

				exec "${pkgs.greetd.regreet}/bin/regreet; swaymsg exit"

				include /etc/sway/config.d/*
			'';
			session = {
				command = "${pkgs.sway}/bin/sway --config ${sway-config}";
				user = "greeter";
			};
		in
		{
			enable = true;
			settings = {
				default_session = session;
				initial_session = session;
				# terminal.vt = 1;
			};
		};
@rharish101
Copy link
Owner

Sounds like greetd isn't started properly at boot, since it's not exporting the GREETD_SOCK environment variable that greetd greeters need. Can you check your bootloader/greetd setup?

@rharish101 rharish101 added the question Further information is requested label Aug 4, 2024
@max-ishere
Copy link
Contributor

@max-ishere
Copy link
Contributor

Oh I see where the issue is:

initial_session = session;

This is for a user session, like

[initial_session]
command = "Hyprland"
user = "max_ishere"

@max-ishere
Copy link
Contributor

Basically remove initial session, and just have default session

https://man.archlinux.org/man/greetd.5.en#default_session

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
question Further information is requested
Projects
None yet
Development

No branches or pull requests

3 participants