From 86bf4c4c1cbd7bf2d124f76dc05cd4ff4e7c89ab Mon Sep 17 00:00:00 2001 From: Tarulia Date: Sat, 7 Feb 2026 01:32:18 +0100 Subject: [PATCH 1/3] linux: Detect unofficial Flatpaks This is a quick and dirty detection that assumes that if a distribution were to package their own Flatpak, they would also use their own custom built runtime (we already have one such example). A "proper" detection would involve changing how and what OBS logs about the Flatpak environment and use that instead. Since that requires some additional considerations, that is out of scope for now. --- checks/linux.py | 12 +++++++++--- 1 file changed, 9 insertions(+), 3 deletions(-) diff --git a/checks/linux.py b/checks/linux.py index c4b5eac..e5a92bc 100644 --- a/checks/linux.py +++ b/checks/linux.py @@ -64,7 +64,11 @@ def checkDistro(lines): def checkFlatpak(lines): isFlatpak = search('Flatpak Runtime:', lines) - if len(isFlatpak) > 0: + if isFlatpak and ('org.kde.Platform' not in isFlatpak[0]) and ('org.freedesktop.Platform' not in isFlatpak[0]): + return [LEVEL_WARNING, "Unofficial Flatpak", + "You are using an unofficial Flatpak package. Please file issues with the packager.

OBS may be unable to assist with issues arising out of the usage of this package. We recommend following our Install Instructions instead."] + + if isFlatpak: return [LEVEL_INFO, "Flatpak", "You are using the Flatpak. Plugins are available as Flatpak extensions, which you can find in your Distribution's Software Center or via flatpak search com.obsproject.Studio. Installation of external plugins is not supported."] @@ -184,8 +188,10 @@ def checkLinuxVCam(lines): def checkLinuxSystemInfo(lines): + logLevel = LEVEL_INFO if flatpak := checkFlatpak(lines): - linuxDistroOrFlatpak = 'Flatpak' + logLevel = flatpak[0] + linuxDistroOrFlatpak = flatpak[1] linuxSystemInfoHelp = flatpak[2] + '
' elif distro := checkDistro(lines): linuxDistroOrFlatpak = 'Distribution: ' + distro[1] @@ -209,4 +215,4 @@ def checkLinuxSystemInfo(lines): desktopEnvironment = 'DE: ⚠️ None' linuxSystemInfoHelp += 'No Desktop Environment detected. This can lead to undefined behavior. Please consult your Desktop Environment\'s or Window Manager\'s support channels on how to fix this.' - return [LEVEL_INFO, linuxDistroOrFlatpak + ' | ' + displayServer + ' | ' + desktopEnvironment, linuxSystemInfoHelp] + return [logLevel, linuxDistroOrFlatpak + ' | ' + displayServer + ' | ' + desktopEnvironment, linuxSystemInfoHelp] From ab36887decd2fcff59fec01c47a6b8a47c6e781f Mon Sep 17 00:00:00 2001 From: Tarulia Date: Sat, 7 Feb 2026 01:45:14 +0100 Subject: [PATCH 2/3] linux: Raise `LEVEL` for "undefined" conditions - unknown Distro - unknown Display Server - unknown Desktop Environment/Window Manager --- checks/linux.py | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) diff --git a/checks/linux.py b/checks/linux.py index e5a92bc..1aad45c 100644 --- a/checks/linux.py +++ b/checks/linux.py @@ -57,6 +57,7 @@ def checkDistro(lines): if distro == 'Missing /etc/os-release !': distro = '(Missing)' distroHelp = 'No distribution detected. This can lead to undefined behavior. Please consult your distribution\'s support channels on how to fix this.
' + return [LEVEL_WARNING, distro, distroHelp] return [LEVEL_INFO, distro, distroHelp] @@ -188,12 +189,12 @@ def checkLinuxVCam(lines): def checkLinuxSystemInfo(lines): - logLevel = LEVEL_INFO if flatpak := checkFlatpak(lines): logLevel = flatpak[0] linuxDistroOrFlatpak = flatpak[1] linuxSystemInfoHelp = flatpak[2] + '
' elif distro := checkDistro(lines): + logLevel = distro[0] linuxDistroOrFlatpak = 'Distribution: ' + distro[1] linuxSystemInfoHelp = distro[2] else: @@ -205,14 +206,16 @@ def checkLinuxSystemInfo(lines): displayServer = 'Wayland' else: # can happen with misconfigured or virtual systems - displayServer = '⚠️ None' + logLevel = LEVEL_WARNING + displayServer = 'None' linuxSystemInfoHelp += 'No Display Server detected. This can lead to undefined behavior. Please consult your Desktop Environment\'s or Window Manager\'s support channels on how to fix this.
' if checkDesktopEnvironment(lines): desktopEnvironment = 'DE: ' + checkDesktopEnvironment(lines)[1] else: # can happen for some misconfigured tiling window managers - desktopEnvironment = 'DE: ⚠️ None' + logLevel = LEVEL_WARNING + desktopEnvironment = 'DE: None' linuxSystemInfoHelp += 'No Desktop Environment detected. This can lead to undefined behavior. Please consult your Desktop Environment\'s or Window Manager\'s support channels on how to fix this.' return [logLevel, linuxDistroOrFlatpak + ' | ' + displayServer + ' | ' + desktopEnvironment, linuxSystemInfoHelp] From 8faf3fe32d055456d9c0b8614596cacf5efae987 Mon Sep 17 00:00:00 2001 From: Tarulia Date: Sat, 7 Feb 2026 01:50:50 +0100 Subject: [PATCH 3/3] linux: Cleanup some inconsistencies in help texts - moved linebreaks to concatenated text - removed Distro/DE prefix since it's obvious from the help text --- checks/linux.py | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) diff --git a/checks/linux.py b/checks/linux.py index 1aad45c..7f0ba0e 100644 --- a/checks/linux.py +++ b/checks/linux.py @@ -56,7 +56,7 @@ def checkDistro(lines): # this is logged when the file can't be found at all if distro == 'Missing /etc/os-release !': distro = '(Missing)' - distroHelp = 'No distribution detected. This can lead to undefined behavior. Please consult your distribution\'s support channels on how to fix this.
' + distroHelp = 'No distribution detected. This can lead to undefined behavior. Please consult your distribution\'s support channels on how to fix this.' return [LEVEL_WARNING, distro, distroHelp] return [LEVEL_INFO, distro, distroHelp] @@ -192,10 +192,10 @@ def checkLinuxSystemInfo(lines): if flatpak := checkFlatpak(lines): logLevel = flatpak[0] linuxDistroOrFlatpak = flatpak[1] - linuxSystemInfoHelp = flatpak[2] + '
' + linuxSystemInfoHelp = flatpak[2] elif distro := checkDistro(lines): logLevel = distro[0] - linuxDistroOrFlatpak = 'Distribution: ' + distro[1] + linuxDistroOrFlatpak = distro[1] linuxSystemInfoHelp = distro[2] else: return @@ -208,14 +208,14 @@ def checkLinuxSystemInfo(lines): # can happen with misconfigured or virtual systems logLevel = LEVEL_WARNING displayServer = 'None' - linuxSystemInfoHelp += 'No Display Server detected. This can lead to undefined behavior. Please consult your Desktop Environment\'s or Window Manager\'s support channels on how to fix this.
' + linuxSystemInfoHelp += '
No Display Server detected. This can lead to undefined behavior. Please consult your Desktop Environment\'s or Window Manager\'s support channels on how to fix this.' if checkDesktopEnvironment(lines): - desktopEnvironment = 'DE: ' + checkDesktopEnvironment(lines)[1] + desktopEnvironment = checkDesktopEnvironment(lines)[1] else: # can happen for some misconfigured tiling window managers logLevel = LEVEL_WARNING - desktopEnvironment = 'DE: None' - linuxSystemInfoHelp += 'No Desktop Environment detected. This can lead to undefined behavior. Please consult your Desktop Environment\'s or Window Manager\'s support channels on how to fix this.' + desktopEnvironment = 'None' + linuxSystemInfoHelp += '
No Desktop Environment detected. This can lead to undefined behavior. Please consult your Desktop Environment\'s or Window Manager\'s support channels on how to fix this.' return [logLevel, linuxDistroOrFlatpak + ' | ' + displayServer + ' | ' + desktopEnvironment, linuxSystemInfoHelp]