You are not logged in.
Hello, I've finally gotten around to trying to add GUI widgets to my awesome-wm config. Of course, in terminal, I needed sudo to mess with wifi (I use sudo /sbin/ifdown wlan0 and sudo /sbin/ifup wlan0) and brightness. For brightness I just gave all execution rights, but for internet, I gave all xrw. I did this recursively and for /run/wpa_supplicant (now /run/wpa_supplicant.wlan0.pid is missing; I got a warning about insecure file), /run/network (now ./ifstate and ./.ifstate.lock and the ifstant.tmp and ifstate.wlan0 are all messed up). How should I go about fixing this? I still have internet of course, since the daemon isn't working to turn off internet connection, but I assume that purging ifupdown to reinstall would mess it up, and pre-downloading it to later install with dpkg -i seems a bit risky, since it may not work and then I might have no internet. Only files in /sbin and /run are affected, but not /etc, so my configs are safe as far as I can tell... Should I just debootstrap a new install?
Offline
I'm pretty sure that everything in /run will be regenerated on reboot. If you changed permissions on the executables in /sbin, those won't revert. You should do that manually.
Instead of changing permissions, you could give your user sudo privs without password for just the required commands. Then you can use those commands in destkop launchers without having to enter a password.
I have something like this in /etc/sudoers.d/usercommands. (Hint: visudo /etc/sudoers.d/usercommands)
Cmnd_Alias HALT = /sbin/shutdown, /sbin/halt, /sbin/poweroff, /sbin/reboot
Cmnd_Alias NET = /sbin/ifconfig, /sbin/ifup, /sbin/ifdown
fred ALL=NOPASSWD: HALT, NET
For brightness, your user can run xrandr.
# $monitor1 is the name of the connected monitor from xrandr without any options.
# $bright1 is a number between 0.0 and 1.0.
xrandr --output $monitor1 --brightness "$bright1"
Offline
In case anyone else has trouble with this, to regenerate the daemons, I regenerated them by turning off internet with sudo /sbinsudo /sbin/ifdown wlan0, running /sbin/wpa_supplicant -iwlan0 and sudo killall wpa_supplicant daemons (the original one was still going apparently), then running sudo /sbin/ifup wlan0.
Last edited by paculino (2025-05-23 23:15:18)
Offline