Author Topic: Does xdg-utils lack xdg-su ?  (Read 1917 times)

Offline melodie

  • Hero Member
  • *****
  • Posts: 5942
  • XMMP=Jabber, free instant messaging protocol !
    • PCLinuxOS Fr
Does xdg-utils lack xdg-su ?
« on: August 27, 2011, 05:40:08 AM »
Hi,

I have recently noticed that xdg-utils description contain a xdg-su in the list of files:

Quote
$ rpm -qil xdg-utils
Name        : xdg-utils                    Relocations: (not relocatable)
Version     : 1.0.3                             Vendor: (none)
Release     : 2pclos2011                    Build Date: lun. 22 août 2011 11:53:08 CEST
Install Date: lun. 22 août 2011 13:41:27 CEST      Build Host: thenudiebar
Group       : System/Base                   Source RPM: xdg-utils-1.0.3-2pclos2011.src.rpm
Size        : 215092                           License: GPL
Signature   : (none)
URL         : http://portland.freedesktop.org/wiki/
Summary     : Interfaces and Tools to allow all applications to easily integrate with the free desktop configuration
Description :

This version of xdg-utils contains the following commands:
xdg-desktop-menu:    command line tool for (un)installing desktop menu items
xdg-desktop-icon:   command line tool for (un)installing icons to the desktop
xdg-mime:           command line tool for querying information
         about file type handling and adding descriptions for new file types
xdg-icon-resource:   command line tool for (un)installing icon resources
xdg-open:           opens a file or URL in the user's preferred application
xdg-email:           command line tool for sending mail using the user's preferred
         e-mail composer
xdg-su:                   run a program as root after prompting for the root password
xdg-screensaver:   command line tool for controlling the screensaver

Testsuite for xdg-utils is available from http://portland.freedesktop.org/wiki/TestSuite
/usr/bin/xdg-desktop-icon
/usr/bin/xdg-desktop-menu
/usr/bin/xdg-email
/usr/bin/xdg-icon-resource
/usr/bin/xdg-mime
/usr/bin/xdg-open
/usr/bin/xdg-screensaver
/usr/bin/xdg-settings
/usr/bin/xdg-terminal
/usr/share/man/man1/xdg-desktop-icon.1.bz2
/usr/share/man/man1/xdg-desktop-menu.1.bz2
/usr/share/man/man1/xdg-email.1.bz2
/usr/share/man/man1/xdg-icon-resource.1.bz2
/usr/share/man/man1/xdg-mime.1.bz2
/usr/share/man/man1/xdg-open.1.bz2
/usr/share/man/man1/xdg-screensaver.1.bz2
/usr/share/man/man1/xdg-terminal.1.bz2
$


So I thought it might be interesting to give it a try, but nothing happened, tried xdg-<tab>, xdg-su didn't appear, looked in the whole system, didn't find it. I didn't search further, until I noticed in PCLinuxOS Lxde (that I remastered with the French locale), that PCManFM was default configured with "xdg-su -c '%u'" in the advanced preferences, and I wondered why, if xdg-su is not provided, so I asked Neal, who told me that it is the default configuration in PCManFM, and that he never changes the configurations when he provides the program along with his Lxde versions.

I thought I would come here to ask about this:

* should we have xdg-su in the systems, or if not shouldn't the information about it be removed from the description ?
* how come it is setup this way in PCManFM ? Is it a default configuration which has not been modified ?

Of course it is not a big trouble, but I thought I would come and point to it, in case it can be fixed.

Regards,
Mélodie

melodie at swissjabber dot ch - IRC #pclinuxos-fr sur freenode

Offline Neal ManBear

  • Administrator
  • Super Villain
  • *****
  • Posts: 15845
  • LXDE! Coffee, Bacon and Cheesecake!
Re: Does xdg-utils lack xdg-su ?
« Reply #1 on: August 27, 2011, 10:06:04 AM »
Quote from: melodie
.....so I asked Neal, who told me that it is the default configuration in PCManFM, and that he never changes the configurations when he provides the program along with his Lxde versions.
     

What I said was that I don't alter the PCManFM source code. I do set PCManFM to use "gksu %s" in all releases of PCLinuxOS-LXDE.     

Offline melodie

  • Hero Member
  • *****
  • Posts: 5942
  • XMMP=Jabber, free instant messaging protocol !
    • PCLinuxOS Fr
Re: Does xdg-utils lack xdg-su ?
« Reply #2 on: August 27, 2011, 12:10:31 PM »
Hi Neal,

I had understood the contrary. Well, I found xdg-su -c '%s' in the Lxde I remastered to French. I am sure it is not me who added it, because I would have never had the idea to place a "-c" option in it. I don't even know what it does. I suppose you may have forgotten to change it ? Or maybe forgotten to copy the changes to /etc/skel ...

Regards,
Mélodie

melodie at swissjabber dot ch - IRC #pclinuxos-fr sur freenode

Offline Neal ManBear

  • Administrator
  • Super Villain
  • *****
  • Posts: 15845
  • LXDE! Coffee, Bacon and Cheesecake!
Re: Does xdg-utils lack xdg-su ?
« Reply #3 on: August 27, 2011, 01:15:46 PM »
I copied the changes to /etc/skel. I'm not that forgetful.


This is from the xdg-su script in the xdgutils package:   
Code: [Select]
xdg-su [-u user] -c command   

The -c option is a normal part of the command.

As I said before, I do not know why the change to xdg-su -c '%s' was coded in. Perhaps PCMan thought it was the better option.   

Any road, xdg-su appears to have been patched out of xdgutils. This may be because it is broken, or it could be conflicting with console tools which is used to call su to root in many applications through pam authentication.     

Offline MBantz

  • PCLinuxOS Tester
  • Hero Member
  • *******
  • Posts: 1317
Re: Does xdg-utils lack xdg-su ?
« Reply #4 on: September 14, 2011, 04:58:55 AM »
it also could suggest a change from sudo to a PAM oriented security,

the latest zen has no sudo and gives me heaps of trouble understanding PAM (interesting security model btw.),

cheers,
MBantz

Online gseaman

  • PCLinuxOS Tester
  • Hero Member
  • *******
  • Posts: 3790
Re: Does xdg-utils lack xdg-su ?
« Reply #5 on: September 14, 2011, 09:58:46 AM »
xdg-su is probably supposed to be just a generic link to whatever *su is available on the current desktop. Isn't that what xdg is about, desktop agnosticism?

Galen

Offline melodie

  • Hero Member
  • *****
  • Posts: 5942
  • XMMP=Jabber, free instant messaging protocol !
    • PCLinuxOS Fr
Re: Does xdg-utils lack xdg-su ?
« Reply #6 on: September 14, 2011, 11:11:49 AM »
xdg-su is probably supposed to be just a generic link to whatever *su is available on the current desktop. Isn't that what xdg is about, desktop agnosticism?

Galen


Hi Galen,

It looks like it is not. When I write this command in PCManFM, then try to open the window as root I get this message:

Quote
Failed to execute child process "xdg-su" (No such file or directory)

in a windowed message.

melodie at swissjabber dot ch - IRC #pclinuxos-fr sur freenode