1
0
Fork 0
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:
root 2024-12-12 22:54:44 +01:00
parent 7544b79285
commit ae40f78d23
4 changed files with 27 additions and 26 deletions

View file

@ -8,17 +8,17 @@
dest: /etc/profile.d/iiab-pwdwarn-profile.sh dest: /etc/profile.d/iiab-pwdwarn-profile.sh
mode: '0644' mode: '0644'
- name: Does /home/{{ iiab_admin_user }}/.config/wayfire.ini exist? - name: Does directory /home/{{ iiab_admin_user }}/.config/labwc/ exist?
stat: stat:
path: /home/{{ iiab_admin_user }}/.config/wayfire.ini path: /home/{{ iiab_admin_user }}/.config/labwc/
register: wayfire_ini 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: template:
src: iiab-pwdwarn-wayfire.j2 src: iiab-pwdwarn-labwc.j2
dest: /usr/local/sbin/iiab-pwdwarn-wayfire dest: /usr/local/sbin/iiab-pwdwarn-labwc
mode: '0755' 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 # 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 # 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 # https://specifications.freedesktop.org/autostart-spec/autostart-spec-latest.html
# Raspbian's 2016-2018 evolution here: https://github.com/iiab/iiab/issues/1537 # 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) - name: ...and put a line in /home/{{ iiab_admin_user }}/.config/labwc/autostart to trigger iiab-pwdwarn-labwc (& pop-up as nec)
ini_file: lineinfile:
path: /home/{{ iiab_admin_user }}/.config/wayfire.ini # iiab-admin path: /home/{{ iiab_admin_user }}/.config/labwc/autostart # iiab-admin
section: autostart create: yes
option: iiab-pwdwarn-wayfire line: /usr/local/sbin/iiab-pwdwarn-labwc
value: /usr/local/sbin/iiab-pwdwarn-wayfire when: labwc_dir.stat.exists and labwc_dir.stat.isdir
when: wayfire_ini.stat.exists

View file

@ -5,18 +5,17 @@
# shell / ssh logins (across all OS's/distros/window managers) might also make sense? # 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: stat:
path: /home/{{ iiab_admin_user }}/.config/wayfire.ini path: /home/{{ iiab_admin_user }}/.config/labwc/
register: wayfire_ini register: labwc_dir
- name: If so, add /usr/local/sbin/iiab-netwarn to /home/{{ iiab_admin_user }}/.config/wayfire.ini - name: If so, add /usr/local/sbin/iiab-netwarn to /home/{{ iiab_admin_user }}/.config/labwc/autostart
ini_file: lineinfile:
path: /home/{{ iiab_admin_user }}/.config/wayfire.ini # iiab-admin path: /home/{{ iiab_admin_user }}/.config/labwc/autostart # iiab-admin
section: autostart create: yes
option: iiab-netwarn line: /usr/local/sbin/iiab-netwarn
value: /usr/local/sbin/iiab-netwarn when: labwc_dir.stat.exists and labwc_dir.stat.isdir
when: wayfire_ini.stat.exists
# mate desktop detection based on 'register: nd_dir' in enable_services # 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) src: roles/network/templates/netwarn/iiab-netwarn # Invoked by 1-prep (so full path needed)
dest: /usr/local/sbin/ dest: /usr/local/sbin/
mode: 0755 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)

View file

@ -3,7 +3,10 @@
# CONFUSING BUT FYI: Steps below run *strictly sequentially* when this script # CONFUSING BUT FYI: Steps below run *strictly sequentially* when this script
# (/usr/local/sbin/iiab-netwarn) is run on boot, triggered by either autostart: # (/usr/local/sbin/iiab-netwarn) is run on boot, triggered by either autostart:
# https://specifications.freedesktop.org/autostart-spec/autostart-spec-latest.html # 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 # https://github.com/WayfireWM/wayfire/wiki/Configuration#autostart
# #
# This allows return codes ($rc) to be meaningful, at each successive step. # This allows return codes ($rc) to be meaningful, at each successive step.