OpenELEC Forum
How to disable XBMC - Printable Version

+- OpenELEC Forum (https://forum.openelec.tv)
+-- Forum: Generic Forum (https://forum.openelec.tv/forumdisplay.php?fid=5)
+--- Forum: MISCELLANEOUS (https://forum.openelec.tv/forumdisplay.php?fid=23)
+--- Thread: How to disable XBMC (/showthread.php?tid=77157)



How to disable XBMC - bwatson - 06-07-2015

Probably a strange request since the whole purpose of openelec is to run XBMC/Kodi, but...

I used to run XBMC (I'll keep calling it that since I'm working with openelec 4.2.1 = XBMC) on my AppleTV Mk1. Served me well for years, but it's now too slow and openelec does not support it any more. I now have a more powerful box for my htpc and am going to use the atv1 as a dedicated MPD server for my bedroom. Openelec is a great mnimal appliance build that runs well on my atv1 so I'd like to keep using it. I've installed the MPD openelec addon and figured out how to get systemd to mount my music share with NFS. I've also figured out how to use systemctl to disable XBMC, Xorg, eventircd etc. Problem is, with the ro root filesystem they come back at next boot.

Is there something I can put in .config on an openelec 4.2.1 build to stop systemd from starting core services that I don't want any more?

Thanks!


How to disable XBMC - nickr - 06-08-2015

autostart.sh is the place to put such scripts.


How to disable XBMC - bwatson - 06-08-2015

Ah, OK. Didn't think of that - using autostart.sh to stop something, but makes perfect sense now that you say it.

My autostart.sh is now:

Code:
systemctl disable xorg-configure@nvidia.service
systemctl disable xorg.service
systemctl disable system-xorgx2dconfigure.slice
systemctl disable eventlircd.service
systemctl disable xbmc-autostart.service
systemctl disable xbmc-cleanlogs.service
systemctl disable xbmc-hacks.service
systemctl disable xbmc-sources.service
systemctl disable xbmc.service
systemctl disable xbmc.target
systemctl disable atvclient.service

Edit - and, that didn't work. Added a "stop" line for each and also changed the file from 644 to 755. Don't know which fixed it, but when I reboot now I just have MPD running.


How to disable XBMC - bwatson - 06-11-2015

Replying to myself again, just in case someone finds this in the future. The above still did not work. There must have been something else that re-enabled xbmc. I was fooled into thinking that it had worked because xbmc was not running. It was only later when I checked logs that I noticed that xbmc was continually being started and crashing. Maybe I had successfully disabled X...

Anyway, I now have a system that boots clean to just running mpd. My autostart.sh is:

Code:
/usr/bin/systemctl stop xorg-configure@nvidia.service
/usr/bin/systemctl stop xorg.service
/usr/bin/systemctl stop system-xorgx2dconfigure.slice
/usr/bin/systemctl stop eventlircd.service
/usr/bin/systemctl stop xbmc-autostart.service
/usr/bin/systemctl stop xbmc-cleanlogs.service
/usr/bin/systemctl stop xbmc-hacks.service
/usr/bin/systemctl stop xbmc-sources.service
/usr/bin/systemctl stop xbmc.service
/usr/bin/systemctl stop xbmc.target
/usr/bin/systemctl stop atvclient.service
/usr/bin/systemctl stop windowmanager.service

/usr/bin/systemctl mask xorg-configure@nvidia.service
/usr/bin/systemctl mask xorg.service
/usr/bin/systemctl mask system-xorgx2dconfigure.slice
/usr/bin/systemctl mask eventlircd.service
/usr/bin/systemctl mask xbmc-autostart.service
/usr/bin/systemctl mask xbmc-cleanlogs.service
/usr/bin/systemctl mask xbmc-hacks.service
/usr/bin/systemctl mask xbmc-sources.service
/usr/bin/systemctl mask xbmc.service
/usr/bin/systemctl mask xbmc.target
/usr/bin/systemctl mask atvclient.service
/usr/bin/systemctl mask windowmanager.service


I also had to update the systemd configuration for mpd - I don't recall what my service.multimedia.mpd.service originally was, but it is now:

Code:
[Unit]
Description=mpd
After=storage-music.mount

[Service]
ExecStart=/bin/sh -c "exec sh /storage/.xbmc/addons/service.multimedia.mpd/bin/mpd.start"
TimeoutStopSec=1
Restart=always
RestartSec=2
StartLimitInterval=0

[Install]
WantedBy=multi-user.target

If anyone has suggestions for a cleaner way to achieve this I'd like to hear about it...