QT_QPA_PLATFORMTHEME cannot be set to qt5ct

  • Thread starter Thread starter Deleted member 67862
  • Start date Start date
D

Deleted member 67862

Guest
Greetings,

For several months I've tried to get qt5ct to be configured correctly by having QT_QPA_PLATFORMTHEME set to qt5ct. It seems to not work through any of the methods:

Putting QT_QPA_PLATFORMTHEME (variable) in /etc/profile
Putting the variable in .tcshrc (I use tcshrc)
Putting the variable in csh, tcsh, and sh rc's (translated to what they use to set environment variables of course)
Putting the variable in ~/.profile
Adding sh -c "QT_QPA_PLATFORMTHEME=qt5ct" to Xfce startup

Some of the ones above only work for qt programs launched from the terminal. Other ones don't work at all. I've circumvented this issue entirely by using icewm because it has an "env" file where you can add this environment variable. However, I'm using Xfce and can't rely on that file anymore. So I'm either glued to using icewm or just not having qt5 programs adhere at all to my gtk theme. Does anyone happen to know a solution?
 
If everything seems to fail (Which is kind of weird) for you can do modify the xfce session file /usr/local/share/xsessions/xfce.desktop
which is a dirty way but this should work then.

Note that this file can be overwritten by updates or re-installation of the xfce4-session package.
 
In XFCE i do have put
Code:
QT_QPA_PLATFORMTHEME=qt5ct;      export QT_QPA_PLATFORMTHEME
in ~/.profile and it works for me.
Weird, I have this exact same thing but it's not working. Im using xdm to launch xfce if that matters.

Bash:
....

EDITOR=ee;       export EDITOR
PAGER=less;      export PAGER

# set ENV to a file invoked each time sh is started for interactive use.
ENV=$HOME/.shrc; export ENV

# Set qt5 to use qt5ct
QT_QPA_PLATFORMTHEME=qt5ct; export QT_QPA_PLATFORMTHEME
 
Weird, I have this exact same thing but it's not working. Im using xdm to launch xfce if that matters.

Bash:
....

EDITOR=ee;       export EDITOR
PAGER=less;      export PAGER

# set ENV to a file invoked each time sh is started for interactive use.
ENV=$HOME/.shrc; export ENV

# Set qt5 to use qt5ct
QT_QPA_PLATFORMTHEME=qt5ct; export QT_QPA_PLATFORMTHEME

Maybe its related to the display manager?

What happens if you try lightdm?
 
Maybe its related to the display manager?

What happens if you try lightdm?
Lightdm gives me a black screen.

export it in .xsession if you use xdm
check running process env with ps -ewww
It's just showing tcsh really:

Code:
hunter@mybsdpc:~ % env ps -ewww
  PID TT  STAT    TIME COMMAND
50025 v1  I+   0:00.01  -tcsh (tcsh)
55939  0  Ss   0:00.05  -tcsh (tcsh)
56800  0  R+   0:00.00  ps -ewww

My .xsession is now:
Code:
QT_QPA_PLATFORMTHEME=qt5ct; export QT_QPA_PLATFORMTHEME
startxfce4
But no difference
 
When starting lightdm or when login to the xfce session?
When starting lightdm. It did not have an entry in /etc/ttys so I added lightdm_enable=YES in rc.conf and got a black screen when starting up.
 
weird no env is shown
Code:
titus@hpbsd:~ % ps -ewww -p $$
  PID TT  STAT    TIME COMMAND
29413  1  Ss   0:00.02 USER=titus LOGNAME=titus HOME=/home/titus MAIL=/var/mail/titus PATH=/sbin:/bin:/usr/sbin:/usr/bin:/usr/local/sbin:/usr/local/bin:/home/titus/bin TERM=xterm-256color BLOCKSIZE=K MM_CHARSET=UTF-8 LANG=C.UTF-8 SHELL=/bin/tcsh SSH_CLIENT=10.1.1.1 15844 22 SSH_CONNECTION=10.1.1.1 15844 10.1.1.177 22 SSH_TTY=/dev/pts/1 -tcsh (tcsh)
titus@hpbsd:~ %
 
env shows a bunch of variables, but they just arent showing up in ps. Everything is normal in xfce terminal. Now I don't understand why I don't see all that in ps
 
do you have any 'hardening' stuff in sysctl.conf ?
Actually I do, I picked all the hardening options as per Robonuggie suggested.

security.bsd.see_other_uids=0
security.bsd.see_other_gids=0
security.bsd.see_jail_proc=0
security.bsd.unprivileged_read_msgbuf=0
security.bsd.unprivileged_proc_debug=0
kern.randompid=1
 
Back
Top