diff --git a/Manual.html b/Manual.html index 3ce8839..41263e1 100644 --- a/Manual.html +++ b/Manual.html @@ -3,7 +3,7 @@ "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
- +A User wants to install yaVDR without customization and relies on full automation. @@ -526,22 +527,22 @@ Several roles are used to tie everything together:
One of the major problems we faced with customized Ubuntu ISO files as installation media for prior yaVDR versions has been the limited hardware support and the time consuming process to create and update them. An interesting alternative to this approach is to enable the user to choose the installation medium by himself, so point releases, kernel versions and additional drivers can be chosen deliberately. After the basic setup is complete (and a working internet connection is available), a fully customizable install script completes the yaVDR installation.
This is an experimental feature which allows to set up a yaVDR installation based on a normal Ubuntu Server 16.04.x installation using Ansible. @@ -576,11 +577,11 @@ We use a callback to generate tags for all roles autmatically:
if (( $EUID != 0 )); then +if (( $EUID != 0 )); then echo "This script must be run using sudo -H or as root" exit fi @@ -598,12 +599,12 @@ ansible-playbook yavdr07.yml -b -i 'localhost_inventory
The yavdr07.yml
playbook sets up a fully-featured yaVDR installation:
@@ -635,13 +636,14 @@ The yavdr07.yml
playbook sets up a fully-featured yaVDR installatio
- autoinstall-satip # install vdr-plugin-satip if a Sat>IP server has been found
- autoinstall-targavfd # install vdr-plugin-targavfd if display is connected
- autoinstall-imonlcd # install vdr-plugin-imonlcd if a matchind display is connected
- - autoinstall-pvr350 # install vdr-plugin-pgvr350 if a matching card is detected
+ - autoinstall-pvr350 # install vdr-plugin-pvr350 if a matching card is detected
- autoinstall-hauppauge-pvr # install vdr-plugin-pvrinput if a matching card is found
- autoinstall-dvbsddevice # install vdr-plugin-dvbsddevice if a matching card is detected
- autoinstall-hardware-irmp # install yavdr-hardware-irmp if a matching usb device is detected
- autoinstall-atric-usb # preconfigure lircd for Atric IR-WakeupUSB receiver
- autoinstall-yausbir # preconfigure lircd for yaUsbIR receiver
- - autoinstall-dvbsky-firmware # download an install required firmware files for dvbsky cards
+ - autoinstall-dvbsky-firmware # download and install required firmware files for dvbsky cards
+ - autoinstall-firmware # download and install firmware files for dvb devices
- kodi
- dvd # set up packages and a udev rule to allow kodi and other players
# to play and eject optical media
@@ -654,8 +656,8 @@ The yavdr07.yml
playbook sets up a fully-featured yaVDR installatio
For a headless server installation yavdr07-headless.yml
is a good choice
@@ -677,7 +679,12 @@ For a headless server installation yavdr07-headless.yml
is a good c
- samba-config
- nfs-server
- grub-config
- - autoinstall-satip
+ - autoinstall-satip # install vdr-plugin-satip if a Sat>IP server has been found
+ - autoinstall-pvr350 # install vdr-plugin-pvr350 if a matching card is detected
+ - autoinstall-hauppauge-pvr # install vdr-plugin-pvrinput if a matching card is found
+ - autoinstall-dvbsddevice # install vdr-plugin-dvbsddevice if a matching card is detected
+ - autoinstall-dvbsky-firmware # download and install required firmware files for dvbsky cards
+ - autoinstall-firmware # download and install firmware files for dvb devices
- wakeup
tags:
- always
@@ -688,8 +695,8 @@ For a headless server installation yavdr07-headless.yml
is a good c
This playbook can either be used to run the installation on the localhost or any other PC in the network that can be accessed via ssh. Simply add the host names or IP addresses to the hosts file in the respective section: @@ -703,12 +710,12 @@ This playbook can either be used to run the installation on the localhost or any
---
@@ -726,8 +733,8 @@ This playbook can either be used to run the installation on the localhost or any
# properties of the user vdr and vdr-related options @@ -748,14 +755,13 @@ This playbook can either be used to run the installation on the localhost or any vdr_plugins: - vdr-plugin-devstatus - vdr-plugin-markad - - vdr-plugin-restfulapi - vdr-plugin-softhddevice-vpp
# dictionary of directories for (shared) files. Automatically exported via NFS and Samba if those roles are enabled @@ -770,8 +776,8 @@ This playbook can either be used to run the installation on the localhost or any
nfs:
@@ -780,8 +786,8 @@ This playbook can either be used to run the installation on the localhost or any
samba:
@@ -791,8 +797,8 @@ This playbook can either be used to run the installation on the localhost or any
# additional packages you want to install @@ -808,8 +814,8 @@ This playbook can either be used to run the installation on the localhost or any
frontend: vdr
@@ -824,20 +830,20 @@ This playbook can either be used to run the installation on the localhost or any
---
@@ -858,19 +864,19 @@ This playbook can either be used to run the installation on the localhost or any
install nvidia-396 from ppa:graphics-drivers/ppa
---
@@ -900,15 +906,15 @@ install nvidia-396 from ppa:graphics-drivers/ppa
This role is used to set up a basic yaVDR installation. It creates the directories, installs the vdr and other useful packages.
This section is for reference only, please use the files in global_vars
for customizations.
@@ -921,7 +927,7 @@ This section is for reference only, please use the files in global_vars
Automatically installed drivers can be very useful, but if you know you need a certain driver, you can simply set it’s value to true. If you don’t want a driver to be installed, set it’s value to false. @@ -951,7 +957,7 @@ Automatically installed drivers can be very useful, but if you know you need a c
Add additional packages you would like to have on your installation to this list @@ -965,7 +971,7 @@ Add additional packages you would like to have on your installation to this list
This section allows you to set the recording directory, the user and group that runs the vdr and it’s home directory. @@ -998,15 +1004,15 @@ This section allows you to set the recording directory, the user and group that
yavdr-common executes the following tasks:
---
@@ -1023,7 +1029,7 @@ yavdr-common executes the following tasks:
This task prevents apt to automatically install all recommended dependencies for packages: @@ -1040,14 +1046,14 @@ This task prevents apt to automatically install all recommended dependencies for
- name: add PPAs apt_repository: repo: '{{ item }}' state: present - update_cache: yes + update_cache: no with_items: '{{ repositories }}' tags: - ppa @@ -1060,7 +1066,7 @@ This task prevents apt to automatically install all recommended dependencies for
- name: use bash instead of dash
@@ -1072,10 +1078,10 @@ This task prevents apt to automatically install all recommended dependencies for
- name: disable release-upgrade notifications
@@ -1097,7 +1103,7 @@ This task prevents apt to automatically install all recommended dependencies for
-
- name: apt | install basic packages
@@ -1129,7 +1135,7 @@ This task prevents apt to automatically install all recommended dependencies for
- name: apt | install extra packages
@@ -1143,17 +1149,17 @@ This task prevents apt to automatically install all recommended dependencies for
{{ ansible_managed | comment('c') }} +{{ ansible_managed | comment('c') }} // Recommends are as of now still abused in many packages APT::Install-Recommends "0"; APT::Install-Suggests "0"; @@ -1161,14 +1167,14 @@ APT::Install-Suggests "0";
Allow the vdr user to restart vdr.service
and reboot the system
{{ vdr.user }} ALL=NOPASSWD: /bin/systemctl --no-block restart vdr.service -{{ vdr.user }} ALL=NOPASSWD: /bin/systemctl --no-block reboot +{{ vdr.user }} ALL=NOPASSWD: /bin/systemctl --no-block restart vdr.service +{{ vdr.user }} ALL=NOPASSWD: /bin/systemctl --no-block reboot
vdr.service
and reboot the system
first_run: False
@@ -1189,12 +1195,12 @@ Allow the vdr user to restart vdr.service
and reboot the system
- name: get information about usb and pci hardware and loaded kernel modules
@@ -1234,16 +1240,16 @@ Allow the vdr user to restart vdr.service
and reboot the system
---
@@ -1262,7 +1268,7 @@ Allow the vdr user to restart vdr.service
and reboot the system
- name: add svdrp and svdrp-disc to /etc/services
@@ -1277,7 +1283,7 @@ Allow the vdr user to restart vdr.service
and reboot the system
- name: create vdr recdir
@@ -1312,7 +1318,7 @@ Allow the vdr user to restart vdr.service
and reboot the system
The additional plugins to install can be set in the variable {{vdr_plugins}}
in the group variables
@@ -1330,7 +1336,7 @@ The additional plugins to install can be set in the variable {{vdr_plugins
- name: ensure vdr is stopped
@@ -1361,7 +1367,7 @@ The additional plugins to install can be set in the variable {{vdr_plugins
- name: create directory for vdr.service systemd drop-in files
@@ -1382,8 +1388,8 @@ The additional plugins to install can be set in the variable {{vdr_plugins
Start after network-online.target @@ -1395,12 +1401,12 @@ Start after network-online.target
LIRC.Up KEY_UP @@ -1535,7 +1541,7 @@ XKeySym.Next XF86AudioNext
# Remote control key macros for VDR @@ -1561,12 +1567,12 @@ User0 @osdteletext
install_avahi: true @@ -1574,8 +1580,8 @@ User0 @osdteletext
---
@@ -1645,15 +1651,15 @@ User0 @osdteletext
---
@@ -1682,12 +1688,12 @@ User0 @osdteletext
/srv *(rw,fsid=0,sync,no_subtree_check,all_squash,anongid={{ vdr.gid }},anonuid={{ vdr.uid }})
@@ -1698,7 +1704,7 @@ User0 @osdteletext
<?xml version="1.0" standalone='no'?> @@ -1719,12 +1725,13 @@ User0 @osdteletext
lircd0_socket: /var/run/lirc/lircd0
@@ -1732,8 +1739,8 @@ User0 @osdteletext
---
@@ -1806,12 +1813,12 @@ User0 @osdteletext
{% if frontend != 'kodi' %} @@ -1822,7 +1829,7 @@ User0 @osdteletext
[Service]
@@ -1832,10 +1839,11 @@ User0 @osdteletext
# +{{ ansible_managed | comment }} +# # Keymaps table # # This table creates an association between a keycode file and a kernel @@ -2023,17 +2031,17 @@ ati_remote rc-medion-x10-digitainer /lib/udev/rc_keymaps/rc-medion-x10-digi
---
@@ -2056,8 +2064,8 @@ ati_remote rc-medion-x10-digitainer /lib/udev/rc_keymaps/rc-medion-x10-digi
# Use PulseAudio by default @@ -2079,12 +2087,13 @@ ati_remote rc-medion-x10-digitainer /lib/udev/rc_keymaps/rc-medion-x10-digi
The X-Server is started by using the two systemd units xlogin@.service
and x@.service
provided by the package xlogin. The former is enabled (and started) for the vdr user - which results (using the default settings for the user vdr with the uid 666) in the activation of xlogin@vdr.service
when reaching the graphical.target. To simplify starting and stopping the X-server and the desktop session a yavdr-xorg.service
is provided by the package yavdr-xorg
, which depends on the two units mentioned before.
@@ -2113,8 +2122,8 @@ In order to achive a clean shutdown of the session, x@t7.service
is
first_run: False
@@ -2137,12 +2146,12 @@ In order to achive a clean shutdown of the session, x@t7.service
is
---
@@ -2155,7 +2164,7 @@ In order to achive a clean shutdown of the session, x@t7.service
is
---
@@ -2276,7 +2285,7 @@ In order to achive a clean shutdown of the session, x@t7.service
is
---
@@ -2432,21 +2441,76 @@ In order to achive a clean shutdown of the session, x@t7.service
is
when:
- nvidia_detected
+
+
+KMS drivers (like for intel (i915) and amd (radeon)) require additional configuration beneath a customized xorg.conf
- for a „static“ output configuration (which works if the TV or AV receiver is not turned on) we need to force loading the display(s) EDID early during the boot process.
+
+This task therefore performs the following actions after the xrandr detection has been executed: +
+
+Please note that rescanning the connected displays works only after removing the forced loading of EDID(s) during boot (call clean-edids
) and a reboot.
+
- name: "create initramfs hook to copy EDID files" + copy: + src: files/include-edid-data.sh + dest: '/etc/initramfs-tools/hooks/include-edid-data' + mode: 0755 + force: yes + +- name: "create /lib/firmware/edid" + file: + state: directory + dest: /lib/firmware/edid +# TODO: +# - write EDID files to /lib/firmware/edid/ +# - complete template for grub.d +name: "add kernel boot parameters for static display configuration" +template: + src: templates/grub.d/intel.j2 + dest: /etc/grub.d/99_intel + mode: 0755 + notify: ['Update Initramfs', 'Update GRUB'] +
{% set output_flag = 'D' if ("HDMI" in xorg.primary.connector or "DVI" in xorg.primary.connector or "DP" in xorg.primary.connector) else 'e' %} +GRUB_CMDLINE_LINUX+=" video={{ xorg.primary.drm_connector }}:{{ xorg.primary.mode|replace('_', '@') }}{{ output_flag }} drm.edid_firmware={{ xorg.primary.drm_connector }}:edid/edid.bin" +# TODO: configure additional monitors (second monitor on, all others off) ++
# file: roles/yavdr-xorg/templates/systemd/system/x-verbose@.service.j2
[Unit]
@@ -2461,8 +2525,8 @@ In order to achive a clean shutdown of the session, x@t7.service
is
[Unit]
After=plymouth.service
@@ -2487,8 +2551,8 @@ In order to achive a clean shutdown of the session, x@t7.service
is
{{ ansible_managed | comment }}
[Unit]
@@ -2499,8 +2563,8 @@ In order to achive a clean shutdown of the session, x@t7.service
is
{{ ansible_managed | comment }} @@ -2513,8 +2577,8 @@ EndSection
Section "Device" Identifier "nvidia" @@ -2640,14 +2704,14 @@ EndSection
{{ ansible_managed | comment }} +{{ ansible_managed | comment }} Section "ServerLayout" Identifier "Layout0" Screen 0 "Screen0" - {% if xorg.best_tv_mode.secondary is defined %} + {% if xorg.best_tv_mode.secondary is defined %} Screen 1 "Screen1" RightOf "Screen0" - {% endif %} + {% endif %} InputDevice "Keyboard0" "CoreKeyboard" InputDevice "Mouse0" "CorePointer" EndSection @@ -2684,54 +2748,54 @@ Section "Monitor" Identifier "Monitor0" VendorName "Unknown" ModelName "Unknown" -{# TODO: VGA2SCART support (if needed) -{% if system.x11.display.0.default == "VGA2Scart_4_3" or system.x11.display.0.default == "VGA2Scart_16_9" %} +{# TODO: VGA2SCART support (if needed) +{% if system.x11.display.0.default == "VGA2Scart_4_3" or system.x11.display.0.default == "VGA2Scart_16_9" %} HorizSync 14-17 VertRefresh 49-61 - {% if system.x11.display.0.default == "VGA2Scart_4_3" %} + {% if system.x11.display.0.default == "VGA2Scart_4_3" %} Modeline "VGA2Scart_4_3" 13.875 720 744 808 888 576 580 585 625 -HSync -Vsync interlace - {% elif system.x11.display.0.default == "VGA2Scart_16_9" %} + {% elif system.x11.display.0.default == "VGA2Scart_16_9" %} Modeline "VGA2Scart_16_9" 19 1024 1032 1120 1216 576 581 586 625 -Hsync -Vsync interlace - {% endif %} -{% endif %} + {% endif %} +{% endif %} #} Option "DPMS" Option "ExactModeTimingsDVI" "True" EndSection -{% if xrandr.best_tv_mode.secondary is defined %} +{% if xrandr.best_tv_mode.secondary is defined %} Section "Monitor" Identifier "Monitor1" VendorName "Unknown" ModelName "Unknown" -{# -{% if system.x11.display.1.default in ("VGA2Scart_4_3", "VGA2Scart_16_9") %} +{# +{% if system.x11.display.1.default in ("VGA2Scart_4_3", "VGA2Scart_16_9") %} HorizSync 14-17 VertRefresh 49-61 - {% if system.x11.display.1.default == "VGA2Scart_4_3" %} + {% if system.x11.display.1.default == "VGA2Scart_4_3" %} Modeline "VGA2Scart_4_3" 13.875 720 744 808 888 576 580 585 625 -HSync -Vsync interlace - {% elif system.x11.display.1.default == "VGA2Scart_16_9" %} + {% elif system.x11.display.1.default == "VGA2Scart_16_9" %} Modeline "VGA2Scart_16_9" 19 1024 1032 1120 1216 576 581 586 625 -Hsync -Vsync interlace - {% endif %} + {% endif %} Option "DPMS" Option "ExactModeTimingsDVI" "True" -{% endif %} +{% endif %} #} EndSection -{% endif %} +{% endif %} Section "Device" Identifier "Device0" -{% if system.hardware.nvidia.detected %} +{% if system.hardware.nvidia.detected %} Driver "nvidia" VendorName "NVIDIA Corporation" -{% endif %} +{% endif %} Screen 0 Option "DPI" "100x100" -{% if system.hardware.nvidia.busid is defined and system.hardware.busid %} +{% if system.hardware.nvidia.busid is defined and system.hardware.busid %} BusID "PCI: {{ system.hardware.nvidia.busid }}" -{% endif %} +{% endif %} Option "NoLogo" "True" Option "UseEvents" "True" Option "TripleBuffer" "False" @@ -2742,17 +2806,17 @@ Section "Device" Option "FlatPanelProperties" "Scaling = Native" EndSection -{% if xrandr.best_tv_mode.secondary is defined %} +{% if xrandr.best_tv_mode.secondary is defined %} Section "Device" Identifier "Device1" - {% if system.hardware.nvidia.detected %} + {% if system.hardware.nvidia.detected %} Driver "nvidia" VendorName "NVIDIA Corporation" - {% endif %} + {% endif %} Screen 1 - {% if system.hardware.nvidia.busid is defined and system.hardware.nvidia.busid %} + {% if system.hardware.nvidia.busid is defined and system.hardware.nvidia.busid %} BusID "PCI: {{ system.hardware.nvidia.busid }}" - {% endif %} + {% endif %} Option "NoLogo" "True" Option "UseEvents" "True" Option "TripleBuffer" "False" @@ -2760,7 +2824,7 @@ Section "Device" Option "TwinView" "0" Option "DynamicTwinView" "0" EndSection -{% endif %} +{% endif %} Section "Screen" @@ -2770,19 +2834,19 @@ Section "Screen" DefaultDepth 24 SubSection "Display" Depth 24 -{% if xrandr.best_tv_mode.primary is defined %} - Modes "{{ xrandr.best_tv_mode.primary.mode }}"{#{% for mode in xrandr %}{% if mode != system.x11.display.0.default %} "{{ mode }}"{% endif %}{% endfor %}#} nvidia-auto-select +{% if xrandr.best_tv_mode.primary is defined %} + Modes "{{ xrandr.best_tv_mode.primary.mode }}"{#{% for mode in xrandr %}{% if mode != system.x11.display.0.default %} "{{ mode }}"{% endif %}{% endfor %}#} nvidia-auto-select -{% elif system.hardware.nvidia.detected == 1 %} +{% elif system.hardware.nvidia.detected == 1 %} Modes "nvidia-auto-select" -{% endif %} +{% endif %} EndSubSection -{% if system.x11.display.0.default or system.x11.default %} - {% if system.x11.display.0.device is definded and system.x11.display.0.device %} - Option "ConnectedMonitor" {{ system.x11.display.0.device }} - {% else %} - Option "ConnectedMonitor" {{ system.x11.default }} - {% endif %} +{% if system.x11.display.0.default or system.x11.default %} + {% if system.x11.display.0.device is definded and system.x11.display.0.device %} + Option "ConnectedMonitor" {{ system.x11.display.0.device }} + {% else %} + Option "ConnectedMonitor" {{ system.x11.default }} + {% endif %} # Option "ConnectedMonitor" "<?cs if:(?system.x11.display.0.device) ?><?cs call:fix_display_name(system.x11.display.0.device) ?><?cs else ?><?cs var:system.x11.default ?><?cs /if ?><?cs if:(?system.x11.dualhead.enabled && system.x11.dualhead.enabled == 1) ?>, <?cs call:fix_display_name(system.x11.display.1.device) ?><?cs /if ?>" #Option "ConnectedMonitor" "<?cs if:(?system.x11.display.0.device) ?> @@ -2800,10 +2864,10 @@ Section "Screen" # Option "MetaModes" "<?cs call:fix_display_name(system.x11.display.0.device) ?>: <?cs var:system.x11.display.0.default ?> { ViewPortIn=<?cs var:system.x11.display.0.viewport.in.x ?>x<?cs var:system.x11.display.0.viewport.in.y ?>, ViewPortOut=<?cs var:system.x11.display.0.viewport.out.x ?>x<?cs var:system.x11.display.0.viewport.out.y ?>+<?cs var:system.x11.display.0.viewport.out.plusx ?>+<?cs var:system.x11.display.0.viewport.out.plusy ?> }" # <?cs each:mode = system.x11.display.0.mode ?><?cs if:(mode != system.x11.display.0.default) ?> # Option "MetaModes" "<?cs call:fix_display_name(system.x11.display.0.device) ?>: <?cs var:mode ?> { ViewPortIn=<?cs var:system.x11.display.0.viewport.in.x ?>x<?cs var:system.x11.display.0.viewport.in.y ?>, ViewPortOut=<?cs var:system.x11.display.0.viewport.out.x ?>x<?cs var:system.x11.display.0.viewport.out.y ?>+<?cs var:system.x11.display.0.viewport.out.plusx ?>+<?cs var:system.x11.display.0.viewport.out.plusy ?> }"<?cs /if ?><?cs /each ?> -{% endif %} +{% endif %} EndSection -{% if system.x11.dualhead.enabled == "1" %} +{% if system.x11.dualhead.enabled == "1" %} Section "Screen" Identifier "Screen1" @@ -2812,12 +2876,12 @@ Section "Screen" DefaultDepth 24 SubSection "Display" Depth 24 -{% if system.x11.display.0.default is defined and system.x11.display.0.default %} - Modes "{{ system.x11.display.1.default }}"{% for mode in system.x11.display.1.mode %}{% if mode != system.x11.display.1.default %} "{{ mode }}"{% endif %}{% endfor %} +{% if system.x11.display.0.default is defined and system.x11.display.0.default %} + Modes "{{ system.x11.display.1.default }}"{% for mode in system.x11.display.1.mode %}{% if mode != system.x11.display.1.default %} "{{ mode }}"{% endif %}{% endfor %} -{% elif system.hardware.nvidia.detected == "1" %} +{% elif system.hardware.nvidia.detected == "1" %} Modes "nvidia-auto-select" -{% endif %} +{% endif %} EndSubSection # <?cs if:(?system.x11.display.1.default && system.x11.display.1.default != "" && system.x11.display.1.default != "disabled") ?> @@ -2832,15 +2896,15 @@ Section "Screen" # Option "MetaModes" "<?cs call:fix_display_name(system.x11.display.1.device) ?>: <?cs var:mode ?> { ViewPortIn=<?cs var:system.x11.display.1.viewport.in.x ?>x<?cs var:system.x11.display.1.viewport.in.y ?>, ViewPortOut=<?cs var:system.x11.display.1.viewport.out.x ?>x<?cs var:system.x11.display.1.viewport.out.y ?>+<?cs var:system.x11.display.1.viewport.out.plusx ?>+<?cs var:system.x11.display.1.viewport.out.plusy ?> }"<?cs /if ?><?cs /each ?> # <?cs /if ?> EndSection -{% endif %} +{% endif %}
Set environment variables for system locale and user session on startup
@@ -2855,18 +2919,47 @@ Set environment variables for system locale and user session on startup#!/bin/bash +# Created by yavdr-ansible. +# This hook copies EDID files with the naming scheme "edid.${OUTPUT}.bin" to the initramfs. + +[ "$1" = "prereqs" ] && { echo "udev"; exit 0; } + +# load hook helper functions +. /usr/share/initramfs-tools/hook-functions + +rm /lib/firmware/edid/edid.*.bin +find "/etc/X11/" -name "edid.*.bin" -type f -exec cp -t "/lib/firmware/edid/" {} + +mkdir -p "${DESTDIR}/lib/firmware/edid" +find "/etc/X11/" -name "edid.*.bin" -type f -exec cp -t "${DESTDIR}/lib/firmware/edid/" {} + +manual_add_modules i915 radeon +exit 0 ++
--- @@ -2916,6 +3009,14 @@ Set environment variables for system locale and user session on startup owner: '{{ vdr.user }}' group: '{{ vdr.group }}' +- name: expand rc2.xml for openbox on second display + template: + src: 'templates/openbox/rc2.xml.j2' + dest: '{{ vdr.home }}/.config/openbox/rc2.xml' + mode: 0644 + owner: '{{ vdr.user }}' + group: '{{ vdr.group }}' + - name: create yavdr-desktop.target for the user session template: src: 'templates/systemd/user/yavdr-desktop.target.j2' @@ -3007,14 +3108,14 @@ Set environment variables for system locale and user session on startup
xterm*background: Black @@ -3037,11 +3138,11 @@ XTerm.vt100.font: 7x13
#!/bin/bash -{{ ansible_managed | comment }} +{{ ansible_managed | comment }} exec openbox-session
# forward environment variables to an environment file and the systemd user session @@ -3060,12 +3161,12 @@ systemctl --user import-environment DISPLAY XAUTHORITY XDG_RUNTIME_DIR DBUS_SESS feh --bg-center "/usr/share/yavdr/images/yavdr_logo.png" -enabled_services=( +enabled_services=( "tmux.service" "detect-second-display.service" "openbox-second.service" "osd2web.service" "yavdr-frontend.service" "pulseaudio.socket" - "pulseaudio.service" "wm-exit.service" "irexec.service") -disabled_services=() + "pulseaudio.service" "wm-exit.service" "irexec.service") +disabled_services=() # enable configured services for the user session for service in "${enabled_services[@]}"; do @@ -3077,7 +3178,7 @@ feh --bg-center "/usr/share/yavdr/images/yavdr_logo.png systemctl --user disable "$service" done -if which dbus-update-activation-environment >/dev/null 2>&1; then +if which dbus-update-activation-environment >/dev/null 2>&1; then dbus-update-activation-environment DISPLAY XAUTHORITY XDG_RUNTIME_DIR fi @@ -3087,7 +3188,7 @@ systemctl --user isolate yavdr-desktop.target
<?xml version="1.0" encoding="UTF-8"?> @@ -3903,6 +4004,826 @@ systemctl --user isolate yavdr-desktop.target </applications> </openbox_config> ++
<?xml version="1.0" encoding="UTF-8"?> +<openbox_config xmlns="http://openbox.org/3.4/rc" xmlns:xi="http://www.w3.org/2001/XInclude"> +<!-- Do not edit this file, it will be overwritten on install. + Copy the file to $HOME/.config/openbox/ instead. --> + <resistance> + <strength>10</strength> + <screen_edge_strength>20</screen_edge_strength> + </resistance> + <focus> + <focusNew>no</focusNew> + <!-- always try to focus new windows when they appear. other rules do + apply --> + <followMouse>no</followMouse> + <!-- move focus to a window when you move the mouse into it --> + <focusLast>yes</focusLast> + <!-- focus the last used window when changing desktops, instead of the one + under the mouse pointer. when followMouse is enabled --> + <underMouse>no</underMouse> + <!-- move focus under the mouse, even when the mouse is not moving --> + <focusDelay>200</focusDelay> + <!-- when followMouse is enabled, the mouse must be inside the window for + this many milliseconds (1000 = 1 sec) before moving focus to it --> + <raiseOnFocus>no</raiseOnFocus> + <!-- when followMouse is enabled, and a window is given focus by moving the + mouse into it, also raise the window --> + </focus> + <placement> + <policy>Smart</policy> + <!-- 'Smart' or 'UnderMouse' --> + <center>yes</center> + <!-- whether to place windows in the center of the free area found or + the top left corner --> + <monitor>Active</monitor> + <!-- with Smart placement on a multi-monitor system, try to place new windows + on: 'Any' - any monitor, 'Mouse' - where the mouse is, 'Active' - where + the active window is, 'Primary' - only on the primary monitor --> + <primaryMonitor>Active</primaryMonitor> + <!-- The monitor where Openbox should place popup dialogs such as the + focus cycling popup, or the desktop switch popup. It can be an index + from 1, specifying a particular monitor. Or it can be one of the + following: 'Mouse' - where the mouse is, or + 'Active' - where the active window is --> + </placement> + <theme> + <name>Onyx</name> + <titleLayout>NLIMC</titleLayout> + <!-- + available characters are NDSLIMC, each can occur at most once. + N: window icon + L: window label (AKA title). + I: iconify + M: maximize + C: close + S: shade (roll up/down) + D: omnipresent (on all desktops). + --> + <keepBorder>no</keepBorder> + <animateIconify>yes</animateIconify> + <font place="ActiveWindow"> + <name>sans</name> + <size>8</size> + <!-- font size in points --> + <weight>bold</weight> + <!-- 'bold' or 'normal' --> + <slant>normal</slant> + <!-- 'italic' or 'normal' --> + </font> + <font place="InactiveWindow"> + <name>sans</name> + <size>8</size> + <!-- font size in points --> + <weight>bold</weight> + <!-- 'bold' or 'normal' --> + <slant>normal</slant> + <!-- 'italic' or 'normal' --> + </font> + <font place="MenuHeader"> + <name>sans</name> + <size>9</size> + <!-- font size in points --> + <weight>normal</weight> + <!-- 'bold' or 'normal' --> + <slant>normal</slant> + <!-- 'italic' or 'normal' --> + </font> + <font place="MenuItem"> + <name>sans</name> + <size>9</size> + <!-- font size in points --> + <weight>normal</weight> + <!-- 'bold' or 'normal' --> + <slant>normal</slant> + <!-- 'italic' or 'normal' --> + </font> + <font place="ActiveOnScreenDisplay"> + <name>sans</name> + <size>9</size> + <!-- font size in points --> + <weight>bold</weight> + <!-- 'bold' or 'normal' --> + <slant>normal</slant> + <!-- 'italic' or 'normal' --> + </font> + <font place="InactiveOnScreenDisplay"> + <name>sans</name> + <size>9</size> + <!-- font size in points --> + <weight>bold</weight> + <!-- 'bold' or 'normal' --> + <slant>normal</slant> + <!-- 'italic' or 'normal' --> + </font> + </theme> + <desktops> + <!-- this stuff is only used at startup, pagers allow you to change them + during a session + + these are default values to use when other ones are not already set + by other applications, or saved in your session + + use obconf if you want to change these without having to log out + and back in --> + <number>2</number> + <firstdesk>1</firstdesk> + <names> + <!-- set names up here if you want to, like this: + <name>desktop 1</name> + <name>desktop 2</name> + --> + </names> + <popupTime>875</popupTime> + <!-- The number of milliseconds to show the popup for when switching + desktops. Set this to 0 to disable the popup. --> + </desktops> + <resize> + <drawContents>yes</drawContents> + <popupShow>Nonpixel</popupShow> + <!-- 'Always', 'Never', or 'Nonpixel' (xterms and such) --> + <popupPosition>Center</popupPosition> + <!-- 'Center', 'Top', or 'Fixed' --> + <popupFixedPosition> + <!-- these are used if popupPosition is set to 'Fixed' --> + <x>10</x> + <!-- positive number for distance from left edge, negative number for + distance from right edge, or 'Center' --> + <y>10</y> + <!-- positive number for distance from top edge, negative number for + distance from bottom edge, or 'Center' --> + </popupFixedPosition> + </resize> + <!-- You can reserve a portion of your screen where windows will not cover when + they are maximized, or when they are initially placed. + Many programs reserve space automatically, but you can use this in other + cases. --> + <margins> + <top>0</top> + <bottom>0</bottom> + <left>0</left> + <right>0</right> + </margins> + <dock> + <position>TopLeft</position> + <!-- (Top|Bottom)(Left|Right|)|Top|Bottom|Left|Right|Floating --> + <floatingX>0</floatingX> + <floatingY>0</floatingY> + <noStrut>no</noStrut> + <stacking>Above</stacking> + <!-- 'Above', 'Normal', or 'Below' --> + <direction>Vertical</direction> + <!-- 'Vertical' or 'Horizontal' --> + <autoHide>no</autoHide> + <hideDelay>300</hideDelay> + <!-- in milliseconds (1000 = 1 second) --> + <showDelay>300</showDelay> + <!-- in milliseconds (1000 = 1 second) --> + <moveButton>Middle</moveButton> + <!-- 'Left', 'Middle', 'Right' --> + </dock> + <keyboard> + <chainQuitKey>C-g</chainQuitKey> + <!-- Keybindings for desktop switching --> + <keybind key="C-A-Left"> + <action name="GoToDesktop"> + <to>left</to> + <wrap>no</wrap> + </action> + </keybind> + <keybind key="C-A-Right"> + <action name="GoToDesktop"> + <to>right</to> + <wrap>no</wrap> + </action> + </keybind> + <keybind key="C-A-Up"> + <action name="GoToDesktop"> + <to>up</to> + <wrap>no</wrap> + </action> + </keybind> + <keybind key="C-A-Down"> + <action name="GoToDesktop"> + <to>down</to> + <wrap>no</wrap> + </action> + </keybind> + <keybind key="S-A-Left"> + <action name="SendToDesktop"> + <to>left</to> + <wrap>no</wrap> + </action> + </keybind> + <keybind key="S-A-Right"> + <action name="SendToDesktop"> + <to>right</to> + <wrap>no</wrap> + </action> + </keybind> + <keybind key="S-A-Up"> + <action name="SendToDesktop"> + <to>up</to> + <wrap>no</wrap> + </action> + </keybind> + <keybind key="S-A-Down"> + <action name="SendToDesktop"> + <to>down</to> + <wrap>no</wrap> + </action> + </keybind> + <keybind key="W-F1"> + <action name="GoToDesktop"> + <to>1</to> + </action> + </keybind> + <keybind key="W-F2"> + <action name="GoToDesktop"> + <to>2</to> + </action> + </keybind> + <keybind key="W-F3"> + <action name="GoToDesktop"> + <to>3</to> + </action> + </keybind> + <keybind key="W-F4"> + <action name="GoToDesktop"> + <to>4</to> + </action> + </keybind> + <keybind key="W-d"> + <action name="ToggleShowDesktop"/> + </keybind> + <!-- Keybindings for windows --> + <keybind key="A-F4"> + <action name="Close"/> + </keybind> + <keybind key="A-Escape"> + <action name="Lower"/> + <action name="FocusToBottom"/> + <action name="Unfocus"/> + </keybind> + <keybind key="A-space"> + <action name="ShowMenu"> + <menu>client-menu</menu> + </action> + </keybind> + <!-- Take a screenshot of the current window with scrot when Alt+Print are pressed --> + <keybind key="A-Print"> + <action name="Execute"> + <command>scrot -s</command> + </action> + </keybind> + <!-- Keybindings for window switching --> + <keybind key="A-Tab"> + <action name="NextWindow"> + <finalactions> + <action name="Focus"/> + <action name="Raise"/> + <action name="Unshade"/> + </finalactions> + </action> + </keybind> + <keybind key="A-S-Tab"> + <action name="PreviousWindow"> + <finalactions> + <action name="Focus"/> + <action name="Raise"/> + <action name="Unshade"/> + </finalactions> + </action> + </keybind> + <keybind key="C-A-Tab"> + <action name="NextWindow"> + <panels>yes</panels> + <desktop>yes</desktop> + <finalactions> + <action name="Focus"/> + <action name="Raise"/> + <action name="Unshade"/> + </finalactions> + </action> + </keybind> + <!-- Keybindings for window switching with the arrow keys --> + <keybind key="W-S-Right"> + <action name="DirectionalCycleWindows"> + <direction>right</direction> + </action> + </keybind> + <keybind key="W-S-Left"> + <action name="DirectionalCycleWindows"> + <direction>left</direction> + </action> + </keybind> + <keybind key="W-S-Up"> + <action name="DirectionalCycleWindows"> + <direction>up</direction> + </action> + </keybind> + <keybind key="W-S-Down"> + <action name="DirectionalCycleWindows"> + <direction>down</direction> + </action> + </keybind> + </keyboard> + <mouse> + <dragThreshold>1</dragThreshold> + <!-- number of pixels the mouse must move before a drag begins --> + <doubleClickTime>500</doubleClickTime> + <!-- in milliseconds (1000 = 1 second) --> + <screenEdgeWarpTime>400</screenEdgeWarpTime> + <!-- Time before changing desktops when the pointer touches the edge of the + screen while moving a window, in milliseconds (1000 = 1 second). + Set this to 0 to disable warping --> + <screenEdgeWarpMouse>false</screenEdgeWarpMouse> + <!-- Set this to TRUE to move the mouse pointer across the desktop when + switching due to hitting the edge of the screen --> + <context name="Frame"> + <mousebind button="A-Left" action="Press"> + <action name="Focus"/> + <action name="Raise"/> + </mousebind> + <mousebind button="A-Left" action="Click"> + <action name="Unshade"/> + </mousebind> + <mousebind button="A-Left" action="Drag"> + <action name="Move"/> + </mousebind> + <mousebind button="A-Right" action="Press"> + <action name="Focus"/> + <action name="Raise"/> + <action name="Unshade"/> + </mousebind> + <mousebind button="A-Right" action="Drag"> + <action name="Resize"/> + </mousebind> + <mousebind button="A-Middle" action="Press"> + <action name="Lower"/> + <action name="FocusToBottom"/> + <action name="Unfocus"/> + </mousebind> + <mousebind button="A-Up" action="Click"> + <action name="GoToDesktop"> + <to>previous</to> + </action> + </mousebind> + <mousebind button="A-Down" action="Click"> + <action name="GoToDesktop"> + <to>next</to> + </action> + </mousebind> + <mousebind button="C-A-Up" action="Click"> + <action name="GoToDesktop"> + <to>previous</to> + </action> + </mousebind> + <mousebind button="C-A-Down" action="Click"> + <action name="GoToDesktop"> + <to>next</to> + </action> + </mousebind> + <mousebind button="A-S-Up" action="Click"> + <action name="SendToDesktop"> + <to>previous</to> + </action> + </mousebind> + <mousebind button="A-S-Down" action="Click"> + <action name="SendToDesktop"> + <to>next</to> + </action> + </mousebind> + </context> + <context name="Titlebar"> + <mousebind button="Left" action="Drag"> + <action name="Move"/> + </mousebind> + <mousebind button="Left" action="DoubleClick"> + <action name="ToggleMaximize"/> + </mousebind> + <mousebind button="Up" action="Click"> + <action name="if"> + <shaded>no</shaded> + <then> + <action name="Shade"/> + <action name="FocusToBottom"/> + <action name="Unfocus"/> + <action name="Lower"/> + </then> + </action> + </mousebind> + <mousebind button="Down" action="Click"> + <action name="if"> + <shaded>yes</shaded> + <then> + <action name="Unshade"/> + <action name="Raise"/> + </then> + </action> + </mousebind> + </context> + <context name="Titlebar Top Right Bottom Left TLCorner TRCorner BRCorner BLCorner"> + <mousebind button="Left" action="Press"> + <action name="Focus"/> + <action name="Raise"/> + <action name="Unshade"/> + </mousebind> + <mousebind button="Middle" action="Press"> + <action name="Lower"/> + <action name="FocusToBottom"/> + <action name="Unfocus"/> + </mousebind> + <mousebind button="Right" action="Press"> + <action name="Focus"/> + <action name="Raise"/> + <action name="ShowMenu"> + <menu>client-menu</menu> + </action> + </mousebind> + </context> + <context name="Top"> + <mousebind button="Left" action="Drag"> + <action name="Resize"> + <edge>top</edge> + </action> + </mousebind> + </context> + <context name="Left"> + <mousebind button="Left" action="Drag"> + <action name="Resize"> + <edge>left</edge> + </action> + </mousebind> + </context> + <context name="Right"> + <mousebind button="Left" action="Drag"> + <action name="Resize"> + <edge>right</edge> + </action> + </mousebind> + </context> + <context name="Bottom"> + <mousebind button="Left" action="Drag"> + <action name="Resize"> + <edge>bottom</edge> + </action> + </mousebind> + <mousebind button="Right" action="Press"> + <action name="Focus"/> + <action name="Raise"/> + <action name="ShowMenu"> + <menu>client-menu</menu> + </action> + </mousebind> + </context> + <context name="TRCorner BRCorner TLCorner BLCorner"> + <mousebind button="Left" action="Press"> + <action name="Focus"/> + <action name="Raise"/> + <action name="Unshade"/> + </mousebind> + <mousebind button="Left" action="Drag"> + <action name="Resize"/> + </mousebind> + </context> + <context name="Client"> + <mousebind button="Left" action="Press"> + <action name="Focus"/> + <action name="Raise"/> + </mousebind> + <mousebind button="Middle" action="Press"> + <action name="Focus"/> + <action name="Raise"/> + </mousebind> + <mousebind button="Right" action="Press"> + <action name="Focus"/> + <action name="Raise"/> + </mousebind> + </context> + <context name="Icon"> + <mousebind button="Left" action="Press"> + <action name="Focus"/> + <action name="Raise"/> + <action name="Unshade"/> + <action name="ShowMenu"> + <menu>client-menu</menu> + </action> + </mousebind> + <mousebind button="Right" action="Press"> + <action name="Focus"/> + <action name="Raise"/> + <action name="ShowMenu"> + <menu>client-menu</menu> + </action> + </mousebind> + </context> + <context name="AllDesktops"> + <mousebind button="Left" action="Press"> + <action name="Focus"/> + <action name="Raise"/> + <action name="Unshade"/> + </mousebind> + <mousebind button="Left" action="Click"> + <action name="ToggleOmnipresent"/> + </mousebind> + </context> + <context name="Shade"> + <mousebind button="Left" action="Press"> + <action name="Focus"/> + <action name="Raise"/> + </mousebind> + <mousebind button="Left" action="Click"> + <action name="ToggleShade"/> + </mousebind> + </context> + <context name="Iconify"> + <mousebind button="Left" action="Press"> + <action name="Focus"/> + <action name="Raise"/> + </mousebind> + <mousebind button="Left" action="Click"> + <action name="Iconify"/> + </mousebind> + </context> + <context name="Maximize"> + <mousebind button="Left" action="Press"> + <action name="Focus"/> + <action name="Raise"/> + <action name="Unshade"/> + </mousebind> + <mousebind button="Middle" action="Press"> + <action name="Focus"/> + <action name="Raise"/> + <action name="Unshade"/> + </mousebind> + <mousebind button="Right" action="Press"> + <action name="Focus"/> + <action name="Raise"/> + <action name="Unshade"/> + </mousebind> + <mousebind button="Left" action="Click"> + <action name="ToggleMaximize"/> + </mousebind> + <mousebind button="Middle" action="Click"> + <action name="ToggleMaximize"> + <direction>vertical</direction> + </action> + </mousebind> + <mousebind button="Right" action="Click"> + <action name="ToggleMaximize"> + <direction>horizontal</direction> + </action> + </mousebind> + </context> + <context name="Close"> + <mousebind button="Left" action="Press"> + <action name="Focus"/> + <action name="Raise"/> + <action name="Unshade"/> + </mousebind> + <mousebind button="Left" action="Click"> + <action name="Close"/> + </mousebind> + </context> + <context name="Desktop"> + <mousebind button="Up" action="Click"> + <action name="GoToDesktop"> + <to>previous</to> + </action> + </mousebind> + <mousebind button="Down" action="Click"> + <action name="GoToDesktop"> + <to>next</to> + </action> + </mousebind> + <mousebind button="A-Up" action="Click"> + <action name="GoToDesktop"> + <to>previous</to> + </action> + </mousebind> + <mousebind button="A-Down" action="Click"> + <action name="GoToDesktop"> + <to>next</to> + </action> + </mousebind> + <mousebind button="C-A-Up" action="Click"> + <action name="GoToDesktop"> + <to>previous</to> + </action> + </mousebind> + <mousebind button="C-A-Down" action="Click"> + <action name="GoToDesktop"> + <to>next</to> + </action> + </mousebind> + <mousebind button="Left" action="Press"> + <action name="Focus"/> + <action name="Raise"/> + </mousebind> + <mousebind button="Right" action="Press"> + <action name="Focus"/> + <action name="Raise"/> + </mousebind> + </context> + <context name="Root"> + <!-- Menus --> + <mousebind button="Middle" action="Press"> + <action name="ShowMenu"> + <menu>client-list-combined-menu</menu> + </action> + </mousebind> + <mousebind button="Right" action="Press"> + <action name="ShowMenu"> + <menu>root-menu</menu> + </action> + </mousebind> + </context> + <context name="MoveResize"> + <mousebind button="Up" action="Click"> + <action name="GoToDesktop"> + <to>previous</to> + </action> + </mousebind> + <mousebind button="Down" action="Click"> + <action name="GoToDesktop"> + <to>next</to> + </action> + </mousebind> + <mousebind button="A-Up" action="Click"> + <action name="GoToDesktop"> + <to>previous</to> + </action> + </mousebind> + <mousebind button="A-Down" action="Click"> + <action name="GoToDesktop"> + <to>next</to> + </action> + </mousebind> + </context> + </mouse> + <menu> + <!-- You can specify more than one menu file in here and they are all loaded, + just don't make menu ids clash or, well, it'll be kind of pointless --> + <!-- default menu file (or custom one in $HOME/.config/openbox/) --> + <!-- system menu files on Debian systems --> + <file>/var/lib/openbox/debian-menu.xml</file> + <file>menu.xml</file> + <hideDelay>200</hideDelay> + <!-- if a press-release lasts longer than this setting (in milliseconds), the + menu is hidden again --> + <middle>no</middle> + <!-- center submenus vertically about the parent entry --> + <submenuShowDelay>100</submenuShowDelay> + <!-- time to delay before showing a submenu after hovering over the parent + entry. + if this is a negative value, then the delay is infinite and the + submenu will not be shown until it is clicked on --> + <submenuHideDelay>400</submenuHideDelay> + <!-- time to delay before hiding a submenu when selecting another + entry in parent menu + if this is a negative value, then the delay is infinite and the + submenu will not be hidden until a different submenu is opened --> + <showIcons>yes</showIcons> + <!-- controls if icons appear in the client-list-(combined-)menu --> + <manageDesktops>yes</manageDesktops> + <!-- show the manage desktops section in the client-list-(combined-)menu --> + </menu> + <!-- + # this is an example with comments through out. use these to make your + # own rules, but without the comments of course. + # you may use one or more of the name/class/role/title/type rules to specify + # windows to match + + <application name="the window's _OB_APP_NAME property (see obxprop)" + class="the window's _OB_APP_CLASS property (see obxprop)" + groupname="the window's _OB_APP_GROUP_NAME property (see obxprop)" + groupclass="the window's _OB_APP_GROUP_CLASS property (see obxprop)" + role="the window's _OB_APP_ROLE property (see obxprop)" + title="the window's _OB_APP_TITLE property (see obxprop)" + type="the window's _OB_APP_TYPE property (see obxprob).. + (if unspecified, then it is 'dialog' for child windows)"> + # you may set only one of name/class/role/title/type, or you may use more + # than one together to restrict your matches. + + # the name, class, role, and title use simple wildcard matching such as those + # used by a shell. you can use * to match any characters and ? to match + # any single character. + + # the type is one of: normal, dialog, splash, utility, menu, toolbar, dock, + # or desktop + + # when multiple rules match a window, they will all be applied, in the + # order that they appear in this list + + + # each rule element can be left out or set to 'default' to specify to not + # change that attribute of the window + + <decor>yes</decor> + # enable or disable window decorations + + <shade>no</shade> + # make the window shaded when it appears, or not + + <position force="no"> + # the position is only used if both an x and y coordinate are provided + # (and not set to 'default') + # when force is "yes", then the window will be placed here even if it + # says you want it placed elsewhere. this is to override buggy + # applications who refuse to behave + <x>center</x> + # a number like 50, or 'center' to center on screen. use a negative number + # to start from the right (or bottom for <y>), ie -50 is 50 pixels from + # the right edge (or bottom). use 'default' to specify using value + # provided by the application, or chosen by openbox, instead. + <y>200</y> + <monitor>1</monitor> + # specifies the monitor in a xinerama setup. + # 1 is the first head, or 'mouse' for wherever the mouse is + </position> + + <size> + # the size to make the window. + <width>20</width> + # a number like 20, or 'default' to use the size given by the application. + # you can use fractions such as 1/2 or percentages such as 75% in which + # case the value is relative to the size of the monitor that the window + # appears on. + <height>30%</height> + </size> + + <focus>yes</focus> + # if the window should try be given focus when it appears. if this is set + # to yes it doesn't guarantee the window will be given focus. some + # restrictions may apply, but Openbox will try to + + <desktop>1</desktop> + # 1 is the first desktop, 'all' for all desktops + + <layer>normal</layer> + # 'above', 'normal', or 'below' + + <iconic>no</iconic> + # make the window iconified when it appears, or not + + <skip_pager>no</skip_pager> + # asks to not be shown in pagers + + <skip_taskbar>no</skip_taskbar> + # asks to not be shown in taskbars. window cycling actions will also + # skip past such windows + + <fullscreen>yes</fullscreen> + # make the window in fullscreen mode when it appears + + <maximized>true</maximized> + # 'Horizontal', 'Vertical' or boolean (yes/no) + </application> + + # end of the example +--> + <applications> + <application title="softhddevice"> + <decor>no</decor> + <maximized>yes</maximized> + <!--<skip_pager>yes</skip_pager>--> + <skip_taskbar>no</skip_taskbar> + </application> + <application title="vaapidevice"> + <decor>no</decor> + <maximized>yes</maximized> + <!--<skip_pager>yes</skip_pager>--> + <skip_taskbar>no</skip_taskbar> + </application> + <application class="VDR"> + <decor>no</decor> + <maximized>yes</maximized> + <!--<skip_pager>yes</skip_pager>--> + <skip_taskbar>no</skip_taskbar> + </application> + <application title="browser"> + <decor>no</decor> + <maximized>yes</maximized> + <!--<skip_pager>yes</skip_pager>--> + <skip_taskbar>no</skip_taskbar> + </application> + <application title="osd2Web"> + <decor>no</decor> + <maximized>yes</maximized> + <!--<skip_pager>yes</skip_pager>--> + <skip_taskbar>no</skip_taskbar> + </application> + </applications> +</openbox_config> +
[Unit] +[Unit] Description=yaVDR Desktop Requires=default.target After=default.target pulseaudio.service @@ -3925,7 +4846,7 @@ systemctl --user isolate yavdr-desktop.target
[Unit]
@@ -3941,7 +4862,7 @@ systemctl --user isolate yavdr-desktop.target
[Unit] @@ -3953,7 +4874,7 @@ systemctl --user isolate yavdr-desktop.target [Service] EnvironmentFile=%h/.second_display -ExecStart=/usr/bin/openbox --config-file %h/.config/openbox/rc.xml +ExecStart=/usr/bin/openbox --config-file %h/.config/openbox/rc2.xml ExecStartPost=/usr/bin/xset -dpms s off -display $DISPLAY ExecStartPost=/bin/bash %h/.fehbg @@ -3963,7 +4884,7 @@ systemctl --user isolate yavdr-desktop.target
[Unit]
@@ -3986,7 +4907,7 @@ systemctl --user isolate yavdr-desktop.target
[Unit]
@@ -4005,7 +4926,7 @@ systemctl --user isolate yavdr-desktop.target
[Unit]
@@ -4024,20 +4945,20 @@ systemctl --user isolate yavdr-desktop.target
-
irexec.service starts irexec for the user session
[Unit] +[Unit] Description=LIRC command handler -[Service] +[Service] Type=simple ExecStart=/usr/bin/irexec %h/.lircrc -[Install] +[Install] WantedBy=yavdr-desktop.target
begin - prog = irexec - button = KEY_HOME - config = frontend-dbus-send switchbetween kodi vdr + prog = irexec + button = KEY_HOME + config = frontend-dbus-send switchbetween kodi vdr end
---
@@ -4085,12 +5006,12 @@ end
---
@@ -4115,14 +5036,14 @@ end
{{ ansible_managed | comment }} @@ -4208,7 +5129,7 @@ end
{% for name, path in media_dirs.iteritems() %} @@ -4230,7 +5151,7 @@ end
include = /etc/samba/smb.conf.custom @@ -4243,15 +5164,15 @@ end
It would be nice to be able to detect if it is suitable to install those drivers:
Vendor-IDs: @@ -4261,9 +5182,20 @@ Vendor-IDs:
https://github.com/s-moch/linux-saa716x - kann man den relevanten Teil als dkms-Paket bauen? @@ -4271,15 +5203,15 @@ Vendor-IDs:
The tool ubuntu-drivers is used to install the matching driver version for nvidia graphics cards, virtualbox guest additions and Intel and AMD microcode updates.
---
@@ -4302,8 +5234,8 @@ The tool ubuntu-drivers is used to install the matching driver version for nvidi
This role installs the guest additions for virtualbox guests on Ubuntu 16.04 @@ -4354,12 +5286,12 @@ This role installs the guest additions for virtualbox guests on Ubuntu 16.04
---
@@ -4371,8 +5303,8 @@ This role installs the guest additions for virtualbox guests on Ubuntu 16.04
---
@@ -4414,8 +5346,8 @@ This role installs the guest additions for virtualbox guests on Ubuntu 16.04
{{ ansible_managed | comment }} @@ -4444,12 +5376,12 @@ This role installs the guest additions for virtualbox guests on Ubuntu 16.04
---
@@ -4460,8 +5392,8 @@ This role installs the guest additions for virtualbox guests on Ubuntu 16.04
---
@@ -4503,8 +5435,8 @@ This role installs the guest additions for virtualbox guests on Ubuntu 16.04
{{ ansible_managed | comment }} @@ -4532,15 +5464,15 @@ This role installs the guest additions for virtualbox guests on Ubuntu 16.04
If a Sat>IP Server responds to a discovery request, the package vdr-plugin-satip is installed.
---
@@ -4565,12 +5497,12 @@ If a Sat>IP Server responds to a discovery request, the package vdr-plugin-sa
---
@@ -4586,12 +5518,12 @@ If a Sat>IP Server responds to a discovery request, the package vdr-plugin-sa
---
@@ -4607,12 +5539,12 @@ If a Sat>IP Server responds to a discovery request, the package vdr-plugin-sa
---
@@ -4628,12 +5560,12 @@ If a Sat>IP Server responds to a discovery request, the package vdr-plugin-sa
---
@@ -4649,8 +5581,8 @@ If a Sat>IP Server responds to a discovery request, the package vdr-plugin-sa
---
@@ -4665,12 +5597,12 @@ If a Sat>IP Server responds to a discovery request, the package vdr-plugin-sa
---
@@ -4681,38 +5613,54 @@ If a Sat>IP Server responds to a discovery request, the package vdr-plugin-sa
--- # This role provides easyily downloadable firmware files -- name: Firmware for Hauppauge WinTV HD Solo/Duo, PCTV 292e +- name: Firmware dvb-demod-si2168-b40-01.fw for Hauppauge WinTV HD Solo/Duo, PCTV 292e get_url: url: https://github.com/OpenELEC/dvb-firmware/raw/master/firmware/dvb-demod-si2168-b40-01.fw checksum: sha256:8507536630d75a316d0719d6b95c04b90c36baa5b457ad457c9bacadafcef134 dest: /lib/firmware/dvb-demod-si2168-b40-01.fw when: '"2040:0264" in usb or "2013:025f" in usb' -- name: Firmware for Hauppauge WinTV-HVR-930C +- name: Firmware dvb-fe-xc5000-1.6.114.fw for Hauppauge WinTV-HVR-930C get_url: url: https://github.com/OpenELEC/dvb-firmware/raw/master/firmware/dvb-fe-xc5000-1.6.114.fw checksum: sha256:7104bda8df301fe1bd4c09de1708aeb6d0d8e1f9d55505449fecfad82639235f dest: /lib/firmware/dvb-fe-xc5000-1.6.114.fw when: '"2040:1605" in usb' + +- name: Firmware ngenge_18.fw for ngene cards + get_url: + url: http://l4m-daten.de/downloads/firmware/dvb-s2/linux/all/ngene_18.fw + checksum: sha256:213d98ec2cd575eba15d82ee79fed7098e670de43792f8aa773a95cfb7c32060 + dest: /lib/firmware/ngene_18.fw + when: '"ngene" in modules' + notify: reboot required + +- name: Firmware drxk_a3.mc for drxk + get_url: + url: https://github.com/OpenELEC/dvb-firmware/raw/master/firmware/drxk_a3.mc + checksum: sha256:f8956ad6f92a4ce90a6ab94ed23e2f9a27e9317e936fd3e0119778dd28e7e294 + dest: /lib/firmware/drxk_a3.mc + when: '"ngene" in modules or "drxk" in modules' + notify: reboot required
---
@@ -4723,8 +5671,8 @@ If a Sat>IP Server responds to a discovery request, the package vdr-plugin-sa
---
@@ -4734,8 +5682,8 @@ If a Sat>IP Server responds to a discovery request, the package vdr-plugin-sa
---
@@ -4785,15 +5733,15 @@ If a Sat>IP Server responds to a discovery request, the package vdr-plugin-sa
Problem: woher kommt der Treiber (AFAIK noch nicht im Kernel)? Die Firmware sollte in yavdr-firmware stecken
---
@@ -4804,8 +5752,8 @@ Problem: woher kommt der Treiber (AFAIK noch nicht im Kernel)? Die Firmware soll
---
@@ -4822,12 +5770,12 @@ Problem: woher kommt der Treiber (AFAIK noch nicht im Kernel)? Die Firmware soll
---
@@ -4838,8 +5786,8 @@ Problem: woher kommt der Treiber (AFAIK noch nicht im Kernel)? Die Firmware soll
---
@@ -4857,12 +5805,12 @@ Problem: woher kommt der Treiber (AFAIK noch nicht im Kernel)? Die Firmware soll
---
@@ -4873,8 +5821,8 @@ Problem: woher kommt der Treiber (AFAIK noch nicht im Kernel)? Die Firmware soll
---
@@ -4890,19 +5838,19 @@ Problem: woher kommt der Treiber (AFAIK noch nicht im Kernel)? Die Firmware soll
- import_tasks: install-kodi.yml tags=install,update,kodi:install - import_tasks: configure-kodi.yml tags=install,update,kodi:configure @@ -4910,7 +5858,7 @@ Problem: woher kommt der Treiber (AFAIK noch nicht im Kernel)? Die Firmware soll
---
@@ -4928,7 +5876,7 @@ Problem: woher kommt der Treiber (AFAIK noch nicht im Kernel)? Die Firmware soll
- name: create kodi.service for the user session
@@ -4977,12 +5925,12 @@ Problem: woher kommt der Treiber (AFAIK noch nicht im Kernel)? Die Firmware soll
This systemd unit for the user session starts (and stops) kodi. @@ -5007,15 +5955,15 @@ This systemd unit for the user session starts (and stops) kodi.
Those configuration files provide a preconfiguration for kodi which overrides the system wide configuration
This file maps the keys defined in Lircmap.xml to actions within kodi.
<?xml version="1.0" encoding="UTF-8"?> @@ -5645,17 +6593,17 @@ This file maps the keys defined in Lircmap.xml to actions within kodi.
--- # file: roles/dvd/tasks/main.yml @@ -5695,15 +6643,15 @@ This file maps the keys defined in Lircmap.xml to actions within kodi.
---
@@ -5752,8 +6700,8 @@ This file maps the keys defined in Lircmap.xml to actions within kodi.
# ----- GLOBAL SECTION ----- @@ -5859,8 +6807,8 @@ This file maps the keys defined in Lircmap.xml to actions within kodi.
---
@@ -5876,14 +6824,14 @@ This file maps the keys defined in Lircmap.xml to actions within kodi.
{{ ansible_managed | comment }} +{{ ansible_managed | comment }} Section "ServerLayout" Identifier "Layout0" Screen 0 "Screen0" - {% if system.x11.dualhead.enabled %} + {% if system.x11.dualhead.enabled %} Screen 1 "Screen1" RightOf "Screen0" - {% endif %} + {% endif %} InputDevice "Keyboard0" "CoreKeyboard" InputDevice "Mouse0" "CorePointer" EndSection @@ -5920,50 +6868,50 @@ Section "Monitor" Identifier "Monitor0" VendorName "Unknown" ModelName "Unknown" -{% if system.x11.display.0.default == "VGA2Scart_4_3" or system.x11.display.0.default == "VGA2Scart_16_9" %} +{% if system.x11.display.0.default == "VGA2Scart_4_3" or system.x11.display.0.default == "VGA2Scart_16_9" %} HorizSync 14-17 VertRefresh 49-61 - {% if system.x11.display.0.default == "VGA2Scart_4_3" %} + {% if system.x11.display.0.default == "VGA2Scart_4_3" %} Modeline "VGA2Scart_4_3" 13.875 720 744 808 888 576 580 585 625 -HSync -Vsync interlace - {% elif system.x11.display.0.default == "VGA2Scart_16_9" %} + {% elif system.x11.display.0.default == "VGA2Scart_16_9" %} Modeline "VGA2Scart_16_9" 19 1024 1032 1120 1216 576 581 586 625 -Hsync -Vsync interlace - {% endif %} -{% endif %} + {% endif %} +{% endif %} Option "DPMS" Option "ExactModeTimingsDVI" "True" EndSection -{% if system.x11.dualhead.enabled == "1" %} +{% if system.x11.dualhead.enabled == "1" %} Section "Monitor" Identifier "Monitor1" VendorName "Unknown" ModelName "Unknown" -{% if system.x11.display.1.default in ("VGA2Scart_4_3", "VGA2Scart_16_9") %} +{% if system.x11.display.1.default in ("VGA2Scart_4_3", "VGA2Scart_16_9") %} HorizSync 14-17 VertRefresh 49-61 - {% if system.x11.display.1.default == "VGA2Scart_4_3" %} + {% if system.x11.display.1.default == "VGA2Scart_4_3" %} Modeline "VGA2Scart_4_3" 13.875 720 744 808 888 576 580 585 625 -HSync -Vsync interlace - {% elif system.x11.display.1.default == "VGA2Scart_16_9" %} + {% elif system.x11.display.1.default == "VGA2Scart_16_9" %} Modeline "VGA2Scart_16_9" 19 1024 1032 1120 1216 576 581 586 625 -Hsync -Vsync interlace - {% endif %} + {% endif %} Option "DPMS" Option "ExactModeTimingsDVI" "True" -{% endif %} +{% endif %} EndSection -{% endif %} +{% endif %} Section "Device" Identifier "Device0" -{% if system.hardware.nvidia.detected %} +{% if system.hardware.nvidia.detected %} Driver "nvidia" VendorName "NVIDIA Corporation" -{% endif %} +{% endif %} Screen 0 Option "DPI" "100x100" -{% if system.hardware.nvidia.busid %} +{% if system.hardware.nvidia.busid %} BusID "PCI: {{ system.hardware.nvidia.busid }}" -{% endif %} +{% endif %} Option "NoLogo" "True" Option "UseEvents" "True" Option "TripleBuffer" "False" @@ -5974,17 +6922,17 @@ Section "Device" Option "FlatPanelProperties" "Scaling = Native" EndSection -{% if system.x11.dualhead.enabled == "1" %} +{% if system.x11.dualhead.enabled == "1" %} Section "Device" Identifier "Device1" - {% if system.hardware.nvidia.detected %} + {% if system.hardware.nvidia.detected %} Driver "nvidia" VendorName "NVIDIA Corporation" - {% endif %} + {% endif %} Screen 1 - {% if system.hardware.nvidia.busid %} + {% if system.hardware.nvidia.busid %} BusID "PCI: {{ system.hardware.nvidia.busid }}" - {% endif %} + {% endif %} Option "NoLogo" "True" Option "UseEvents" "True" Option "TripleBuffer" "False" @@ -5992,7 +6940,7 @@ Section "Device" Option "TwinView" "0" Option "DynamicTwinView" "0" EndSection -{% endif %} +{% endif %} Section "Screen" @@ -6002,19 +6950,19 @@ Section "Screen" DefaultDepth 24 SubSection "Display" Depth 24 -{% if system.x11.display.0.default is defined and system.x11.display.0.default %} - Modes "{{ system.x11.display.0.default }}"{% for mode in system.x11.display.0.mode %}{% if mode != system.x11.display.0.default %} "{{ mode }}"{% endif %}{% endfor %} +{% if system.x11.display.0.default is defined and system.x11.display.0.default %} + Modes "{{ system.x11.display.0.default }}"{% for mode in system.x11.display.0.mode %}{% if mode != system.x11.display.0.default %} "{{ mode }}"{% endif %}{% endfor %} -{% elif system.hardware.nvidia.detected == 1 %} +{% elif system.hardware.nvidia.detected == 1 %} Modes "nvidia-auto-select" -{% endif %} +{% endif %} EndSubSection -{% if system.x11.display.0.default or system.x11.default %} - {% if system.x11.display.0.device is definded and system.x11.display.0.device %} - Option "ConnectedMonitor" {{ system.x11.display.0.device }} - {% else %} - Option "ConnectedMonitor" {{ system.x11.default }} - {% endif %} +{% if system.x11.display.0.default or system.x11.default %} + {% if system.x11.display.0.device is definded and system.x11.display.0.device %} + Option "ConnectedMonitor" {{ system.x11.display.0.device }} + {% else %} + Option "ConnectedMonitor" {{ system.x11.default }} + {% endif %} # Option "ConnectedMonitor" "<?cs if:(?system.x11.display.0.device) ?><?cs call:fix_display_name(system.x11.display.0.device) ?><?cs else ?><?cs var:system.x11.default ?><?cs /if ?><?cs if:(?system.x11.dualhead.enabled && system.x11.dualhead.enabled == 1) ?>, <?cs call:fix_display_name(system.x11.display.1.device) ?><?cs /if ?>" #Option "ConnectedMonitor" "<?cs if:(?system.x11.display.0.device) ?> @@ -6032,10 +6980,10 @@ Section "Screen" # Option "MetaModes" "<?cs call:fix_display_name(system.x11.display.0.device) ?>: <?cs var:system.x11.display.0.default ?> { ViewPortIn=<?cs var:system.x11.display.0.viewport.in.x ?>x<?cs var:system.x11.display.0.viewport.in.y ?>, ViewPortOut=<?cs var:system.x11.display.0.viewport.out.x ?>x<?cs var:system.x11.display.0.viewport.out.y ?>+<?cs var:system.x11.display.0.viewport.out.plusx ?>+<?cs var:system.x11.display.0.viewport.out.plusy ?> }" # <?cs each:mode = system.x11.display.0.mode ?><?cs if:(mode != system.x11.display.0.default) ?> # Option "MetaModes" "<?cs call:fix_display_name(system.x11.display.0.device) ?>: <?cs var:mode ?> { ViewPortIn=<?cs var:system.x11.display.0.viewport.in.x ?>x<?cs var:system.x11.display.0.viewport.in.y ?>, ViewPortOut=<?cs var:system.x11.display.0.viewport.out.x ?>x<?cs var:system.x11.display.0.viewport.out.y ?>+<?cs var:system.x11.display.0.viewport.out.plusx ?>+<?cs var:system.x11.display.0.viewport.out.plusy ?> }"<?cs /if ?><?cs /each ?> -{% endif %} +{% endif %} EndSection -{% if system.x11.dualhead.enabled == "1" %} +{% if system.x11.dualhead.enabled == "1" %} Section "Screen" Identifier "Screen1" @@ -6044,12 +6992,12 @@ Section "Screen" DefaultDepth 24 SubSection "Display" Depth 24 -{% if system.x11.display.0.default is defined and system.x11.display.0.default %} - Modes "{{ system.x11.display.1.default }}"{% for mode in system.x11.display.1.mode %}{% if mode != system.x11.display.1.default %} "{{ mode }}"{% endif %}{% endfor %} +{% if system.x11.display.0.default is defined and system.x11.display.0.default %} + Modes "{{ system.x11.display.1.default }}"{% for mode in system.x11.display.1.mode %}{% if mode != system.x11.display.1.default %} "{{ mode }}"{% endif %}{% endfor %} -{% elif system.hardware.nvidia.detected == "1" %} +{% elif system.hardware.nvidia.detected == "1" %} Modes "nvidia-auto-select" -{% endif %} +{% endif %} EndSubSection # <?cs if:(?system.x11.display.1.default && system.x11.display.1.default != "" && system.x11.display.1.default != "disabled") ?> @@ -6064,14 +7012,14 @@ Section "Screen" # Option "MetaModes" "<?cs call:fix_display_name(system.x11.display.1.device) ?>: <?cs var:mode ?> { ViewPortIn=<?cs var:system.x11.display.1.viewport.in.x ?>x<?cs var:system.x11.display.1.viewport.in.y ?>, ViewPortOut=<?cs var:system.x11.display.1.viewport.out.x ?>x<?cs var:system.x11.display.1.viewport.out.y ?>+<?cs var:system.x11.display.1.viewport.out.plusx ?>+<?cs var:system.x11.display.1.viewport.out.plusy ?> }"<?cs /if ?><?cs /each ?> # <?cs /if ?> EndSection -{% endif %} +{% endif %} -{% if not system.x11.use_compositing %} +{% if not system.x11.use_compositing %} Section "Extensions" # if not open-gl OSD is needed (e.g. for vdr-sxfe): Option "Composite" "Disable" EndSection -{% endif %} +{% endif %}
---
@@ -6116,8 +7064,8 @@ EndSection
---
@@ -6138,8 +7086,8 @@ EndSection
{{ ansible_managed | comment }} @@ -6165,12 +7113,12 @@ ACPI_START_AHEAD=5
system:
@@ -6182,8 +7130,8 @@ ACPI_START_AHEAD=5
---
@@ -6208,8 +7156,8 @@ ACPI_START_AHEAD=5
#!/bin/sh @@ -6217,27 +7165,32 @@ ACPI_START_AHEAD=5 # This file is configured by the ansible configuration for yaVDR -{% if system.shutdown is defined and system.shutdown == 'reboot' %} -menuentry "PowerOff" { +{% if system.shutdown is defined and system.shutdown == 'reboot' %} +menuentry "PowerOff" { halt -} -{% endif %} +} +{% endif %} -if [ "${recordfail}" = 1 ]; then - set timeout={{ 3 if grub.timeout < 3 else grub.timeout }} +if [ "${recordfail}" = 1 ]; then + set timeout={{ 3 if grub.timeout < 3 else grub.timeout }} else - set timeout={{ grub.timeout if grub.timeout is defined else 0 }} + set timeout={{ grub.timeout if grub.timeout is defined else 0 }} fi
--- +- name: Update Initramfs + command: "update-initramfs -u" + failed_when: ('error' in initramfs_register_update.stderr) + register: initramfs_register_update + - name: Update GRUB command: update-grub failed_when: ('error' in grub_register_update.stderr) @@ -6251,15 +7204,15 @@ menuentry "PowerOff" {
This section contains custom modules for the yaVDR Playbooks. They are used to collect facts about the system and configure applications and daemons.
# This Module collects the vendor- and device ids for USB- and PCI(e)-devices and currently loaded kernel modules. @@ -6335,110 +7288,110 @@ This section contains custom modules for the yaVDR Playbooks. They are used to c from ansible.module_utils.basic import * -PCIDevice = namedtuple("PCIDevice", 'idVendor idProduct idClass pciPath') +PCIDevice = namedtuple("PCIDevice", 'idVendor idProduct idClass pciPath') -vendor_dict = { +vendor_dict = { 0x10de: 'nvidia', 0x8086: 'intel', 0x1002: 'amd', 0x80ee: 'virtualbox', - } + } -def get_pci_devices(): - for device in chain(glob.glob('/sys/devices/pci*/*:*:*/'), glob.glob('/sys/devices/pci*/*:*:*/*:*:*/')): +def get_pci_devices(): + for device in chain(glob.glob('/sys/devices/pci*/*:*:*/'), glob.glob('/sys/devices/pci*/*:*:*/*:*:*/')): try: - with open(os.path.join(device, 'device')) as d: - product_id = int(d.read().strip(), 16) - with open(os.path.join(device, 'vendor')) as d: - vendor_id = int(d.read().strip(), 16) - with open(os.path.join(device, 'class')) as d: - class_id = int(d.read().strip(), 16) - yield PCIDevice(idVendor=vendor_id, idProduct=product_id, idClass=class_id, pciPath=device) + with open(os.path.join(device, 'device')) as d: + product_id = int(d.read().strip(), 16) + with open(os.path.join(device, 'vendor')) as d: + vendor_id = int(d.read().strip(), 16) + with open(os.path.join(device, 'class')) as d: + class_id = int(d.read().strip(), 16) + yield PCIDevice(idVendor=vendor_id, idProduct=product_id, idClass=class_id, pciPath=device) except IOError: pass -def format_device_list(iterator): - return ["{:04x}:{:04x}".format(d.idVendor, d.idProduct) for d in iterator] +def format_device_list(iterator): + return ["{:04x}:{:04x}".format(d.idVendor, d.idProduct) for d in iterator] -def format_gpu_device_list(iterator): - def get_entries(iterator): +def format_gpu_device_list(iterator): + def get_entries(iterator): for d in iterator: if d.idClass == 0x030000: - yield {"VendorName": vendor_dict.get(d.idVendor, "unknown"), - "VendorID": d.idVendor, "ProductID": d.idProduct} - return [entry for entry in get_entries(iterator)] + yield {"VendorName": vendor_dict.get(d.idVendor, "unknown"), + "VendorID": d.idVendor, "ProductID": d.idProduct} + return [entry for entry in get_entries(iterator)] -def list_acpi_power_modes(): - acpi_power_modes = [] +def list_acpi_power_modes(): + acpi_power_modes = [] try: - with open('/sys/power/state') as f: - acpi_power_modes = [l for l in f.readline().split()] + with open('/sys/power/state') as f: + acpi_power_modes = [l for l in f.readline().split()] except IOError: pass return acpi_power_modes -arg_specs = { - 'usb': dict(default=True, type='bool', required=False), - 'pci': dict(default=True, type='bool', required=False), - 'modules': dict(default=True, type='bool', required=False), - 'gpus': dict(default=True, type='bool', required=False), - 'acpi_power_modes': dict(default=True, type='bool', required=False), - } +arg_specs = { + 'usb': dict(default=True, type='bool', required=False), + 'pci': dict(default=True, type='bool', required=False), + 'modules': dict(default=True, type='bool', required=False), + 'gpus': dict(default=True, type='bool', required=False), + 'acpi_power_modes': dict(default=True, type='bool', required=False), + } -def main(): - module = AnsibleModule(argument_spec=arg_specs, supports_check_mode=True,) - collect_usb = module.params['usb'] - collect_pci = module.params['pci'] - collect_modules = module.params['modules'] - collect_gpus = module.params['gpus'] - collect_acpi_power_modes = module.params['acpi_power_modes'] +def main(): + module = AnsibleModule(argument_spec=arg_specs, supports_check_mode=True,) + collect_usb = module.params['usb'] + collect_pci = module.params['pci'] + collect_modules = module.params['modules'] + collect_gpus = module.params['gpus'] + collect_acpi_power_modes = module.params['acpi_power_modes'] - usb_devices = [] - pci_devices = [] - modules = [] - gpus = [] + usb_devices = [] + pci_devices = [] + modules = [] + gpus = [] nvidia_detected = False intel_detected = False amd_detected = False virtualbox_detected = False - acpi_power_modes = [] + acpi_power_modes = [] if collect_usb: - usb_devices = format_device_list(usb.core.find(find_all=True)) + usb_devices = format_device_list(usb.core.find(find_all=True)) if collect_pci: - pci_devices = format_device_list(get_pci_devices()) + pci_devices = format_device_list(get_pci_devices()) if collect_modules: - k = kmodpy.Kmod() - modules = [m[0] for m in k.loaded()] + k = kmodpy.Kmod() + modules = [m[0] for m in k.loaded()] if collect_gpus: - gpus = format_gpu_device_list(get_pci_devices()) - nvidia_detected = any((True for gpu in gpus if gpu['VendorName'] == 'nvidia')) - intel_detected = any((True for gpu in gpus if gpu['VendorName'] == 'intel')) - amd_detected = any((True for gpu in gpus if gpu['VendorName'] == 'amd')) - virtualbox_detected = any((True for gpu in gpus if gpu['VendorName'] == 'virtualbox')) + gpus = format_gpu_device_list(get_pci_devices()) + nvidia_detected = any((True for gpu in gpus if gpu['VendorName'] == 'nvidia')) + intel_detected = any((True for gpu in gpus if gpu['VendorName'] == 'intel')) + amd_detected = any((True for gpu in gpus if gpu['VendorName'] == 'amd')) + virtualbox_detected = any((True for gpu in gpus if gpu['VendorName'] == 'virtualbox')) if collect_acpi_power_modes: - acpi_power_modes = list_acpi_power_modes() + acpi_power_modes = list_acpi_power_modes() - data = {'usb': usb_devices, 'pci': pci_devices, 'modules': modules, 'gpus': gpus, + data = {'usb': usb_devices, 'pci': pci_devices, 'modules': modules, 'gpus': gpus, 'acpi_power_modes': acpi_power_modes, 'nvidia_detected': nvidia_detected, 'intel_detected': intel_detected, 'amd_detected': amd_detected, - 'virtualbox_detected': virtualbox_detected} - module.exit_json(changed=False, ansible_facts=data, msg=data) + 'virtualbox_detected': virtualbox_detected} + module.exit_json(changed=False, ansible_facts=data, msg=data) if __name__ == '__main__': - main() + main()
DOCUMENTATION = ''' @@ -6474,96 +7427,96 @@ This section contains custom modules for the yaVDR Playbooks. They are used to c SSDP_MX = 2 SSDP_ST = "urn:ses-com:device:SatIPServer:1" -ssdpRequest = "\r\n".join(( +ssdpRequest = "\r\n".join(( "M-SEARCH * HTTP/1.1", - "HOST: %s:%d" % (SSDP_ADDR, SSDP_PORT), + "HOST: %s:%d" % (SSDP_ADDR, SSDP_PORT), "MAN: \"ssdp:discover\"", - "MX: %d" % (SSDP_MX), - "ST: %s" % (SSDP_ST), - "\r\n")) + "MX: %d" % (SSDP_MX), + "ST: %s" % (SSDP_ST), + "\r\n")) @contextmanager -def socket_manager(*args, **kwargs): +def socket_manager(*args, **kwargs): """provide a context manager for socket""" - sock = socket.socket(*args, **kwargs) - sock.setblocking(False) - sock.setsockopt(socket.IPPROTO_IP, socket.IP_MULTICAST_TTL, 2) - sock.setsockopt(socket.SOL_SOCKET, socket.SO_REUSEADDR, 1) + sock = socket.socket(*args, **kwargs) + sock.setblocking(False) + sock.setsockopt(socket.IPPROTO_IP, socket.IP_MULTICAST_TTL, 2) + sock.setsockopt(socket.SOL_SOCKET, socket.SO_REUSEADDR, 1) try: - sock.setsockopt(socket.SOL_SOCKET, socket.SO_REUSEPORT, 1) + sock.setsockopt(socket.SOL_SOCKET, socket.SO_REUSEPORT, 1) except socket.error: pass - sock.settimeout(SSDP_MX + 0.5) - sock.bind((SSDP_BIND, SSDP_PORT)) + sock.settimeout(SSDP_MX + 0.5) + sock.bind((SSDP_BIND, SSDP_PORT)) try: yield sock finally: - sock.close() + sock.close() -def parse_satip_xml(data): +def parse_satip_xml(data): """ Parse SAT>IP XML data. Args: data (str): XML input data.. Returns: dict: Parsed SAT>IP device name and frontend information. """ - result = {'name': '', 'frontends': {}} + result = {'name': '', 'frontends': {}} if data: - root = ET.fromstring(data) - name = root.find('.//*/{urn:schemas-upnp-org:device-1-0}friendlyName') - result['name'] = name.text - satipcap = root.find('.//*/{urn:ses-com:satip}X_SATIPCAP') + root = ET.fromstring(data) + name = root.find('.//*/{urn:schemas-upnp-org:device-1-0}friendlyName') + result['name'] = name.text + satipcap = root.find('.//*/{urn:ses-com:satip}X_SATIPCAP') if satipcap is None: - raise ValueError("Invalid SAT>IP device description") - caps = {} - for system in satipcap.text.split(","): - cap = system.split("-") + raise ValueError("Invalid SAT>IP device description") + caps = {} + for system in satipcap.text.split(","): + cap = system.split("-") if cap: - count = int(cap[1]) - if cap[0] in caps: - count = count + caps[cap[0]] - caps[cap[0]] = count - result['frontends'] = caps + count = int(cap[1]) + if cap[0] in caps: + count = count + caps[cap[0]] + caps[cap[0]] = count + result['frontends'] = caps return result -def main(): - description_urls = [] - device_list = [] - module = AnsibleModule(argument_spec={}, supports_check_mode=True,) - with socket_manager(socket.AF_INET, socket.SOCK_DGRAM) as sock: +def main(): + description_urls = [] + device_list = [] + module = AnsibleModule(argument_spec={}, supports_check_mode=True,) + with socket_manager(socket.AF_INET, socket.SOCK_DGRAM) as sock: # according to Sat>IP Specification 1.2.2, p. 20 # a client should send three requests within 100 ms with a ttl of 2 - for _ in range(3): - sock.sendto(ssdpRequest, (SSDP_ADDR, SSDP_PORT)) - time.sleep(0.03) + for _ in range(3): + sock.sendto(ssdpRequest, (SSDP_ADDR, SSDP_PORT)) + time.sleep(0.03) try: - response = sock.recv(1024) + response = sock.recv(1024) if response and "SERVER:" in response: - for line in response.splitlines(): + for line in response.splitlines(): if "LOCATION" in line: - url = line.split()[-1].strip() + url = line.split()[-1].strip() if url not in description_urls: - description_urls.append(url) - info = requests.get(url, timeout=2) - device_list.append(parse_satip_xml(info.text)) + description_urls.append(url) + info = requests.get(url, timeout=2) + device_list.append(parse_satip_xml(info.text)) else: - raise ValueError('No satip server detected') - except (socket.timeout, ValueError, ET.ParseError): + raise ValueError('No satip server detected') + except (socket.timeout, ValueError, ET.ParseError): pass - module.exit_json(changed=False, ansible_facts={'satip_devices': device_list}) + module.exit_json(changed=False, ansible_facts={'satip_devices': device_list}) if __name__ == '__main__': - main() + main()
[ ]
support multiple screens (-d :0.0 .. :0.n)- name: Reconfigure unattended upgrades with dpkg @@ -6933,6 +7886,10 @@ This section contains custom modules for the yaVDR Playbooks. They are used to c name: x@vt7.service state: stopped register: x_stop + +- name: reboot required + debug: + msg: PLEASE REBOOT YOUR SYSTEM.