Jump to content

How to run ExpressVPN on startup on Mint?

Go to solution Solved by Nayr438,
54 minutes ago, Statik said:

I'm still pretty new to the whole Linux game, what's the difference between the two?

Autostart will just launch it on login, the same as if you started it from the terminal

 

Systemd will run it as a user service that can be controlled via systemctl, enabling the service will have it auto start on login.

The Service has also additional configuration options for waiting for various events, executing commands on stop, Auto Restart, etc... , Though what I posted above is just a simple execute start.

https://www.freedesktop.org/software/systemd/man/systemd.service.html

Spoiler
  • Start Service -> systemctl start --user expressvpn_autoconnect
  • Restart Service -> systemctl restart --user expressvpn_autoconnect
  • Stop Service -> systemctl stop --user expressvpn_autoconnect
  • Check Service Status -> systemctl status --user expressvpn_autoconnect

Hey guys, I'm setting up my first VPN, and after melting my brain trying to mount my NAS, I'm having issues having my VPN run on startup. Instead of remembering to do the old fashioned

Quote

expressvpn connect smart

is there any magic I can throw in the terminal to make expressvpn connect on startup?

 

Thanks for any help

Gaming Build:

CPU: Ryzen 7 3800x   |  GPU: Asus ROG STRIX 2080 SUPER Advanced (2115Mhz Core | 9251Mhz Memory) |  Motherboard: Asus X570 TUF GAMING-PLUS  |  RAM: G.Skill Ripjaws DDR4 3600MHz 16GB  |  PSU: Corsair RM850x  |  Storage: 1TB ADATA XPG SX8200 Pro, 250GB Samsung 840 Evo, 500GB Samsung 840 Evo  |  Cooler: Corsair H115i Pro XT  |  Case: Lian Li PC-O11

 

Peripherals:

Monitor: LG 34GK950F  |  Sound: Sennheiser HD 598  |  Mic: Blue Yeti  |  Keyboard: Corsair K95 RGB Platinum  |  Mouse: Logitech G502

 

Laptop:

Asus ROG Zephryus G15

Ryzen 7 4800HS, GTX1660Ti, 16GB DDR4 3200Mhz, 512GB nVME, 144hz

 

NAS:

QNAP TS-451

6TB Ironwolf Pro

 

 

Link to comment
Share on other sites

Link to post
Share on other sites

You could create an autostart entry

Spoiler

 

~/.config/autostart/expressvpn_autoconnect.desktop


[Desktop Entry]
Type=Application
Name=expressvpn
Exec=/usr/bin/expressvpn connect smart
StartupNotify=false
Terminal=false


 

or you could create a user systemd service

Spoiler

 

~/.config/systemd/user/expressvpn_autoconnect.service


[Unit]
Description=Express VPN Auto Connect

[Service]
ExecStart=/usr/bin/expressvpn connect smart

[Install]
WantedBy=default.target

systemctl enable  --user --now expressvpn_autoconnect

 

 

Link to comment
Share on other sites

Link to post
Share on other sites

8 minutes ago, Nayr438 said:

-snip-

I'm still pretty new to the whole Linux game, what's the difference between the two?

Gaming Build:

CPU: Ryzen 7 3800x   |  GPU: Asus ROG STRIX 2080 SUPER Advanced (2115Mhz Core | 9251Mhz Memory) |  Motherboard: Asus X570 TUF GAMING-PLUS  |  RAM: G.Skill Ripjaws DDR4 3600MHz 16GB  |  PSU: Corsair RM850x  |  Storage: 1TB ADATA XPG SX8200 Pro, 250GB Samsung 840 Evo, 500GB Samsung 840 Evo  |  Cooler: Corsair H115i Pro XT  |  Case: Lian Li PC-O11

 

Peripherals:

Monitor: LG 34GK950F  |  Sound: Sennheiser HD 598  |  Mic: Blue Yeti  |  Keyboard: Corsair K95 RGB Platinum  |  Mouse: Logitech G502

 

Laptop:

Asus ROG Zephryus G15

Ryzen 7 4800HS, GTX1660Ti, 16GB DDR4 3200Mhz, 512GB nVME, 144hz

 

NAS:

QNAP TS-451

6TB Ironwolf Pro

 

 

Link to comment
Share on other sites

Link to post
Share on other sites

54 minutes ago, Statik said:

I'm still pretty new to the whole Linux game, what's the difference between the two?

Autostart will just launch it on login, the same as if you started it from the terminal

 

Systemd will run it as a user service that can be controlled via systemctl, enabling the service will have it auto start on login.

The Service has also additional configuration options for waiting for various events, executing commands on stop, Auto Restart, etc... , Though what I posted above is just a simple execute start.

https://www.freedesktop.org/software/systemd/man/systemd.service.html

Spoiler
  • Start Service -> systemctl start --user expressvpn_autoconnect
  • Restart Service -> systemctl restart --user expressvpn_autoconnect
  • Stop Service -> systemctl stop --user expressvpn_autoconnect
  • Check Service Status -> systemctl status --user expressvpn_autoconnect
Link to comment
Share on other sites

Link to post
Share on other sites

Add your command to .bash_profile in your home directory. Droping script into autostart directory also works. 

 

You can use systemd as well if you are more advance. 

Sudo make me a sandwich 

Link to comment
Share on other sites

Link to post
Share on other sites

  • 1 year later...

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now

×