Solved Easy way to connect to wifi router

maxmoon

Member

Reaction score: 4
Messages: 32

Hi

Is there an easier way to connect to a wifi router?

My current way looks like the following and I even don't know if it might to be like that, because it looks 'broken':
  1. Look for the SSID with: sudo ifconfig wlan0 scan
  2. Put the ssid and password in /etc/wpa_supplicant.conf
  3. Connect with the given SSID with: sudo ifconfig wlan0 ssid "the searched ssid name"
  4. Restart netif service otherwise internet will not work: sudo service netif restart
It would be very nice if there is a 'better' way, because I am travelling a lot and it just gets complicated.
 
OP
OP
M

maxmoon

Member

Reaction score: 4
Messages: 32

Vermadens script might be very nice, but you still have to edit wpa_supplicant.conf by hand.

And because I really need something simple, which is in the taskbar, net-mgmt/networkmgr might be the better solution instead of net-mgmt/wifimgr

Marking this issue as solved.
 
OP
OP
M

maxmoon

Member

Reaction score: 4
Messages: 32

Ok, networkmgr doesn't work well if it's about adding new ssids. There are several problems with doas, even if I used a doas.conf, which should fit with it. I tried vermadens script then and it has issues with doas too, even if he is providing a doas.conf. So I think I stick with wifimgr, even if the software doesn't show with which router I am connected :/
 

Phishfry

Son of Beastie

Reaction score: 1,524
Messages: 4,429

I use net-mgmt/networkmgr and it is good stuff.
Perhaps you have a typo or spacing error? The package message shows only this is needed:
/usr/local/etc/doas.conf
Code:
permit nopass keepenv root
permit :wheel
permit nopass keepenv :wheel cmd netcardmgr
permit nopass keepenv :wheel cmd ifconfig
permit nopass keepenv :wheel cmd service
but you still have to edit wpa_supplicant.conf by hand.
I think it is a good idea to clear out wpa_supplicant.conf and let networkmgr handle the entries.
 
OP
OP
M

maxmoon

Member

Reaction score: 4
Messages: 32

I've changed the doas.conf and cleared the context of wpa_supplicant.conf. But it still don't work. Here is the output of networkmgr:

Code:
doas: Operation not permitted
/bin/sh: Syntax error: Unterminated quoted string
doas: Operation not permitted
Traceback (most recent call last):
  File "/usr/local/share/networkmgr/authentication.py", line 28, in add_to_wpa_supplicant
    Lock_Wpa_Supplicant(self.ssid, self.bssid, pwd, self.wificard)
  File "/usr/local/share/networkmgr/authentication.py", line 114, in __init__
    wsf = open(wpa_supplican, 'a')
PermissionError: [Errno 13] Permission denied: '/etc/wpa_supplicant.conf'
I did chmod 644 /etc/wpa_supplicant.conf. Does it need more rights?
 

Elazar

Member

Reaction score: 28
Messages: 55

Code:
wsf = open(wpa_supplican, 'a')
This calls open() with the "a" option (append text to file).
I guess it throws an exception if you make the file read-only.
 

mariolasagna

New Member

Reaction score: 2
Messages: 3

I installed networkmgr, tried both ways via git and pkg install but it's not showing up on the menu bar. Any ideas?

Using FreeBSD 12.0-RELEASE-p10.

Cheers.
 

Elazar

Member

Reaction score: 28
Messages: 55

Which Desktop environment?

You can start it in a terminal, or via rofi.
 

SKull

Member

Reaction score: 17
Messages: 34

I've changed the doas.conf and cleared the context of wpa_supplicant.conf. But it still don't work. Here is the output of networkmgr:

Code:
doas: Operation not permitted
/bin/sh: Syntax error: Unterminated quoted string
doas: Operation not permitted
Traceback (most recent call last):
  File "/usr/local/share/networkmgr/authentication.py", line 28, in add_to_wpa_supplicant
    Lock_Wpa_Supplicant(self.ssid, self.bssid, pwd, self.wificard)
  File "/usr/local/share/networkmgr/authentication.py", line 114, in __init__
    wsf = open(wpa_supplican, 'a')
PermissionError: [Errno 13] Permission denied: '/etc/wpa_supplicant.conf'
I did chmod 644 /etc/wpa_supplicant.conf. Does it need more rights?
Is your user a member of wheel?
 

mariolasagna

New Member

Reaction score: 2
Messages: 3

Which Desktop environment?

You can start it in a terminal, or via rofi.
I have Gnome Desktop. I believe when you install it via pkg Gnome 3 comes by default. I noticed that GhostBSD is shipped with Mate which is Gnome 2.
 

mariolasagna

New Member

Reaction score: 2
Messages: 3

Is your user a member of wheel?
Correct I'm member of wheel on /etc/group and also I implemented all configs on doas. I followed the github instructions. In addition I installed GhostBSD and copied the configuration that was not on github. The basic difference now is that GhostBSD runs Mate (Gnome2) and FreeBSD Gnome is v3. I checked in my extensions but this top menu is not an extension.
 
Top