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

Launching Niri WM with Greetd Tuigreet #165

Open
ConsularParadi opened this issue Nov 10, 2024 · 4 comments
Open

Launching Niri WM with Greetd Tuigreet #165

ConsularParadi opened this issue Nov 10, 2024 · 4 comments

Comments

@ConsularParadi
Copy link

Hi, I have been unable to setup niri with greetd and tuigreet such that it can interact with the xdp-gnome for screensharing.
What has been mentioned in the niri docs is that if running without a window-manager, run niri-session to start a systemd service and import all required variables.
Here is what the desktop entry for niri looks like:

[Desktop Entry]
Name=Niri
Comment=A scrollable-tiling Wayland compositor
Exec=niri-session
TryExec=niri
Type=Application
DesktopNames=niri

And here is how my greetd config looks like

[terminal]
vt = 1
[default_session]
command = "tuigreet --cmd niri"  
user = "greeter"

It seems that the niri service is not loaded upon login

systemctl --user status niri
○ niri.service - A scrollable-tiling Wayland compositor
     Loaded: loaded (/usr/lib/systemd/user/niri.service; static)
     Active: inactive (dead)

Even if running only tuigreet without --cmd niri, I'm thrown into a tty session and the actual window manager is not launched neither running as a service.
It works when I login through tty and run niri-session.

@apognu
Copy link
Owner

apognu commented Nov 10, 2024

What if you use --cmd niri-session? Using the cmd option or writing an ad-hoc CMD with F2 runs the specific command, not a session file with the same name.

If you want to select the session from the desktop file you use, you can use F3 from tuigreet.

Does this help?

@ConsularParadi
Copy link
Author

Choosing the session as well as using cmd niri-session takes me to the tty where when status of the niri service is checked using systemctl --user status niri, it shows that the service is inactive(dead)
What I have discovered during this is that when I enter the tty session using the above methods and press Ctrl+d, it leads me to my WM session where the niri service is active.

@ToxicMushroom
Copy link

if it helps you @ConsularParadi this is how I launch sway, these XDG flags are required for portals to work correctly afaik:

export XDG_CURRENT_DESKTOP=sway
export XDG_SESSION_DESKTOP=sway
export XDG_SESSION_TYPE=wayland
# export VDPAU_DRIVER=radeonsi

sway -d 2> ~/sway.log

+

merlijn@arch ~ % cat .config/sway/config | grep XDG
# XDG Session setup
exec "systemctl --user import-environment DISPLAY XAUTHORITY WAYLAND_DISPLAY XDG_CURRENT_DESKTOP"

@ConsularParadi
Copy link
Author

Hi @ToxicMushroom, talking to the creator of niri, seems like the environment variables are being setup by systemd script niri-session.
What remains is the problem of exiting a tty session using Ctrl+d to actually enter the window manager.
Thank you for your response though. I better understand the interaction of display protocol and login manager now.

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

No branches or pull requests

3 participants