Xfce Forum

Sub domains
 

You are not logged in.

#1 2025-09-23 18:16:58

nraygun
Member
Registered: 2018-04-24
Posts: 34
LinuxChrome 140.0

xfce4-panel-profiles doesn't work with sudo -u

MX Linux 25 beta 1, xfce 4.20.1, xfce4-panel-profiles 1.0.15-1

I have a bash script that sets up my environment including the panel. In the script, there's a mix of commands that need sudo and some that don't.

In the area of the panel load, I'm having weird results.

If I'm logged in as say, john, then issue the command:

sudo -u john xfce4-panel-profiles load panel.tar.bz2

it doesn't load the panel.

But if I do:

xfce4-panel-profiles load panel.tar.bz2

it works.

I might still be in sudo mode if I omit the sudo -u john part.

If I'm logged in as john, isn't using "sudo -u john" the same as just running it without the sudo part?

Offline

#2 2025-09-23 18:53:13

eriefisher
Wanderer
From: ON, Canada
Registered: 2008-10-25
Posts: 774
LinuxFirefox 143.0

Re: xfce4-panel-profiles doesn't work with sudo -u

If your logged in as "john" why are you sudoing to "john? Your already "john". The panel itself does not require sudo especially if your run it as the logged in user.


I AM CANADIAN!
Siduction
Debian Sid
Xfce 4.20 with Wayland/Labwc

Offline

#3 2025-09-23 20:20:57

nraygun
Member
Registered: 2018-04-24
Posts: 34
LinuxChrome 140.0

Re: xfce4-panel-profiles doesn't work with sudo -u

I'm sudoing as john because the prior code in the script is sudoing as root(editing /etc/fstab, modifying the hosts file, etc.).

Offline

#4 2025-09-23 21:01:42

eriefisher
Wanderer
From: ON, Canada
Registered: 2008-10-25
Posts: 774
LinuxFirefox 143.0

Re: xfce4-panel-profiles doesn't work with sudo -u

So your trying to edit a file owned by root as "john". "john" does not have root privileges. you need to sudo to "john" then sudo to root to edit these files. This is why I don't like sudo.


I AM CANADIAN!
Siduction
Debian Sid
Xfce 4.20 with Wayland/Labwc

Offline

#5 2025-09-24 16:09:31

nraygun
Member
Registered: 2018-04-24
Posts: 34
LinuxChrome 140.0

Re: xfce4-panel-profiles doesn't work with sudo -u

Well, no. I was editing a file owned by root as root with sudo, but then immediately after that I needed to do something as john so I did a "sudo -u john" but it doesn't work. Something weird is going on with xfce4-panel-profiles so I just removed the "sudo -u john" part for all areas that don't need root.

Script works fine in a VM. Worse case I'll just split the script into two parts - one run with sudo, the other without.

We'll see how it goes on metal when the OS goes GA. Thanks for the help.

Offline

Registered users online in this topic: 0, guests: 1
[Bot] ClaudeBot

Board footer

Powered by FluxBB
Modified by Visman

[ Generated in 0.008 seconds, 7 queries executed - Memory usage: 538.9 KiB (Peak: 539.52 KiB) ]