diff --git a/src/detection/de/de_linux.c b/src/detection/de/de_linux.c index ab6a93b7c..7b31160ed 100644 --- a/src/detection/de/de_linux.c +++ b/src/detection/de/de_linux.c @@ -74,7 +74,20 @@ static void getGnome(FFstrbuf* result, FF_MAYBE_UNUSED FFDEOptions* options) static void getCinnamon(FFstrbuf* result, FF_MAYBE_UNUSED FFDEOptions* options) { - ffParsePropFileData("applications/cinnamon.desktop", "X-GNOME-Bugzilla-Version =", result); + ffStrbufSetS(result, getenv("CINNAMON_VERSION")); + + if (result->length == 0) + ffParsePropFileData("applications/cinnamon.desktop", "X-GNOME-Bugzilla-Version =", result); + + if (!result->length == 0 && options->slowVersionDetection) + { + if (ffProcessAppendStdOut(result, (char* const[]){ + "cinnamon", + "--version", + NULL + }) == NULL) // Cinnamon 6.2.2 + ffStrbufSubstrAfterLastC(result, ' '); + } } static void getMate(FFstrbuf* result, FFDEOptions* options)