Bug 54941

Summary: Improve MATE Desktop integration with xdg-su
Product: Portland Reporter: Nelson Marques <nmo.marques>
Component: xdg-utilsAssignee: Portland Bugs <portland-bugs>
Status: RESOLVED FIXED QA Contact:
Severity: normal    
Priority: medium    
Version: unspecified   
Hardware: x86-64 (AMD64)   
OS: Linux (All)   
Whiteboard:
i915 platform: i915 features:
Attachments: improve MATE recognition

Description Nelson Marques 2012-09-14 19:29:15 UTC
Created attachment 67184 [details] [review]
improve MATE recognition

'xdg-su' plays a role in several components of openSUSE, being one of them YaST; the lack of support for MATE Desktop in xdg-su brings aditionals problems and neutralizes key features from YaST2 (as YasT2 itself).

I believe this tiny patch might help; I leave to your review, and I'm willing to refactore it if it's not done in the proper way.

thanks.
Comment 1 Rex Dieter 2012-09-16 17:37:29 UTC
Why do you think either XDG_DESKTOP or DESKTOP_SESSION fallbacks are required?

Does MATE_DESKTOP_SESSION_ID not get set properly in some circumstances?
Comment 2 Rex Dieter 2012-09-16 17:40:42 UTC
Nevermind about XDG_CURRENT_DESKTOP, recognizing MATE there does indeed make sense, but I'm still curious about justifications for querying DESKTOP_SESSION
Comment 3 Rex Dieter 2012-09-16 17:46:57 UTC
meh, I guess it doesn't hurt anything either :-/

committed,
http://cgit.freedesktop.org/xdg/xdg-utils/commit/?id=8f92ae1b0c1253727873394cacfb42ab5ef26e02
Comment 4 Nelson Marques 2012-09-16 19:07:14 UTC
(In reply to comment #3)
> meh, I guess it doesn't hurt anything either :-/
> 
> committed,
> http://cgit.freedesktop.org/xdg/xdg-utils/commit/?id=8f92ae1b0c1253727873394cacfb42ab5ef26e02

Rex,

Actually this part of the patch does all the magic:

diff --git a/scripts/xdg-su.in b/scripts/xdg-su.in
index 6bd229a..6c5a124 100644
--- a/scripts/xdg-su.in
+++ b/scripts/xdg-su.in
@@ -155,7 +155,7 @@ case "$DE" in
     su_kde
     ;;
-    gnome*|lxde)
+    gnome*|lxde|mate)
     su_gnome
     ;;






From my experience, if this isn't changed, then YaST will fail to find any valid handler and thus won't work (the password popup never comes);

nmarques@mantis:~> /sbin/YaST2
xdg-su: no graphical method available for invoking '/sbin/yast2 sw_single' as 'root'

By adding the patch above... then everything works; there's further impact; for example with keyring and NetworkManager accessing passwords.

With this change I don't find more erratic behavior.

Regarding your commit and my previous hack, I've tested it further in the last days and actilly only the part transcribed above works, so it's probably more cleaner.

Thanks for this.

Use of freedesktop.org services, including Bugzilla, is subject to our Code of Conduct. How we collect and use information is described in our Privacy Policy.