From 2ae9d012006a54ef287681ef07f52cd5e0acd397 Mon Sep 17 00:00:00 2001 From: Osama Albahrani <54853250+osalbahr@users.noreply.github.com> Date: Mon, 22 Sep 2025 04:37:14 +0300 Subject: [PATCH] OS (Linux): Better Ubuntu flavor detection - Fixes https://github.com/fastfetch-cli/fastfetch/issues/1974 --- src/detection/os/os_linux.c | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/src/detection/os/os_linux.c b/src/detection/os/os_linux.c index 376bf8d34..b2d0621dc 100644 --- a/src/detection/os/os_linux.c +++ b/src/detection/os/os_linux.c @@ -61,10 +61,6 @@ FF_MAYBE_UNUSED static bool detectArmbianVersion(FFOSResult* result) FF_MAYBE_UNUSED static void getUbuntuFlavour(FFOSResult* result) { - const char* xdgConfigDirs = getenv("XDG_CONFIG_DIRS"); - if(!ffStrSet(xdgConfigDirs)) - return; - if (detectArmbianVersion(result)) return; else if(ffStrbufStartsWithS(&result->prettyName, "Linux Lite ")) @@ -104,6 +100,10 @@ FF_MAYBE_UNUSED static void getUbuntuFlavour(FFOSResult* result) return; } + const char* xdgConfigDirs = getenv("XDG_CONFIG_DIRS"); + if(!ffStrSet(xdgConfigDirs)) + return; + if(ffStrContains(xdgConfigDirs, "kde") || ffStrContains(xdgConfigDirs, "plasma") || ffStrContains(xdgConfigDirs, "kubuntu")) { ffStrbufSetStatic(&result->name, "Kubuntu");