[Gambas-bugtracker] Bug #2347: Desktop.Type gives KDE5 if kde is instaled but using gnome

bugtracker at gambaswiki.org bugtracker at gambaswiki.org
Tue Aug 24 11:55:43 CEST 2021


Comment #11 by Bruce STEERS:

I found a fix for this,  if I use 'sudo -E' then the environment variables are passed to the root app.

I'm thinking now probably easiest to put something on the wiki in the gb.desktop info about problems with using gb.desktop as root?

But i'm also thinking of maybe a useful parameter for gb.dekstop something like Desktop.SudoUser = True that would make the routines use the $SUDO_USER Env if it's found for the user folders. ($SUDO_USER is the name of the user who ran the app as root)

This will work great i think for Desktop.Path and Desktop.GetDirectory() functions as they already seek the XDG_CONFIG_DIRS and can easily be forced to search for the $SUDO_USER path for it's user-dirs.dirs.

Not sure how to get Desktop.Type and Desktop.Types working yet though.


More information about the Bugtracker mailing list