KittyKatt / screenFetch

Fetches system/theme information in terminal for Linux desktop screenshots.
GNU General Public License v3.0
3.82k stars 453 forks source link

[Bug report] If snapd is not running, screenfetch gets stuck #714

Open c02y opened 3 years ago

c02y commented 3 years ago

I'm submitting a ... (check one with "x")

[x] bug report
[ ] new distro request

Bug report

=> search Github for a similar issue or PR before submitting
=> download the latest revision from Github and check if the bug is still present
   -> https://github.com/KittyKatt/screenFetch/raw/master/screenfetch-dev
=> Show us the output of: screenfetch -v
>> screenfetch -v
:: Finding distro...found as 'Manjaro 21.0'
:: Finding hostname and user...found as 'chz@chz'
:: Finding kernel version...found as 'x86_64 Linux 5.11.6-1-MANJARO'
:: Finding current uptime...found as '2h 24m'
:: Finding current package count...found as '1542'
:: Finding current shell...found as 'fish 3.1.2'
:: Finding current resolution(s)...found as '2560x1440'
:: Finding desktop environment...found as 'Xfce4'
:: Finding window manager...found as 'Xfwm4'
:: Finding window manager theme...found as 'Matcha-dark-azul'
:: Finding GTK2 theme...found as 'Matcha-dark-azul'
:: Finding GTK3 theme...found as 'Not Found'
:: Finding icon theme...found as 'Papirus-Dark'
:: Finding user font...found as 'Noto Sans 11'
:: Finding current CPU...found as 'Intel Core i7-10875H @ 16x 5.1GHz [48.0°C]'
:: Finding current disk usage...found as '686G / 946G (77%%)'
:: Finding current GPU...found as 'GeForce RTX 2060 with Max-Q Design'
:: Finding current RAM usage...found as '4087MiB / 15749MiB'

 ██████████████████  ████████     chz@chz
 ██████████████████  ████████     OS: Manjaro 21.0 Ornara
 ██████████████████  ████████     Kernel: x86_64 Linux 5.11.6-1-MANJARO
 ██████████████████  ████████     Uptime: 2h 24m
 ████████            ████████     Packages: 1542
 ████████  ████████  ████████     Shell: fish 3.1.2
 ████████  ████████  ████████     Resolution: 2560x1440
 ████████  ████████  ████████     DE: Xfce4
 ████████  ████████  ████████     WM: Xfwm4
 ████████  ████████  ████████     WM Theme: Matcha-dark-azul
 ████████  ████████  ████████     GTK Theme: Matcha-dark-azul [GTK2]
 ████████  ████████  ████████     Icon Theme: Papirus-Dark
 ████████  ████████  ████████     Font: Noto Sans 11
 ████████  ████████  ████████     Disk: 686G / 946G (77%)
                                  CPU: Intel Core i7-10875H @ 16x 5.1GHz [48.0°C]
                                  GPU: GeForce RTX 2060 with Max-Q Design
                                  RAM: 4087MiB / 15749MiB

The screenfetch script has the following part: https://github.com/KittyKatt/screenFetch/blob/7b8774cc31a61972b38d39958fcbda39bce4d2f5/screenfetch-dev#L1482-L1488

But it doesn't take one situation into account that snapd is not running in background, for me, snap list will take forever (more than 2mins), I got screenfetch result only after 2mins.

It should check if snapd is running in the background first, then execute the snap command and get its pkgs info.

But I googled it for a while and failed, I don't know how to check if snapd is running in the background in a cross-linux-distro way. So I'll let the developer of screenfetch do this.

New distro request

Distro name: 
Homepage: 
Distro logo: 
Package manager: 

Show us the output of
 => lsb_release -sirc
 => cat /etc/os-release
 => ls -1 /etc/*-release
KittyKatt commented 3 years ago

This makes total sense on why it stalls. Should have thought of that when this got written ages ago.