Official Raspberry Pi Respin

Help for Current Versions of MX
When asking for help, use Quick System Info from MX Tools. It will be properly formatted using the following steps.
1. Click on Quick System Info in MX Tools
2. Right click in your post and paste.
Message
Author
User avatar
Jerry3904
Administrator
Posts: 23044
Joined: Wed Jul 19, 2006 6:13 am

Re: Official Raspberry Pi Respin

#41 Post by Jerry3904 »

IIRC it's not included b/c it needs to set up a Live environment, which the RPi image does not support. Or something along those lines...
Production: 5.10, MX-23 Xfce, AMD FX-4130 Quad-Core, GeForce GT 630/PCIe/SSE2, 16 GB, SSD 120 GB, Data 1TB
Personal: Lenovo X1 Carbon with MX-23 Fluxbox
Other: Raspberry Pi 5 with MX-23 Xfce Raspberry Pi Respin

Senpai
Posts: 474
Joined: Tue Nov 19, 2019 7:39 am

Re: Official Raspberry Pi Respin

#42 Post by Senpai »

Hi:
Let me see if I can explain well....
I have installed Kodi in MX-rpi_Xfce and in the icons that the program creates when installing, the command is "kodi-pkexec" and gives an error that does not find the file, certainly seems a wrong command....
The other icon it creates for "Full Screen" the command is "kodi --standalone -fs", but none of them works... unless the user has recently entered the "sudo" password in any command and the system has it in memory...
I have tried to put in the icons the command "pkexec kodi" and "pkexec kodi --standalone -fs" and it works asking for the password without problems, although the configuration is not of the user, I suppose it will be that of root?

What would be the best way to use it? should the user be in some specific group?

Best regards

User avatar
Jerry3904
Administrator
Posts: 23044
Joined: Wed Jul 19, 2006 6:13 am

Re: Official Raspberry Pi Respin

#43 Post by Jerry3904 »

Don't know anything about kodi and am not totally sure its problems are our problem, but the default user on the MXRPi has sudo privileges by default.

Did you create a new user after install? If yes, you can use MX User Manager to add missing group memberships.
Production: 5.10, MX-23 Xfce, AMD FX-4130 Quad-Core, GeForce GT 630/PCIe/SSE2, 16 GB, SSD 120 GB, Data 1TB
Personal: Lenovo X1 Carbon with MX-23 Fluxbox
Other: Raspberry Pi 5 with MX-23 Xfce Raspberry Pi Respin

User avatar
dolphin_oracle
Developer
Posts: 22020
Joined: Sun Dec 16, 2007 12:17 pm

Re: Official Raspberry Pi Respin

#44 Post by dolphin_oracle »

in my mind Kodi should not be running as root at all, and therefore should not need to be run with pkexec.
http://www.youtube.com/runwiththedolphin
lenovo ThinkPad X1 Extreme Gen 4 - MX-23
FYI: mx "test" repo is not the same thing as debian testing repo.

Senpai
Posts: 474
Joined: Tue Nov 19, 2019 7:39 am

Re: Official Raspberry Pi Respin

#45 Post by Senpai »

dolphin_oracle wrote: Fri Feb 09, 2024 8:35 am in my mind Kodi should not be running as root at all, and therefore should not need to be run with pkexec.
Yes, I think the same, in other compilations for Pi, it doesn't happen.
Best regards

Senpai
Posts: 474
Joined: Tue Nov 19, 2019 7:39 am

Re: Official Raspberry Pi Respin

#46 Post by Senpai »

Jerry3904 wrote: Fri Feb 09, 2024 8:23 am Don't know anything about kodi and am not totally sure its problems are our problem, but the default user on the MXRPi has sudo privileges by default.

Did you create a new user after install? If yes, you can use MX User Manager to add missing group memberships.
Thank you Jerry3904:
I'm not saying it's MX's problem, I just find the behavior strange, because on PiOS/Rasbian it has never happened.
Yes, create another user who also belongs to the "sudo" group, I will investigate further.
Best regards

User avatar
fukamushi
Posts: 4
Joined: Fri Nov 17, 2023 5:55 pm

Re: Official Raspberry Pi Respin

#47 Post by fukamushi »

Hey Senpai, so far this is what I've found:

The file "/usr/bin/kodi" contains:
'''
198| if [ -n "$WAYLAND_DISPLAY" ] && [ -z "$STANDALONE" ]; then
199| ${KODI_BINARY} $SAVED_ARGS &
200| else
201| unset DISPLAY; sudo openvt -sw -- su -c "${KODI_BINARY} $SAVED_ARGS" $USER &
202| fi"
'''

So apparently Kodi running 'sudo openvt' on line 201 of /usr/bin/kodi is why it's asking for a sudo password.
The etc/sudoers.d/020_kodi file has /bin/fgconsole & /bin/chvt, but it's missing /bin/openvt.

Solution:
Add /bin/openvt to etc/sudoers.d/020_kodi. [1]

I think since Raspbian Bookworm uses wayland by default the sudo line above isn't being run.
If you run Raspbian Bookworm with X11 instead it'll ask for sudo.

source:
[1] https://forums.raspberrypi.com/viewtopi ... o#p2146651

Senpai
Posts: 474
Joined: Tue Nov 19, 2019 7:39 am

Re: Official Raspberry Pi Respin

#48 Post by Senpai »

fukamushi wrote: Wed Feb 14, 2024 1:53 pm Hey Senpai, so far this is what I've found:

The file "/usr/bin/kodi" contains:
'''
198| if [ -n "$WAYLAND_DISPLAY" ] && [ -z "$STANDALONE" ]; then
199| ${KODI_BINARY} $SAVED_ARGS &
200| else
201| unset DISPLAY; sudo openvt -sw -- su -c "${KODI_BINARY} $SAVED_ARGS" $USER &
202| fi"
'''

So apparently Kodi running 'sudo openvt' on line 201 of /usr/bin/kodi is why it's asking for a sudo password.
The etc/sudoers.d/020_kodi file has /bin/fgconsole & /bin/chvt, but it's missing /bin/openvt.

Solution:
Add /bin/openvt to etc/sudoers.d/020_kodi. [1]

I think since Raspbian Bookworm uses wayland by default the sudo line above isn't being run.
If you run Raspbian Bookworm with X11 instead it'll ask for sudo.

source:
[1] https://forums.raspberrypi.com/viewtopi ... o#p2146651
Hi:
Thanks for your help, I will try it. :happy:
Postscript:
I have worked your solution, although in my case doing more tests it has worked somewhat better putting complete the solution of the thread you sent from the Raspi forum.

I've changes /etc/sudoers.d/020_kodi to:

Code: Select all

Cmnd_Alias KODI_VT = /bin/fgconsole, /bin/chvt *
Cmnd_Alias KODI_VT2 = /bin/openvt

%video ALL = (root) NOPASSWD: KODI_VT
%video ALL = (root) NOPASSWD: KODI_VT2
Best regards

skallal
Posts: 258
Joined: Fri Jul 28, 2023 12:47 pm

Re: Official Raspberry Pi Respin

#49 Post by skallal »

Not sure if this is the best place for RPi respin questions?

I'm trying to debug an issue on my Pi 4. The smartd daemon is supposed to write to SYSLOG. My x64 system has a /var/log/syslog file, but my Pi doesn't.

The issue is that my network drive hosted on the Pi doesn't spin down after a specified interval. It's the hd-idle package that spins down the hard drive. It's set for 10 minutes of non use. It looks like smartd is preventing hd-idle from working though not yet for certain.

So I'd like to get SYSLOG working if possible.

User avatar
Jerry3904
Administrator
Posts: 23044
Joined: Wed Jul 19, 2006 6:13 am

Re: Official Raspberry Pi Respin

#50 Post by Jerry3904 »

When the file rpd-plym-splash was upgraded recently it overwrote the MX splash. To revert to the MX version, issue these two commands one at a time in a terminal:

Code: Select all

sudo plymouth-set-default-theme MXLiveLogo
sudo update-initramfs -u -k all
Production: 5.10, MX-23 Xfce, AMD FX-4130 Quad-Core, GeForce GT 630/PCIe/SSE2, 16 GB, SSD 120 GB, Data 1TB
Personal: Lenovo X1 Carbon with MX-23 Fluxbox
Other: Raspberry Pi 5 with MX-23 Xfce Raspberry Pi Respin

Post Reply

Return to “MX Help”