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

Enable dark theme #263

Merged
merged 1 commit into from
Oct 2, 2023
Merged

Enable dark theme #263

merged 1 commit into from
Oct 2, 2023

Conversation

antirais
Copy link
Contributor

@antirais antirais commented Jun 2, 2023

Web-eID app supports dark theme, but this is disabled on linux:

Disabled as there is currently no straightforward way to detect dark mode in Linux.

Agreed, this is not straightforward, but can be made work with some configurations. Updated code to use check gsettings get org.gnome.desktop.interface color-scheme instead, as this specifies the preferred color scheme for the user interface.

@mrts
Copy link
Member

mrts commented Jun 19, 2023

We were previously uncomfortable with launching a separate process only to query the theme, so this has been disabled. I'll leave it to @kristelmerilain to make a final verdict.

@antirais
Copy link
Contributor Author

Relevant issues fixed in latest QT related to QProcess: https://www.qt.io/blog/security-advisory-qprocess

@klemensn
Copy link
Contributor

We were previously uncomfortable with launching a separate process only to query the theme, so this has been disabled. I'll leave it to @kristelmerilain to make a final verdict.

web-eid-app, imho, is a good example of a small and self contained application which, by virtue of using Qt, requires many capabilities one might not expect.

There already exists another code path in which an external program is executed: Clicking on https://id.ee runs xdg-open(1)*.

I looked into this and more whilst pledge(2)ing the native host application on OpenSD in order to reduce its attack surface and contain bugs/misbehaviour as much as possible, see
openbsd/ports@cff2767

At the moment, I don't exepct any of this to land upstream or useful on other platforms as they lack pledge(2) or adequate equivalents, but OpenBSD's local patch ought to provide some insight, still.

* this means clicking the link in the window will currently crash web-eid since it pledged not to fork or execute and I did not (yet) disable/neuter this functionality -- it is the only drawback I am currently aware of, one that I'll gladly take given the tight promises it allows web-eid to run under.

Coming back to this PR, I'd probably revert it locally on OpenBSD to retain these security benefits -- that is, until a better method of querying a system's theme settings has been found.

@kristelmerilain kristelmerilain merged commit 49f62a3 into web-eid:main Oct 2, 2023
7 checks passed
@antirais antirais deleted the dark-theme branch May 15, 2024 07:42
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.

5 participants