Welcome!
Important information
-- Spectre and Meltdown vulnerabilities
-- Change in MX sources

News
-- MX Linux on social media: here
-- Mepis support still here

Current releases
-- MX-17.1 Final release info here
-- antiX-17 release info here

New users
-- Please read this first, and don't forget to add system and hardware information to posts!
-- Here are the Forum Rules

QT5CT environment variable not set

For issues with MX that has been modified from the initial install. Example: adding packages that then cause issues.
Post Reply
Message
Author
kyle_a
Forum Novice
Forum  Novice
Posts: 36
Joined: Sat Jan 27, 2018 12:53 pm

QT5CT environment variable not set

#1 Post by kyle_a » Tue Jan 30, 2018 1:01 pm

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?

User avatar
dolphin_oracle
Forum Veteran
Forum Veteran
Posts: 9282
Joined: Sun Dec 16, 2007 1:17 pm

Re: QT5CT environment variable not set

#2 Post by dolphin_oracle » Tue Jan 30, 2018 1:35 pm

there is a file in /etc/X11/Xsession.d/ that controls the QT5CT environment variable.
http://www.youtube.com/runwiththedolphin
lenovo ThinkPad T530 - MX-17
lenovo s21e & 100s - antiX-17, MX17(live-usb)
FYI: mx "test" repo is not the same thing as debian testing repo.

User avatar
Stevo
Forum Veteran
Forum Veteran
Posts: 16160
Joined: Fri Dec 15, 2006 8:07 pm

Re: QT5CT environment variable not set

#3 Post by Stevo » Tue Jan 30, 2018 2:56 pm

You can run it from the terminal with this, too:

Code: Select all

export QT_QPA_PLATFORMTHEME=qt5ct && qt5ct
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.

User avatar
Stevo
Forum Veteran
Forum Veteran
Posts: 16160
Joined: Fri Dec 15, 2006 8:07 pm

Re: QT5CT environment variable not set

#4 Post by Stevo » Tue Jan 30, 2018 4:03 pm

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.

kyle_a
Forum Novice
Forum  Novice
Posts: 36
Joined: Sat Jan 27, 2018 12:53 pm

Re: QT5CT environment variable not set

#5 Post by kyle_a » Tue Jan 30, 2018 5:30 pm

Stevo wrote:You can run it from the terminal with this, too:

Code: Select all

export QT_QPA_PLATFORMTHEME=qt5ct && qt5ct
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.

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.

User avatar
richb
Administrator
Posts: 17041
Joined: Wed Jul 12, 2006 2:17 pm

Re: QT5CT environment variable not set

#6 Post by richb » Tue Jan 30, 2018 5:33 pm

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

Rich
SSD Production: MX 17.1
AMD A8 7600 FM2+ CPU R7 Graphics, 16 GIG Mem. Three Samsung EVO SSD's 250 GB, 350 GB HD

kyle_a
Forum Novice
Forum  Novice
Posts: 36
Joined: Sat Jan 27, 2018 12:53 pm

Re: QT5CT environment variable not set

#7 Post by kyle_a » Tue Jan 30, 2018 5:36 pm

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.
How would I modify it? What would that look like?
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.

User avatar
Stevo
Forum Veteran
Forum Veteran
Posts: 16160
Joined: Fri Dec 15, 2006 8:07 pm

Re: QT5CT environment variable not set

#8 Post by Stevo » 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.

Post Reply

Return to “MX Modified”