bigbrozer / kodi-steamlink-launcher

Plugin for Kodi to launch Steamlink on Raspberry Pi
28 stars 18 forks source link

It asks for password when launch it #6

Open jovalbo opened 4 years ago

jovalbo commented 4 years ago

I installed it in kodi Leia 18.4

It doesnt't work, it lunch the raspbian desktop and in the middle it asks for the account password.

Do you have any clue why?

I have a raspi 4 with raspbian buster

mdPlusPlus commented 4 years ago

I was able to work around this by changing the autologin user in /etc/systemd/system/autologin@.service:

sudo sed -i "s/--autologin pi/--autologin kodi/g" /etc/systemd/system/autologin@.service

However, Steam Link is not starting.

Opening a terminal on the machine (instead of ssh) and running steamlink as user kodi results in error: This application failed to start because no Qt platform plugin could be initialized.

I guess I will just modify the plugin to run as user pi.

bigbrozer commented 4 years ago

I think the current X server is ran as "pi" user instead of "kodi" which is why you could encounter the error you got from Qt plugin loading. Please try to switch to user "pi" to check if its related...

bilbaraski commented 3 years ago

I agree it's due to the user account but I also had an issue of the timing of when commands were launched. I had to do a few other tweaks to make it work with the latest RpiDesktop (5.10). There might be a better way to do this; but it is working. Now If I can just find a way to change focus to the steamlink window so I don't have to have a mouse attached.

/etc/systemd/system/kodi.service: [Unit] Description=Kodi standalone After = systemd-user-sessions.service network.target sound.target Conflicts=getty@tty1.service

[Service] Type=idle User=pi Group=pi TTYPath=/dev/tty1 ExecStart=/usr/bin/kodi-standalone ExecStop=/usr/bin/killall --user pi --exact --wait kodi.bin Restart=on-abort StandardInput=tty StandardOutput=journal

[Install] WantedBy = multi-user.target

/home/pi/.kodi/addons/plugin.program.steamlink/resources/lib/start.sh:

!/bin/bash

DIRNAME=$( dirname "${BASH_SOURCE[0]}" ) sudo openvt -c 7 -s -f -- su pi -c "bash ${DIRNAME}/heartbeat.sh&" sudo systemctl stop kodi exit

/home/pi/.kodi/addons/plugin.program.steamlink/resources/lib/heartbeat.sh:

!/bin/bash

sleep 10 /usr/bin/xinit /usr/bin/steamlink -- :1 vt1& sleep 30 export DISPLAY=:0 while pgrep steamlink &>/dev/null; do sleep 5 done sudo systemctl restart kodi