@follpvosten@karp.lol I wrote about current limitations on graphical session support, so my services and configs are based on the same idea and try to solve the same issue.
Before starting niri on tty-login, I was using noctalia-greeter, you can see how it was set up in that commit. Similar config can be applied to other login managers (e.g. tuigreet) as well.
Stuff prefixed with
1. As a target to prevent graphical services from starting in a non-graphical login.
2. Import graphical environment variables into Shepherd environment.
3. Reduce race conditions by delay the starting of graphical services.
But it won't be possible to avoid race conditions, since importing environment variables requires manual setup and there's possibility to start a graphical service before the import, although I haven't encountered it yet.
Importing env vars is implemented via the
The snippet in my config does the same thing:
#guix
@cwebber@social.coop
note that I used this person’s channel to allow myself to write kdl in schemeThanks for using! I posted about it here ;)
I’m still not entirely sure I wanna keep the tty-only loginIf you have a display manager (e.g. GDM by default in Guix System
%desktop-services), you'll be able to select niri in the menu after installing it into the system profile (for example, adding it to the packages field of your operating-system).Before starting niri on tty-login, I was using noctalia-greeter, you can see how it was set up in that commit. Similar config can be applied to other login managers (e.g. tuigreet) as well.
Stuff prefixed with
ros: in my configs are from my personal channel, there's an index to browse sources.and the somewhat wonky seeming “graphical-system” target that they use, it has some issues on my side.I wrote the
graphical-session service with the following roles in mind:1. As a target to prevent graphical services from starting in a non-graphical login.
2. Import graphical environment variables into Shepherd environment.
3. Reduce race conditions by delay the starting of graphical services.
But it won't be possible to avoid race conditions, since importing environment variables requires manual setup and there's possibility to start a graphical service before the import, although I haven't encountered it yet.
Importing env vars is implemented via the
set-environment Shepherd action in the service, which is used like the following niri config:spawn-sh-at-startup "herd set-environment graphical-session XDG_CURRENT_DESKTOP=$XDG_CURRENT_DESKTOP XDG_SESSION_TYPE=$XDG_SESSION_TYPE NIRI_SOCKET=$NIRI_SOCKET"The snippet in my config does the same thing:
(spawn-sh-at-startup
#$(format #f "herd set-environment graphical-session~{ ~a=$~:*~a~}"
'("XDG_CURRENT_DESKTOP"
"XDG_SESSION_TYPE"
"NIRI_SOCKET")))set-environment needs to be started by the compositor, since only the compositor knows these environment variables.#guix
@cwebber@social.coop