http://kodi.wiki/view/HOW-TO:Autostart_Kodi_for_Linux
Hello, can anyone help me with this KODI init script? Well, it is working when i try to start it from xubuntu desktop, xinit create another instance of X11 only for KODi, but there is a problem, when i enable it with update-rc kodi defaults ..... after restart, X11 boots only in :1 instance, there is no :0 instance of X11, where normal xubuntu desktop is.
If you look at these settings....
# Required-Start: $all
# Required-Stop: $all
# Default-Start: 2 3 4 5
# Default-Stop: 0 1 6
... it should wait on every runlevel for all services, before this script should startup.
Sry for my engrish
Thanks
Use systemd config instead. So assuming your user running kodi is kodi and it belongs to correct groups.
Create
kodi.service in
/etc/systemd/system/kodi.service with contents.
Code:
[Unit]
Description = kodi-standalone using xinit
After = systemd-user-sessions.service network.target sound.target network-online.target
[Service]
User = kodi
Group = kodi
Type = simple
PAMName=login
ExecStart = /usr/bin/xinit /usr/bin/dbus-launch --exit-with-session /usr/bin/kodi-standalone -- :0 -nolisten tcp vt7
Restart = on-abort
[Install]
WantedBy = multi-user.target
You will also need to create a
custom-actions.pkla /etc/polkit-1/localauthority/50-local.d/custom-actions.pkla
Code:
[Actions for kodi user]
Identity=unix-user:kodi
Action=org.freedesktop.udisks.*;org.freedesktop.login1.*
ResultAny=yes
ResultInactive=yes
ResultActive=yes
[Untrusted Upgrade]
Identity=unix-user:kodi
Action=org.debian.apt.upgrade-packages;org.debian.apt.update-cache
ResultAny=yes
ResultInactive=yes
ResultActive=yes
Dont forget you need kodi user in correct groups also.
Code:
[Unit]
Description = kodi-standalone using xinit
After = systemd-user-sessions.service network.target sound.target network-online.target
[Service]
User = kodi
Group = kodi
Type = simple
PAMName=login
ExecStart = /usr/bin/xinit /usr/bin/dbus-launch --exit-with-session /usr/bin/kodi-standalone -- [color=#FF4500]:1[/color] -nolisten tcp vt7
Restart = on-abort
[Install]
WantedBy = multi-user.target
This doesnt work in xubuntu 15.04. I dont know why.
Whats the user running kodi called?
also you somehow have
Code:
ExecStart = /usr/bin/xinit /usr/bin/dbus-launch --exit-with-session /usr/bin/kodi-standalone -- [color=#FF4500]:1[/color] -nolisten tcp vt7
Typos everywhere you added code that I did not post like the color stuff and you decided to chnage the screen from :0 to :1. Recheck and ensure you havent made errors on copy and paste.
User: kodi
Thats not typo. Im trying it to run it on the another/separate instanace of X11. (:1)
It can not be started in 0: , because there is normal xubuntu desktop X11 display
Just like that:
Code:
ExecStart = /usr/bin/xinit /usr/bin/dbus-launch --exit-with-session /usr/bin/kodi-standalone -- :1 -nolisten tcp vt7
Thanks
No idea about dual monitors here.
Who mentioned multiple monitors?
Exactly, i just want to run separate X11 display with KODI over default X11 display with display manager (xubuntu desktop), all this on the same monitor.
I should be better, because accidentally pop ups and interferences from xubuntu desktop 0: display will stay isolated.
Sorry for the "necromancy".
I am interested too. But it seems that Kodi guys do not have this use case in mind. The unique use case Kodi team has in mind is running Kodi and only Kodi on a machine! I don't want to dedicate my PC to running only Kodi, I want, like any other program in the world, to keep "multitasking". For example, if I receive a mail while I am looking at a movie, I don' t mind pausing and changing screen to look at the e-mail.
Apparently this use case is just impossible with Kodi that plays badly with DE like Unity... and freezes. So the idea to launch it on a separate X (I mean as the op says here: DISPLAY :1) should provide enough isolation so that Kodi does not interfere.
Then you can still switch with CTRL-ALT-F7/F8 between your regular DE and Kodi.
... or maybe look at other Mediaplayers that behave like "normal" programs !..