Opened 5 years ago

Closed 5 years ago

#1153 closed Bug / Defect (notabug)

OpenVPN GUI tray icon does not initialize when using the —connect option

Reported by: Chaos Owned by: Selva Nair
Priority: major Milestone:
Component: Windows GUI Version: OpenVPN 2.5.0 (Community Ed)
Severity: Not set (select this one, unless your'e a OpenVPN developer) Keywords:
Cc:

Description

I have a Windows Task schedule set to launch the OpenVPN GUI with a specific configuration.
Such that the launch is “openvpn-gui.exe —connect “myconfig.ovpn”

It will successfully launch and connect on boot, but the tray icon does not show I am connected. The VPN IS actually connected but it seems like the GUI and tray icon don’t know this.

Change History (5)

comment:1 Changed 5 years ago by Selva Nair

A scheduled task to start the GUI at boot wont work as GUI needs a user session and access to a desktop.

With some flags like "interactive" and "run only when user logged in", it should be possible to start the GUI from the task scheduler -- see a similar discussion here: https://github.com/OpenVPN/openvpn-gui/issues/276. But then its simpler to make a shortcut with "--connect config" as arg and add that to launch on logon.

If the goal is to connect at boot use openvpnserv2 --- such instances cannot be controlled by the GUI as of now.

Version 0, edited 5 years ago by Selva Nair (next)

comment:2 Changed 5 years ago by chaos

I miss typed. It is set to launch when a user logs in but the issue remains.

comment:3 Changed 5 years ago by Selva Nair

If its run from task scheduler, you will need the right flags to get the process running in the correct session with access to the desktop.

Much simpler to make a short cut and add it to run on logon. If that doesn't work post details -- installed version, OS etc so that I can try to reproduce.

comment:4 Changed 5 years ago by Chaos

I was able to find the issue. Turns out the OpenVPN service was installed and set to automatic. Even though I had all the options about starting the service or starting on login on the GUI set to false. This was making it so any of my startup tasks would run after the OpenVPN service and would fail.

You can feel free to close this.

comment:5 Changed 5 years ago by Selva Nair

Resolution: notabug
Status: newclosed

Thanks for the follow up.

By the way, none of the settings in the GUI will change how OpenVPNService is started as that requires elevated privileges while the GUI is supposed to be run as a limited user. The GUI does not make use of that service either.

Currently OpenVPNService is installed by default with start type set to manual. But if a previous installation with a different start type exists, that setting is preferred by the installer.

Note: See TracTickets for help on using tickets.