Hallo,
Da ich mein System möglichst schlank halten will, habe ich mir mein eigenes Skript gebaut um einen Webbrowser möglichst elegant mit dem VDR zu kombinieren.
Bedienung ist weitgehend mit der Fernbedienung möglich (danke an pandel für die Grundidee). Konflikte mit der Tastaturbedienung sind soweit möglich vermieden worden. Bei mir funktioniert die IR-Fernbedienung mit dem ir-keytable Kerneltreiber (mit Steinzeit Lirc will ich nichts zu tun haben). Die Zahlentasten sind dabei auf KP_n Events gelegt und werden bei aktivem Browser zur Maussteuerung verwendet. So bleiben die Zahlentasten auf der Tastatur normal verwendbar.
Der Browser wird nur einmal gestartet und wir danach in den Hintergrund gelegt. Audio wird per alsa-softvol umgeschaltet. Dadurch kann man blitzschnell zwischen VDR und Browser wechseln. Das softhddevice SUSP/RESU Geraffel wie bei Kodi kann man sich daher ersparen.
Spezielle Tolls sind numlockx, xdotool, xbindkeys
Viel Spass
/usr/local/bin/start-chrome:
#!/bin/bash
export DISPLAY=:0.0
rm /tmp/stop-chrome
numlockx on # enforce numlock to ensure we receive KP_n events
#svdrpsend PLUG softhddevice SUSP
amixer set AUX 255
xdotool mousemove 815 145 # optimised for SRF Play
xbindkeys -f /etc/xbindkeysrc
if xdotool search --class "google-chrome" windowmap %3
then
xdotool search --class "google-chrome" windowsize %3 1920 1080
xdotool search --class "google-chrome" windowmove %3 0 0
xdotool search --class "google-chrome" key --window %3 --delay 100 Home ctrl+r
else
google-chrome \
--proxy-pac-url="http://core/local.pac" \
--alsa-output-device='aux' \
--window-size=1920,1080 --window-position=0,0 \
--kiosk "https://www.srf.ch/play/tv" >/dev/null 2>&1 &
fi
# wait for stop trigger
while [ ! -f /tmp/stop-chrome ]; do inotifywait -e create /tmp; done
rm /tmp/stop-chrome
xdotool search --class "google-chrome" windowunmap %3
killall xbindkeys
# transfer audio settings to back VDR
VOL=$(amixer get PCM | sed -n 's/.*Playback \([0-9]*\).*/\1/p' | tail -1)
if amixer get IEC958,1 | grep -q "Playback \[off\]"
then
amixer set IEC958,1 unmute
svdrpsend VOLU MUTE
else
if (( "$VOL" != 0 )); then svdrpsend VOLU $VOL; fi
fi
#svdrpsend PLUG skindesigner DLIC 2>&1 >/dev/null
#svdrpsend PLUG softhddevice RESU 2>&1 >/dev/null
amixer set AUX 1 # 0 produces clicking noise
amixer set VDR 255
Alles anzeigen
/etc/xbindkeysrc: (Primar für SRF Play und Youtube. Für Netflix gibt es eventuell noch weitere Tricks)
"xdotool mousemove_relative --sync -- -15 0"
KP_4
"xdotool mousemove_relative --sync 15 0"
KP_6
"xdotool mousemove_relative --sync -- 0 -15"
KP_2
"xdotool mousemove_relative --sync 0 15"
KP_8
"xdotool mousemove_relative --sync 1 0 mousemove_relative --sync -- -1 0 click 1"
KP_5
"xdotool mousemove 480 270"
KP_1
"xdotool mousemove 1440 270"
KP_3
"xdotool mousemove 480 810"
KP_7
"xdotool mousemove 1440 810"
KP_9
"xdotool key 0"
KP_0 + Release
"xdotool click 4"
XF86ScrollUp
"xdotool click 5"
XF86ScrollDown
"xdotool key Prior"
XF86LaunchA + Release
"xdotool key Next"
XF86LaunchB + Release
"amixer set PCM 5%+"
XF86AudioRaiseVolume
"amixer set PCM 5%-"
XF86AudioLowerVolume
"xdotool search Play key Right"
XF86AudioForward + Release
"xdotool search Play key Left"
XF86AudioRewind + Release
"amixer set IEC958,1 toggle"
XF86AudioMute
"touch /tmp/stop-chrome"
XF86Sleep + Release
"xdotool key alt+Left"
XF86Back + Release
# "svdrpsend PLUG softhddevice SUSP"
"amixer set VDR 1"
XF86Close
"xdotool key f"
c:215 + Release # XF86AudioPlay
"xdotool key Escape"
c:209 + Release # XF86AudioPause
Alles anzeigen
Die beiden ALSA Softvol's:
pcm.aux {
type softvol
slave.pcm pcm.default
control {
name "AUX"
card NVidia
}
}
pcm.vdr {
type softvol
slave.pcm pcm.default
control {
name "VDR"
card NVidia
}
}
Alles anzeigen
Start aus der commands.conf