Bug 170947

Summary: Recommend the use of kdesudo, if installed
Product: adept Reporter: Jonathan Thomas <echidnaman>
Component: generalAssignee: Peter Rockai <me>
Status: RESOLVED FIXED    
Severity: wishlist CC: echidnaman
Priority: NOR    
Version: unspecified   
Target Milestone: ---   
Platform: unspecified   
OS: Linux   
Latest Commit: Version Fixed In:
Attachments: Patch for kdesudo detection/recommendation

Description Jonathan Thomas 2008-09-12 23:02:43 UTC
Version:           3.0 Beta 2 (Battleship) (using 4.1.1 (KDE 4.1.1), Kubuntu packages)
Compiler:          cc
OS:                Linux (i686) release 2.6.26-5-generic

Running GUI applications as sudo can be dangerous sometimes, as sudo has a tendency to change permissions of vital files which can make a system unusable unless you know how to fix it. (See https://bugs.launchpad.net/ubuntu/+source/adept/+bug/203331)

But currently, if Adept is launched without admin powers it recommends sudo. If you could, could you have Adept recommend kdesudo if Adept is launched without admin powers? All that would need to be done is a QFile::exists() for the kdesudo binary, then changing the string slightly, since I know Debian doesn't have an up-to-date kdesudo.
Comment 1 Jonathan Thomas 2008-10-13 03:22:31 UTC
I am working on this, by the way.
Comment 2 Jonathan Thomas 2008-10-13 04:19:15 UTC
Created attachment 27842 [details]
Patch for kdesudo detection/recommendation

Here's a patch. If kdesudo or gksu (Gnome su frontend) are detected as existing, txt will have sudo replaced with the frontend's name. The patch is pretty much self-explanatory, I think.