# [solved] networkmanager-openconnect problem

## Wallsandfences

Hi,

I'm trying to connect to connect to my vpn via networkmanager-openconnect. This works in fedora live.

It works in gentoo with the cli openconnect as well

```

tun0: flags=4305<UP,POINTOPOINT,RUNNING,NOARP,MULTICAST>  mtu 1406

        inet <snip>  netmask 255.255.255.255  destination <snip>

        inet6 <snip>  prefixlen 64  scopeid 0x20<link>

        unspec 00-00-00-00-00-00-00-00-00-00-00-00-00-00-00-00  txqueuelen 500  (UNSPEC)

        RX packets 92  bytes 14292 (13.9 KiB)

        RX errors 0  dropped 0  overruns 0  frame 0

        TX packets 536  bytes 48747 (47.6 KiB)

        TX errors 0  dropped 0 overruns 0  carrier 0  collisions 0

```

But via the gnome networkmanager stuff I get:

```

Jan 20 22:38:08 eg-server systemd-resolved[340]: Got mDNS UDP packet on unknown scope. Ignoring.

Jan 20 22:38:07 eg-server NetworkManager[17620]: <info>  [1516484287.7132] vpn-connection[0x...,"Name",0]: VPN service disappeared

Jan 20 22:38:07 eg-server NetworkManager[17620]: <info>  [1516484287.7123] vpn-connection[0x...,"Name",0]: VPN plugin: state changed: stopped (6)

Jan 20 22:38:07 eg-server NetworkManager[17620]: <error> [1516484287.7102] vpn-connection[0x....,"Name",0]: Failed to request VPN secrets #3: No agents were available for this request.

Jan 20 22:38:07 eg-server NetworkManager[17620]: <info>  [1516484287.6965] vpn-connection[0x...,"Name",0]: Saw the service appear; activating connection

Jan 20 22:38:07 eg-server NetworkManager[17620]: <info>  [1516484287.6840] vpn-connection[0x...,"Name",0]: Started the VPN service, PID 17671

Jan 20 22:38:07 eg-server NetworkManager[17620]: <info>  [1516484287.6763] audit: op="connection-activate" uuid="6f..." name="NAme" pid=17654 uid=1000 result="success"

Jan 20 22:38:07 eg-server systemd-resolved[340]: Got mDNS UDP packet on unknown scope. Ignoring.

```

EDIT: it even works with

```
nmcli --ask connection up 'Name'
```

So, what am I missing?Last edited by Wallsandfences on Mon Jan 22, 2018 8:07 am; edited 1 time in total

----------

## blopsalot

when using gnome-nm, secret handling is passed along to gnome-shell/consolekit. 

u can try this as a workaround, maybe someone more familiar can add.

```
ln -s /usr/lib/networkmanager/nm-openconnect-auth-dialog /usr/lib/gnome-shell/
```

----------

## Wallsandfences

that doesn't help. I miss the connected-icons in the top bar and the connections-related entries in the top-right menu as well, so I figure something is amiss.

I explicitly added networkmanager as global use flag in make.conf and ran a world update, but something seems still to be missing

It works on  another box with gnome 3.24., and it has those entries. What might be missing?

----------

## Wallsandfences

Argh. When I issue 

```
USE="networkmanager" emerge -v gnome-shell
```

gnome-shell actually compiles the icons in the system status area and in the user menu. It works then!!

But, without explicitly forcing USE in the command line, 

I get 

```
Calculating dependencies... done!

[ebuild   R    ] gnome-base/gnome-shell-3.24.3::gentoo  USE="bluetooth browser-extension ibus -networkmanager* -nsplugin (-openrc-force)" PYTHON_TARGETS="python3_5 -python3_4" 0 KiB

Total: 1 package (1 reinstall), Size of downloads: 0 KiB

```

 although the use flag is given in make.conf

```
/etc/portage # cat make.conf | grep networkmanager

     npt lbrv svm_lock nrip_save vmmcall networkmanager"

```

as well as in package.use:

```
/etc/portage # cat package.use/gnome-shell | grep networkmanager

gnome-base/gnome-shell networkmanager

```

What the {h|f} goes on there? Why isn't the networkmanager use-flag accepted?

----------

## Hu

Don't you mean grep expr file, not cat file | grep expr?  The latter is a Useless Use Of Cat.

To the point at hand, you have package.use as a directory.  Do you have any other files in that directory that set conflicting flags on gnome-base/gnome-shell?

----------

## Wallsandfences

Indeed, a 

```
/etc/portage/package.use grep networkmanager * 
```

 revealed a buried -networkmanager somewhere else...

----------

