Htop doesn't show systemd state of process and jobs

Hi,

With newly created user, htop doesn’t display systemd state of process and jobs. I don’t have that issue with root or dietpi users.
2023-11-02-144118_386x31_scrot

Are the other DietPi OS users experience the same issue or the problem is at my Pi Zero locally?
It looks like permission issue, but couldn’t figure out it. Any ideas?

Can the user call systemd? With sudo.

I’m not sure how to test if the new user can call systemd.
Probably not what you ask, but if the new user run htop with sudo, systemd information is displayed properly.

I try systemctl list-unit-files without sudo and the output of the command is: Failed to connect to bus: No such file or directory. All my other machines are able to list unit files without sudo user.

Because you run it as root like this.

What do you have in visudo?

#                                                                                     
# This file MUST be edited with the 'visudo' command as root.                         
#                                                                                     
# Please consider adding local content in /etc/sudoers.d/ instead of                  
# directly modifying this file.                                                       
#                                                                                     
# See the man page for details on how to write a sudoers file.                        
#                                                                                     
Defaults    env_reset                                                                 
Defaults    mail_badpass                                                              
Defaults    secure_path="/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin"
                                                                                      
# Host alias specification                                                            
                                                                                      
# User alias specification                                                            
                                                                                      
# Cmnd alias specification                                                            
                                                                                      
# User privilege specification                                                        
root    ALL=(ALL:ALL) ALL                                                             
                                                                                      
# Allow members of group sudo to execute any command                                  
%sudo   ALL=(ALL:ALL) ALL                                                             
                                                                                      
# See sudoers(5) for more information on "@include" directives:                       
                                                                                      
@includedir /etc/sudoers.d

I was able to fix the issue with sudo apt reinstall dbus-user-session and reboot.

1 Like