Bug 540627 - X-KDE-SubstituteUID do not work on XFCE and LXDE
Summary: X-KDE-SubstituteUID do not work on XFCE and LXDE
Status: VERIFIED FIXED
Alias: None
Product: openSUSE 11.4
Classification: openSUSE
Component: YaST2 (show other bugs)
Version: Factory
Hardware: Other Other
: P3 - Medium : Major (vote)
Target Milestone: Factory
Assignee: Lukas Ocilka
QA Contact: Jiri Srain
URL:
Whiteboard: desktop-interop maint:released:11.2:3...
Keywords:
Depends on: 621848
Blocks:
  Show dependency treegraph
 
Reported: 2009-09-21 09:28 UTC by andrea florio
Modified: 2021-03-09 12:06 UTC (History)
11 users (show)

See Also:
Found By: ---
Services Priority:
Business Priority:
Blocker: ---
Marketing QA Status: ---
IT Deployment: ---


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description andrea florio 2009-09-21 09:28:39 UTC
I don't know if that is a YaST/ XFCE/ X.org or Usability issue, but because it's a YaST2 launcher problem i added YaST2 as componet, feel free to edit if i am wrong.

All YaST .destop files in /usr/share/applications/YaST2 use the "X-KDE-SubstituteUID" to make them running as root.

X-KDE-SubstituteUID is a KDE only "workaround" for that only KDE is supposed to be able to understand.

Really, also GNOME as very famous DE understand that.

All the others DE like XFCE, LXDE, Icewm and so on do not understand that (and they are not supposed to do that) so they run all yast2 modules as NON root user.

all that Desktop files should edit their exec line and maybe remove X-KDE-SubstituteUID exactly as has been done with /usr/share/applications/YaST.desktop into yast2-control-center package.

/usr/share/applications/YaST.desktop content:

[Desktop Entry]
X-SuSE-translate=true
Type=Application
Categories=Settings;System;SystemSetup;X-SuSE-Core-System;X-SuSE-ControlCenter-System;
Name=YaST
Icon=yast
GenericName=Administrator Settings
Exec=/usr/bin/xdg-su -c /sbin/yast2
#OnlyShowIn=KDE;GNOME;
#X-KDE-SubstituteUID=true
X-KDE-RootOnly=true
X-KDE-System-Settings-Parent-Category=system
X-KDE-ServiceTypes=KCModule
Encoding=UTF-8


as you can see use /usr/bin/xdg-su -c in Exec line, made the .desktop file DE independent
Comment 1 Ladislav Slezák 2009-11-03 12:22:08 UTC
Bubli? You probably know more details about "X-KDE-SubstituteUID" option...
Comment 2 Pavol Rusnak 2009-12-17 16:38:22 UTC
Either we edit _ALL_ desktop files and replace X-KDE-SubstitudeUID with Andrea's suggestion (xdg-su -c cmd) or we hack the support into Xfce and LXDE. (We would still need to hack ALL new upcoming desktop environments ...)
Comment 3 Christian Boltz 2009-12-28 19:43:23 UTC
(In reply to comment #2)
> Either we edit _ALL_ desktop files and replace X-KDE-SubstitudeUID with
> Andrea's suggestion (xdg-su -c cmd) 

That's the way to go IMHO. 

Finding all desktop files that contain X-KDE-SubstitudeUID should be easy with a rpmlint (or similar) check.

> or we hack the support into Xfce and LXDE.
> (We would still need to hack ALL new upcoming desktop environments ...)

That will cause more work on the long-term ;-) and additionally isn't a good[tm] solution. If you really want this way, ask upstream (freedesktop.org) to introduce a "SubstitudeUID" parameter that is valid for all desktops instead of making all desktop environments honoring KDE-specific settings.
Comment 4 Katarina Machalkova 2010-01-07 15:01:59 UTC
(In reply to comment #0)
> Really, also GNOME as very famous DE understand that.

Not quite true, SUSE's fork of GNOME does, but upstream GNOME does not (that's what I was told some time ago, maybe it's not so anymore ... )

(In reply to comment #2)
> Either we edit _ALL_ desktop files and replace X-KDE-SubstitudeUID with
> Andrea's suggestion (xdg-su -c cmd) 

Fair enough, let's do it.

The only thing that bothers me is that YaST should somehow require/recommend xdg-utils in order to make sure 'xdg-su' is really installed and can be used. The question is 
i) which component of YaST ( yast2 - its base package, as every single YaST module depends on it? ) will be the one with requirement
ii) wouldn't strict requirement of xdg-utils pull in some additional (desktop-oriented) stuff we certainly want to avoid on minimal systems where YaST must also work?
Comment 5 andrea florio 2010-01-07 15:30:53 UTC
1st question:

who's supposed to submitreq for ANY desktop file? any fast way to do it?

2nd

actually the following packages looks to REQUIRE xdg-utils:

desktop-data-openSUSE
dia
opensuse-codec-installer
wireshark
xsane
gtkpod

and looks to be already a MUST for patterns:

package-lists-openSUSE-X11-cd
package-lists-openSUSE-images


and anyway, icewm requires xdg-menu and i see no troubles if it can recommends xdg-utils

in other words, even minimum X11 installation should already have xdg-utils installed because of patterns.

any way the core component is just "yast2" so probably it should be added as recommends to yast2 package or to patterns..
Comment 6 Pavol Rusnak 2010-01-07 15:36:29 UTC
(In reply to comment #4)

> i) which component of YaST ( yast2 - its base package, as every single YaST
> module depends on it? ) will be the one with requirement

Unless we have another yast package that is being installed for each module, yast2 seems to be the only choice.

> ii) wouldn't strict requirement of xdg-utils pull in some additional
> (desktop-oriented) stuff we certainly want to avoid on minimal systems where
> YaST must also work?

$ rpm -q --requires xdg-utils
rpmlib(PayloadFilesHavePrefix) <= 4.0-1
rpmlib(CompressedFileNames) <= 3.0.4-1
/bin/bash
/bin/sh
rpmlib(PayloadIsLzma) <= 4.4.6-1

Seems that xdg-utils does not bring any unnecessary requires to system (at the moment). We'd need to track that if we added REQUIRES to yast2 core package.
Comment 7 Pavol Rusnak 2010-01-07 15:40:15 UTC
(In reply to comment #5)
> who's supposed to submitreq for ANY desktop file? any fast way to do it?

I wouldn't create SRs right now. There would be hundreds of them. We could think of a better approach and probably also create RPMLINT check which will throw an error if "X-KDE-SubstituteUID" and suggest using "xdg-su -c" in Exec line instead.

Adding Coolo and Dirk for further discussion.

> 2nd
> in other words, even minimum X11 installation should already have xdg-utils
> installed because of patterns.

Good.
Comment 8 Katarina Machalkova 2010-01-14 16:36:41 UTC
I've made a mass update of relevant .desktops for all YaST modules in our SVN repo (there are still some modules out there that are not living in this repo and are maintained outside YaST team, but afaik none of them is part of openSUSE)

After discussion with jsrain (he's maintaining yast2.rpm - the base pack every other YaST pack requires), we decided to go for adding a weak requirement to yast2, so it now Recommends: xdg-utils. On X11-enabled systems xdg-utils are in anyway. On X11-less systems we don't need them, as text-mode YaST control centre doesn't read Exec= key at all.

> > who's supposed to submitreq for ANY desktop file? any fast way to do it?
> 
> I wouldn't create SRs right now. There would be hundreds of them. 

Right, it's like ~80 YaST packages to submit. Some of them (storage, tv, ...)  are already submitted with the above mentioned change. The rest will get submitted over the time, due to other pending changes. Those that won't, might get a reminder in, say, 2 months from now ...
Comment 9 andrea florio 2010-01-14 16:58:34 UTC
wonderful
Comment 10 Pavol Rusnak 2010-01-14 17:01:15 UTC
(In reply to comment #8)
> > I wouldn't create SRs right now. There would be hundreds of them. 
> 
> Right, it's like ~80 YaST packages to submit.

Well, not only YaST uses desktop files. That's why I wrote "hundreds" ... But thanks for your effort in YaST territory.
Comment 11 andrea florio 2010-01-14 17:11:36 UTC
what about to add the rpmlint check as pavol suggested? i don't think to be difficult.... i will try to create my own rpmlint, no promises :)
Comment 12 Katarina Machalkova 2010-01-14 17:26:05 UTC
Who's the next candidate for .desktop file modification, now that YaST is done ?
Comment 13 andrea florio 2010-01-14 17:38:34 UTC
anubis@linux-y9ev:/usr/share/applications> grep -rwl "X-KDE-SubstituteUID" .
./MonoOSC.desktop                                                           
./AcetoneISO.desktop                                                        
./gnome-system-log.desktop                                                  
./gparted.desktop                                                           
./sax2.desktop                                                              

./YaST2/*.desktop  --> already done

./wireshark.desktop


that has been done on my gnome 11.2 installation... of course lots of packages are not installed on my system and actually only wireshark, sax2 and gnome-system-log looks be OSS packages
Comment 14 Pavol Rusnak 2010-01-14 17:52:03 UTC
I'll take it. Wireshark is mine package and I'll take care of the rest too.
Comment 15 Johannes Meixner 2010-01-15 14:34:12 UTC
FYI regarding comment #8:
"adding a weak requirement to yast2, so it now Recommends: xdg-utils.
 On X11-enabled systems xdg-utils are in anyway.
 On X11-less systems we don't need them"

In the end "Recommends: xdg-utils" lets our package mamagement system
install xdg-utils and anything which it requires in any case, see
https://bugzilla.novell.com/show_bug.cgi?id=546893#c4
-----------------------------------------------------------------
Recommends has in the end the same result as Requires
(if the packages are available to be installed) because
our installer installs recommended packages silently
-----------------------------------------------------------------

Fortunately (as far as I see) xdg-utils requires almost nothing.
In particular (as far as I see) xdg-utils does not require
or recommend any X11 stuff.
Comment 16 andrea florio 2010-01-15 15:53:56 UTC
(In reply to comment #15)
> FYI regarding comment #8:
> "adding a weak requirement to yast2, so it now Recommends: xdg-utils.
>  On X11-enabled systems xdg-utils are in anyway.
>  On X11-less systems we don't need them"
> 
> In the end "Recommends: xdg-utils" lets our package mamagement system
> install xdg-utils and anything which it requires in any case, see
> https://bugzilla.novell.com/show_bug.cgi?id=546893#c4
> -----------------------------------------------------------------
> Recommends has in the end the same result as Requires
> (if the packages are available to be installed) because
> our installer installs recommended packages silently
> -----------------------------------------------------------------
> 
> Fortunately (as far as I see) xdg-utils requires almost nothing.
> In particular (as far as I see) xdg-utils does not require
> or recommend any X11 stuff.


exactly, it will never recommend/requires anything since it's just a set of wrapper scripts.

if do not want to recommend it, how do you suggest to proceed? simply work on patterns?
Comment 17 Katarina Machalkova 2010-01-15 16:46:56 UTC
> if do not want to recommend it, how do you suggest to proceed? simply work on
> patterns?

Nah, what Johannes is probably trying to imply here is that with current default setup of libzypp and solver, there is no difference between Recommends and Requires. Package gets pulled in as a dependent one no matter which one of these two is used, so we could have done Requires:xdg-utils just as well.

This behaviour can be switched off in zypp.conf and then only Requires will be installed along with selected package/pattern. But I doubt many users know about and use this option.
Comment 18 andrea florio 2010-01-15 17:02:53 UTC
i think than, that's better to leave it as Recommends, because IMHO you can still avoid to install xdg-utils with  the "--no-recommends" zypper option, that is much easier to find than edit zypp.conf
Comment 19 Vincent Untz 2010-01-19 00:40:06 UTC
So, hrm, does that mean I can remove the patches we have in GNOME to support X-KDE-SubstituteUID?
Comment 20 Pavol Rusnak 2010-01-19 08:41:25 UTC
(In reply to comment #19)
> So, hrm, does that mean I can remove the patches we have in GNOME to support
> X-KDE-SubstituteUID?

Let's keep them for a while. At least until there is a rpmlint check ready and active :-)
Comment 21 Pavol Rusnak 2010-02-25 12:41:54 UTC
Fixed wireshark, sax2 and gparted package. Reassigning to GNOME so they can fix their desktop files, after that we should clean KDE.
Comment 22 andrea florio 2010-02-25 14:22:00 UTC
perfect... any news from rpmlint check? it will help to fix all packages, even outside Factory
Comment 23 Pavol Rusnak 2010-02-25 14:24:51 UTC
No news, someone has to write it :-/
Comment 24 Vincent Untz 2010-03-28 16:54:12 UTC
(In reply to comment #21)
> Fixed wireshark, sax2 and gparted package. Reassigning to GNOME so they can fix
> their desktop files, after that we should clean KDE.

I fixed the only mention of a X-KDE-SubstitudeUID key in GNOME .desktop files I'm aware of.

So moving to kde team.
Comment 25 andrea florio 2010-05-17 14:59:51 UTC
what's the current status of that ?
Comment 26 Swamp Workflow Management 2010-08-11 10:29:19 UTC
Update released for: yast2-add-on-creator
Products:
openSUSE 11.2 (i586)
openSUSE 11.3 (i586)
Comment 27 andrea florio 2010-08-11 22:25:55 UTC
i guess it wasn't supposed to be here right?

(In reply to comment #26)
> Update released for: yast2-add-on-creator
> Products:
> openSUSE 11.2 (i586)
> openSUSE 11.3 (i586)
Comment 28 Vincent Untz 2010-09-18 08:39:00 UTC
I don't have any mention of X-KDE-SubstitudeUID here anymore on 11.4. Can we go ahead and remove the patches in gnome-desktop and glib?
Comment 29 andrea florio 2010-09-18 09:02:00 UTC
what about bnc621848 ??

they said the request for maintenance was sent, but i don't see any progress... 11.3 is still broken

the following .desktop files for yast are still broken:

add-on 
inetd
joystick
online_update
sshd
vendor
backup
inst_release_notes
ldap_browser
restore
sudo                
checkmedia
inst_suse_register
mouse
sound
sysconfig           
hwinfo
irda
nis
squid
system_settings

and only based on the ones i have installed... can you confirm it has been fixed on factory?
Comment 30 Vincent Untz 2010-09-18 09:20:23 UTC
(In reply to comment #29)
> what about bnc621848 ??
> 
> they said the request for maintenance was sent, but i don't see any progress...
> 11.3 is still broken

As I said in my comment, I only looked at 11.4 (ie, Factory).
Comment 31 Katarina Machalkova 2010-09-30 11:51:57 UTC
> the following .desktop files for yast are still broken:
> 
> add-on 

...

> system_settings
> 
> and only based on the ones i have installed... can you confirm it has been
> fixed on factory?

Nope, it has been fixed in YaST SVN only. Some modules are fixed in Factory, because mass update of .desktop files (removing SubstituteUID) got in along with other bugfixes. 
The above listed modules are still broken in Factory because nobody made submitreqs when there were no other bugfixes pending. And nobody (almost) hacks on YaST anymore
Comment 33 Hubert Mantel 2010-12-07 13:09:53 UTC
This problem is not YaST specific and affects many packages. So it should be supervised on the project management level.
Comment 34 Stephan Kulow 2010-12-07 13:15:40 UTC
if you submitted all fixed yast modules from svn, feel free to close it.
Comment 35 Stefan Schubert 2011-01-11 11:10:37 UTC
OK, then lets start with the first module. Lukas when you have submitted
your packages to factory please assign the bug to the next package maintainer:

add-on 
inetd
joystick
online_update
sshd
vendor
backup
inst_release_notes
ldap_browser
restore
sudo                
checkmedia
inst_suse_register
mouse
sound
sysconfig           
hwinfo
irda
nis
squid
system_settings
Comment 36 Vincent Untz 2011-03-21 08:44:05 UTC
Any news on this? The patch we have in glib to try to support this in the meantime might be causing issues (see bug 681078).
Comment 37 Bernhard Wiedemann 2011-06-15 21:17:42 UTC
This is an autogenerated message for OBS integration:
This bug (540627) was mentioned in
https://build.opensuse.org/request/show/73653 Factory / yast2-sshd
Comment 38 Bernhard Wiedemann 2011-06-27 15:00:24 UTC
This is an autogenerated message for OBS integration:
This bug (540627) was mentioned in
https://build.opensuse.org/request/show/74667 Factory / yast2-squid
Comment 39 Bernhard Wiedemann 2011-06-28 11:00:38 UTC
This is an autogenerated message for OBS integration:
This bug (540627) was mentioned in
https://build.opensuse.org/request/show/74761 Factory / yast2-add-on
Comment 40 Bernhard Wiedemann 2011-07-08 14:00:38 UTC
This is an autogenerated message for OBS integration:
This bug (540627) was mentioned in
https://build.opensuse.org/request/show/75857 Factory / yast2-squid
Comment 41 Lukas Ocilka 2011-07-22 15:10:46 UTC
All YaST modules I've found in SVN have been fixed

  * Removed X-KDE-SubstituteUID from desktp files
  * Replaced with /usr/bin/xdg-su -c '/sbin/yast2 ${yast_module}'
    if appropriate

I'll continue with submitting all the package as time permits next week...
Comment 42 Bernhard Wiedemann 2011-07-22 16:00:32 UTC
This is an autogenerated message for OBS integration:
This bug (540627) was mentioned in
https://build.opensuse.org/request/show/76788 Factory / yast2
Comment 43 Bernhard Wiedemann 2011-07-22 17:00:44 UTC
This is an autogenerated message for OBS integration:
This bug (540627) was mentioned in
https://build.opensuse.org/request/show/76800 Factory / yast2-network
Comment 44 Bernhard Wiedemann 2011-07-25 12:00:32 UTC
This is an autogenerated message for OBS integration:
This bug (540627) was mentioned in
https://build.opensuse.org/request/show/76946 Factory / yast2-packager
Comment 45 Bernhard Wiedemann 2011-07-25 13:00:23 UTC
This is an autogenerated message for OBS integration:
This bug (540627) was mentioned in
https://build.opensuse.org/request/show/76953 Factory / yast2-metapackage-handler
https://build.opensuse.org/request/show/76957 Factory / yast2-installation
Comment 46 Bernhard Wiedemann 2011-07-25 14:00:23 UTC
This is an autogenerated message for OBS integration:
This bug (540627) was mentioned in
https://build.opensuse.org/request/show/76958 Factory / yast2-firstboot
Comment 47 Bernhard Wiedemann 2011-07-26 09:00:45 UTC
This is an autogenerated message for OBS integration:
This bug (540627) was mentioned in
https://build.opensuse.org/request/show/77047 Factory / yast2-ldap-client
Comment 48 Bernhard Wiedemann 2011-07-26 12:00:20 UTC
This is an autogenerated message for OBS integration:
This bug (540627) was mentioned in
https://build.opensuse.org/request/show/77063 Factory / yast2-devtools
Comment 49 Bernhard Wiedemann 2011-07-26 13:00:29 UTC
This is an autogenerated message for OBS integration:
This bug (540627) was mentioned in
https://build.opensuse.org/request/show/77068 Factory / yast2-fcoe-client
https://build.opensuse.org/request/show/77072 Factory / yast2-snapper
Comment 50 Lukas Ocilka 2011-07-26 13:08:14 UTC
All (known) YaST modules have been fixed. Most of them submitted
to openSUSE:Factory (if appropriate).
Comment 51 Vincent Untz 2011-07-26 13:32:42 UTC
I'm now removing the patches in glib2 and gnome-desktop2 that change the code to understand X-KDE-SubstituteUID.
Comment 52 Bernhard Wiedemann 2011-07-26 14:00:40 UTC
This is an autogenerated message for OBS integration:
This bug (540627) was mentioned in
https://build.opensuse.org/request/show/77079 Factory / yast2-apparmor
Comment 53 Bernhard Wiedemann 2011-07-27 14:00:30 UTC
This is an autogenerated message for OBS integration:
This bug (540627) was mentioned in
https://build.opensuse.org/request/show/77221 Factory / yast2-sysconfig
Comment 54 Bernhard Wiedemann 2011-08-31 15:00:12 UTC
This is an autogenerated message for OBS integration:
This bug (540627) was mentioned in
https://build.opensuse.org/request/show/80417 Factory / autoyast2
Comment 55 Bernhard Wiedemann 2011-09-16 13:00:09 UTC
This is an autogenerated message for OBS integration:
This bug (540627) was mentioned in
https://build.opensuse.org/request/show/82417 Factory / yast2-restore
https://build.opensuse.org/request/show/82418 Factory / yast2-irda
Comment 56 Bernhard Wiedemann 2011-10-02 11:00:10 UTC
This is an autogenerated message for OBS integration:
This bug (540627) was mentioned in
https://build.opensuse.org/request/show/85921 Factory / yast2-slp
https://build.opensuse.org/request/show/85926 Factory / yast2-mouse
Comment 57 Bernhard Wiedemann 2011-10-02 12:00:10 UTC
This is an autogenerated message for OBS integration:
This bug (540627) was mentioned in
https://build.opensuse.org/request/show/85932 Factory / yast2-phone-services
Comment 58 Bernhard Wiedemann 2011-10-04 11:00:08 UTC
This is an autogenerated message for OBS integration:
This bug (540627) was mentioned in
https://build.opensuse.org/request/show/86514 Factory / yast2-slp
Comment 59 Bernhard Wiedemann 2016-04-15 09:54:26 UTC
This is an autogenerated message for OBS integration:
This bug (540627) was mentioned in
https://build.opensuse.org/request/show/37769 Factory / yast2-packager
https://build.opensuse.org/request/show/40018 Factory / yast2-http-server
https://build.opensuse.org/request/show/42198 Factory / yast2-slp-server
https://build.opensuse.org/request/show/42262 Factory / yast2-instserver
https://build.opensuse.org/request/show/42690 Factory / yast2-dirinstall
https://build.opensuse.org/request/show/49782 Factory / yast2-online-update
https://build.opensuse.org/request/show/49936 Factory / yast2-tune
https://build.opensuse.org/request/show/50376 Factory / yast2-live-installer
https://build.opensuse.org/request/show/52593 Factory / yast2-sound
https://build.opensuse.org/request/show/65008 Factory / yast2-nis-client
https://build.opensuse.org/request/show/77668 Factory / yast2-sudo
https://build.opensuse.org/request/show/78015 Factory / yast2-power-management
https://build.opensuse.org/request/show/78261 Factory / yast2-nis-server
Comment 60 Bernhard Wiedemann 2017-09-01 20:00:40 UTC
This is an autogenerated message for OBS integration:
This bug (540627) was mentioned in
https://build.opensuse.org/request/show/520245 Factory / gparted
Comment 61 Swamp Workflow Management 2018-04-12 10:02:13 UTC
This is an autogenerated message for OBS integration:
This bug (540627) was mentioned in
https://build.opensuse.org/request/show/595936 Factory / yast2-iscsi-client