joba1
January 22, 2024, 12:01pm
1
Hi all,
I want to get rid of QT_QPA_PLATFORM=wayland in my standard “gnome for xorg” session.
Unfortunately I cannot find where it is set.
I checked
/etc/profile
/etc/profile.d
/etc/bash.bashrc
/etc/bashrc.local
~/.profile
~/.bashrc
Any ideas where this could come in?
P.S.
I just created a new user and it has not set the variable. So it is not a system default, but an individual user setting.
Check process environment upwards, if some process has it but its parent does not, most likely it is the parent that sets this variable.
1 Like
joba1
January 22, 2024, 1:06pm
3
ps -ef shows
joachim 24900 25543 0 13:05 ? 00:00:13 /usr/libexec/gnome-terminal-server
joachim 25543 1 0 Jan09 ? 00:00:26 /usr/lib/systemd/systemd --user
Parent systemd doesn’t have it. Child gnome-terminal-server does.
But it is not in one of the accessed files during startup of gnome-terminal-server.
Checked with
job4:~ > files=`strace /usr/libexec/gnome-terminal-server 2>&1 | grep ^open | grep -v ENOENT | awk -F'"' '{print $2}'`
job4:~ > for f in $files ; do grep QT_QPA_PLATFORM $f; done
So systemd somehow sets this for me. Where, why or how I still don’t know…
Is it in systemd environment?
systemctl --user show-environment
1 Like
joba1
January 22, 2024, 2:10pm
6
systemd/User - ArchWiki lists tons of places where environment variables could be set - so far non found…
This wayland stuff keeps being a nightmare…
joba1
January 22, 2024, 3:13pm
7
For the record:
after weeding through files
/etc/profile
/ect/profile.d/
/etc/bashrc.*
~/.bashrc
~/.profile
~/.config/environment.d/
/etc/systemd/user.conf
/etc/systemd/system/user*/
/etc/systemd/user.conf
/usr/lib/systemd/
/etc/systemd/
and not finding either hints on more environment configuration files or the variable itself I remembered that I had commented out the QT_QPA_PLATFORM variable in my .bashrc earlier today.
The variable vanished from my X user environment only after a full reboot. Logout/login was not enough…
I wish this would be more transparent, but problem solved now. Thanks!