Skip to content
  • 0 Votes
    8 Posts
    1k Views
    SGaistS
    Based on the pkexec documentation you can't do what you are trying. The environment is set to a minimal state that excludes the variables you are interested in. If you want their values in your application, you will have to pass them as command line parameters. However, based on the variable you are looking for, it seems you want to run a GUI as root, which is usually a bad idea.
  • XDG Desktop portal in Qt

    Unsolved General and Desktop xdg flatpak
    2
    0 Votes
    2 Posts
    1k Views
    SGaistS
    Hi, Not a direct answer but why not use QDesktopService::openUrl ? Or are you trying to make your app open that file type ?