QT5CT environment variable not set
QT5CT environment variable not set
Hey guys n gals, I'm wondering how to set QT5CT as the main configuration tool for QT5 apps - when I run qt5ct from the terminal it will open up no problem, but when I try to open it from the menu it won't allow it & tells me the environment variable isn't set. "The QT_QPA_PLATFORMTHEME environment variable is not set correctly"
I'm using the LXDE desktop.
/etc/environment looks like:
BROWSER=/usr/bin/xdg-open
QT_QPA_PLATFORMTHEME=qt5ct
& /etc/profile.d/qt5ct.sh looks like:
export QT_QPA_PLATFORMTHEME=qt5ct
This normally works on basic Debian installations. Why isn't this working here though? It'll work if I open up qt5ct & qt5 apps from the terminal, but it won't work from the menu.... What am I missing?
I'm using the LXDE desktop.
/etc/environment looks like:
BROWSER=/usr/bin/xdg-open
QT_QPA_PLATFORMTHEME=qt5ct
& /etc/profile.d/qt5ct.sh looks like:
export QT_QPA_PLATFORMTHEME=qt5ct
This normally works on basic Debian installations. Why isn't this working here though? It'll work if I open up qt5ct & qt5 apps from the terminal, but it won't work from the menu.... What am I missing?
- dolphin_oracle
- Developer
- Posts: 20032
- Joined: Sun Dec 16, 2007 1:17 pm
Re: QT5CT environment variable not set
there is a file in /etc/X11/Xsession.d/ that controls the QT5CT environment variable.
http://www.youtube.com/runwiththedolphin
lenovo ThinkPad X1 Extreme Gen 4 - MX-23
FYI: mx "test" repo is not the same thing as debian testing repo.
lenovo ThinkPad X1 Extreme Gen 4 - MX-23
FYI: mx "test" repo is not the same thing as debian testing repo.
Re: QT5CT environment variable not set
You can run it from the terminal with this, too:
You should be able to modify the launch command in the menu to also export that to the environment first, if you don't want to edit the /etc/X11/Xsession.d/98qtconfig file.
Did you mean LXQT instead of LXDE?
I also see there's a newer version in upstream Debian...I'll build that and see how it works out of the box.
Code: Select all
export QT_QPA_PLATFORMTHEME=qt5ct && qt5ct
Did you mean LXQT instead of LXDE?
I also see there's a newer version in upstream Debian...I'll build that and see how it works out of the box.
Re: QT5CT environment variable not set
The new qt5ct still needed the environment variable command to run the first time, but after I changed the theme selection, it would start normally. But changing the theme in qt5ct had no effect on other Qt 5 apps. I think that the 98qtconfig file is still in charge, and you will have to change "gtk2" in that to "qt5ct", or move the file out of that folder altogether for LXQT.
Re: QT5CT environment variable not set
Stevo wrote:You can run it from the terminal with this, too:You should be able to modify the launch command in the menu to also export that to the environment first, if you don't want to edit the /etc/X11/Xsession.d/98qtconfig file.Code: Select all
export QT_QPA_PLATFORMTHEME=qt5ct && qt5ct
Did you mean LXQT instead of LXDE?
I also see there's a newer version in upstream Debian...I'll build that and see how it works out of the box.
No, I said LXDE. I don't like LXQT at all. Not a fan! Its full of bugs & things won't work the way I want them to, plus the GUI configuration windows are such a mess. Strongly dislike LXQT & will be even more mad if distros try to replace LXDE with LXQT. With LXDE I can just use QT5CT & it will look like my GTK2 / 3 stuff, that's the way I like it.
I've used that command - it doesn't make things from the menu change though!! Only things that are launched from the terminal will work with QT5CT properly! Why is the menu different?
Just try changing the icons & then open up a web browser or something from the menu & you'll see the icons aren't changing.
Re: QT5CT environment variable not set
I am going to move this thread to MX Modified as it pertains to lXDE not the default XFCE.
Forum Rules
Guide - How to Ask for Help
richb Administrator
System: MX 23 KDE
AMD A8 7600 FM2+ CPU R7 Graphics, 16 GIG Mem. Three Samsung EVO SSD's 250 GB
Guide - How to Ask for Help
richb Administrator
System: MX 23 KDE
AMD A8 7600 FM2+ CPU R7 Graphics, 16 GIG Mem. Three Samsung EVO SSD's 250 GB
Re: QT5CT environment variable not set
How would I modify it? What would that look like?Stevo wrote: You should be able to modify the launch command in the menu to also export that to the environment first, if you don't want to edit the /etc/X11/Xsession.d/98qtconfig file.
I've installed AntiX & that file doesn't exist(but neither does this problem), but I am making note of it in case for some reason I end up back on MX or Debian.
Thanks.
Re: QT5CT environment variable not set
We ship the 98qtconfig file with MX so that Qt 5 applications automatically follow the XFCE gtk themes. This makes everything have the same themes without qt5ct. It seems you want the same setup in LXDE, so it should work the same way as in MX. LXDE is GTK, so without that file, qt5ct is only going to affect qt5 applications, and LXDE will go on its merry way if you don't set it to gtk2.
Re: QT5CT environment variable not set
I can't resolve this problem. I have tried but still my terminal shows :Stevo wrote: ↑Tue Jan 30, 2018 6:00 pm We ship the 98qtconfig file with MX so that Qt 5 applications automatically follow the XFCE gtk themes. This makes everything have the same themes without qt5ct. It seems you want the same setup in LXDE, so it should work the same way as in MX. LXDE is GTK, so without that file, qt5ct is only going to affect qt5 applications, and LXDE will go on its merry way if you don't set it to gtk2.
$ echo $QT_QPA_PLATFORMTHEME
gtk2
In my MX Linux 21 the 98qtconfig seems that missing,
The old trick that I used before to start apps from edit menu, used for showfoto >> QT_QPA_PLATFORMTHEME=gtk3 showfoto (taken from this forum) works only when starts terminal. Similar entry in the edit menu entry gives error "Failed to execute child process", even when I change mod by Chmod 0766 to this file.
Code: Select all
System: Host: <filter> Kernel: 5.10.0-10-amd64 x86_64 bits: 64 compiler: N/A
parameters: BOOT_IMAGE=/boot/vmlinuz-5.10.0-10-amd64
root=UUID=<filter> ro quiet splash
Desktop: Xfce 4.16.0 tk: Gtk 3.24.24 info: xfce4-panel wm: xfwm4 dm: LightDM 1.26.0
Distro: MX-21_x64 Wildflower October 20 2021 base: Debian GNU/Linux 11 (bullseye)
Machine: Type: Laptop System: Hewlett-Packard product: HP EliteBook 2170p v: A1028C1100
serial: <filter> Chassis: type: 10 serial: <filter>
Mobo: Hewlett-Packard model: 1815 v: KBC Version 63.1C serial: <filter>
BIOS: Hewlett-Packard v: 68IMT Ver. F.72 date: 04/11/2019
CPU: Topology: Dual Core model: Intel Core i5-3427U bits: 64 type: MT MCP arch: Ivy Bridge
family: 6 model-id: 3A (58) stepping: 9 microcode: 21 L2 cache: 3072 KiB
flags: avx lm nx pae sse sse2 sse3 sse4_1 sse4_2 ssse3 bogomips: 18356
Speed: 1184 MHz min/max: 800/2800 MHz Core speeds (MHz): 1: 1137 2: 1132 3: 1111
4: 1162
Vulnerabilities: Type: itlb_multihit status: KVM: VMX unsupported
Type: l1tf mitigation: PTE Inversion
Type: mds mitigation: Clear CPU buffers; SMT vulnerable
Type: meltdown mitigation: PTI
Type: spec_store_bypass
mitigation: Speculative Store Bypass disabled via prctl and seccomp
Type: spectre_v1 mitigation: usercopy/swapgs barriers and __user pointer sanitization
Type: spectre_v2 mitigation: Full generic retpoline, IBPB: conditional, IBRS_FW,
STIBP: conditional, RSB filling
Type: srbds status: Vulnerable: No microcode
Type: tsx_async_abort status: Not affected
Graphics: Device-1: Intel 3rd Gen Core processor Graphics vendor: Hewlett-Packard driver: i915
v: kernel bus ID: 00:02.0 chip ID: 8086:0166
Display: x11 server: X.Org 1.20.11 driver: modesetting unloaded: fbdev,vesa
resolution: 1366x768~60Hz
OpenGL: renderer: Mesa DRI Intel HD Graphics 4000 (IVB GT2) v: 4.2 Mesa 20.3.5
compat-v: 3.0 direct render: Yes
Audio: Device-1: Intel 7 Series/C216 Family High Definition Audio vendor: Hewlett-Packard
driver: snd_hda_intel v: kernel bus ID: 00:1b.0 chip ID: 8086:1e20
Sound Server: ALSA v: k5.10.0-10-amd64
Network: Device-1: Intel 82579LM Gigabit Network vendor: Hewlett-Packard driver: e1000e
v: kernel port: 2060 bus ID: 00:19.0 chip ID: 8086:1502
IF: eth0 state: down mac: <filter>
Device-2: Intel Centrino Advanced-N 6205 [Taylor Peak] driver: iwlwifi v: kernel
port: 2040 bus ID: 03:00.0 chip ID: 8086:0085
IF: wlan0 state: up mac: <filter>
Drives: Local Storage: total: 140.43 GiB used: 51.45 GiB (36.6%)
ID-1: /dev/sda vendor: Crucial model: CT120BX500SSD1 size: 111.79 GiB block size:
physical: 512 B logical: 512 B speed: 6.0 Gb/s serial: <filter> rev: R013 scheme: MBR
ID-2: /dev/sdb type: USB vendor: SanDisk model: Ultra USB 3.0 size: 28.64 GiB
block size: physical: 512 B logical: 512 B serial: <filter> rev: 1.00 scheme: MBR
Partition: ID-1: / raw size: 29.02 GiB size: 28.44 GiB (98.00%) used: 17.19 GiB (60.4%) fs: ext4
dev: /dev/sda6
Sensors: System Temperatures: cpu: 49.0 C mobo: 0.0 C
Fan Speeds (RPM): N/A
Repos: No active apt repos in: /etc/apt/sources.list
No active apt repos in: /etc/apt/sources.list.d/atom.list
Active apt repos in: /etc/apt/sources.list.d/debian-stable-updates.list
1: deb http://debian.ipacct.com/debian/ bullseye-updates non-free contrib main
Active apt repos in: /etc/apt/sources.list.d/debian.list
1: deb http://debian.ipacct.com/debian/ bullseye main contrib non-free
2: deb http://security.debian.org/debian-security/ bullseye-security main contrib non-free
Active apt repos in: /etc/apt/sources.list.d/google-earth-pro.list
1: deb [arch=amd64] http://dl.google.com/linux/earth/deb/ stable main
Active apt repos in: /etc/apt/sources.list.d/mx.list
1: deb https://mxlinux.ipacct.com/MX-Packages/mx/repo/ bullseye main non-free
Active apt repos in: /etc/apt/sources.list.d/skype-stable.list
1: deb [arch=amd64] https://repo.skype.com/deb stable main
Active apt repos in: /etc/apt/sources.list.d/softmaker.list
1: deb http://shop.softmaker.com/repo/apt/ stable non-free
Active apt repos in: /etc/apt/sources.list.d/vivaldi.list
1: deb [arch=amd64] http://repo.vivaldi.com/stable/deb/ stable main
Info: Processes: 234 Uptime: 22m Memory: 7.64 GiB used: 1.40 GiB (18.4%) Init: SysVinit
v: 2.96 runlevel: 5 default: 5 Compilers: gcc: 10.2.1 alt: 10 Shell: quick-system-in
running in: quick-system-in inxi: 3.0.36
- dolphin_oracle
- Developer
- Posts: 20032
- Joined: Sun Dec 16, 2007 1:17 pm
Re: QT5CT environment variable not set
the variables are currently set in /etc/X11/Xsession.d/56xfce4-qtconfig
http://www.youtube.com/runwiththedolphin
lenovo ThinkPad X1 Extreme Gen 4 - MX-23
FYI: mx "test" repo is not the same thing as debian testing repo.
lenovo ThinkPad X1 Extreme Gen 4 - MX-23
FYI: mx "test" repo is not the same thing as debian testing repo.