--- a/browser/base/content/nsContextMenu.js +++ a/browser/base/content/nsContextMenu.js @@ -210,13 +210,15 @@ nsContextMenu.prototype = { // Set as Desktop background depends on whether an image was clicked on, // and only works if we have a shell service. var haveSetDesktopBackground = false; #ifdef HAVE_SHELL_SERVICE // Only enable Set as Desktop Background if we can get the shell service. var shell = getShellService(); - if (shell) + var env = Components.classes["@mozilla.org/process/environment;1"] + .getService(Components.interfaces.nsIEnvironment); + if (shell && env.get('DESKTOP_SESSION') == "gnome") haveSetDesktopBackground = true; #endif this.showItem("context-setDesktopBackground", haveSetDesktopBackground && this.onLoadedImage); if (haveSetDesktopBackground && this.onLoadedImage) {