You are not logged in.
Pages: 1
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
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
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
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
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
Pages: 1
[ Generated in 0.008 seconds, 7 queries executed - Memory usage: 538.9 KiB (Peak: 539.52 KiB) ]