2015-04-28, 02:13
(2015-04-27, 09:44)wsnipex Wrote: you can't run xrandr prior to starting X. Try ExecStartPost or use an autoexec.py from kodi.
If anyone else is trying this, your suggestions worked excellently after some tweaking.
ExecStartPost does, the trick, but - at least in my setup I need to sleep for about a second before running it, in order to allow X to initialize, I presume.
Also, Xrandr doesnt seem to exit cleanly, so I prefixed it with the "-" symbol, to let everything start properly.
My final working /etc/systemd/system/kodi.service for Ubuntu 15.04 with systemd looks like this:
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
ExecStartPost=/bin/sleep 1
ExecStartPost=-/usr/bin/xrandr -d :0 --output HDMI1 --set "Broadcast RGB" "Full"
Restart=on-abort
[Install]
WantedBy=multi-user.target