Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

linux: Detect unofficial Flatpaks #178

Draft
wants to merge 2 commits into
base: master
Choose a base branch
from

Conversation

mihawk90
Copy link
Contributor

@mihawk90 mihawk90 commented Jan 29, 2025

Description

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. See obsproject/obs-studio#11788 for work towards that.

As discussed with tytan in #documentation on Discord, we're going with this quick detection until such time that this "proper" detection is ready.

Motivation and Context

We recently had a user in #linux-support having issues with both their BlackMagic capture card as well as their Nvidia GPU being detected. Upon inspection of the log, tytan noticed this was not our official Flatpak, and it unfortunately also happens to be broken in other ways.

How Has This Been Tested?

#!/bin/bash

echo "===== Unofficial Flatpak ====="
./loganalyzer.py --url "https://obsproject.com/logs/5PhBee18cV5S6MBe"

The second string was tested with the same log, replacing the runtime identifier.

Types of changes

  • New feature (non-breaking change which adds functionality)

Checklist:

  • My code has been run through clang-format.
  • I have read the contributing document.
  • My code is not on the master branch.
  • The code has been tested.
  • All commit messages are properly formatted and commits squashed where appropriate.
  • I have included updates to all appropriate documentation.

Currently Linux logs output (typically) 3 separate bullet points for the
system information (Distro, Display Server, Desktop Environment), which
looks odd and lengthens the page or bot summary.

Since all are merely informational and without help texts, this combines
all 3 points into a single one. The Flatpak extension helptext is shown
alongside it when appropriate.

For this I chose to extract the simple X11/Wayland checks into their own
functions to make them reusable in other check functions.
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.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant