woodruffw / screenfetch-c

A rewrite of screenFetch in C.

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Identify the boot loader

pizzamaker opened this issue · comments

Whether it's BIOS, EFI, UEFI, Coreboot or Libreboot.

Do you have any thoughts on how do to this/documentation you can point me to?

Thanks!
It looks like this requires root privileges, but I'll look through it for data that can be accessed by a non-root user.

Great :)

sudo dmidecode -s bios-vendor

Not very reliable, but it should add a basic support to it.

Both of these methods require root privileges, so I'm hesitant to add them to screenfetch-c.
I'll continue looking for filesystem indicators/another way to get this information, but I'm not
sure it's possible under the current security context that screenfetch-c is expected to be run (non-root users).

Maybe just add a check, if it is a non root user, then simply don't display it.

That's do-able, but running screenfetch-c as root will cause additional problems (particularly with opening connections to X11 for graphical information). I also don't want to encourage people to run it as root regularly - there have been a fair share of fatal bugs in screenfetch-c and any one of them while running as a superuser could cause a crash.

I do like the idea of adding bootloader information to screenfetch-c, but unfortunately I don't think it's possible with current techniques without requiring users to trust it with heightened access. I'll leave this issue open for the time being in the event that another way of obtaining this information is found.

I see... Usually, it's the other way around. Haha

Yeah, it's more of an architecture problem than anything else.
I wrote screenfetch-c over 3 years ago as a way to teach myself C, and its structure leaves a lot to be desired. I've been planning a rewrite for a few months that'll modularize a large part of the detection system, but I haven't had time to work on it. When I get around to that, adding detections that specifically require root access should be more doable.

Ahhh ok :)