[SOLVED] Conky displays distro name incorrectly 09 February 2020, 14:17:56 I migrated from Arch and since the first Artix reboot conky doesn't display either "Arch Linux" or "Artix Linux" as distribution name.The exact thing being displayed is "GCC)) #1 SMP PREEMPT Tue,". My guess is that conky reads the distro name from output of some command and its output is now different than it expects, but that doesn't really give me any ground to fix the issue hence I'm posting here. Did anyone else experience this problem? How can I solve it?Fetch scripts like screenfetch or neofetch get the name "Artix Linux" right, but they probably do it in a different way (yeah Captain Obvious is here) Last Edit: 11 February 2020, 08:54:49 by SGOrava
Re: Conky displays distro name incorrectly Reply #1 – 09 February 2020, 14:54:24 Check this link for more details:https://github.com/brndnmtthws/conky/blob/11695b076abf72d797879c7c3b16fe89f3b68ca9/src/linux.cc#L2710To explain a bit, it check it /etc/arch-version exist, if so you are Arch Linux.Then it parses /proc/version which has this commentQuote/* I am assuming the distribution name is the first string in /proc/version that: - is preceded by a '(' - starts with a capital - is followed by a space and a number but i am not sure if this is always true... */The better option for conky would be to also check and parse /etc/lsb-releasePS: I created an issue for conky to improve this behaviour. https://github.com/brndnmtthws/conky/issues/939 Last Edit: 09 February 2020, 15:08:58 by SGOrava 1 Likes
Re: Conky displays distro name incorrectly Reply #2 – 09 February 2020, 15:20:22 Oh, so that's the deal. So the only way to fix that now would be to manually patch and compile conky?
Re: Conky displays distro name incorrectly Reply #3 – 09 February 2020, 17:11:09 Quote from: GOKOP – on 09 February 2020, 15:20:22Oh, so that's the deal. So the only way to fix that now would be to manually patch and compile conky?You can do that, the other option is to change /proc/version to match the value which conky expects.Is there a working patch for conky ?I have no idea, if you create a patch please send it to conky.
Re: Conky displays distro name incorrectly Reply #4 – 09 February 2020, 17:41:48 I tried doing something but I'm not very experienced in C programming; I managed to get the distribution name from lsb_release and display it but currently it's quite ugly both code-wise and result-wise. I may work on it later. If I manage to get it nice I'll send a PR to conky for sure
Re: Conky displays distro name incorrectly Reply #5 – 10 February 2020, 11:22:55 Conky, by nature, is not very automagical. Users are expected to tweak it - a lot. See the conky config files for my laptop.
Re: Conky displays distro name incorrectly Reply #6 – 10 February 2020, 22:34:32 So much wasted power on nothing.
Re: Conky displays distro name incorrectly Reply #7 – 10 February 2020, 23:24:13 Ok so now I'm just using ${exec lsb_release -ds | tr -d '"' | tr -d '\n'} instead of $distribution (although at this point I could've just as well written "Artix Linux" because assuming there are quotations in the output is pretty Arch/Artix specific anyway)It works way better than my attempts at invoking the command from inside conky code which spawned like 20+ lsb_release processes for some reason. (perhaps reading /etc/lsb-release directly would be a better option for this)I think I'm fine with this solution for now. Last Edit: 12 February 2020, 16:16:54 by GOKOP
Re: [SOLVED] Conky displays distro name incorrectly Reply #8 – 11 February 2020, 11:02:20 Quote from: SGOrava – on 10 February 2020, 22:34:32So much wasted power on nothing.It's actually my ISO cooking box... 1 Likes