nicoulaj / cinnamon-applet-wireguard

A simple WireGuard systray applet for the Cinnamon desktop environment.
https://cinnamon-spices.linuxmint.com/applets/view/311
GNU General Public License v3.0
14 stars 5 forks source link

sudo error when using the plugin the first time #3

Closed theScrabi closed 3 years ago

theScrabi commented 5 years ago

The first time I used this plugin i got this error:

error t=2019-08-12T12:22:18Z Failed toggling WireGuard interface

Error details:
sudo: no tty present and no askpass program specified

grafik

Could you please add a description in your github README.md on how to fix this error?

jhedd commented 5 years ago

Same issue here. Also, the applet has no icon

nicoulaj commented 5 years ago

Could you test if 623e4e0 solves the issue ? Just clone the project and run make install reload to deploy the version with the fix.

(also, the icon issue is already tracked in #2)

theScrabi commented 5 years ago

Hm it first asked me to install polib:

> make install reload                       132ms  Fr 20 Sep 2019 21:57:58 CEST

Module "polib" not available.

You will need to install this module using your distribution's package manager
(in debian-based syatems "apt-get install python3-polib")

21:58:06: installed extension to ~/.local/share/cinnamon/applets

After installed, run and selected my wg0 it shew me this: grafik

nicoulaj commented 5 years ago

Not what I expected :)

What distro are you running ? It looks like sudo doesn't recognize the --askpass option. What is the output of sudo --version ?

Thanks for testing

theScrabi commented 5 years ago

Wait ... this error aboth appeared after I fiddled around in the code. This was the error that appeared before I lay hand on it: grafik

Translation: sudo: No "askpass"-Programm entered, it will be tried to set SUDO_ASKPASS

sudo --version                             
Sudo-Version 1.8.21p2
Sudoers-Policy-Plugin Version 1.8.21p2
sudoers-Dateigrammatik Version 46
Sudoers I/O plugin version 1.8.21p2

Ah yes I might have issues with my sudo :/

sudo --askpass ls                       
sudo: pkexec konnte nicht ausgeführt werden: Datei oder Verzeichnis nicht gefunden

This means translated sudo: pkexec could not be executed: File or directory could not be found I found this weird as pkexec is installed, and if I execute it directly it works.

cat /etc/*-release  
DISTRIB_ID=LinuxMint
DISTRIB_RELEASE=19.2
DISTRIB_CODENAME=tina
DISTRIB_DESCRIPTION="Linux Mint 19.2 Tina"
NAME="Linux Mint"
VERSION="19.2 (Tina)"
ID=linuxmint
ID_LIKE=ubuntu
PRETTY_NAME="Linux Mint 19.2"
VERSION_ID="19.2"
HOME_URL="https://www.linuxmint.com/"
SUPPORT_URL="https://forums.ubuntu.com/"
BUG_REPORT_URL="http://linuxmint-troubleshooting-guide.readthedocs.io/en/latest/"
PRIVACY_POLICY_URL="https://www.linuxmint.com/"
VERSION_CODENAME=tina
UBUNTU_CODENAME=bionic
nocin commented 4 years ago

I have the same error on a fresh Linux Mint installation.

cat /etc/*-release DISTRIB_ID=LinuxMint DISTRIB_RELEASE=19.3 DISTRIB_CODENAME=tricia DISTRIB_DESCRIPTION="Linux Mint 19.3 Tricia" NAME="Linux Mint" VERSION="19.3 (Tricia)" ID=linuxmint ID_LIKE=ubuntu PRETTY_NAME="Linux Mint 19.3" VERSION_ID="19.3" HOME_URL="https://www.linuxmint.com/" SUPPORT_URL="https://forums.ubuntu.com/" BUG_REPORT_URL="http://linuxmint-troubleshooting-guide.readthedocs.io/en/latest/" PRIVACY_POLICY_URL="https://www.linuxmint.com/" VERSION_CODENAME=tricia UBUNTU_CODENAME=bionic

sudo --version Sudo-Version 1.8.21p2 Sudoers-Policy-Plugin Version 1.8.21p2 sudoers-Dateigrammatik Version 46 Sudoers I/O plugin version 1.8.21p2

I have no inssue when running:

sudo --askpass ls

mainmachine commented 4 years ago

This should not be using sudo but rather pkexec - see #4