Thursday, May 16, 2024
3
rated 0 times [  3] [ 0]  / answers: 1 / hits: 642  / 3 Years ago, thu, december 2, 2021, 3:29:07

I am a linux beginner and I am trying to automate a small task on my computer.
In order to connect to my vpn, I have to open my terminal and type nordvpn connect


I have created a simple .sh script that does this for me.


#!/bin/bash
nordvpn connect

The problem is that to run this file I have to open my terminal and write `./vpn.sh

Is there a way I can automate this to be done with a single click?


More From » command-line

 Answers
2

Not sure about a click, but you could add a keyboard shortcut: Open Settings/Keyboard shortcuts, scroll to the bottom and press the plus sign. Give a name to your shortcut, enter /path/to/nordvpn connect as the command and then select a keyboard shortcut. Note: /path/to/nordvpn should be replaced by the output of which nordvpn.


[#1326] Saturday, December 4, 2021, 3 Years  [reply] [flag answer]
Only authorized users can answer the question. Please sign in first, or register a free account.
cisccla

Total Points: 66
Total Questions: 134
Total Answers: 115

Location: Croatia
Member since Fri, Sep 11, 2020
4 Years ago
cisccla questions
Tue, Nov 16, 21, 08:40, 3 Years ago
Thu, Sep 1, 22, 19:53, 2 Years ago
Fri, Apr 21, 23, 20:17, 1 Year ago
;