Hello I suppose "get_desktop_environment" in vcl/unx/generic/desktopdetect/desktopdetector.cxx may be a good start (see https://opengrok.libreoffice.org/xref/core/vcl/unx/generic/desktopdetect/desktopdetector.cxx?r=6361a939&mo=4425&fi=127#127) Julien