Test setting it in /etc/environment
Linux
From Wikipedia, the free encyclopedia
Linux is a family of open source Unix-like operating systems based on the Linux kernel, an operating system kernel first released on September 17, 1991 by Linus Torvalds. Linux is typically packaged in a Linux distribution (or distro for short).
Distributions include the Linux kernel and supporting system software and libraries, many of which are provided by the GNU Project. Many Linux distributions use the word "Linux" in their name, but the Free Software Foundation uses the name GNU/Linux to emphasize the importance of GNU software, causing some controversy.
Rules
- Posts must be relevant to operating systems running the Linux kernel. GNU/Linux or otherwise.
- No misinformation
- No NSFW content
- No hate speech, bigotry, etc
Related Communities
Community icon by Alpár-Etele Méder, licensed under CC BY 3.0
Depending on the launcher and launch method you may need to set systemd variables. Look at the way 50-systemd-user.conf
works
https://wiki.archlinux.org/title/Sway#Configuration
I use the following fragment to make sure the cursor theme propagates to applications launched with wofi: https://github.com/StaticRocket/dotfiles/blob/main/dot_config/sway/systemd-user.conf
A really common issue with sway is that it doesn't run as a login shell, so none of your .profile or other environment settings get sourced when you login. I think that might be the problem here.
Try closing your sway session, then login to a tty and run sway
. If the qt themes work properly then it's definitely an environment issue.
In my experience setting environment variables is pretty inconsistent. The easiest way would be using /etc/environment. This sets stuff globally for all users and definitely works.
PAM also used to support a per-user environment file, but that's deprecated or removed even. The best you can do for per-user config is setting variables both in your login shell and the systemd user environments file.