# Networkmgr-3.6 is not starting when my desktop starts



## BB_ (Jul 3, 2020)

Hi,

I installed and tried to step up  networkmgr on my laptop.  NetworkMgr is  not starting when my desktop starts.
Current setup:  Gnome Version 3.28.2 on FreeBSD 12.1-RELEASE amd64
Thanks for your advice.

Steps done:
1- pkg install networkmgr
2- creation of doas.conf  as requested on the log file after the  pkg installation.   My doas.conf is exactly the same as the one in the log dow below
3 - my user is wheel group
4 - reboot

Extract from my rc.conf:
wlans_iwm0="wlan0"
ifconfig_wlan0="WPA DHCP"
dbus_enable="YES"
gdm_enable="YES"
gnome_enable="YES"

*Log: after PKG install:*
number of packages to be installed: 2


The process will require 2 MiB more space.
1 MiB to be downloaded.

Proceed with this action? [y/N]: y
[1/2] Fetching networkmgr-3.6.txz: 100%    1 MiB   1.2MB/s    00:01    
[2/2] Fetching doas-6.2p4_1.txz: 100%   17 KiB  17.0kB/s    00:01    
Checking integrity... done (0 conflicting)
[1/2] Installing doas-6.2p4_1...
[1/2] Extracting doas-6.2p4_1: 100%
[2/2] Installing networkmgr-3.6...
[2/2] Extracting networkmgr-3.6: 100%
=====
Message from doas-6.2p4_1:

--
To use doas,

/usr/local/etc/doas.conf

must be created. Refer to doas.conf(5) for further details.

Note: In order to be able to run most desktop (GUI) applications, the user
needs to have the keepenv keyword specified. If keepenv is not specified then
key elements, like the user's $HOME variable, will be reset and cause the GUI
application to crash.

Users who only need to run command line applications can usually get away
without keepenv.

When in doubt, try to avoid using keepenv as it is less secure to have
environment variables passed to privileged users.
=====
Message from networkmgr-3.6:

--
Any bug reports or request of new feature should be addressed at:
https://github.com/GhostBSD/networkmgr/issues

Make sure that the /usr/local/etc/doas.conf have someting simular like this:

    permit nopass keepenv root
    permit :wheel
    permit nopass keepenv :wheel cmd netcardmgr
    permit nopass keepenv :wheel cmd ifconfig
    permit nopass keepenv :wheel cmd service
    permit nopass keepenv :wheel cmd wpa_supplicant
    permit nopass keepenv :wheel cmd killall args wpa_supplicant

When rebooting it should automaticaly start is the desktop support xdg and make
sure that the user using NetworkMgr is in the wheel group.

I searched on the forum and I found this thread,  but  Ididn't find a solution to my issue.









						Finally a Network Manager for FreeBSD!
					

It's DONE! Chris_H!, Thanks a lot for very useful port for DE users. Free gift for all. ericturgeon, Very good GUI program for multiple AP's. Just installed in my openbox. I had to run it in backgroud. Both wired & wireless interfaces were up. Put down wired one first & found that there is no...




					forums.freebsd.org
				




thanks for your support


----------



## Zhsk (Jul 4, 2020)

This is for Linux, but is the same problem https://askubuntu.com/questions/625936/networkmanager-does-not-start-automatically


----------



## twllnbrck (Jul 4, 2020)

security/doas is only required for priviledges to manage network services. Add

```
networkmgr &
```
to your .xinitrc to autostart net-mgmt/networkmgr.
 Or you can autostart it via GNOME by adding a networkmgr.desktop file in your ~/.config/autostart folder.


----------



## BB_ (Jul 4, 2020)

Hi,
I just added networkmgr &, restarted and nothing happened.
Extract of my .xinitrc
exec /usr/local/bin/gnome-session
exec networkmgr &

I also tried to start networkmgr & in a console  and nothing is happening.,  with the PID  I have checked that the process is running..
See below:
<user>@bb:~ % networkmgr &
[1] 1723
<User>@bb:~ % ps -p 1723
PID TT  STAT    TIME COMMAND
1723  0  S    0:01.57 /usr/local/bin/python3.7 /usr/local/bin/networkmgr
<User>@bb:~ %

Beside this nothing is happening in my desktop.
I am a rookie., so thanks for your patience.
Thanks


----------



## twllnbrck (Jul 5, 2020)

BB_ said:


> I also tried to start networkmgr & in a console and nothing is happening., with the PID I have checked that the process is running..


I don't use GNOME but I think you need a bar with system tray to use networkmgr UI. 


BB_ said:


> Extract of my .xinitrc
> exec /usr/local/bin/gnome-session
> exec networkmgr &


Try to start networkmgr before your gnome-session.
If that doesnt work create a ~/.config/autostart/networkmgr.desktop file like this

```
[Desktop Entry]
Type=Application
Name=Network Manager
Exec=/usr/local/bin/networkmgr
Terminal=false
Comment=Network Manager for BSD
X-GNOME-Autostart-enabled=true
```
As I said I dont use GNOME (especially not on BSD). I use x11-wm/openbox with x11/polybar and start networkmgr over .xinitrc ..


----------



## T-Daemon (Jul 5, 2020)

Is/are the user(s) in the _wheel_ group? Check with `id -p`.

"_Make sure that the user using NetworkMgr is in the wheel group." _

From
_








						GitHub - ghostbsd/networkmgr: NetworkMgr is a Python GTK3 network manager for FreeBSD, GhostBSD, TrueOS and DragonFlyBSD
					

NetworkMgr is a Python GTK3 network manager for FreeBSD, GhostBSD, TrueOS and DragonFlyBSD - GitHub - ghostbsd/networkmgr: NetworkMgr is a Python GTK3 network manager for FreeBSD, GhostBSD, TrueOS ...




					github.com
				



_


----------



## T-Daemon (Jul 5, 2020)

Just saw it, you are. Sorry.


----------

