Bug 468330 - An unwelcome env var QT_PLUGIN_PATH has appeared in Fedora
An unwelcome env var QT_PLUGIN_PATH has appeared in Fedora
Product: Fedora
Classification: Fedora
Component: kdelibs (Show other bugs)
All Linux
medium Severity low
: ---
: ---
Assigned To: Kevin Kofler
Fedora Extras Quality Assurance
Depends On:
  Show dependency treegraph
Reported: 2008-10-24 02:33 EDT by Mark Summerfield
Modified: 2010-12-07 13:39 EST (History)
10 users (show)

See Also:
Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
Last Closed: 2008-10-24 21:21:25 EDT
Type: ---
Regression: ---
Mount Type: ---
Documentation: ---
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---

Attachments (Terms of Use)

  None (edit)
Description Mark Summerfield 2008-10-24 02:33:58 EDT
In one of the updates that occurred recently, a new environment variable, QT_PLUGINS_PATH=/usr/lib/kde4/plugins
was added. (Maybe it was added as a KDE update rather than a Qt one; I don't know.)

This environment variable doesn't appear to be needed. But worse, it causes problems with locally installed versions of PyQt4.

On my machine I have Python, Qt, and PyQt4 from the Fedora packages.
But in addition in $HOME I have built my own Qt and PyQt4 and Pythons so that I can experiment with them.

With QT_PLUGINS_PATH=/usr/lib/kde4/plugins set it takes 13 seconds from the moment of invocation for a PyQt4 file dialog to appear. If I unset the variable (as I now do in .bashrc), the file dialog appears instantly as expected.

I realise that not many people will need to install multiple versions of PyQt4 like I do, but I still think the environment variable should not be set unless there is a really compelling reason to do so.
Comment 1 Kevin Kofler 2008-10-24 21:21:25 EDT
1. This is set by kdelibs4, not qt4. The file which sets it is /etc/profile.d/kde4.sh.
2. This is not a new thing, this has existed ever since kdelibs4 has existed in F8. (And it's the same in the kdelibs in F9 and Rawhide.) You probably simply didn't have kdelibs4 installed before.
3. Your claim that "this environment variable doesn't appear to be needed" is incorrect: it is required for KDE plugins to be found by Qt, including but not limited to: the Oxygen widget style in kdebase-runtime, the Qt Designer KDE plugin in kdelibs4-devel, the image format plugins in kdelibs4 itself etc.
4. What you're seeing seems to be some problem your custom version of Qt 4 appears to have with one of the plugins in that path, which also shows that the environment variable is obviously not unneeded, because something is being loaded from it. ;-)
5. The file is marked %config(noreplace), so you can just hack the variable out if you don't like it. (But I think you should figure out the actual problem instead.)

Oh, and it's called QT_PLUGIN_PATH, not QT_PLUGINS_PATH.

Note You need to log in before you can comment on or make changes to this bug.