Skip to content

Commit 90e2d8f

Browse files
OS (Linux): detects Ubuntu Studio before Kubuntu on KDE systems (#2298)
* fix(os): detect Ubuntu Studio before KDE-based flavor checks Add an explicit Ubuntu Studio detection in `getUbuntuFlavour()` by checking for `/usr/share/doc/ubuntustudio-desktop` and setting `name`, `id`, and `idLike` accordingly. This prevents Ubuntu Studio systems from being misidentified as Kubuntu when KDE/Plasma-related XDG config paths are present.fix(os): detect Ubuntu Studio before KDE-based flavor checks Add an explicit Ubuntu Studio detection in `getUbuntuFlavour()` by checking for `/usr/share/doc/ubuntustudio-desktop` and setting `name`, `id`, and `idLike` accordingly. This prevents Ubuntu Studio systems from being misidentified as Kubuntu when KDE/Plasma-related XDG config paths are present. * refactor(os): detect Ubuntu Studio via package presence
1 parent 0dd8d80 commit 90e2d8f

1 file changed

Lines changed: 8 additions & 0 deletions

File tree

src/detection/os/os_linux.c

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -99,6 +99,14 @@ FF_A_UNUSED static bool getUbuntuFlavour(FFOSResult* result) {
9999
return false;
100100
}
101101

102+
if (ffPathExists("/var/lib/dpkg/info/ubuntustudio-desktop.list", FF_PATHTYPE_FILE))
103+
{
104+
ffStrbufSetStatic(&result->name, "Ubuntu Studio");
105+
ffStrbufSetStatic(&result->id, "ubuntu-studio");
106+
ffStrbufSetStatic(&result->idLike, "ubuntu");
107+
return false;
108+
}
109+
102110
if (ffStrContains(xdgConfigDirs, "kde") || ffStrContains(xdgConfigDirs, "plasma") || ffStrContains(xdgConfigDirs, "kubuntu")) {
103111
ffStrbufSetStatic(&result->name, "Kubuntu");
104112
ffStrbufSetStatic(&result->id, "kubuntu");

0 commit comments

Comments
 (0)