guysimpson
Posts: 1
Joined: Tue Dec 22, 2020 8:27 pm

taskbar missing for root

Tue Dec 22, 2020 8:45 pm

On a Raspberry Pi4 2GB...

- flashed 32 GB SD card with Buster Image
- completed basic Pi configuration / localization
- executed following commands...
sudo apt update
sudo apt full-upgrade

After this process when I login as root on the console (or via RDP) the taskbar flashes a few times, and then disappears. This problem does not occur with other accounts. The same process, on the same platform worked fine 10 days ago, so this is a new problem.

I have tried the various lxpanel suggestions found in the forum, but without success.

Any insight or advice much appreciated.

EachBeach
Posts: 3
Joined: Thu Jan 07, 2021 11:42 am

Re: taskbar missing for root

Thu Jan 07, 2021 11:47 am

Hi, I have the same problem.
New installation with all updates on the Raspi 4B.
User Pi is okay, but as user root the taskbar flickers briefly and then is gone.
I have already tried a few things...help would be cool ;)

richrussell
Posts: 99
Joined: Thu Jan 16, 2020 10:52 am

Re: taskbar missing for root

Thu Jan 07, 2021 12:47 pm

I guess the first question is, why are you logging in as root? On modern Linux/Unix systems generally the root user is disabled and everything is done using the sudo mechanism.

EachBeach
Posts: 3
Joined: Thu Jan 07, 2021 11:42 am

Re: taskbar missing for root

Thu Jan 07, 2021 2:56 pm

Unfortunately this answer does not help at all :-(
For my application I need an operating system that runs without errors.
Otherwise I won't start programming ;-)

richrussell
Posts: 99
Joined: Thu Jan 16, 2020 10:52 am

Re: taskbar missing for root

Thu Jan 07, 2021 4:23 pm

It was a valid question, because as root isn't expected to have an interactive logon it may be missing various configuration files and these may need to be created. Of course if you have a reason for logging in as root, then there's no problem with that - it's just not that common these days.

EachBeach
Posts: 3
Joined: Thu Jan 07, 2021 11:42 am

Re: taskbar missing for root

Thu Jan 07, 2021 4:33 pm

So far, this has always worked with my raspi 3.
And if the taskbar flickers 5 times and then is gone, that is not a feature it's a bug :lol:

User avatar
scruss
Posts: 4190
Joined: Sat Jun 09, 2012 12:25 pm
Location: Toronto, ON
Contact: Website

Re: taskbar missing for root

Thu Jan 07, 2021 7:17 pm

Seriously, the desktop is not designed to run as root. If you're starting programming, you absolutely don't want to run as root.
This is the helpful answer. You might not like it, but it's how things are set up.
‘Remember the Golden Rule of Selling: “Do not resort to violence.”’ — McGlashan.
Pronouns: he/him

klricks
Posts: 7856
Joined: Sat Jan 12, 2013 3:01 am
Location: Grants Pass, OR, USA
Contact: Website

Re: taskbar missing for root

Mon Jan 25, 2021 10:52 pm

Unless specified otherwise my response is based on the latest and fully updated RPiOS Buster w/ Desktop OS.

User avatar
RaspbianUser1
Posts: 861
Joined: Thu Mar 05, 2020 6:34 pm
Location: ~/

Re: taskbar missing for root

Mon Jan 25, 2021 11:50 pm

Don't use a desktop for root!
You will ruin privileges for certain files, and break your system

Also its a terrible idea for security reasons to have root as your main user!

Also as a desktop is meant to be ran as a user other than root, you wont have access to things such as:
Themes (most likely)
Icons for applications
Your task bar

All because the files aren't there for root, as it is not meant to be run with a desktop

If you need root for anything just use sudo!
like sudo apt update or sudo touch /etc/systemd/system/test.service
Running with a Raspberry Pi 4B 4GB with Raspberry Pi OS with MATE Desktop
Why not overclock, push some more performance out of your computer!
Think before you delete something a stranger on the internet told you to.

n00dlz
Posts: 1
Joined: Wed Jun 16, 2021 6:37 pm

Re: taskbar missing for root

Wed Jun 16, 2021 7:18 pm

I also logged in as 'root' after being instructed to do so by two different tutorials. I am a noob to RPi and Linux and was getting comfortable in the enviroinment by customising it. Instructions on how to change the default 'pi' username include the words "login as root". Why would they do this if it, according to you guys, breaks your system?

https://thepihut.com/blogs/raspberry-pi ... d-password
"And then logout back in as the user 'root' using the password you just created."
(not my bad English)

https://raspberrytips.com/change-raspberry-pi-username/
"- Login with root"

Even without the taskbar, I managed to easily get the terminal up and run the commands and it worked fine. My new username is in effect and the 'root' user account is now disabled and I can't see any problems so far, but then maybe you wouldn't if it only affects permissions on certain files.

So how has this affected my system? Because if I'm gona have problems later on, I'd rather lose a day and start fresh.

Thanks. (if you guys need any professional audio advice, I'm here for reciprocation :ugeek: )

bjtheone
Posts: 1426
Joined: Mon May 20, 2019 11:28 pm
Location: The Frozen North (AKA Canada)

Re: taskbar missing for root

Thu Jun 17, 2021 12:10 pm

scruss wrote:
Thu Jan 07, 2021 7:17 pm
Seriously, the desktop is not designed to run as root. If you're starting programming, you absolutely don't want to run as root.
This is the helpful answer. You might not like it, but it's how things are set up.
To clarify, the default setup of RPiOS with Desktop (using LXDE) is not setup to run with with root logging in and starting the windowing system and the desktop manager. You certainly could set it up to run that way, however it is a really bad idea and is very much not the recommended way of doing things. If you run as root, you have a much higher probability of breaking the OS when you do something wrong.

Beyond the fact that it does not come setup to do that, if you do the wrong thing in trying to set it up you will almost certainly mess up various permissions and break the system such that regular users don't work anymore. If you don't understand Linux/Unix and how the multiuser system works, it will be a painful experience.

It is setup, with a regular user ("pi" is the default) and root elevation via sudo. It works very nicely that way and there is no good reason to change this for most use cases.

User avatar
scruss
Posts: 4190
Joined: Sat Jun 09, 2012 12:25 pm
Location: Toronto, ON
Contact: Website

Re: taskbar missing for root

Thu Jun 17, 2021 9:16 pm

bjtheone wrote:
Thu Jun 17, 2021 12:10 pm
To clarify, the default setup of RPiOS with Desktop (using LXDE) is not setup to run with with root logging in and starting the windowing system …
It's really the desktop itself — comprising X11 and all the stuff under it that's not set up to be run as root. I'll defer to Emmanuele Bassi, one of the core GTK developers:
Speaking as the developer of a GUI toolkit, and as an application developer, no: there are no *real*, substantiated, technological reasons why anybody should run a GUI application as root. By running GUI applications as an admin user you're literally running millions of lines of code that have not been audited properly to run under elevated privileges; you're also running code that will touch files inside your $HOME and may change their ownership on the file system; connect, via IPC, to even more running code, etc.

You're opening up a massive, gaping security hole — likely because application developers were too lazy to properly do separation between the code that creates and manages the GUI bits, and the code that executes the privileged operations.

GUI applications should not run as root because it's insecure. Because it's irresponsible towards users and their data. And, lastly, because it's simply not necessary, given the technological context in which applications are written.
from Bug 772875 – [wayland] can't run application as root using sudo. His full answer is worth a read.

I still stick by my answer. It's a terrible, terrible idea to run the desktop as root.
‘Remember the Golden Rule of Selling: “Do not resort to violence.”’ — McGlashan.
Pronouns: he/him

GlowInTheDark
Posts: 1830
Joined: Sat Nov 09, 2019 12:14 pm

Re: taskbar missing for root

Thu Jun 17, 2021 10:21 pm

I still stick by my answer. It's a terrible, terrible idea to run the desktop as root.
Agreed. Of course.

But do note that we are muddying the waters here, especially with the quote above (by the GTK developer), in that sometimes we are talking about the desktop itself and sometimes we are talking about GUI apps.

On the subject of GUI apps running as root, I have two counterexamples - one specific, one general:

1) gparted - must be run as root (obviously). And it turns out one often has to jump through some hoops to do that. Yes, I know it is possible (I know of at least 2 ways), but it is not at all obvious how to do it.

2) MS and Mac clearly do think that it should be possible to admin a system w/o ever even knowing there is such a thing as a command line. Linux does not subscribe to this view, which means we really do expect people to drop to a command line to do (most) root-y/admin-y things.
Poster of inconvenient truths.

Linux zealot and proud of it.

swampdog
Posts: 731
Joined: Fri Dec 04, 2015 11:22 am

Re: taskbar missing for root

Fri Jun 18, 2021 9:14 am

GlowInTheDark wrote:
Thu Jun 17, 2021 10:21 pm
I still stick by my answer. It's a terrible, terrible idea to run the desktop as root.
Agreed. Of course.

But do note that we are muddying the waters here, especially with the quote above (by the GTK developer), in that sometimes we are talking about the desktop itself and sometimes we are talking about GUI apps.

On the subject of GUI apps running as root, I have two counterexamples - one specific, one general:

1) gparted - must be run as root (obviously). And it turns out one often has to jump through some hoops to do that. Yes, I know it is possible (I know of at least 2 ways), but it is not at all obvious how to do it.
When I run the desktop as a different user I'm prompted for a password for gparted. Unfortunately it's the "pi" password but that's all there is.

There used to be (iirc) 'kdesu' for KDE and I still have 'gksu' (GNOME) on my desktop PC which are both depreciated graphical sudo commands.
GlowInTheDark wrote:
Thu Jun 17, 2021 10:21 pm
2) MS and Mac clearly do think that it should be possible to admin a system w/o ever even knowing there is such a thing as a command line. Linux does not subscribe to this view, which means we really do expect people to drop to a command line to do (most) root-y/admin-y things.
I can't speak for Mac. M$ way is a mess in that an app can elevate itself behind the scenes. It goes all the way back to things always being written for "Administrator" and there's a "SYSTEM" (aka "root") account which is the holy grail for M$ hackers. All M$ could come up with was UAC which folk turn off.

Tbh though the rpi is kindof special case though because folk are always fiddling with the hardware. The linux I'm using to type this - last time I had to be root on it..

Code: Select all

$ history | grep " su "
 2083  2020-05-16 09:19:55 sudo su -
 2096  2020-05-27 21:48:49 sudo su -
 2254  2020-09-06 18:02:01 sudo su -
 2258  2020-09-06 18:14:42 sudo su -
..aside from apt-get update/upgrade (which there's no need for because there's a GUI updater).

bjtheone
Posts: 1426
Joined: Mon May 20, 2019 11:28 pm
Location: The Frozen North (AKA Canada)

Re: taskbar missing for root

Fri Jun 18, 2021 11:41 am

scruss wrote:
Thu Jun 17, 2021 9:16 pm
bjtheone wrote:
Thu Jun 17, 2021 12:10 pm
To clarify, the default setup of RPiOS with Desktop (using LXDE) is not setup to run with with root logging in and starting the windowing system …
It's really the desktop itself — comprising X11 and all the stuff under it that's not set up to be run as root.

I still stick by my answer. It's a terrible, terrible idea to run the desktop as root.
Absolutely agree. My point was more to the fact that while it is possible, that in NOT how it comes setup by default and the likelihood of messing up the system is high, unless you know what you are doing. Of course, if you do know what you are doing, it is very unlikely you will be trying to run it that way.

Return to “General discussion”