XBMC: Difference between revisions

From Network Security Wiki
Content added Content deleted
Line 118: Line 118:
== LibreElec Shutdown Button ==
== LibreElec Shutdown Button ==


Source: [https://forum.libreelec.tv/thread/1754-problem-installing-pi-tools-addon/ libreelec.tv], [https://lowpowerlab.com/forum/atxraspi/libreelec-python-script/ lowpowerlab.com]


*Install Raspberry Pi Tools from libreELEC UI:
https://forum.libreelec.tv/thread/1754-problem-installing-pi-tools-addon/
Program ---> Get more ... ---> Raspberry Pi Tools ---> install


nano /storage/.config/shutdown_pi.py
Raspberry Pi Tools


/storage/.config/shutdown_pi.py


<syntaxhighlight lang="python">
#!/bin/python
#!/bin/python
import RPi.GPIO as GPIO
import RPi.GPIO as GPIO
Line 141: Line 141:
# Our function on what to do when the button is pressed
# Our function on what to do when the button is pressed
def Shutdown(channel):
def Shutdown(channel):
os.system("sudo shutdown -h now")
os.system("poweroff")
# Add our function to execute when the button pressed event happens
# Add our function to execute when the button pressed event happens
Line 149: Line 149:
while 1:
while 1:
time.sleep(1)
time.sleep(1)
</syntaxhighlight>


nano /storage/.config/autostart.sh


<syntaxhighlight lang="bash">
/storage/.config/autostart.sh

#!/bin/bash
#!/bin/bash
(
(
/storage/.config/shutdown_pi.py
/storage/.config/shutdown_pi.py
)&
)&
</syntaxhighlight>


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


{{DISQUS}}
{{DISQUS}}

Revision as of 21:26, 6 May 2018


Kodi Shortcuts

Kodi/XBMC Shortcuts

Feature Shorcut Key
Audio delay control A
Play P
Stop X
Rewind (2x, 4x) R
Fast forward F
Rewind 30s
Forward 30s
Seek forward 10min, Next track
Step back 10min, Previous track
Variable seek backwards Ctrl+←
Variable seek forward Ctrl+→
Move subtitles up Ctrl+↑
Move subtitles down Ctrl+↓
Toggle Subtitles T
Previous Menu or Home Screen Esc
Volume Down, Volume Up, Mute + plus, – minus, F8
Shut down Menu S
Pause / Play Space bar / P
Zoom / Aspect Ratio Z
Add to Queue Q
Page up PageUp
Page down PageDown
Jump to that time in playback 1+2+3+4+Enter will jump to 12 min 34s
Jump backward in amount of time 1+0+← will jump back 10 seconds
Jump forward in amount of time 1+0+→ will jump forward 10 seconds
Jump to that letter in a list Shift + Letter
Zoom Picture Level 1-9 Picture View
Next Picture . period Picture View
Previous Picture , comma Picture View
Zoom In, Zoom Out + plus, – minus Picture View


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.
  • Now update Grub2:
sudo gedit /etc/grub.d/40_custom
#!/bin/sh
exec tail -n +3 $0
# This file provides an easy way to add custom menu entries.  Simply type the
# menu entries you want to add after this comment.  Be careful not to change
# the 'exec tail' line above.
#
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
}

Now finalize the grub menu additions:

sudo update-grub



LibreElec Shutdown Button

Source: libreelec.tv, lowpowerlab.com

  • Install Raspberry Pi Tools from libreELEC UI:
Program ---> Get more ... ---> Raspberry Pi Tools ---> install
nano /storage/.config/shutdown_pi.py
#!/bin/python  
import RPi.GPIO as GPIO  
import time  
import os
import sys

sys.path.append("/storage/.kodi/addons/virtual.rpi-tools/lib")

# Use the Broadcom SOC Pin numbers  
# Setup the Pin with Internal pullups enabled and PIN in reading mode.  
GPIO.setmode(GPIO.BCM)  
GPIO.setup(3, GPIO.IN, pull_up_down = GPIO.PUD_UP)  
 
# Our function on what to do when the button is pressed  
def Shutdown(channel):  
  os.system("poweroff")  
 
# Add our function to execute when the button pressed event happens  
GPIO.add_event_detect(3, GPIO.FALLING, callback = Shutdown, bouncetime = 2000)  
 
# Now wait!  
while 1:  
  time.sleep(1)
nano /storage/.config/autostart.sh
#!/bin/bash
(
/storage/.config/shutdown_pi.py
)&
  • Make files executable
chmod +x shutdown_pi.py 
chmod +x autostart.sh


{{#widget:DISQUS |id=networkm |uniqid=XBMC |url=https://aman.awiki.org/wiki/XBMC }}