Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Can't enable VPN #64

Closed
johngebbie opened this issue Jul 7, 2019 · 28 comments
Closed

Can't enable VPN #64

johngebbie opened this issue Jul 7, 2019 · 28 comments
Assignees
Labels
bug Something isn't working question Further information is requested

Comments

@johngebbie
Copy link

When I try to enable my VPN in the network settings it instantly toggles back off.

When I click its cog and go to the 'Identity' tab, the password is blank. If I fill it in click 'Apply' and go back to the tab its blank again.

If I switch over to Ubuntu (I'm using Regolith as a desktop session) I can toggle it on. It stays on even when I switch back to Regolith. But when I reboot or sleep my computer, it's gone again.

It doesn't matter too much to me, but I hope this is helpful.

@KatonaZsolt
Copy link

Same issue here too.

@kgilmer
Copy link
Member

kgilmer commented Jul 8, 2019

Hmm, interesting. I don't use a VPN myself so am not really sure how I can reproduce this. I tried creating a fake VPN and did see this "...instantly toggles back off" behavior as well. @johngebbie or @KatonaZsolt can either of you give me a snippet of your /var/log/syslog for when you try to enable the VPN? To do this, open a terminal, type tail -f /var/log/syslog, hit enter a few times to seperate the old log data from what we want, then press the VPN toggle. gnome-control-center will hopefully emit some error information that may provide clues.

@kgilmer kgilmer self-assigned this Jul 8, 2019
@kgilmer kgilmer added bug Something isn't working question Further information is requested labels Jul 8, 2019
@KatonaZsolt
Copy link

Hello, tanks for the quick response! Here is my result:
...
Jul 8 11:21:28 Z-ROG-18 NetworkManager[2640]: [1562577688.9547] audit: op="connection-activate" uuid="b413a938-6bbf-49e9-943e-91bbe29e9fbd" name="Silicon" pid=5625 uid=1000 result="success"
Jul 8 11:21:28 Z-ROG-18 NetworkManager[2640]: [1562577688.9663] vpn-connection[0x56398883c530,b413a938-6bbf-49e9-943e-91bbe29e9fbd,"Silicon",0]: Started the VPN service, PID 6460
Jul 8 11:21:28 Z-ROG-18 NetworkManager[2640]: [1562577688.9851] vpn-connection[0x56398883c530,b413a938-6bbf-49e9-943e-91bbe29e9fbd,"Silicon",0]: Saw the service appear; activating connection
Jul 8 11:21:29 Z-ROG-18 NetworkManager[2640]: [1562577689.0039] vpn-connection[0x56398883c530,b413a938-6bbf-49e9-943e-91bbe29e9fbd,"Silicon",0]: Failed to request VPN secrets #3:
No agents were available for this request.
Jul 8 11:21:29 Z-ROG-18 NetworkManager[2640]: [1562577689.0101] vpn-connection[0x56398883c530,b413a938-6bbf-49e9-943e-91bbe29e9fbd,"Silicon",0]: VPN service disappeared
...
The VPN is working under Budgie/Gnome(through nm-applet and the control center too). Please let me know if I can help!

@kgilmer
Copy link
Member

kgilmer commented Jul 9, 2019

This seems related: https://bugzilla.redhat.com/show_bug.cgi?id=1394977

@kgilmer
Copy link
Member

kgilmer commented Jul 9, 2019

I have verified that running nm-applet causes a password dialog to be presented when I try and start my fake VPN. A short term fix may be to add this to your i3 config to have it launch on start, however there may be side effects to this. If you want to give it a try, add this line to the bottom of your ~./config/i3-regolith/config file:

exec --no-startup-id /usr/bin/nm-applet

Then either log back in or reload i3 and try to start the VPN connection again.

@kgilmer
Copy link
Member

kgilmer commented Jul 9, 2019

This issue also looks interesting: clearlinux/distribution#205

Since this problem does not occur w/ in ubuntu-session I suspect a service that is loaded there is not being loaded w/ Regolith. I'll have to setup a machine to learn more.

@KatonaZsolt
Copy link

Success with the nm-applet launch on start. This solution is perfectly fine for me, thanks a lot!

@kgilmer
Copy link
Member

kgilmer commented Jul 14, 2019

Closing, looks like using nm-applet is a fix for this issue.

@kgilmer kgilmer closed this as completed Jul 14, 2019
@vanboom
Copy link

vanboom commented Aug 9, 2019

This fix worked for me also, thanks for posting it.

@vanboom
Copy link

vanboom commented Aug 25, 2019

The config file might also be in ~/.config/regolith/i3/config

@maxx
Copy link

maxx commented Jan 17, 2020

This solution allows networkmanager to prompt you for a password, but it still does not allow you to store the password.

@gnzlbg
Copy link

gnzlbg commented Feb 16, 2020

This fix did not work for me. I added:

exec --no-startup-id /usr/bin/nm-applet

to ~/.config/regolith/i3/config (which did not exist - that's the only line this file has in my system), and when restarting the computer, I get the following error:

i3 Error: Status_command not found (exit 127)

The desktop then becomes unusable, and typing super+enter does not open a terminal, and that there is no other way to open one. I had to restart again and log into the Ubuntu desktop, to be able to remove that line file (EDIT: removing that line did not help, I had to remove the ~/.config/regolith/i3 directory to fix this).

This is something that should "just work", and not require the user to meddle with configuration files, so IMO this issue should be reopened.

EDIT: since this did not work for me, but worked for others, I suppose that I just added the line to the wrong file. It is not clear to me at all from the instructions in the workarounds to which file this line should be added - feels like an important bit of information that should not be omitted.

@vanboom
Copy link

vanboom commented Feb 16, 2020

This fix stopped working for me as well along the way after an update.

@kgilmer
Copy link
Member

kgilmer commented Feb 16, 2020

@gnzlbg , you'll need to copy the entire i3 config file and then add your change. See here for details. You can verify which config file i3 is loading with i3 --moreversion.

@vanboom can you be more specific? Can you check and see if nm-applet is running in the background or not?

@kgilmer kgilmer reopened this Feb 16, 2020
@7system7
Copy link

7system7 commented Feb 29, 2020

Same issue here. And I added this magic line to my config

exec --no-startup-id /usr/bin/nm-applet

// OFF
Btw, right here, the copy of the config files are also not working and I don't know why... I tried this and this documentation
And there is no real solution for this problem in github nor the stackoverflow. So, I created my configs in global config files. 😞

$ ls -la ~/.config/regolith/i3/config
-rw-r--r-- 1 system7 system7 15K febr  28 18:37 /home/system7/.config/regolith/i3/config

$ i3 --moreversion
Binary i3 version:  4.17.1 (2019-08-30) © 2009 Michael Stapelberg and contributors
Running i3 version: 4.17.1 (2019-08-30) (pid 3807)abort…)
Loaded i3 config: /home/system7/.config/regolith/i3/config (Last modified: 2020. febr. 28., péntek, 18:37:12 CET, 52752 seconds ago)

The i3 binary you just called: /usr/bin/i3
The i3 binary you are running: i3

I also tried these dirs and there is no success:

  • ~/.i3/config
  • ~/.config/i3/config

I like the idea of i3 and regolith, I used it for 1.5 week and it was fun. Maybe it will be a great desktop solution for professionals too. So keep it up, guys! 👍
BUT sadly, it seems, it is unstable for serious work right now. For every special settings (like the VPN) I have to dig the OS files in terminal or the internet and I do not have time for it. 😞 Maybe I made a mistake with the ubuntu base system, I don't know but the Ubuntu GNOME session works like charm.

@kgilmer
Copy link
Member

kgilmer commented Mar 1, 2020

Thanks for the feedback @7system7 . I understand your perspective. If I or someone else is able to get setup w/ a VPN and do some testing and produce a better setup guide, I'll let you know! 😄 👍

@Minalan
Copy link

Minalan commented Mar 6, 2020

I don't know what is causing it, but I think there may be something wrong with the way NetworkManager is being run in Regolith vs. Ubuntu.
When tailing the /var/log/syslog I see a ton of messages like this:

Mar 5 21:00:56 **** NetworkManager[1280]: [1583463656.4464] error requesting auth for org.freedesktop.NetworkManager.settings.modify.hostname: Authorization check failed: Failed to open file “/proc/28073/status”: No such file or directory

Those errors do not occur in the standard Ubuntu session.

I tried following this:
https://bugs.launchpad.net/ubuntu/+source/policykit/+bug/1782263

Set auth-polkit=false and it got rid of the errors bug didn't fix the VPN problem.

@dennis-reiter
Copy link

I experienced the same problems with my vpn. Starting nm-applet did not solve the problem but when I started the nm-applet from my shell, I saw it complaining about a missing /usr/lib/NetworkManager/nm-openconnect-auth-dialog.
This dialog is provided by network-manager-openconnect-gnome. So

sudo apt install network-manager-openconnect-gnome

sudo systemctl restart NetworkManager.service

Now vpn is working!

@kgilmer
Copy link
Member

kgilmer commented Mar 17, 2020

That's great to hear @dennis-reiter ! @Minalan @7system7 @vanboom @maxx are you able to verify @dennis-reiter 's fix?

@JensPfeifle
Copy link

JensPfeifle commented Mar 17, 2020

I am getting a similar message when trying to toggle the VPN from the control panel:

Mar 17 11:40:42 t490jp NetworkManager[3842]: <info>  [1584441642.2018] audit: op="connection-activate" uuid="c004e577-8ab7-4761-8263-6659f703c27c" name="MyVPN" pid=16969 uid=1000 result="fail" reason="Not authorized to control networking."

Updates, restarts, and fixes mentioned in this thread have not helped so far. Oddly enough it was working yesterday...

Edit: Working now since this morning...

@newtorob
Copy link

@dennis-reiter's fix worked for me

@TSchattschneider
Copy link

Same problem when trying to use my university opneconnect-VPN, using exec --no-startup-id /usr/bin/nm-applet worked.

@imarchev
Copy link

imarchev commented Apr 2, 2020

My issue was caused by the previous installation of i3wm. I had a config for i3wm located in /.config/i3/config with the same row exec --no-startup-id /usr/bin/nm-applet
The fix that works for me was to remove np-applet row from i3wm config and add it to /.config/regolith/i3/config and after Logout-Login I was able to switch-on VPN

@jonathancasters
Copy link

jonathancasters commented Apr 3, 2020

When I do the nm-applet in my terminal I get these error's:
error_nm_applet
I added the nm-applet commando in the config files, but it didn't work, so I tried this in the terminal, and got those errors. I still couldn't activate my VPN connection. It popped back off when I pushed it.

So I went to the default ubuntu layout, logged in there and then I went back to regolith, and now I could connect.

@masdarzulfikar
Copy link

in my case, the config file is in the: /etc/regolith/i3/config
I add the line exec --no-startup-id /usr/bin/nm-applet and it worked.

@kgilmer
Copy link
Member

kgilmer commented Apr 15, 2020

Hello VPN team! 😄 , is anyone here able to test @dennis-reiter 's update to the VPN blocklet?

regolith-linux/regolith-i3xrocks-config#32

@gdeflaux
Copy link
Member

gdeflaux commented May 2, 2020

Confirming that installing the additional packages

sudo apt install network-manager-openconnect-gnome
sudo systemctl restart NetworkManager.service

and adding /usr/bin/nm-applet in my i3 config file worked. I can start my VPN from the gnome control center.

I can't get the openvpn block to show anything else than VPN: down. I tried the block from the master branch. Also, I am unable to locate de PID file of the VPN connection, which seems to be what the script is looking for. The folder /run/openvpn is empty although I can definitely confirm that I am connected to a VPN.

The nm-vpn block does work.

@kgilmer
Copy link
Member

kgilmer commented May 22, 2020

Based on recent feedback it appears that people are able to enable VPN. Closing the issue. For users still facing issues w VPN, kindly open a new ticket and fill out the required fields.

@kgilmer kgilmer closed this as completed May 22, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working question Further information is requested
Projects
None yet
Development

No branches or pull requests