Switch user in Konqueror (mockup)

Various KDE 1.-4. Improvements

Source i (link to git-repo or to original if based on someone elses unmodified work):

Add the source-code for this project on opencode.net

0
Become a Fan
5.0

Available as/for:
Description:
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 :-)

Ratings & Comments

9 Comments

Anthonis

manual pls how to instal this

Wiedi

just type fish://user@localhost/path/you/want 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.

Wiedi

ah sorry, i messed it up - wanted to post it to http://www.kde-apps.org/content/show.php?content=41801

logixoul

I have another idea. Simply ask the user for an applicable password every time they try to do anything non-permitted with a file. 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?

TheNacho

Yes, that would be nice. You could just drag'n'drop files somewhere, and if you don't have the appropriate rights, konqueror would ask you for your password. 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'.

logixoul

Perfect.

peppelorum

To make your wish somewhat real I "hacked" together a service menu http://www.kde-look.org/content/show.php?content=41801

gordin

"kdesu konqueror" will do what you want. 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

TheNacho

No, that's not the same thing. "kdesu konqueror" would open a new konqueror window with the start page. But imagine you've got a directory really deep in the filesystem, and you just want to copy a file from another equally deep nested directory there. You would at least have to copy the path and paste it in the new window. Plus, you would loose the current window configuration (split windows, custom views & toolbars, because settings are read from ~root) By the way, in Ubuntu there is already an option in the kontext menu to open with "kdesu kwrite".

Pling
0 Affiliates
Details
license
version
updated
added
downloads 24h 0
mediaviews 24h 0
pageviews 24h 0

More Various KDE 1.-4. Improvements from TheNacho:

True transparency for Konsole
TheNacho
last update date: 18 years ago

Score 5.0

Other Various KDE 1.-4. Improvements:

Slicker Debian Package for Woody
cirrusgr
last update date: 22 years ago

Score 5.0

Konqueror/kdesktop suggestion
PovMan
last update date: 22 years ago

Score 5.0

Biiig buttons
dbojan
last update date: 20 years ago

Score 5.0

Yet Another KControl
Frans
last update date: 21 years ago

Score 5.0

Next window and next/previos window
dbojan
last update date: 20 years ago

Score 5.0

Fantasie Toolbar
katoe
last update date: 20 years ago

Score 5.0