
Switch user in Konqueror (mockup)
Various KDE 1.-4. Improvements
Source (link to git-repo or to original if based on someone elses unmodified work): Add the source-code for this project on opencode.net
When browsing the filesystem with Konqueror, you sometimes find a file you need to edit or delete, but you can't, because it's owned by root (or another user). So, the usual workaround ist to press F4, and use su and the command line.
My proposal ist to add an extra button or menu entry to Konqueror, which allows you to "switch" to another user, or to root.
To the Implementation: As far as I know, it's technically not possible for a process to gain rights, but only to start as root (setuid root), and then to switch to a less privileged user. (That's what kdm, su etc. do) So, what we would have to do is to remeber the password the user gave us, and do all file operations through some kind of wrapper script, until the user switches back.
Note: There should be some kind of visual feedback that Konqueror is running with extended rights, so that the user doesn't mix up the windows and accidently do something harmfull. My idea is to color the title bar differently, but this would require larger changes to kwin. (I'm going to post this as an extra idea.) Alternatively, there could also be an indicator e.g. in the toolbar.
PS: Please excuse the german text in the picture :-)
Anthonis
14 years ago
Report
Wiedi
14 years ago
and you'll be prompted for the password.
For example fish://root@localhost/home/otheruser/ allows me to browse the homedir of "otheruser" if i have the root password.
I think using KIO here is better than starting a new konqueror process because your private settings (like customized appearance and themes) still work and it uses less memory.
Report
Wiedi
14 years ago
Report
logixoul
14 years ago
This is of course an inadequate solution for management of many files. But if you're keen to do that, why not just log in as root?
Report
TheNacho
14 years ago
Just an idea, this could be implemented very low-level in the kde file access functions. So if I would try to save a file in kwrite, for which a don't have write access, i wouldn't get an error message, but instead the choice to 'abort' or to do 'su root'.
Report
logixoul
14 years ago
Report
peppelorum
14 years ago
http://www.kde-look.org/content/show.php?content=41801
Report
gordin
14 years ago
Besides you can always add a open with entry "kdesu kate" for editing files owned by root or another user.
Just add a new entry to your k-menu, then you can say "open with->other.." and choose the entry
Report
TheNacho
14 years ago
By the way, in Ubuntu there is already an option in the kontext menu to open with "kdesu kwrite".
Report