[LINUX GUIDE] – VPN Accelerator and auto-connect at boot

A message to the Proton Team – WE SHOULDN’T HAVE TO DO THIS! MAKE THE LINUX GUI BETTER, PLEASE!

Linux users can use the official CLI tool to make some advanced changes like changing the default connection protocol, turning on alternative routing, custom DNS etc.

The CLI tool is installed automatically when you install the GUI. You can also install the CLI only.

To turn on the VPN Accelerator, open up your terminal and use this command:

protonvpn-cli config --vpn-accelerator enable

Use this command for more configuration options:

protonvpn-cli config --help

Setting up auto-connect at boot

The following method is tested on Debian 11 with Xfce, Fedora 38 Workstation with Gnome and Manjaro 22.1.1 with KDE.

Go to the autostart folder in your home directory which contains all your application shortcuts that start immediately after login:

cd ~/.config/autostart

Create a new file:

nano pvpn.desktop

Paste the following:

[Desktop Entry]
Exec=protonvpn-cli c -f
Name=ProtonVPN Autoconnect
Comment=Autoconnect to the fastest server
Type=Application
Icon=protonvpn-logo

Change the “Exec” value according to your needs. For example, use

protonvpn-cli c --cc DE -p TCP

to connect to the fastest server in Germany using the TCP protocol. Save the file by hitting Ctrl + X, then Y, and then Enter.

Test this by logging out and then logging back in. Or just restart the whole system. If everything went perfectly, you should be automatically connected to the VPN when you log in.

If due to some reason you are not automatically connected, change the “Exec” value to:

Exec=bash -c "sleep 10 && protonvpn-cli c -f"

This will delay the command execution by ten seconds.

For more configuration options or help regarding installing and using only the CLI tool, read my blog post.

I hope this helps.

protonvpn-cli is not up-to-date as protonvpn gui. Wireguard is now available in protonvpn gui but not in protonvpn-cli for example.

I removed protonvpn-cli and installed protonvpn gui, which is up-to-date & official and created a script that runs protonvpn gui at startup , which takes it to system tray, without showing the gui.

Don’t forget to add a server name if you want to connect to a vpn server once the gui app opens in: Settings → General → Auto Connect → then add a server name such as NL#42 for example.

Here is my script that gets executed at startup (install wmctrl at first!):

#!/bin/bash

# Launch ProtonVPN
protonvpn-app &

# Wait for the ProtonVPN window to appear
while true; do
    # Get the window ID for ProtonVPN
    window_id=$(wmctrl -l | grep "Proton VPN" | awk '{print $1}')

    # Check if the window ID is found
    if [ -n "$window_id" ]; then
        wmctrl -i -c "$window_id"
        break
    fi

    # Wait for 0.01 seconds before checking again
    sleep 0.01
done

thank you so much for this guide. I am using latest Manjaro with Gnome. Would you have any advice how to proceed? Thank you. :slight_smile:

protonvpn-cli c -f

When I use that it never gives me the fastest server, only gives my the one with less load but the speeds are not great on that one.

Useful tutorial, thank you u/aiquiral. Great blog by the way…

Just a question: should we stop the GUI before changing config through CLI ? then restart it after changes are done? How do both interact with each other?

I came to ProtonVPN to test. I already have an account on SurfShark and came from VPN.ac, Proton network is faster and more stable but the SurfShark (or VPN.ac) client for Linux is far better. At least it looks the same between Windows & Linux with same features. This one has no “Settings”, no “Profiles”, no “VPN accelerator”, no “Wireshark” nor “Connect on Boot” in the GUI while it’s all available in Windows client. We would expect from Proton a better work on their application, and at least more consideration to their Linux users. The price is the same for Windows and Linux, so both should benefit the same quality of service, right? u/protonvpn

Thank you! Is it possible to use secure core in the CLI? I checked the article at the proton website and found nothing.

No, sadly. Only OpenVPN, TCP and UDP. This might help, if you really need Wireguard.

Just follow the same steps. Create a .desktop file in your autostart folder and paste the contents given in the post.

You should report this in their GitHub repository. Or maybe just email them about this issue. Their support team is quite good.

Honestly, I recommend closing the GUI and never using it again. Everything can be managed with the CLI, plus, it saves a lot of RAM usage. But it does not matter if the GUI is open or not. The changes made with the CLI are automatically reflected in the GUI immediately.

And yes, it is sad that the Proton Team is not focusing on the Linux users, even when we are paying the same. But I like their email service and that is what matters to me the most, so, I am staying.

I’ve convinced members of my family to use Linux but it has to be visual and simple to non-geeks, that’s why they like the SurfShark app’s interface. And it’s efficient enough for their daily use. Of course the advantages of CLI are obvious to me in anything :wink: