It would be great to have a 'run as root' or 'run as other user' option added to launchers on the panel, and to xfrun4.
Additional information: When I want to add a program to the panel like qtparted, or some root-run script (like the one I use to update XFCE4 from CVS =D ) I'm forced to write something like the following in the launcher: xterm -e "su -c 'program_name && exit' " which is a hell of a lot less convenient than being able to tick a little box saying 'run as' with a combobox next to it containing [root] and other users. GNOME and KDE already have this functionality - why not XFCE?
"GNOME and KDE already have this functionality - why not XFCE?" 1) That's a lousy argument 2) because it's hard and has all kinds of security implementations 3) because no-one has done the work Some of what you want, you may be able to achieve using sudo.
I wrote a sudo based implementation for xfce4-session, we could put that into libxfce4util and use it.
1) How so? Because I'm saying something is standard in the big desktops, it could also be added to... this desktop? 2) you could copy GNOME or KDE's code for it? use their implementation. is there a standard set out by freedesktop for it? bmeurer: a sudo-based xfce4-session? What would that do?
"1) How so? Because I'm saying something is standard in the big desktops, it could also be added to... this desktop?" GNOME/KDE have a million things we don't have. A feature is either useful or it's not. "2) you could copy GNOME or KDE's code for it? use their implementation. is there a standard set out by freedesktop for it?" Perhaps. It still requires someone to do the work and to look at security implications. Benedikt meant he made a sudo-based system for xfce4-session (to shutdown or reboot the computer). That's interesting, because it means there is definitely code that can be used. Another option is to use something like gksu (I think it's called that).
The gksu code is interesting, but it has two major problems: a) its not yet finished (the author is currently reworking the stuff to separate the backend/frontend code, once finished, one can simply use the libgksu). b) its not very portable. The author is a doesn't care well about "foreign" plattforms. From a quick look at the code, atleast the su part will run into problems, since it requires forkpty() which is only present in BSD-derived Unices. Maybe I'm just too paranoid, since every plattform currently officially supported by Xfce - that is Solaris, *BSD and Linux - has forkpty. Anyway, we could make libgksu an optional depend and provide "Run as..." if libgksu is present.
huysmans: This feature is useful. The work-around for it's lack is that I have to put some complex run-inside-xterm crap. A normal user wouldn't even know how to do that. I think it's an important feature, and that a lot of people would enjoy seeing it. But anyway sounds like there's a couple of promising codebases for it so I leave it as a suggestion =P
Benedikt, What's your vision on this subject now? "Run as..." does make sense to me (if your user is in the 'wheel' group)... And Gksu is also finished by now, as it is used in major distributions...
IMHO not very smart to add, I mean when you need to run application as root quite often your permissions are wrong and we should not encourage users to use the root account ;).
Created attachment 1630 patch to add "run with sudo" to xfrun Add "run with sudo" to xfrun dialog. If "run in terminal" is checked, use "sudo" in the command. If not, use "gksudo" to run the command. This patch modify to be save "run with sudo" in a flag in the historic.
Sudo is terminal terminology. In my opinion something like 'run with administrator privileges' should be used. On the other hand I agree with Nick, if you know how to compile XFCE from CVS, you should know the /bin/su -c way to do this. You can even directly use gksudo to run your root commands.
Agreed with Nick, we shouldn't encourage root usage from our UI. If you have gksudo installed, it's just a matter of typing a few additional characters (and autocompletion is coming so even less :D). Closing this as "won't fix".