Open k561 opened 1 year ago
For not entering the password every times you want to connect or disconnect, as @k561 said, replace in ~/.local/share/cinnamon/applets/wireguard@nicoulaj.net/applet.js pkexec
by sudo
line 123 :
Replace :
['pkexec', 'wg-quick', enable ? 'up' : 'down', iface],
by :
['sudo', 'wg-quick', enable ? 'up' : 'down', iface],
Then in sudo visudo
add this line : with no empty line :
# Allow members of group sudo to execute any command
%sudo ALL=(ALL:ALL) ALL
YOUR_USER_NAME ALL=(ALL) NOPASSWD: /usr/bin/wg-quick
# See sudoers(5) for more information on "@include" directives:
Replace YOUR_USER_NAME by your username or ALL
########################
The config files needs to be in /etc/wireguard/ (e.g /etc/wireguard/wg0.conf)
And you must let reading access for your username to the folder wiregard : sudo chmod o+r /etc/wireguard
########################
Finally restart Cinnamon to make it works ( Alt+F2, type r and hit enter)
For not entering the password every times you want to connect or disconnect, as @k561 said, replace in ~/.local/share/cinnamon/applets/wireguard@nicoulaj.net/applet.js
pkexec
bysudo
line 123 : Replace :['pkexec', 'wg-quick', enable ? 'up' : 'down', iface],
by :
['sudo', 'wg-quick', enable ? 'up' : 'down', iface],
Then in
sudo visudo
add this line : with no empty line :# Allow members of group sudo to execute any command %sudo ALL=(ALL:ALL) ALL YOUR_USER_NAME ALL=(ALL) NOPASSWD: /usr/bin/wg-quick # See sudoers(5) for more information on "@include" directives:
Replace YOUR_USER_NAME by your username or ALL
########################
The config files needs to be in /etc/wireguard/ (e.g /etc/wireguard/wg0.conf) And you must let reading access for your username to the folder wiregard :
sudo chmod o+r /etc/wireguard
########################
Finally restart Cinnamon to make it works ( Alt+F2, type r and hit enter)
How to fix it?
Sorry I don't know, I don't use WIregard anymore. Create a new issue and explain what you have done...
If you get tired of entering the password requested by pkexec, you can use sudo. Add in /etc/sudoers:
user ALL=NOPASSWD:/usr/bin/wg-quick
and replace in ~/.local/share/cinnamon/applets/wireguard@nicoulaj.net/applet.js: