code for

86 views
Skip to first unread message

Balan K

unread,
Jan 24, 2022, 5:15:13 AM1/24/22
to tunnelblick-discuss
is there is any installation method  terminal without using brew command to install tunnelblick kindly share 

Tunnelblick developer

unread,
Jan 24, 2022, 6:26:48 AM1/24/22
to tunnelblick-discuss
Yes. You can install Tunnelblick using the following command:

     sudo TUNNELBLICK_APP_PATH/Contents/Resources/installer  3

where TUNNELBLICK_APP_PATH is the path to a copy of the Tunnelblick.app to be installed.

For example, when installing from a copy of Tunnelblick.app in a volume mounted from a disk image, use the following command:

     sudo /Volumes/Tunnelblick/Tunnelblick.app/Contents/Resources/installer  3

This installs Tunnelblick only; no configurations are installed. To install configurations from the command line, see Installing and Deleting VPN Configurations.

Alexander Harm

unread,
May 13, 2022, 5:58:09 PM5/13/22
to tunnelblick-discuss
Thanks for the info. I have the problem that Tunnelblick still requires admin privileges upon launch (Tunnel must complete update).

Is there a way to install Tunnelblick from command line so that a non admin user can use it? So far I have

# Installation
/Applications/Tunnelblick.app/Contents/Resources/installer 3

# Set some preferences
defaults write "/Library/Application Support/Tunnelblick/forced-preferences" "updateCheckAutomatically" -bool false
defaults write "/Library/Application Support/Tunnelblick/forced-preferences" "allowNonAdminSafeConfigurationReplacement" -bool true

chmod 644 "/Library/Application Support/Tunnelblick/forced-preferences.plist"

Somewhere else I read about option 5 of the installer which I used before. What is the difference between 3 and 5?

Regards, Alexander

Alexander Harm

unread,
May 13, 2022, 5:58:09 PM5/13/22
to tunnelblick-discuss
I tried to install Tunnelblick using this code:

# Installation
/Applications/Tunnelblick.app/Contents/Resources/installer 5


# Set some preferences
defaults write "/Library/Application Support/Tunnelblick/forced-preferences" "updateCheckAutomatically" -bool false
defaults write "/Library/Application Support/Tunnelblick/forced-preferences" "allowNonAdminSafeConfigurationReplacement" -bool true

chmod 644 "/Library/Application Support/Tunnelblick/forced-preferences.plist"

Is there any way to make this work for on-admin users? Upon first launch it still asks for admin credentials (to complete the update).

Also, what is the difference between option 3 and 5?

Regards, Alexander

On Monday, January 24, 2022 at 12:26:48 PM UTC+1 Tunnelblick developer wrote:

Tunnelblick developer

unread,
May 14, 2022, 12:41:27 AM5/14/22
to tunnelblick-discuss
How did you install it that it needs admin privileges upon launch? You can't just run .../installer 3. It must be run as the super user (e.g., sudo).

"installer 3" is to copy and install Tunnelblick from somewhere else, NOT from an already-installed Tunnelblick in /Applications.

"installer 5" is to secure the copy of Tunnelblick that is already in /Applications. It should be used only in very unusual circumstances.

Alexander Harm

unread,
May 17, 2022, 5:52:20 AM5/17/22
to tunnelblick-discuss
Thanks for your reply. I changed my approach by downloading "Tunnelblick.app" into "/tmp" and then running the installer with the suggested option "3". However, I receive this error now:

Tunnelblick installer started 2022-05-17 11:45:24.575456. 1 arguments: 0x0003
getuid() = 0; getgid() = 0; geteuid() = 0; getegid() = 0
isOnRemoteVolume: will check parent of '/var/root/Library/Application Support/Tunnelblick'
isOnRemoteVolume: will check parent of '/var/root/Library/Application Support/Tunnelblick'
Unable to create directory /var/root/Library/Application Support/Tunnelblick with permissions 750
stat of /tmp/tunnelblick-authorized-running failed
Error was 'No such file or directory'

Alexander Harm

unread,
May 17, 2022, 6:05:18 AM5/17/22
to tunnelblick-discuss
When I "touch /tmp/tunnelblick-authorized-running" before installing, it only produces the error "Unable to create directory /var/root/Library/Application Support/Tunnelblick with permissions 750". However, there is no Tunnelblick in "/Applications"

Tunnelblick developer

unread,
May 17, 2022, 8:19:17 AM5/17/22
to tunnelblick-discuss
/tmp is a symlink to a directory. No part of a path the Tunnelblick installer can be a symlink (for security reasons).

Download Tunnelblick to somewhere that has no symlinks in its path and run its installer there

For example, download it to /Users/USERNAME/Desktop. Then run

          sudo /Users/USERNAME/Desktop/Tunnelblick.app/Contents/Resources/installer 3

where USERNAME is the short username of a user.

Then delete /Users/USERNAME/Desktop/Tunnelblick.app.

Alexander Harm

unread,
May 18, 2022, 5:31:41 AM5/18/22
to tunnelblick-discuss
OK, I changed the path to /Users/Shared/Tunnelblick.app

However, the error remains the same:

Tunnelblick installer started 2022-05-18 09:02:07.686816. 1 arguments: 0x0003

getuid() = 0; getgid() = 0; geteuid() = 0; getegid() = 0
isOnRemoteVolume: will check parent of '/var/root/Library/Application Support/Tunnelblick'
isOnRemoteVolume: will check parent of '/var/root/Library/Application Support/Tunnelblick'
Unable to create directory /var/root/Library/Application Support/Tunnelblick with permissions 750
stat of /tmp/tunnelblick-authorized-running failed
Error was 'No such file or directory'

Tunnelblick developer

unread,
May 18, 2022, 10:01:01 AM5/18/22
to tunnelblick-discuss
What version of Tunnelblick are you trying to install?
Is there anything unusual about your macOS setup? (Home directory on a different volume, perhaps?)

The following works fine for me for either the current stable or current beta release of Tunnelblick when running as an admin user:
  1. Use Finder to copy (hold down the "Option" key while dragging) Tunnelblick.app to /Users/Shared
  2. Use Terminal to execute
  3.      sudo /Users/Shared/Tunnelblick.app/Contents/Resources/installer 3     
Perhaps the installer is confused by things you've done such as "touch /tmp/tunnelblick-authorized-running".

I suggest you restart your computer and try again using the above procedure.


Alexander Harm

unread,
May 18, 2022, 12:00:29 PM5/18/22
to tunnelblick-discuss
I did not do touch something anymore. It is a M1 MBP running the latest version of Monterey, installation is executed with root privileges... I will test manually and come back to you with my findings.

Alexander Harm

unread,
May 18, 2022, 12:17:36 PM5/18/22
to tunnelblick-discuss
OK, tried the manual method and it does not work either. I execute sudo /Users/Shared/Tunnelblick.app/Contents/Resources/installer 3 but nothing appears in /Applications

Is there a way of installing without copying?

I'm using the latest stable version 3.8.7a_build_5770

Alexander Harm

unread,
May 19, 2022, 4:48:40 AM5/19/22
to tunnelblick-discuss
Installing on Intel works as expected.

Alexander Harm

unread,
May 19, 2022, 5:01:51 AM5/19/22
to tunnelblick-discuss
Tried again:
- MBP Intel with Monterey: works
- MBP M1 with Monterey: does not
- MB M1 with Monterey: does not

Weird.

Tunnelblick developer

unread,
May 19, 2022, 8:03:22 AM5/19/22
to tunnelblick-discuss
The procedure I described works on my MBP M1Max (18,4) with Monterey 12.3.1.

What version of Monterey are on your M1s?

Alexander Harm

unread,
May 19, 2022, 3:04:44 PM5/19/22
to tunnelblick-discuss
I believe it was 12.3.1.

They are managed by an MDM though but I cannot imagine, that this plays a role.

The funny thing is, there is no error message, nothing. I will try to get hold of another M1 machine and try again.
Reply all
Reply to author
Forward
0 new messages