XBMC

= Kodi Shortcuts = Kodi/XBMC Shortcuts

O Ctrl + Shift + O
 * Video Information Shortcuts:

= OpenELEC Dual Boot=

How to dual boot(actually Triple boot) OpenELEC with Ubuntu and Windows.


 * OpenELEC itself requires at least 2 partitions.


 * Create the first partition, EXT4
 * Label it 'OE_SYSTEM', size 512MB to 1GB.
 * The OE_SYSTEM partition must be flagged as bootable.
 * Both operating system files, SYSTEM and KERNEL, must be placed into the OE_SYSTEM partition (assume /dev/sda6)


 * Create the second partition, EXT4
 * Label it 'OE_DATA', size.
 * Here all local OpenELEC/XBMC data will be placed, such as databases and thumbnails (assume /dev/sda7)


 * Write down the linux drive letters & update the below file with it
 * Unlike Grub, Grub2 starts partition counting from 1 not 0.

sudo gedit /etc/grub.d/40_custom
 * Now update Grub2:

exec tail -n +3 $0 # menuentry "OpenELEC" { search --set=root --label OE_SYSTEM --hint hd0,msdos6 linux /KERNEL boot=LABEL=OE_SYSTEM disk=LABEL=OE_DATA quiet } menuentry "OpenELEC debugging" { search --set=root --label OE_SYSTEM --hint hd0,msdos6 linux /KERNEL boot=LABEL=OE_SYSTEM disk=LABEL=OE_DATA debugging }
 * 1) !/bin/sh
 * 1) This file provides an easy way to add custom menu entries.  Simply type the
 * 2) menu entries you want to add after this comment.  Be careful not to change
 * 3) the 'exec tail' line above.

Now finalize the grub menu additions:

sudo update-grub

LibreElec Shutdown Button


Source: libreelec.tv, lowpowerlab.com, libreelec.tv

Program ---> Get more ... ---> Raspberry Pi Tools ---> install
 * Install Raspberry Pi Tools from libreELEC UI:

nano /storage/.config/shutdown_pi.py
 * Create shutdown script:

nano /storage/.config/autostart.sh
 * Create Autostart Script:

chmod +x shutdown_pi.py chmod +x autostart.sh
 * Make files executable

mount -o remount,rw /flash nano /flash/config.txt enable_uart=1
 * Enable UART for the Status LED:


 * Reboot

= OSMC =

OSMC Shutdown Button
Source: discourse.osmc.tv



sudo apt update sudo apt install python-pip python-dev gcc python-setuptools wheel pip install rpi.gpio
 * Install Raspberry Pi Tools from CLI:

nano /home/osmc/.config/shutdown_pi.py
 * Create shutdown script:

sudo chmod +x shutdown_pi.py
 * Make files executable

./home/osmc/.config/shutdown_pi.py
 * Test Script:


 * Auto Start as a Service

Create systemd service file: sudo nano /lib/systemd/system/shutdownpi.service

[Unit] Description = GPIO shutdown button

[Service] Type = idle ExecStart = /home/osmc/.config/shutdown_pi.py

[Install] WantedBy = multi-user.target

Enable the service: sudo systemctl enable shutdownpi

Start the service: sudo systemctl start shutdownpi

sudo nano /boot/config.txt enable_uart=1
 * Enable UART for the Status LED:


 * Reboot