opening dolphin as root

New to Debian (Or Linux in general)? Ask your questions here!

opening dolphin as root

Postby dguerrini » 2019-08-24 02:17

Hi, I haven't encountered this issue anywhere, so here it is:

I'm using Debian 10 with KDE, and it seems that when I open dolphin in the application launcher I do it as root. It seems so because I cannot open files I just downloaded through firefox or thunderbird (it says the files do not exist, even though they are there) and because I could open a txt file in the root partition (/), modify it and save it with no request for my root password.

If I try to open the downloaded files with konsole, as user, it does it normally.

Does anyone know how this came to be, and how I can change this to opening dolphin as user as it should be?

thanks in advance.
dguerrini
 
Posts: 4
Joined: 2019-08-24 01:31

Re: opening dolphin as root

Postby sunrat » 2019-08-24 03:04

Dolphin doesn't normally run as root and it requires some configuration with pkexec to get it to run as such. Only you could know how this came to be on your system. Even running it as root it should still be able to open files in your home folder.
Check the command and permissions in the launcher for Dolphin. Even if it was to open as root, you should still be asked for a password.
To confirm it is running as root, open KSysGuard and look for Dolphin in the processes tab, it will show user.

I'm not surprised you can't find anything related to this with a web search. It's very strange and first I've heard of anything like it. You're not somehow logged in as root to the desktop GUI are you? That's also rather difficult to achieve.
“ computer users can be divided into 2 categories:
Those who have lost data
...and those who have not lost data YET ”
Remember to BACKUP!
User avatar
sunrat
 
Posts: 2796
Joined: 2006-08-29 09:12
Location: Melbourne, Australia

Re: opening dolphin as root

Postby peer » 2019-08-24 05:29

I also usen debina 10 ith KDE.
When I right-click on the starter for Dolphin, choose 'Edit application' and then click on 'permissions' I see that the user is root and the group is root.

In dolphin I can open a textfile with kwrite and edit it. When I want to save it I am asked for a password.
But I cannot copy a file in my root directories.
peer
 
Posts: 62
Joined: 2017-03-26 10:14

Re: opening dolphin as root

Postby dguerrini » 2019-08-24 10:45

sunrat wrote:Dolphin doesn't normally run as root and it requires some configuration with pkexec to get it to run as such. Only you could know how this came to be on your system. Even running it as root it should still be able to open files in your home folder.
Check the command and permissions in the launcher for Dolphin. Even if it was to open as root, you should still be asked for a password.
To confirm it is running as root, open KSysGuard and look for Dolphin in the processes tab, it will show user.

I'm not surprised you can't find anything related to this with a web search. It's very strange and first I've heard of anything like it. You're not somehow logged in as root to the desktop GUI are you? That's also rather difficult to achieve.


It is very strange. I now saw in Ksysguard that dolphin is running as user.
When I go to "edit application" in the launcher, it says owner and group are root.
How would I know if I'm logged to desktop GUI as root? Thought of that possibility too...
And no, it never asked for password, only to start the desktop GUI when booting.

:?: :?: :?:
dguerrini
 
Posts: 4
Joined: 2019-08-24 01:31

Re: opening dolphin as root

Postby arzgi » 2019-08-24 12:24

To see if you are root or user, open konsole, and give command

Code: Select all
whoami


Check also your /home permissions, still in konsole

Code: Select all
ls -la /home
arzgi
 
Posts: 461
Joined: 2008-02-21 17:03
Location: Finland

Re: opening dolphin as root

Postby dguerrini » 2019-08-24 13:22

arzgi wrote:To see if you are root or user, open konsole, and give command

Code: Select all
whoami


Check also your /home permissions, still in konsole

Code: Select all
ls -la /home



whoami gave user;
ls -la /home gave user for the specific user folder, and root for the rest (lost.found, etc.).

sounds normal, right?
:?: :|
dguerrini
 
Posts: 4
Joined: 2019-08-24 01:31

Re: opening dolphin as root

Postby Segfault » 2019-08-24 15:07

How about following all written and unwritten rules and the good practice in general and not running any GUI applications as root? When you learn how to drive a car it comes in two parts, driving skills and rules on highways. This is the same for operating a computer. The root account is housekeeping account, user account is for using the computer. You use root account to give your user rights it needs to do the job and then you work as user. I don't remember when I used a GUI app as root last time, probably I did when I was a n00b, but it was 22 years ago. So my recommendation is: instead of trying to figure out how to do it the wrong way learn how to do it the right way. It will be rewarding in long run.
Segfault
 
Posts: 914
Joined: 2005-09-24 12:24

Re: opening dolphin as root

Postby phenest » 2019-08-24 18:33

What's the result of:
Code: Select all
id -u
ASRock H77 Pro4-M i7 3770K - 32GB RAM - Pioneer BDR-209D
User avatar
phenest
 
Posts: 1703
Joined: 2010-03-09 09:38
Location: The Matrix

Re: opening dolphin as root

Postby stevepusser » 2019-08-24 23:27

The same question was asked here not that long ago. One solution was to install and use the "kde-servicemenu-rootactions" package for MX 19. It will perform a number of actions as root from a normal user's Dolphin, include opening a root Dolphin.

I'll let you practice searching the forum to find the thread. Just search for "rootactions".
The MX Linux repositories: Backports galore! If we don't have something, just ask and we'll try--we like challenges. New packages: Calibre 3.48.0, QMPlay2 19.09.03, wine-staging 4.16, Telegram-desktop 1.8.8, Pale Moon 28.7.1, Waterfox 56.2.14
User avatar
stevepusser
 
Posts: 11098
Joined: 2009-10-06 05:53

Re: opening dolphin as root

Postby sunrat » 2019-08-24 23:48

It's not the same question if I understand correctly. In fact I'm not sure I understand at all.
OP's reported issues -
- text files in / can be opened and saved without password
- several downloaded files can not be opened
Now Dolphin doesn't open text files, that requires a text editor. Dolphin also doesn't open downloaded files. It will display them and clicking on them should open in their appropriate application eg. image viewer for images, media player for audio or video files.

The OP original question was
how I can change this to opening dolphin as user as it should be?
We have established that Dolphin is actually running as user.
We can't go any further without more information or a clearer explanation of the perceived issue.
Last edited by sunrat on 2019-08-25 07:25, edited 1 time in total.
“ computer users can be divided into 2 categories:
Those who have lost data
...and those who have not lost data YET ”
Remember to BACKUP!
User avatar
sunrat
 
Posts: 2796
Joined: 2006-08-29 09:12
Location: Melbourne, Australia

Re: opening dolphin as root

Postby NFT5 » 2019-08-25 04:11

I suspect that the problem is that the permissions for the launcher show Owner as root and that OP therefore thinks that he's running Dolphin as root. This isn't the case, although I can understand how OP thinks it is. Dolphin opens with only user permissions and requires additional permissions to perform tasks on files/folders that are not in the user's home folder.

KDE is different in that it will allow you to open and change a file but then ask for authorisation by password when that file is saved. Every other desktop I've used won't let you open a file that you don't have permission to open, at all. So, for example, I can open, in Kate, say /etc/fstab by double clicking it in Dolphin, then make changes and it will ask me for a password if I attempt to save those changes. I actually find this quite convenient - no need to drop to the CLI or to open a file manager as root which I'd have to do if I was using, for example, MATE.

Note that, in KDE, root actions are not actually performed as root, but rather with sudo permissions, so can be limited. Again this is, in my opinion, quite a good feature, allowing a user with sudo privileges to perform everyday administrative tasks, but, subject to privileges given, not access things that they shouldn't.

The kde-servicemenu-rootactions package that stevepusser made available works quite well, allowing actions as root and even opening a separate instance of Dolphin as root, should one need that.
User avatar
NFT5
 
Posts: 324
Joined: 2014-10-10 11:38
Location: Canberra, Australia

Re: opening dolphin as root

Postby dguerrini » 2019-08-27 15:09

sunrat wrote:It's not the same question if I understand correctly. In fact I'm not sure I understand at all.
OP's reported issues -
- text files in / can be opened and saved without password
- several downloaded files can not be opened
Now Dolphin doesn't open text files, that requires a text editor. Dolphin also doesn't open downloaded files. It will display them and clicking on them should open in their appropriate application eg. image viewer for images, media player for audio or video files.

The OP original question was
how I can change this to opening dolphin as user as it should be?
We have established that Dolphin is actually running as user.
We can't go any further without more information or a clearer explanation of the perceived issue.


Well, at least someone tried to understand the whole thing without talking nonsense. I don't want to open dolphin as root. It seemed to me it was doing so. I know dolphin is not a text-file opener, it only shows me stuff and permits me to navigate through stuff :roll: .

The course of action is: I save a file.odt from firefox or thunderbird. I open dolphin. I go to the folder where the file.odt was saved. I try to open the file.odt with libreoffice. It starts the opening process, then it crashes and says: file.odt does not exit. BUT!!! if I open konsole, and write: libreoffice file.odt, the file opens normally.

Is it anywhere clearer?
dguerrini
 
Posts: 4
Joined: 2019-08-24 01:31

Re: opening dolphin as root

Postby stevepusser » 2019-08-27 19:06

Oh, I'm sorry I misunderstood your question.

Have you investigated if it's only odt files (templates?) or are other Libreoffice file types also affected? Do text files open normally with your default editor? What happens if you install Calligra and set that to be the default for the Libreoffice file types?
The MX Linux repositories: Backports galore! If we don't have something, just ask and we'll try--we like challenges. New packages: Calibre 3.48.0, QMPlay2 19.09.03, wine-staging 4.16, Telegram-desktop 1.8.8, Pale Moon 28.7.1, Waterfox 56.2.14
User avatar
stevepusser
 
Posts: 11098
Joined: 2009-10-06 05:53


Return to Beginners Questions

Who is online

Users browsing this forum: No registered users and 4 guests

fashionable