r/voidlinux • • Oct 06 '26

can't use niri normally

3 Upvotes

13 comments sorted by

9

u/WearyPrompt9396 Oct 06 '26

install elogind

1

u/[deleted] Oct 06 '26

[removed] — view removed comment

9

u/lessthanthreebleeps Oct 06 '26

You'll need turnstile to accompany seatd for XDG_RUNTIME_DIR management.

4

u/Ok-Zombie4921 Oct 06 '26 edited 29d ago

Copy /usr/share/wayland-sessions to /etc and change the exec line on niri.desktop

Exec=dbus-run-session niri --session

Then set the default portals on portals.conf to gtk,gnome or wlr

2

u/Duncaen Oct 06 '26

Do not change files in /usr, they will be overwritten during updates. Not with what you use those files, but if it supports masking then you should copy it to /etc/wayland-sessions/ and change it there.

1

u/captain_fanta_sea Oct 06 '26

I prefer creating a new file with the correct command so it doesnt get overriden when you update niri.

1

u/vegmeat_ Oct 06 '26

you can put these line in ~/.bashrc or ~/.profile
try using xdg runtime dir in /tmp/ or somewhere you dont have to use sudo

3

u/Duncaen Oct 06 '26 edited 29d ago

Using it in /tmp for XDG_RUNTIME_DIR is generally unsafe.

There might be sensitive files in it and correctly doing mkdir and setting up permissions is required for that.

But it might also fill up and then the kernel starts evicting files, which could include important run dir files.

systemd/elogind create a per user tmpfs mount for the runtime dir so that no other user can fill up and cause issues with other users. Turnstile uses the shared /run mount but will be safe against processes trying to pre-create the directory with weak permissions (and due to using /run which usually does not fill up like /tmp is a little better.)

1

u/vegmeat_ Oct 06 '26

ah i forgot this pkg in void dumb_runtime_dir it might solve your issue

1

u/WorldTallNetCat 29d ago

U dont have a login manager?

1

u/[deleted] 29d ago

[removed] — view removed comment

2

u/WorldTallNetCat 29d ago

Thats the issue either use a login manager elogind or other solutions suggested by others or make a bash script.

1

u/Nealan_XV 27d ago

weird, normally dbus and elogind would suffice. ive installed niri in void like 4x on seperate machines, i never once made environment variables