I have actually one environment variable that is needed by some GUI applications : QT_QPA_PLATFORMTHEME=qt5ct. For now I export it in ~/.bashrc.
When I run qt5ct from a terminal, the app sees the environment variable. But not when it is run from a desktop file.
So I tried multiple ways, changing the Exec= line of the desktop file (launching qt5ct show me if the app sees the environment variable):
sh -e 'qt5ct': not detectingsh -c 'qt5ct': not detectingsh -a -e 'qt5ct': not detectingbash -c 'qt5ct': not detecting
Finally, managed to find a tricky way (in my opinion) that works:
/usr/bin/env QT_QPA_PLATFORMTHEME=qt5ct qt5ct: detecting
So my question is : is there any way to export the variable environment QT_QPA_PLATFORMTHEME such as I do in ~/.bashrc ?
Since it takes me time to edit manually desktop entries (and perhaps these will be overwritten automatically by an update of the app ?).
I tried an export in ~/.bashrc, ~/.profile, without any change, and I don't have any ~/.xsession.
P.S. Sorry if there are English mistakes, and also if the title is not as accurate as my question.
.profile, did you log out and back in?~/.profilefor the desktop environment is loaded during login only.~/.profile- is still not detected by the app (from desktop file)./etc/environment(no export here). Did you try this yet?/etc/environmentthe variable is correctly detected ! Thanks again for your time. Perhaps you want to publish it as an answer, to gain points ? If no, there is no problem and I can answer this thread to mark it as resolved.