! Please note that this is a snapshot of our old Bugzilla server, which is read only since May 29, 2020. Please go to gitlab.xfce.org for our new server !
Adding 'run as root' to launchers and xfrun4
Status:
RESOLVED: WONTFIX
Priority:
Very Low
Severity:
enhancement
Product:
Xfce-utils

Comments

Description benxor 2004-06-03 07:27:28 CEST
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.
Comment 1 benxor 2004-06-03 07:27:30 CEST
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?
Comment 2 Jasper Huijsmans editbugs 2004-06-03 07:58:02 CEST
"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.
Comment 3 Benedikt Meurer 2004-06-03 10:28:36 CEST
I wrote a sudo based implementation for xfce4-session, we could put that into
libxfce4util and use it.
Comment 4 benxor 2004-06-03 12:24:46 CEST
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?
Comment 5 Jasper Huijsmans editbugs 2004-06-03 13:10:54 CEST
"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).
Comment 6 Benedikt Meurer 2004-06-03 18:33:38 CEST
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.
Comment 7 benxor 2004-06-04 08:44:11 CEST
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
Comment 8 Harold Aling 2007-02-14 22:37:11 CET
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...
Comment 9 Nick Schermer editbugs 2007-02-15 08:10:19 CET
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 ;).
Comment 10 Rodolfo 2008-05-12 23:29:52 CEST
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.
Comment 11 Thomas Dekker 2008-06-23 08:07:52 CEST
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.
Comment 12 Jérôme Guelfucci editbugs 2010-10-25 22:28:54 CEST
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".

Bug #217

Reported by:
benxor
Reported on: 2004-06-03
Last modified on: 2010-10-25

People

Assignee:
Brian J. Tarricone (not reading bugmail)
CC List:
1 user

Version

Attachments

Additional information