I'm running Xubuntu 17.10 and I would like to remove screen locking when I'm connected to my home wifi.
My current plan is something like:
- Use a
/etc/interfaces/if.up/
script to check when I'm connected to my wifi (usingiwconfig
to get the SSID) - To do this, I've read that the wifi interface must be in interfaces. It is currently not. But if I add it there, will it still connect to networks automatically as it does out of the box?
- Then, I'm not sure how to disable light-locker (and only temporarily). Can light-locker be commanded from the CLI?
- Then, have a
if.down
/if.up
script that does turns on light-locker whenever I disconnect from the wifi or connect to some other network.
An alternative method would be to just have a cron script that runs every 1 min and toggles light-locker as a function of the connection.
So to summarize my questions:
- How to enable/disable light-locker programmatically from within
a script that is run at
if.down
/if.up
or incron
? - Can I add an interface to /etc/interfaces file so that
if.up
/if.down
scripts can run, and still manage the interface automatically using as usual?
Edit: after some research, it seems i should rather use the NetworkManager dispatcher instead of if.up
/if.down
scripts. This would invalidate question 1.
0 Answers