[Interest] QDesktopServices::openUrl() without inheriting environment?

Thiago Macieira thiago.macieira at intel.com
Fri Oct 23 21:32:29 CEST 2020

On Friday, 23 October 2020 08:50:07 PDT Olivier B. wrote:
> Is there a way to still use the mechanism to find the application to use
> from system settings, but launch the command with the default system
> environment, not the one inherited from the application's process
> (something like calling the command with env -i) ?

No, there's no such code in Qt and it's not likely we'll ever have it.

Second, you can't clean the environment. At the very least you need the 
DISPLAY and XAUTHORITY variables, possibly all of the XDG_* ones too.

You're far more likely to be able to remove the variables you don't want / 
need from the application's own environment using unsetenv(3).

Thiago Macieira - thiago.macieira (AT) intel.com
  Software Architect - Intel DPG Cloud Engineering

More information about the Interest mailing list