Scheduled Maintenance: We are aware of an issue with Google, AOL, and Yahoo services as email providers which are blocking new registrations. We are trying to fix the issue and we have several internal and external support tickets in process to resolve the issue. Please see: viewtopic.php?t=158230

 

 

 

opening dolphin as root

New to Debian (Or Linux in general)? Ask your questions here!
Post Reply
Message
Author
dguerrini
Posts: 4
Joined: 2019-08-24 01:31

opening dolphin as root

#1 Post by dguerrini »

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.

User avatar
sunrat
Administrator
Administrator
Posts: 6478
Joined: 2006-08-29 09:12
Location: Melbourne, Australia
Has thanked: 118 times
Been thanked: 474 times

Re: opening dolphin as root

#2 Post by sunrat »

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!

peer
Posts: 449
Joined: 2017-03-26 10:14
Has thanked: 8 times
Been thanked: 22 times

Re: opening dolphin as root

#3 Post by peer »

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.

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

Re: opening dolphin as root

#4 Post by dguerrini »

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.

:?: :?: :?:

arzgi
Posts: 1194
Joined: 2008-02-21 17:03
Location: Finland
Been thanked: 31 times

Re: opening dolphin as root

#5 Post by arzgi »

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

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

Re: opening dolphin as root

#6 Post by dguerrini »

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?
:?: :|

Segfault
Posts: 993
Joined: 2005-09-24 12:24
Has thanked: 5 times
Been thanked: 17 times

Re: opening dolphin as root

#7 Post by Segfault »

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.

User avatar
phenest
Posts: 1702
Joined: 2010-03-09 09:38
Location: The Matrix

Re: opening dolphin as root

#8 Post by phenest »

What's the result of:

Code: Select all

id -u
ASRock H77 Pro4-M i7 3770K - 32GB RAM - Pioneer BDR-209D

User avatar
stevepusser
Posts: 12930
Joined: 2009-10-06 05:53
Has thanked: 41 times
Been thanked: 72 times

Re: opening dolphin as root

#9 Post by stevepusser »

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".
MX Linux packager and developer

User avatar
sunrat
Administrator
Administrator
Posts: 6478
Joined: 2006-08-29 09:12
Location: Melbourne, Australia
Has thanked: 118 times
Been thanked: 474 times

Re: opening dolphin as root

#10 Post by sunrat »

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
NFT5
df -h | grep > 20TiB
df -h | grep > 20TiB
Posts: 598
Joined: 2014-10-10 11:38
Location: Canberra, Australia
Has thanked: 10 times
Been thanked: 43 times

Re: opening dolphin as root

#11 Post by NFT5 »

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.

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

Re: opening dolphin as root

#12 Post by dguerrini »

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?

User avatar
stevepusser
Posts: 12930
Joined: 2009-10-06 05:53
Has thanked: 41 times
Been thanked: 72 times

Re: opening dolphin as root

#13 Post by stevepusser »

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?
MX Linux packager and developer

Post Reply