[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Re: KDE run Dolphin as root?



Default User <hunguponcontent@gmail.com> writes:

> On Sat, Jun 6, 2020, 21:19 Kushal Kumaran <kushal@locationd.net> wrote:
>
>> Default User <hunguponcontent@gmail.com> writes:
>>
>> > Hi, all.
>> >
>> > As an experiment, I just installed Debian 10.4 Stable on a spare drive,
>> and
>> > installed kde on it.
>> >
>> > I have not tried kde in many years, so am not really familiar with it.
>> > Perhaps I am overlooking something obvious, but I can not seem to run
>> > Dolphin or Konqueror as root.
>> >
>> > Searching online, I was astounded to see many references to this problem,
>> > saying that this is not a bug, but a feature - that kde developers are
>> > deliberately working to prevent users from using some programs, including
>> > Dolphin as root, as a "security measure".
>> >
>> > So, can the current version of Dolphin in Debian Stable be run as root
>> > (without re-compiling, etc)?
>> >
>>
>> Dolphin is just checking the SUDO_USER environment variable.  Just unset
>> the variable before starting dolphin.  Ref:
>>
>> https://codesearch.debian.net/search?q=Executing+Dolphin+with+sudo+is+not+possible+due+to+unfixable+security+vulnerabilities&literal=1
>>
>> I have no idea what the unfixable security vulnerabilities are.
>>
>> > And, if not, how (and why) would anyone use kde at all?
>>
>> You might be overestimating the number of people who need to do file
>> management as root with a graphical tool.  I, for one, use plasma as my
>> primary desktop environment, but almost all file management activity is
>> through emacs (with tramp for root stuff), or just a shell.  Until I saw
>> your post, I had no idea dolphin would refuse to run as root.
>>
>> --
>> regards,
>> kushal
>>
>
>
>
>
> First, to Keith:
>
> Yes, I vaguely remember that thread.  I did briefly look through the list
> archive but could not find it.
>
> Perhaps there is a search function for the list archive, but I am unaware
> of it.
>
>
> Second, to Kushal:
>
> I did look at the code you referenced. Interesting. But I am not a
> programmer.
>
> I did try to under the SUDO_USER environment variable as you suggested.
> Maybe I didn't do it correctly, but it did not resolve the problem. Dolphin
> refuses to run with elevated privileges.
>

Running

  sudo sh -c 'unset SUDO_USER; KDE_FULL_SESSION=true dolphin'

from a shell gets a dolphin window.

There is some advice at
https://forum.kde.org/viewtopic.php?f=223&t=161021#p425888 that can
arrange things so that you get an action on the right-click context
menu.

> Anyway, for now, I can use Midnight Commander, either as sudo or as root,
> to do file management of root folders and files. But it is somewhat
> "clunky" to do so.
>
> And just to note: I do a lot of management of files and directories
> requiring root privileges.
>
> So I guess I just got spoiled, using the nemo file manager in Cinnamon.
> Just right click the Cinnamon desktop, select "Open as root", then use nemo
> with temporarily elevated privileges.  Then close nemo, and I am back to
> the desktop as a regular user again. Easy.

Sounds like you have your needs properly met with cinnamon and nemo, and
they seem to be available in debian.  Is there a particular reason you
need to solve this problem with dolphin?  I assume you could have just
installed nemo and used it even while using the plasma shell as the
desktop.

-- 
regards,
kushal


Reply to: