Bug 17964 - invoking "dolphin" as root results in no file icons to be displayed
Summary: invoking "dolphin" as root results in no file icons to be displayed
Status: RESOLVED FIXED
Alias: None
Product: Mageia
Classification: Unclassified
Component: RPM Packages (show other bugs)
Version: Cauldron
Hardware: i586 Linux
Priority: Normal normal
Target Milestone: Mageia 7
Assignee: KDE maintainers
QA Contact:
URL:
Whiteboard:
Keywords:
: 20336 (view as bug list)
Depends on:
Blocks:
 
Reported: 2016-03-12 08:38 CET by Ben McMonagle
Modified: 2019-02-04 23:32 CET (History)
10 users (show)

See Also:
Source RPM: dolphin
CVE:
Status comment:


Attachments
example of file icons as normal user (8.46 KB, image/png)
2016-03-12 08:39 CET, Ben McMonagle
Details
example of same files (6.51 KB, image/png)
2016-03-12 08:40 CET, Ben McMonagle
Details
Dolphin screenshot (29.83 KB, image/jpeg)
2016-08-06 13:18 CEST, Otto Leipälä
Details

Description Ben McMonagle 2016-03-12 08:38:44 CET
Description of problem:invoking "dolphin" or "nautilus" as root results in no file icons to be displayed


Version-Release number of selected component (if applicable):
Mageia-6-dev1-i586-DVD.iso
DATE.txt: Thu Mar 10 21:45:52 CET 2016


How reproducible:every time


Steps to Reproduce:
1.install DE that utilises Dolphin or Nautilus as file manager from above .iso
2.reboot and login to desktop
3.invoke the file manager as root
4. browse directories
Comment 1 Ben McMonagle 2016-03-12 08:39:33 CET
Created attachment 7558 [details]
example of file icons as normal user
Comment 2 Ben McMonagle 2016-03-12 08:40:14 CET
Created attachment 7559 [details]
example of same files
Ben McMonagle 2016-03-12 08:40:51 CET

Keywords: (none) => 6dev1

Comment 3 Marja Van Waes 2016-03-12 19:03:40 CET
CC'ing doktor5000, because he'll remember better than me what the consensus in Mageia was about starting file managers as root

CC: (none) => doktor5000, marja11

Rémi Verschelde 2016-03-14 13:10:36 CET

CC: (none) => mageia, olav

Comment 4 Herman Viaene 2016-03-18 10:26:17 CET
I have the same issue:
At the CLI I get loads of messages like:
QPainter::begin: Paint device returned engine == 0, type: 2
QPainter::setCompositionMode: Painter not active
QPixmap::scaled: Pixmap is a null pixmap
QPixmap::scaled: Pixmap is a null pixmap
QPixmap::scaled: Pixmap is a null pixmap

CC: (none) => herman.viaene

Comment 5 Olav Vitters 2016-03-20 17:05:15 CET
I just ran nautilus as root and I got icons, so totally works for me

Regarding comment 4: There's not enough detail on this. Nautilus doesn't use Qt, so those messages are totally incorrect.

Need clearer steps to reproduce and also where the error is. E.g. "browse directories": why should I if all file icons are broken? If that is a significant step, why is that so?

Removing myself from CC; cannot do much here.

CC: olav => (none)

Comment 6 Ben McMonagle 2016-03-20 20:17:32 CET
(In reply to Olav Vitters from comment #5)
> I just ran nautilus as root and I got icons, so totally works for me

> 
> Need clearer steps to reproduce and also where the error is. E.g. "browse
> directories": why should I if all file icons are broken? If that is a
> significant step, why is that so?
> 
> Removing myself from CC; cannot do much here.

reason is: 
attempting to retrieve copy of  file from drakx directory: report.bug.xz
running file manager as normal user, access is refused as root privileges required.
no pop-up is provided to enter root password.
Comment 7 Florian Hubold 2016-03-21 09:32:04 CET
(In reply to ben mcmonagle from comment #6)
> reason is: 
> attempting to retrieve copy of  file from drakx directory: report.bug.xz
> running file manager as normal user, access is refused as root privileges
> required.
> no pop-up is provided to enter root password.

That might be the case, but that is totally different from the subject of this bug and your initial report in comment 0, just saying.

I can at least reproduce the issue of missing icons with dolphin, starting it from a root shell gained via "su -".

FWIW and back on topic, how do you start dolphin or nautilus as root? Using "su -" or using kdesu or similar in GNOME, or using sudo or ... ?
Comment 8 Ben McMonagle 2016-03-21 09:51:36 CET
(In reply to Florian Hubold from comment #7)

> 
> I can at least reproduce the issue of missing icons with dolphin, starting
> it from a root shell gained via "su -".
> 
I use the same method.
Comment 9 Marja Van Waes 2016-03-28 22:24:12 CEST
(In reply to ben mcmonagle from comment #6)

> 
> reason is: 
> attempting to retrieve copy of  file from drakx directory: report.bug.xz
> running file manager as normal user, access is refused as root privileges
> required.
> no pop-up is provided to enter root password.

it is better to go to a terminal or konsole, become root and then do e.g.:

  cp -a /root/drakx/report.bug.xz /home/ben/

the file will then be in your home directory and world readable, and you will be able to upload it.

Assigning this bug to dolphin, because it was only reproduced there.

Assignee: bugsquad => mageia
Summary: [6dev1] invoking "dolphin" or "nautilus" as root results in no file icons to be displayed => [6dev1] invoking "dolphin" as root results in no file icons to be displayed
Source RPM: (none) => dolphin

Comment 10 Herman Viaene 2016-03-29 09:44:45 CEST
@ Florian:
When I do "su -l" at the CLI and then dolphin, I get no file icons. When I make a desktop starter with "gksu dolphin", it is the same.
Comment 11 Barry Jackson 2016-03-30 17:16:40 CEST
I can reproduce this bug using su - but if I use rootactions-servicemenu addon in dolphin to open /root/drakx folder in a second instance of dolphin (as root) then the icons are there.

rootactions-servicemenu uses kdesu.

using:
/usr/libexec/kf5/kdesu -c dolphin

...opens dolphin as root with the icons displayed correctly and it appears to work normally. (e.g. I can copy a root file and save it in my home folder, or open and edit it in kate)

CC: (none) => zen25000

Comment 12 Otto Leipälä 2016-07-31 12:35:20 CEST
Do this from terminal just change your user to right one eg.benmc then logout.

su -c "mkdir -p /root/.config"

su -c "cp -r /home/user/.config/kdeglobals /root/.config"

Reason root applications don't read kde settings from local user settings folder they are readed from /root/.config/kdeglobals,it's not there by default until you manually copy it or use kdesu systemsettings.

CC: (none) => ozkyster

Comment 13 Ben McMonagle 2016-08-03 09:54:27 CEST
(In reply to Otto Leipälä from comment #12)

 kdesu systemsettings.

kdesu appears to be deprecated - "command not found"
Comment 14 Ben McMonagle 2016-08-03 09:56:46 CEST
(In reply to Otto Leipälä from comment #12)
> Do this from terminal just change your user to right one eg.benmc then
> logout.
> 
> su -c "mkdir -p /root/.config"
> 
> su -c "cp -r /home/****/.config/kdeglobals /root/.config"

made no difference :(

su - dolphin still has no icons, only text name of file
Comment 15 David GEIGER 2016-08-04 07:19:02 CEST
(In reply to ben mcmonagle from comment #14)
> (In reply to Otto Leipälä from comment #12)
> > Do this from terminal just change your user to right one eg.benmc then
> > logout.
> > 
> > su -c "mkdir -p /root/.config"
> > 
> > su -c "cp -r /home/****/.config/kdeglobals /root/.config"
> 
> made no difference :(
> 
> su - dolphin still has no icons, only text name of file

As mentionned barjac, better is to use this command:

$ /usr/libexec/kf5/kdesu dolphin

CC: (none) => geiger.david68210

Comment 16 Nicolas Lécureuil 2016-08-04 09:54:50 CEST
(In reply to David GEIGER from comment #15)
> (In reply to ben mcmonagle from comment #14)
> > (In reply to Otto Leipälä from comment #12)
> > > Do this from terminal just change your user to right one eg.benmc then
> > > logout.
> > > 
> > > su -c "mkdir -p /root/.config"
> > > 
> > > su -c "cp -r /home/****/.config/kdeglobals /root/.config"
> > 
> > made no difference :(
> > 
> > su - dolphin still has no icons, only text name of file
> 
> As mentionned barjac, better is to use this command:
> 
> $ /usr/libexec/kf5/kdesu dolphin

and for me this is the real way to use it.
Comment 17 Otto Leipälä 2016-08-06 13:17:02 CEST
Yes because i have made symlink manually to /usr/bin.
Works fine here with icons and text shows up in dolphin as root without any modification like kdesu systemsettings5 or else.
Comment 18 Otto Leipälä 2016-08-06 13:18:36 CEST
Created attachment 8313 [details]
Dolphin screenshot

Working dolphin.
Samuel Verschelde 2016-08-25 16:25:06 CEST

Assignee: mageia => kde

Helge Hielscher 2016-08-30 16:38:03 CEST

CC: (none) => hhielscher

Comment 19 Nicolas Lécureuil 2017-03-18 01:47:59 CET
not mageia specfic, i tested on fedora and obtained the same result. Can you report this bug upstream ?
Comment 20 Frédéric "LpSolit" Buclin 2017-03-22 16:50:15 CET
If you add:

KDE_FULL_SESSION=true

into your .bashrc file and export it, does this fix your problem (after closing and reopening your root session)?
Frédéric "LpSolit" Buclin 2017-03-22 17:06:10 CET

Keywords: 6dev1 => 6sta2
See Also: (none) => https://bugs.kde.org/show_bug.cgi?id=353263
Target Milestone: --- => Mageia 6

Comment 21 Frédéric "LpSolit" Buclin 2017-04-01 14:53:40 CEST
*** Bug 20336 has been marked as a duplicate of this bug. ***

CC: (none) => LpSolit

Nicolas Lécureuil 2017-04-03 11:12:19 CEST

Target Milestone: Mageia 6 => Mageia 7

Comment 22 Frédéric "LpSolit" Buclin 2017-05-06 16:32:10 CEST
https://userbase.kde.org/KDE_System_Administration/Environment_Variables#Automatically_Set_Variables says that KDE_FULL_SESSION is "Set to true by KDE startup", but it seems this is not the case in Mageia 6. So instead of adding KDE_FULL_SESSION=true in /root/.bashrc, KDE should set it itself.

Nicolas, any idea how to set this environment variable at KDE startup?
Comment 23 Frédéric "LpSolit" Buclin 2017-05-06 17:59:28 CEST
(In reply to Frédéric Buclin from comment #22)
> KDE_FULL_SESSION is "Set to true by KDE startup", but it seems this is not
> the case in Mageia 6.

Ah, forget that. When you use e.g. 'su' to start a shell as root and then launch dolphin or kwrite, the root user is not using any specific DE. Is that right? In that case, I don't see how we could define the DE the user who called 'su' is currently running.
Comment 24 Maurice Batey 2017-07-11 13:20:53 CEST
> because i have made symlink manually to /usr/bin.
> Works fine here with icons and text shows up in dolphin as root without any 
> modification like kdesu systemsettings5 or else.

 Otto, what precisely is that symlink setting, please?

(Sounds cleanest/simplest fix!)

CC: (none) => maurice

Comment 25 Maurice Batey 2017-07-11 18:26:35 CEST
> su -c "mkdir -p /root/.config"

> su -c "cp -r /home/user/.config/kdeglobals /root/.config"

 Tried that; made no difference...

# ls /.config
kdeglobals
Comment 26 Maurice Batey 2017-07-11 18:29:28 CEST
> /usr/libexec/kf5/kdesu -c dolphin

Yes, that works, but I don't want to have to do that repeatedly whilst 
in 'su - root' mode, when handling various directories as Root.
Comment 27 Manuel Hiebel 2017-07-11 19:31:43 CEST
btw, I have this bug when launching dolphin via konsole under Icewn and as regular user
Comment 28 Barry Jackson 2017-07-11 23:02:15 CEST
(In reply to Maurice Batey from comment #26)
> > /usr/libexec/kf5/kdesu -c dolphin
> 
> Yes, that works, but I don't want to have to do that repeatedly whilst 
> in 'su - root' mode, when handling various directories as Root.

Why not just add something like this to your desktop:
Save it as "Root Dolphin.desktop"

[Desktop Entry]
Comment[en_GB]=
Comment=Open Dolphin as root
Exec=/usr/libexec/kf5/kdesu -c dolphin
GenericName[en_GB]=
GenericName=Root Dolphin
Icon=system-file-manager
MimeType=
Name[en_GB]=Root Dolphin
Name=Root Dolphin
Path=
StartupNotify=true
Terminal=false
TerminalOptions=
Type=Application
X-DBUS-ServiceName=
X-DBUS-StartupType=
X-KDE-SubstituteUID=false
X-KDE-Username=
Comment 29 Maurice Batey 2017-07-11 23:17:31 CEST
Thanks, Barry - will give that a try tomorrow.

(Need to find out how the target directory is passed.)
Comment 30 Barry Jackson 2017-07-11 23:24:11 CEST
(In reply to Maurice Batey from comment #29)
> Thanks, Barry - will give that a try tomorrow.
> 
> (Need to find out how the target directory is passed.)

Do you mean where it will open?
If so that is set with the Path= line in the above .desktop file.

Also check you mail :)
Comment 31 Maurice Batey 2017-07-12 12:55:36 CEST
> that is set with the Path= line in the above .desktop file.

  Tried that but whatever is entered, it opens with /home!
(Tried "/" and "/root/"...)

But it's easy to switch it to /root when it opens, so will suit my purposes by keeping it minimised during work as Root on Root files.

Thank you!
Comment 32 Barry Jackson 2017-07-12 13:22:00 CEST
(In reply to Maurice Batey from comment #31)
> > that is set with the Path= line in the above .desktop file.
> 
>   Tried that but whatever is entered, it opens with /home!
> (Tried "/" and "/root/"...)
> 
> But it's easy to switch it to /root when it opens, so will suit my purposes
> by keeping it minimised during work as Root on Root files.
> 
> Thank you!

Ah, so it does, however if you add your favourite path to the end of the exec line instead it does what you want:

Exec=/usr/libexec/kf5/kdesu -c dolphin /home/youruser
Comment 33 Maurice Batey 2017-07-12 13:30:16 CEST
Ah, yes, of course - just adding "/" did the trick!
Comment 34 Maurice Batey 2017-07-22 14:45:53 CEST
Just checked my Mageia-6. "Packages up to date", but Dolphin's icon problem seems to have disppeared (Dolphin V.16.12.3)!
Rémi Verschelde 2017-07-24 14:59:34 CEST

Summary: [6dev1] invoking "dolphin" as root results in no file icons to be displayed => invoking "dolphin" as root results in no file icons to be displayed

Comment 35 Ben McMonagle 2019-02-04 23:32:02 CET
closing as last comment +12 months ago
re-open if needed

Resolution: (none) => FIXED
Status: NEW => RESOLVED


Note You need to log in before you can comment on or make changes to this bug.