2020-03-30, 16:35
Since i have some strange Kodi installation that requires sudo to launch Kodi, i was thinking to backup Kodi config and try to reinstall it under pi user possibly. (my pi user is not in sudoers)
1) Find Kodi config directories: find /home /root -maxdepth 2 -type d -iname ".kodi*" -exec du -h --max-depth=0 {} \;
(i do not know which one is the one i am using... the /usr/bin/kodi has root:root rights)
2) Stop Kodi gracefully or kill all pids belonging to kodi: ps aux|grep kodi;kill -9 pidhere
3) Create backup of each Kodi config directory: ext=2 && for kodidatadir in $(find /home /root -maxdepth 2 -type d -name .kodi);do cp -rpn $kodidatadir $kodidatadir$ext;done
4) remove kodi: sudo apt purge kodi;sudo apt autoremove
5) assign pi to sudo group (i have it intentionally disabled), install kodi under pi user and then remove pi from sudo: sudo addgroup pi sudo;sudo -u pi sudo apt install kodi -y;sudo delgroup pi sudo;
but it still fails:
1) Find Kodi config directories: find /home /root -maxdepth 2 -type d -iname ".kodi*" -exec du -h --max-depth=0 {} \;
(i do not know which one is the one i am using... the /usr/bin/kodi has root:root rights)
2) Stop Kodi gracefully or kill all pids belonging to kodi: ps aux|grep kodi;kill -9 pidhere
3) Create backup of each Kodi config directory: ext=2 && for kodidatadir in $(find /home /root -maxdepth 2 -type d -name .kodi);do cp -rpn $kodidatadir $kodidatadir$ext;done
4) remove kodi: sudo apt purge kodi;sudo apt autoremove
5) assign pi to sudo group (i have it intentionally disabled), install kodi under pi user and then remove pi from sudo: sudo addgroup pi sudo;sudo -u pi sudo apt install kodi -y;sudo delgroup pi sudo;
but it still fails:
Quote:pi@raspberrypi:/home/otheruser $ kodi --standalonei do not want Kodi to have root access to the computer (when running it with sudo, then i can browse all files even under different accounts)
open /dev/fb0: No such file or directory
XDG_RUNTIME_DIR (/run/user/1001) is not owned by us (uid 1000), but by uid 1001! (This could e g happen if you try to connect to a non-root PulseAudio as a root user, over the native protocol. Don't do that.)
XDG_RUNTIME_DIR (/run/user/1001) is not owned by us (uid 1000), but by uid 1001! (This could e g happen if you try to connect to a non-root PulseAudio as a root user, over the native protocol. Don't do that.)
XDG_RUNTIME_DIR (/run/user/1001) is not owned by us (uid 1000), but by uid 1001! (This could e g happen if you try to connect to a non-root PulseAudio as a root user, over the native protocol. Don't do that.)
XDG_RUNTIME_DIR (/run/user/1001) is not owned by us (uid 1000), but by uid 1001! (This could e g happen if you try to connect to a non-root PulseAudio as a root user, over the native protocol. Don't do that.)
Cannot connect to server socket err = No such file or directory
Cannot connect to server request channel
jack server is not running or cannot be started
JackShmReadWritePtr::~JackShmReadWritePtr - Init not done for -1, skipping unlock
JackShmReadWritePtr::~JackShmReadWritePtr - Init not done for -1, skipping unlock
XDG_RUNTIME_DIR (/run/user/1001) is not owned by us (uid 1000), but by uid 1001! (This could e g happen if you try to connect to a non-root PulseAudio as a root user, over the native protocol. Don't do that.)
Sorry, user pi is not allowed to execute '/home/pi/.kodi/addons/service.tvh.manager/resources/lib/shutdown.sh 0 0' as root on raspberrypi.
^CSegmentation fault