appmenus: fix detection of desktop environment
In Fedora 23-based dom0, DESKTOP_SESSION environment contains full path to session file, instead of just basename. QubesOS/qubes-issues#1606
This commit is contained in:
parent
6cd45f88c5
commit
e90c8a97ff
@ -319,7 +319,7 @@ def QubesVm_label_setter(self, _):
|
||||
|
||||
# Apparently desktop environments heavily caches the icons,
|
||||
# see #751 for details
|
||||
if os.environ.get("DESKTOP_SESSION", "") == "kde-plasma":
|
||||
if "plasma" in os.environ.get("DESKTOP_SESSION", ""):
|
||||
try:
|
||||
os.unlink(os.path.expandvars(
|
||||
"$HOME/.kde/cache-$HOSTNAME/icon-cache.kcache"))
|
||||
@ -337,7 +337,7 @@ def QubesVm_label_setter(self, _):
|
||||
dbus_interface="org.freedesktop.Notifications")
|
||||
except:
|
||||
pass
|
||||
elif os.environ.get("DESKTOP_SESSION", "") == "xfce":
|
||||
elif "xfce" in os.environ.get("DESKTOP_SESSION", ""):
|
||||
self.appmenus_remove()
|
||||
self.appmenus_create()
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user