linux-cli-community
linux-cli-community copied to clipboard
Can't automatically connect at startup
Whenever I restart my computer, I check my vpn status to see that I am not connected despite having enabled autoconnect.
Steps to reproduce the behavior:
- Follow the guide to install protonvpn-cli from pypi
- Init profile (free version)
- follow guide on https://github.com/ProtonVPN/linux-cli-community/blob/master/USAGE.md#installing-from-pypi to enable autoconnect (change "user" to OpenVPN username)
- Restart ubuntu
- check protonvpn status using "protonvpn status" in terminal
- not connected
Error: Running "sudo systemctl status protonvpn-autoconnect.service" in the terminal, it poops out the following message:
protonvpn-autoconnect.service - ProtonVPN-CLI auto-connect Loaded: loaded (/etc/systemd/system/protonvpn-autoconnect.service; enabled; vendor preset: enabled) Active: failed (Result: exit-code) since Thu 2021-04-08 16:20:38 BST; 13min ago
Apr 08 16:20:38 Computerbox protonvpn[587]: File "/usr/local/lib/python3.8/dist-packages/protonvpn_cli/connection.py", line 15, in
However, I am able to manually connect using protonvpn-cli commands with no issue apart from not being able to connect automatically at boot.
Desktop (please complete the following information):
- OS: Ubuntu 20.04.2 LTS
- Python Version: Don't know how to check.
- ProtonVPN-CLI Version: Don't know how to check.
Additional context I did install some protonvpn packages to connect directly to vpn. Although it didn't have autoconnect so I installed protonvpn-cli yesterday. I am also running this on a VM version of ubuntu.
I'm having the same isue.
I don't know if this works on any other desktop environments, but if you are using GNOME just put this in ~/.config/autostart/ProtonVPN-Reconnect.desktop:
[Desktop Entry] Name=ProtonVPN-Reconnect Comment=Automatically reconnect to ProtonVPN at startup Exec=/usr/bin/protonvpn-cli reconnect Terminal=false Type=Application X-GNOME-Autostart-enabled=true
That said, I use the official packages and not from PyPI
thank you @tommytran732 I did this on arch kde and it works!
for anyone to copy paste
nano ~/.config/autostart/ProtonVPN-Reconnect.desktop