You are not logged in.

#1 2022-05-29 17:57:08

Redo11
Member
Registered: 2019-08-06
Posts: 6

Enviroment variables are breaking my themes. Where do I remove them?

So, I use Plasma daily. My system is very bloated, cause I like to try out a lot of stuff.
Lately, after an update, my QT applications are looking *weird*, meaning wrong theme and style, compared to what I have in my settings.
After checking qt5ct, I found a warning about two environment variables being set.

Please remove the QT_STYLE_OVERRIDE environment variable (current value: adwaita).

The QT_QPA_PLATFORMTHEME environment variable is not set correctly (current value: gtk3, required value: qt5ct).

I tried unsetting them manually and it did fix the themes.
Now, how to remove them.
I tried /etc/environment; /etc/profile; ~/.profile etc etc.
None of them work, probably because the variable is being overwritten after desktop login.
Where can I find the source of them and stop them from ruining my system?

I would also prefer to avoid hacky solutions like removing the variables 10 seconds after start.

albert@albert-pc ~> printenv | grep -i "qt"
QT_AUTO_SCREEN_SCALE_FACTOR=0
QT_QPA_PLATFORMTHEME=gtk3
QT_STYLE_OVERRIDE=adwaita

Offline

#2 2022-05-29 19:55:52

ewaller
Administrator
From: Pasadena, CA
Registered: 2009-07-13
Posts: 20,692

Re: Enviroment variables are breaking my themes. Where do I remove them?

Here would be a way to find all references in your home directory:

find ~ -exec grep adwaita \{\} \; -print 2>/dev/null

Edit:  Comb through the files it provides.  It also shows the relevant lines of the files.
Edit2:  If you have a lot of files in $HOME, that could take a while

Last edited by ewaller (2022-05-29 19:57:30)


Nothing is too wonderful to be true, if it be consistent with the laws of nature -- Michael Faraday
The shortest way to ruin a country is to give power to demagogues.— Dionysius of Halicarnassus
---
How to Ask Questions the Smart Way

Offline

#3 2022-05-29 20:25:48

Trilby
Inspector Parrot
Registered: 2011-11-29
Posts: 30,498
Website

Re: Enviroment variables are breaking my themes. Where do I remove them?

You can check which processes have the variable defined which should narrow it down pretty quickly:

#!/bin/sh

find /proc/ -name environ -exec grep -l QT_STYLE_OVERRIDE '{}' \+ 2>/dev/null \
		| cut -d/ -f 3 | sort -u | while read pid; do
	cat /proc/$pid/cmdline 2>/dev/null || continue
	echo
done | tr '\0' ' '

"UNIX is simple and coherent" - Dennis Ritchie; "GNU's Not Unix" - Richard Stallman

Offline

#4 2022-05-30 13:05:09

Redo11
Member
Registered: 2019-08-06
Posts: 6

Re: Enviroment variables are breaking my themes. Where do I remove them?

Honestly, I went over it and have no idea @Trilby

sh-5.1$ find /proc/ -name environ -exec grep -l QT_STYLE_OVERRIDE '{}' \+ 2>/dev/null           | cut -d/ -f 3 | sort -u | while read pid; do        cat /proc/$pid/cmdline 2>/dev/null || continue;         echo; done | tr '\0' ' '
/usr/bin/plasma_session 
/usr/lib/kf5/klauncher --fd=9 
/sbin/kded5 
/usr/bin/kglobalaccel5 
/usr/lib/dconf-service 
/sbin/ksmserver 
/usr/lib/kactivitymanagerd 
/usr/lib/telepathy/mission-control-5 
/sbin/xembedsniproxy 
/sbin/kaccess 
/usr/lib/kdeconnectd 
/sbin/gmenudbusmenuproxy 
/usr/lib/DiscoverNotifier 
/usr/lib/budgie-window-shuffler/gridwindow 
/usr/lib/policykit-1-pantheon/io.elementary.desktop.agent-polkit 
python3 /sbin/mpDris2 
/usr/lib/evolution-data-server/evolution-alarm-notify 
/sbin/kgpg 
python3 /sbin/quickchar 
/sbin/io.elementary.tasks --background 
/usr/lib/budgie-desktop/plugins/budgie-visualspace/auto_workspace 
/usr/lib/budgie-previews/previews_creator 
/sbin/io.elementary.mail --background 
/usr/lib/budgie-previews/previews_daemon 
/usr/lib/budgie-wallstreet/wallstreet 
/sbin/dde-printer-helper 
/opt/safing/portmaster/portmaster-start notifier --data=/opt/safing/portmaster 
/usr/bin/python2.7 /sbin/emojione-picker 
/usr/lib/geoclue-2.0/demos/agent 
/usr/lib/budgie-window-shuffler/windowshufflerdaemon 
/usr/lib/budgie-window-shuffler/layouts_popup 
/usr/bin/python /usr/bin/firewall-applet 
/usr/bin/zeitgeist-daemon 
/sbin/kalendarac 
/usr/lib/kf5/kscreen_backend_launcher 
/usr/lib/bluetooth/obexd 
/usr/lib/tracker-miner-fs-3 
/usr/lib/tracker-miner-rss-3 
/usr/lib/zeitgeist/zeitgeist-fts 
zeitgeist-datahub 
/usr/lib/xdg-desktop-portal 
/usr/lib/xdg-document-portal 
/usr/lib/evolution-source-registry 
/usr/lib/xdg-permission-store 
/sbin/akonadi_control 
/opt/safing/portmaster/updates/linux_amd64/notifier/portmaster-notifier_v0-3-2 --data /opt/safing/portmaster 
/usr/lib/xdg-desktop-portal-gnome 
/usr/lib/goa-daemon 
/usr/lib/goa-identity-service 
/usr/bin/akonadiserver 
/usr/bin/mysqld --defaults-file=/home/albert/.local/share/akonadi/mysql.conf --datadir=/home/albert/.local/share/akonadi/db_data/ --socket=/run/user/1000/akonadi/mysql.socket --pid-file=/run/user/1000/akonadi/mysql.pid 
/usr/bin/pipewire 
/usr/bin/pipewire-media-session 
/usr/bin/pipewire-pulse 
/usr/lib/xdg-desktop-portal-kde 
/usr/lib/xdg-desktop-portal-gtk 
/usr/bin/gpg-agent --supervised 
/usr/bin/akonadi_akonotes_resource --identifier akonadi_akonotes_resource_0 
/usr/bin/akonadi_archivemail_agent --identifier akonadi_archivemail_agent 
/usr/bin/akonadi_birthdays_resource --identifier akonadi_birthdays_resource 
/usr/bin/akonadi_contacts_resource --identifier akonadi_contacts_resource_0 
/usr/bin/akonadi_followupreminder_agent --identifier akonadi_followupreminder_agent 
/usr/lib/io.elementary.settings-daemon.xdg-desktop-portal 
/usr/bin/akonadi_ical_resource --identifier akonadi_ical_resource_0 
/usr/bin/akonadi_indexing_agent --identifier akonadi_indexing_agent 
/usr/bin/akonadi_maildir_resource --identifier akonadi_maildir_resource_0 
/usr/bin/akonadi_maildispatcher_agent --identifier akonadi_maildispatcher_agent 
/usr/bin/akonadi_mailfilter_agent --identifier akonadi_mailfilter_agent 
/usr/bin/akonadi_mailmerge_agent --identifier akonadi_mailmerge_agent 
/usr/bin/akonadi_migration_agent --identifier akonadi_migration_agent 
/usr/bin/akonadi_newmailnotifier_agent --identifier akonadi_newmailnotifier_agent 
/usr/bin/akonadi_notes_agent --identifier akonadi_notes_agent 
/usr/bin/akonadi_sendlater_agent --identifier akonadi_sendlater_agent 
/usr/bin/akonadi_unifiedmailbox_agent --identifier akonadi_unifiedmailbox_agent 
/usr/lib/evolution-calendar-factory 
/usr/lib/evolution-addressbook-factory 
/usr/lib/gvfs-udisks2-volume-monitor 
/usr/lib/gvfs-mtp-volume-monitor 
/usr/lib/gvfs-gphoto2-volume-monitor 
/usr/lib/gvfs-goa-volume-monitor 
/usr/lib/gvfs-afc-volume-monitor 
/usr/lib/gvfsd-metadata 
/usr/lib/kf5/kio_http_cache_cleaner 
/sbin/kalarm --tray 
kwin_x11 --replace 
plasmashell 
/sbin/ksysguardd 
/sbin/dolphin 
/usr/bin/fish 
/usr/lib/kf5/kioslave5 /usr/lib/qt/plugins/kf5/kio/kio_http.so https  local:/run/user/1000/plasmashelliwWyWt.9.slave-socket 
/usr/lib/kf5/kioslave5 /usr/lib/qt/plugins/kf5/kio/kio_http.so https  local:/run/user/1000/plasmashellHvEmec.10.slave-socket 
/usr/lib/kf5/kioslave5 /usr/lib/qt/plugins/kf5/kio/thumbnail.so thumbnail  local:/run/user/1000/dolphinBDWRgv.13.slave-socket 
/sbin/konsole 
/usr/bin/fish 
sh 
/usr/lib/kf5/kioslave5 /usr/lib/qt/plugins/kf5/kio/kio_http.so https  local:/run/user/1000/plasmashellLGdJlW.11.slave-socket 
sh 
tr \0   
/usr/bin/startplasma-x11 
sh-5.1$ 

Offline

#5 2022-05-30 13:14:07

seth
Member
From: Won't reply 2 private help req
Registered: 2012-09-03
Posts: 77,255

Re: Enviroment variables are breaking my themes. Where do I remove them?

~/.config/plasma-workspace/env/
https://wiki.archlinux.org/title/Enviro … s#Per_user
https://wiki.archlinux.org/title/Fish#Configuration

If you log into a console (ctrl+alt+f2), is the environment there as well?

Online

#6 2022-05-30 14:10:53

Redo11
Member
Registered: 2019-08-06
Posts: 6

Re: Enviroment variables are breaking my themes. Where do I remove them?

No, it's only once I log into the desktop

Offline

#7 2022-05-30 14:28:02

seth
Member
From: Won't reply 2 private help req
Registered: 2012-09-03
Posts: 77,255

Re: Enviroment variables are breaking my themes. Where do I remove them?

Then it's not fish - still look at the other locations and ~/.config/plasma-workspace/env/ is plasma specific.

Online

#8 2022-05-30 14:47:58

Redo11
Member
Registered: 2019-08-06
Posts: 6

Re: Enviroment variables are breaking my themes. Where do I remove them?

They are all empty.

Offline

#9 2022-05-30 14:56:28

seth
Member
From: Won't reply 2 private help req
Registered: 2012-09-03
Posts: 77,255

Re: Enviroment variables are breaking my themes. Where do I remove them?

Well, then do what ewaller told you or likewise "grep -r adwaita ~"

Online

Board footer

Powered by FluxBB