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

pavucontrol-qt doesn't inherit system theme, icons and font #6044

Closed
5 of 7 tasks
glu8716 opened this issue Oct 9, 2023 · 4 comments
Closed
5 of 7 tasks

pavucontrol-qt doesn't inherit system theme, icons and font #6044

glu8716 opened this issue Oct 9, 2023 · 4 comments

Comments

@glu8716
Copy link
Contributor

glu8716 commented Oct 9, 2023

Description

I'm on LXQt and pavucontrol-qt doesn't inherit system theme, icons and font.

1

Steps to Reproduce

  1. Open pavucontrol-qt with Firejail on.

Expected behavior

Program should inherit system theme, icons and font.

Actual behavior

Program doesn't inherit system theme, icons and font.

Behavior without a profile

Program has correct theme, font and icons.

2

Additional context

None.

Environment

  • Linux distribution and version: Artix
  • Firejail version: 0.9.72

Checklist

  • The issues is caused by firejail (i.e. running the program by path (e.g. /usr/bin/vlc) "fixes" it).
  • I can reproduce the issue without custom modifications (e.g. globals.local).
  • The program has a profile. (If not, request one in https://github.com/netblue30/firejail/issues/1139)
  • The profile (and redirect profile if exists) hasn't already been fixed upstream.
  • I have performed a short search for similar issues (to avoid opening a duplicate).
    • I'm aware of browser-allow-drm yes/browser-disable-u2f no in firejail.config to allow DRM/U2F in browsers.
  • I used --profile=PROFILENAME to set the right profile. (Only relevant for AppImages)

Log

Output from the terminal

Reading profile /etc/firejail/pavucontrol-qt.profile
Reading profile /etc/firejail/pavucontrol.profile
Reading profile /etc/firejail/disable-common.inc
Reading profile /etc/firejail/disable-devel.inc
Reading profile /etc/firejail/disable-exec.inc
Reading profile /etc/firejail/disable-interpreters.inc
Reading profile /etc/firejail/disable-programs.inc
Reading profile /etc/firejail/disable-xdg.inc
Reading profile /etc/firejail/whitelist-usr-share-common.inc
Reading profile /etc/firejail/whitelist-var-common.inc
Parent pid 7981, child pid 7982
1 program installed in 1.56 ms
Warning: An abstract unix socket for session D-BUS might still be available. Use --net or remove unix from --protocol set.
Warning: skipping alternatives for private /etc
Warning: skipping asound.conf for private /etc
Warning: skipping ld.so.preload for private /etc
Private /etc installed in 4.48 ms
Private /usr/etc installed in 0.01 ms
Warning: /sbin directory link was not blacklisted
Warning: /usr/sbin directory link was not blacklisted
Warning: not remounting /run/user/1000/gvfs
Warning: not remounting /run/user/1000/doc
Child process initialized in 64.64 ms

Parent is shutting down, bye...

@glitsj16
Copy link
Collaborator

glitsj16 commented Oct 9, 2023

There's a comment in the included pavucontrol.profile that might be relevant:

# whitelisting in ${HOME} is broken, see #3112
#mkfile ${HOME}/.config/pavucontrol.ini
#whitelist ${HOME}/.config/pavucontrol.ini
whitelist /usr/share/pavucontrol
whitelist /usr/share/pavucontrol-qt
#include whitelist-common.inc

Yet we seem to have forgotten to do the same in pavucontrol-qt.profile:

mkdir ${HOME}/.config/pavucontrol-qt
whitelist ${HOME}/.config/pavucontrol-qt

Not sure if this impacts theming, but it's something we'll need to correct regardless.

You can try again with the below and check if that works:

$ cat ~/.config/firejail/pavucontrol-qt.local
# Firejail profile for pavucontrol-qt
# Persistent local customizations

# whitelisting in ${HOME} is broken, see #3112
ignore mkdir ${HOME}/.config/pavucontrol-qt
ignore whitelist ${HOME}/.config/pavucontrol-qt

# try a blacklisting profile to fix theming
ignore whitelist /usr/share/pavucontrol
ignore whitelist /usr/share/pavucontrol-qt
ignore include whitelist-usr-share-common.inc
ignore include whitelist-var-common.inc

# try allowing D-bus session bus to fix theming
ignore dbus-user none

Also, do you use any of the Qt environment variables like QT_STYLE_OVERRIDE / QT_QPA_PLATFORMTHEME?

@glu8716
Copy link
Contributor Author

glu8716 commented Oct 9, 2023

You can try again with the below and check if that works:

Yes it does! What makes the theme working for me is:

ignore mkdir ${HOME}/.config/pavucontrol-qt
ignore whitelist ${HOME}/.config/pavucontrol-qt

The others seem to make no difference.

Also, do you use any of the Qt environment variables like QT_STYLE_OVERRIDE / QT_QPA_PLATFORMTHEME?

No I don't.

@glitsj16
Copy link
Collaborator

glitsj16 commented Oct 9, 2023

@glu8716

That's great news. It means my PR will be enough to fix this and keep whitelisting outside of ${HOME} and 'dbus-user none' intact. Just remember to drop this workaround when a next firejail release comes in via your OS.

Thanks again for reporting!

@glitsj16
Copy link
Collaborator

glitsj16 commented Oct 9, 2023

Fixed via #6045.

@glitsj16 glitsj16 closed this as completed Oct 9, 2023
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

No branches or pull requests

2 participants