fastfetch-cli / fastfetch

Like neofetch, but much faster because written mostly in C.
MIT License
8.02k stars 347 forks source link

[BUG] LM detection not working #1031

Closed Dariqq closed 1 week ago

Dariqq commented 1 week ago

General description of bug:

Hi,

The LM module is claiming to parse /run/systemd/sessions/$XDG_SESSION_ID but it is actually looking at /var/run/systemd/sessions/$XDG_SESSION_ID. This is causing problems for systems where /var/run is not linked to /run such as Guix System with elogind.

[
  {
    "type": "LM",
    "error": "Failed to parse /run/systemd/sessions/$XDG_SESSION_ID"
  }
]

The /run/systemd/sessions/$XDG_SESSION_ID file exists and has the expected contents. /var/run/systemd does not exist.

I don't know if changing to /run uncoditainally causes some problems on other systems. I have checked a recent debian and fedora system and there /var/run -> /run.

Also the defined macro FF_SYSTEMD_SESSIONS_PATH does not seem to get used at all.

CarterLi commented 1 week ago

Thanks for the detaied explaination. I like it.

Dariqq commented 1 week ago

Thanks for the quick repsonse. Can confirm that the patch fixes the issue