Is there any way to enable VPN connect option on GDM?

I have a requirement to connect VPN before user login. After configuring VPN via network manager, it shows the status on gnome login screen, however there is no option for nm-openconnect-auth-dialog to connect the server. is there any way to enable VPN option on gnome login screen (GDM). haven’t seen any documentation on it(either from GNOME or other sources).

Any pointers on this would be helpful.


It’s possible if you have a static password: you can configure NetworkManager to connect automatically when a certain network is activated, and configure it to save the password for all users instead of only for your user. That will work for sure.

If you have a dynamic password and really need to display the auth dialog, then I don’t know what will happen, but it’s worth a try I suppose? If that fails, you’ll need to make changes to gnome-shell.

Really don’t need the auto connect option for VPN. At login screen , i need the auth dialog prompt to enter username and password every time. Could you please point where exactly to tweak the gnome-shell for enabling nm-openconnect-auth-dialog at login screen.


By following the link Enable connecting to WiFI and VPN connections at the GDM login able to bring the network option on gdm login screen , however VPN was not coming up.

Any pointers would be helpful. Thanks

Hi @fmuellner ,

As mentioned in the link 1935261 – [RFE] Enable connecting to WiFI and VPN connections at the GDM login , tested the vpn connections at GDM on os - centos 8.

Pkgs used:
Placed polkit rule as mentioned in the link.

Created the VPN setup using OpenConnect utility . Installed the following VPN pkgs.

once after reboot/gdm restart, network agent got enabled at the login screen. However, VPN option was not get enabled.

So I didn’t answer your support request via private e-mail over the weekend, and now I’m getting pinged on a public forum?

I’m generally happy to help, but please keep in mind that you are asking for free support here. Do not treat us as customer support if you are not – well – a customer.

However, VPN option was not get enabled.

Does the connection have the “Make available to other users” option checked?

The login screen doesn’t show any network connections that require an external window to connect, but that should only affect modem connections and new wifi connections with enterprise encryption.

There is no filtering of VPN connections, so any connection that is visible to the GDM user should show up (provided that the network-control permission was enabled (RHEL/CentOS) or not disabled (upstream))

Thank u so much for you response :slight_smile:

Sorry for bothering you. I am very curious on enabling the vpn at gdm. As you suggested, enabled “Make available to other users” option and vpn got enabled at login screen.

When attempting to connect to a VPN at the login screen, the popup where you input your pin/token never arrives. When look through on journalCtl observed the error “Failed to request VPN secrets #3 No agents available for this request”


This topic was automatically closed 30 days after the last reply. New replies are no longer allowed.