mirror of
https://github.com/iiab/iiab.git
synced 2025-03-09 15:40:17 +00:00
Put iiab-netwarn & iiab-pwdwarn-labwc in ~/.config/labwc/autostart
This commit is contained in:
parent
7544b79285
commit
ae40f78d23
4 changed files with 27 additions and 26 deletions
|
@ -8,17 +8,17 @@
|
|||
dest: /etc/profile.d/iiab-pwdwarn-profile.sh
|
||||
mode: '0644'
|
||||
|
||||
- name: Does /home/{{ iiab_admin_user }}/.config/wayfire.ini exist?
|
||||
- name: Does directory /home/{{ iiab_admin_user }}/.config/labwc/ exist?
|
||||
stat:
|
||||
path: /home/{{ iiab_admin_user }}/.config/wayfire.ini
|
||||
register: wayfire_ini
|
||||
path: /home/{{ iiab_admin_user }}/.config/labwc/
|
||||
register: labwc_dir
|
||||
|
||||
- name: "If so, install from template: /usr/local/sbin/iiab-pwdwarn-wayfire"
|
||||
- name: "If so, install from template: /usr/local/sbin/iiab-pwdwarn-labwc"
|
||||
template:
|
||||
src: iiab-pwdwarn-wayfire.j2
|
||||
dest: /usr/local/sbin/iiab-pwdwarn-wayfire
|
||||
src: iiab-pwdwarn-labwc.j2
|
||||
dest: /usr/local/sbin/iiab-pwdwarn-labwc
|
||||
mode: '0755'
|
||||
when: wayfire_ini.stat.exists
|
||||
when: labwc_dir.stat.exists and labwc_dir.stat.isdir
|
||||
|
||||
# 2019-03-07: This pop-up (/etc/xdg/lxsession/LXDE-pi/sshpwd-lxde-iiab.sh) did
|
||||
# not actually appear when triggered by /etc/xdg/autostart/pprompt-iiab.desktop
|
||||
|
@ -28,10 +28,9 @@
|
|||
# https://specifications.freedesktop.org/autostart-spec/autostart-spec-latest.html
|
||||
# Raspbian's 2016-2018 evolution here: https://github.com/iiab/iiab/issues/1537
|
||||
|
||||
- name: ...and put a line in /home/{{ iiab_admin_user }}/.config/wayfire.ini to trigger iiab-pwdwarn-wayfire (& pop-up as nec)
|
||||
ini_file:
|
||||
path: /home/{{ iiab_admin_user }}/.config/wayfire.ini # iiab-admin
|
||||
section: autostart
|
||||
option: iiab-pwdwarn-wayfire
|
||||
value: /usr/local/sbin/iiab-pwdwarn-wayfire
|
||||
when: wayfire_ini.stat.exists
|
||||
- name: ...and put a line in /home/{{ iiab_admin_user }}/.config/labwc/autostart to trigger iiab-pwdwarn-labwc (& pop-up as nec)
|
||||
lineinfile:
|
||||
path: /home/{{ iiab_admin_user }}/.config/labwc/autostart # iiab-admin
|
||||
create: yes
|
||||
line: /usr/local/sbin/iiab-pwdwarn-labwc
|
||||
when: labwc_dir.stat.exists and labwc_dir.stat.isdir
|
||||
|
|
|
@ -5,18 +5,17 @@
|
|||
# shell / ssh logins (across all OS's/distros/window managers) might also make sense?
|
||||
|
||||
|
||||
- name: Does /home/{{ iiab_admin_user }}/.config/wayfire.ini exist?
|
||||
- name: Does directory /home/{{ iiab_admin_user }}/.config/labwc/ exist?
|
||||
stat:
|
||||
path: /home/{{ iiab_admin_user }}/.config/wayfire.ini
|
||||
register: wayfire_ini
|
||||
path: /home/{{ iiab_admin_user }}/.config/labwc/
|
||||
register: labwc_dir
|
||||
|
||||
- name: If so, add /usr/local/sbin/iiab-netwarn to /home/{{ iiab_admin_user }}/.config/wayfire.ini
|
||||
ini_file:
|
||||
path: /home/{{ iiab_admin_user }}/.config/wayfire.ini # iiab-admin
|
||||
section: autostart
|
||||
option: iiab-netwarn
|
||||
value: /usr/local/sbin/iiab-netwarn
|
||||
when: wayfire_ini.stat.exists
|
||||
- name: If so, add /usr/local/sbin/iiab-netwarn to /home/{{ iiab_admin_user }}/.config/labwc/autostart
|
||||
lineinfile:
|
||||
path: /home/{{ iiab_admin_user }}/.config/labwc/autostart # iiab-admin
|
||||
create: yes
|
||||
line: /usr/local/sbin/iiab-netwarn
|
||||
when: labwc_dir.stat.exists and labwc_dir.stat.isdir
|
||||
|
||||
|
||||
# mate desktop detection based on 'register: nd_dir' in enable_services
|
||||
|
@ -45,4 +44,4 @@
|
|||
src: roles/network/templates/netwarn/iiab-netwarn # Invoked by 1-prep (so full path needed)
|
||||
dest: /usr/local/sbin/
|
||||
mode: 0755
|
||||
when: wayfire_ini.stat.exists or (mate_dir.stat.exists and mate_dir.stat.isdir)
|
||||
when: (labwc_dir.stat.exists and labwc_dir.stat.isdir) or (mate_dir.stat.exists and mate_dir.stat.isdir)
|
||||
|
|
|
@ -3,7 +3,10 @@
|
|||
# CONFUSING BUT FYI: Steps below run *strictly sequentially* when this script
|
||||
# (/usr/local/sbin/iiab-netwarn) is run on boot, triggered by either autostart:
|
||||
# https://specifications.freedesktop.org/autostart-spec/autostart-spec-latest.html
|
||||
# ...or by Wayland compositor Wayfire's ~/.config/wayfire.ini for RasPiOS 12+:
|
||||
# ...or by Wayland compositor's ~/.config/labwc/autostart in new RasPiOS 12+:
|
||||
# https://forums.raspberrypi.com/viewtopic.php?t=379321
|
||||
# (Prior to Dec 2024, RasPiOS compositor Wayfire did the same...)
|
||||
# https://github.com/iiab/iiab/pull/3685
|
||||
# https://github.com/WayfireWM/wayfire/wiki/Configuration#autostart
|
||||
#
|
||||
# This allows return codes ($rc) to be meaningful, at each successive step.
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue