leo-arch / clifm

The shell-like, command line terminal file manager: simple, fast, extensible, and lightweight as hell.
https://github.com/leo-arch/clifm/wiki
GNU General Public License v2.0
1.29k stars 41 forks source link

Fastfetch bug #289

Closed theRoboxx closed 1 month ago

theRoboxx commented 1 month ago

Describe the bug fastfetch crashes when listing the Shell parameter

To Reproduce Steps to reproduce the behavior:

  1. Run fastfetch in foot-client
  2. Displays information until Shell parameter
  3. Shell parameter doesn't get displayed and freezes

Expected behavior The fastfetch command should list every Laptop information

Screenshots Fish vs. Clifm fastfetch

Desktop (please complete the following information):

leo-arch commented 1 month ago

Hi @theRoboxx. Reproduced with version 18.0. However, the issue is not there in the latest git version. Please give it a try.

muellerto commented 1 month ago

clifm 1.18.4 (Apr 22, 2024) 1

muellerto commented 1 month ago

OK, on my Arch it says just "clifm": 1

leo-arch commented 1 month ago

Thanks for your confirmation @muellerto.

As to the Shell field showing clifm (on Linux), I'm not sure why (but this is most likely related to fastfetch rather than to clifm itself). It might be because fastfetch is getting the running shell by consulting the parent PID, but I'm not sure.

EDIT: Yeap, that's what it actually seems to be doing (i.e. checking /proc/PID/stat):

https://github.com/fastfetch-cli/fastfetch/blob/445dd94b53f0903f35989dca47eeaa6edeb53f86/src/detection/terminalshell/terminalshell_linux.c#L124

CarterLi commented 1 month ago

Happened to find this.

Fastfetch have resolved similar issues by adding them to ignore list. I can do the same for clifm if needed.

leo-arch commented 1 month ago

That would be great @CarterLi. Thanks!

CarterLi commented 1 month ago

Just tried clifm. Seems that clifm spawn $SHELL process to run shell commands, so that the process tree is: terminal > shell > clifm > shell > fastfetch

So the problematic module should be Terminal instead of Shell

image

Really curious why it worked differently in @muellerto's screenshot.

Anyway, I will make fastfetch ignore clifm in both Shell & Terminal module

leo-arch commented 1 month ago

the process tree is: terminal > shell > clifm > shell > fastfetch

This is true.

As to the Terminal field, I'm getting the right value, no matter what terminal I use.

Btw, I normally run clifm under valgrind, in which case fastfetch takes valgrind as my shell. I guess you should add valgrind to the shell ignore list too.

CarterLi commented 1 month ago

okey

leo-arch commented 1 month ago

Hey @theRoboxx, can we mark this issue as solved?