3

Is there a way to create a desktop shortcut to a VPN connection, like in Windows? Basically, once clicked, it asks for the login information and connects.

Thanks in advance.

2 Answers 2

2

Not sure about desktop, but if you just click on the network icon in the system tray then you will see the section "VPN Connections" there and you should be able to just add them. Not sure if there is a way to get them to the desktop from there or not.

1
  • 1
    when you opened the network icon, right click on the vpn icon and use "copy to desktop".
    – laurent
    Apr 25, 2011 at 12:45
0

with the following script, you can toggle your VPN connection. The name of the VPN connection is the first command line argument, you can find out the name using

nmcli con show

Then, you simply create a new launcher on the desktop that calls that script with the right name, either putting it somewhere on your PATH or using the absolute path in the "Command" line of the launcher.

#!/bin/bash
name="$1"
conn=`nmcli c show | grep "$name" | gawk '{print $4}'`

if test "$conn" == "--"; then
   nmcli con up "$name"
else
   nmcli con down "$name"
fi

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .