Strange Root Theme Issue

So I am having a very strange issue with my root theme, When I am logged in under my root account and I run timeshift is is running as root and it does follow the theme I have set for the root user, which is great,

However when I open a snapshot folder in timeshift it opens dolphin with root privs and for some strange reason dolphin is not using the theme that is set for the root user,

Like I have logged in under root and went into system settings and changed all the theme to use a dark theme,

Same thing happens when I go in a terminal and do sudo pcmanfm, I see it is using the icons I have set in the root user but its not using the dark theme. Anyone know why it would do this?

Are you saying you are actually logging into your DE as your root user? If so, you should never do this. You can just copy your theming settings to root. You don’t need to actually log in and change the theming.

Probably because when you use sudo you are missing pieces of the environment. More than likely it is XDG_CURRENT_DESKTOP which isn’t being set.

You can use sudo -E if you want to also pass the environment. Be aware that this will pass the entire environment to your root session.

1 Like

I tried to do sudo -E pcmanfm and it still comes up with a light theme, This is quite confusing. I really wish I knew where to read up to understand the basics of all of how themes work when it comes to root and running applications as sudo.

from what I remember when I first set the dark theme in root everything was working fine, I wonder if an update changed something I am unaware of. I have no clue where to even begin.

XDG_CURRENT_DESKTOP which isn’t being set.

Here is what happened when I ran
Sudo -E Pcmanfm in a terminal, Maybe this will help shed some light on what is going on and how I could fix it

I know that it isnt recommended to have the apps running as root, I want to do it anyway to learn more.

Like the entire desktop environment, running gui apps as root or with sudo is not advisable. If you want a file manager in the terminal, there are choices like Ranger and MC. Also, if you are running a file manger as root, the purpose is to get work done and get in and out quickly. Why does the theme even matter?

We will wait for the final results with the knowledge you have gained. :wink:

All source code is published by the developers.

Start from this:

Please, post a link to any document that says that these applications that fail, are designed to run as root.

This strange root theme issue sounds like “I want to know how I can do illegal things, in a legal way”.
:rofl:

1 Like

Maybe I should just log in as root and stay logged in as root, what would be the harm in that any way?

Maybe I should drive my bike with my eyes closed, what would be the harm in that any way?

Is any DE designed, so that you login as root?

1 Like

How can I do that or which theme files do I have to copy to root for that?

It differs depending on the DE you use.

For plasma, you easily use something like konsave to transfer them.

1 Like

I am sure malware authors would just love you for that, and wish more people did just like you.

So the learning has yet to begin?

You are acting like a toddler asking how to touch a hot stove. Should the adults in the room help you achieve your goal?

1 Like

File managers like dolphin and pcmanfm were not intended to be run as root. You can do most anything you need as the user with sudo privileges with them. Copying or moving files on Plasma that you don’t have access too will trigger a sudo password prompt. Really there’s not much reason to use these as root at all.

1 Like

I am so used to using gui file managers and I like to tinker with files in root directories and mess around with things. It is how I learn.

Yes, can can still do that with Dolphin (the default KDE file manager). If you try and copy a file, say a manually downloaded theme, to /use/share/themes it will bring up a prompt asking for the sudo or administrator password. There’s no need to run the application itself as root. That’s what I was trying to say, not to use nano, vim, or ed from the CLI.
Other file managers may work differently, but I know this is the case with Plasma and Dolphin as I was editing my plasmarc in the default theme today from the GUI.

I did that with Windows 3.11 back in 1993. I learned not to do that again, at least not without some research and a backup and recovery plan. It was a quick lesson.

It is more so attempting to understand how more of the inner working operate when it comes to themes. I enjoy tinkering with the themes. Generally It is quite simple to understand what is going on, I am baffled why it is doing this with dolphins theme in root.

The answer is very simple: Timeshift uses GTK theming, Dolphin uses QT theming. Your user account has been set up to use your GTK theme on QT apps, but your root account has not.

The relevant documentation is here: https://wiki.archlinux.org/title/Uniform_look_for_Qt_and_GTK_applications