Skip to content
Command line instal/configurationl of viscosity
Got a problem with Viscosity or need help? Ask here!
Hey all!
As part of my new-mac-setup (or after wiping my mac to hand it to the genius bar), I typically reinstall Viscosity (and most other things) via homebrew. While some mac-ish things aren't easily exposed via the defaults command, many things are. My questions:
1) Are there command line options I can use to cause a connection import from our OpenVPN appliance?
2) Is there a command-line way I can fill in my license key
3) Is there a way to manipulate other viscosity preferences (like the icon style) from the command line.
I can't find these answers in the knowledge base.
As part of my new-mac-setup (or after wiping my mac to hand it to the genius bar), I typically reinstall Viscosity (and most other things) via homebrew. While some mac-ish things aren't easily exposed via the defaults command, many things are. My questions:
1) Are there command line options I can use to cause a connection import from our OpenVPN appliance?
2) Is there a command-line way I can fill in my license key
3) Is there a way to manipulate other viscosity preferences (like the icon style) from the command line.
I can't find these answers in the knowledge base.
Hi thegushi,
You can make use of macOS's "defaults" command to read and set preferences. For example, to read all of Viscosity's preferences you can enter the following into the Terminal:
In regards to programatically using Viscosity's "Import from Server" feature, I'm afraid that's not possible. It must be done via Viscosity's GUI. If you have a configuration file already however, you could potentially copy it into the "~/Library/Application Support/Viscosity/OpenVPN" directory.
Cheers,
James
You can make use of macOS's "defaults" command to read and set preferences. For example, to read all of Viscosity's preferences you can enter the following into the Terminal:
Code: Select all
You can also read a setting individually, for example:
defaults read com.viscosityvpn.Viscosity
Code: Select all
To set/change a setting, you can use a command like so (in this example we're changing the menu icon):
defaults read com.viscosityvpn.Viscosity MenuBarIcons
Code: Select all
This can be used to set any setting, including your license information. However generally you want to extract the correct values to set from a working copy of Viscosity, as often these values can be encoded and not in plain text.defaults write com.viscosityvpn.Viscosity MenuBarIcons "Solid Blue"
In regards to programatically using Viscosity's "Import from Server" feature, I'm afraid that's not possible. It must be done via Viscosity's GUI. If you have a configuration file already however, you could potentially copy it into the "~/Library/Application Support/Viscosity/OpenVPN" directory.
Cheers,
James
Web: https://www.sparklabs.com
Support: https://www.sparklabs.com/support
Twitter: https://twitter.com/sparklabs
Support: https://www.sparklabs.com/support
Twitter: https://twitter.com/sparklabs
2 posts
Page 1 of 1