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

0
7.2
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 :-)

Anthonis

12 years ago

manual pls how to instal this

Report

Wiedi

12 years ago

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.

Report

Wiedi

12 years ago

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

Report

logixoul

12 years ago

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?

Report

C

TheNacho

12 years ago

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'.

Report

logixoul

12 years ago

Perfect.

Report

peppelorum

12 years ago

To make your wish somewhat real I "hacked" together a service menu

http://www.kde-look.org/content/show.php?content=41801

Report

gordin

12 years ago

"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

Report

C

TheNacho

12 years ago

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".

Report

12345678910
product-maker Count:54 Rating: 7.24
File (click to download) Version Description Downloads Date Filesize DL OCS-Install
Pling
*Needs ocs-url or ocs-store to install things
Details
license
version
updated Jun 30 2006
added Jun 30 2006
downloads today
0
page views today 3
+