Such a variable to simulate any DE has been already invented. It is named XDG_CURRENT_DESKTOP. To get a glimpse how to use it, see test cases. xdg-utils first try to use DE specific tools and, in case of error, fallback to internal implementations for generic mode.
https://git.launchpad.net/ubuntu/+source/xdg-utils/tree/autotests/test- lib.sh?id=9df7480816442225cc59373d62a475247318b0d8#n55 ** Changed in: xdg-utils (Ubuntu) Status: Confirmed => Fix Released -- You received this bug notification because you are a member of Ubuntu Bugs, which is subscribed to Ubuntu. https://bugs.launchpad.net/bugs/220774 Title: xdg-open should allow user to force "desktop environment" detection To manage notifications about this bug go to: https://bugs.launchpad.net/ubuntu/+source/xdg-utils/+bug/220774/+subscriptions -- ubuntu-bugs mailing list ubuntu-bugs@lists.ubuntu.com https://lists.ubuntu.com/mailman/listinfo/ubuntu-bugs