Hey all,

I've installed Obarun on my laptop using the 'Obarun-JWM_x86_64-2018-09.iso'.

At first, connman-gtk was working just fine, both on the Live ISO, and on my current installation; I was able to easily set up my wifi using it.

Recently, though, I changed my hostname in '/etc/s6/s6.conf'. It appears that, after that (or else due to package updates?) connman-gtk displays blank output; no menu nor interfaces appear. In addition,
my wifi connection no longer works.

When I run 'connmanctl', I get the following output:

Error getting services: Rejected send message, 3 matched rules; type="method_call", sender=":1.49" (uid=1000 pid=3356 comm="connmanctl ") interface="net.connman.Manager" member="GetServices" error name="(unset)" requested_reply="0" destination="net.connman" (uid=0 pid=2966 comm="/usr/bin/connmand --config=/etc/connman/Error getting peers: Rejected send message, 3 matched rules; type="method_call", sender=":1.49" (uid=1000 pid=3356 comm="connmanctl ") interface="net.connman.Manager" member="GetPeers" error name="(unset)" requested_reply="0" destination="net.connman" (uid=0 pid=2966 comm="/usr/bin/connmand --config=/etc/connman/main.cError getting technologies: Rejected send message, 3 matched rules; type="method_call", sender=":1.49" (uid=1000 pid=3356 comm="connmanctl ") interface="net.connman.Manager" member="GetTechnologies" error name="(unset)" requested_reply="0" destination="net.connman" (uid=0 pid=2966 comm="/usr/bin/connmand --config=/etc/connman/main.conf ")
connmanctl>

In searching for a solution, I started playing around with 's6opts switch' - when I run 's6opts switch Default', I lose even my wired connection, and ifconfig outputs the following (which I suspect is wrong, since my wired interface, having been stopped, doesn't show up, but my wireless interface for some weird reason does, and says it's up, when that's not true):

lo: flags=73<UP,LOOPBACK,RUNNING> mtu 65536
inet 127.0.0.1 netmask 255.0.0.0
inet6 ::1 prefixlen 128 scopeid 0x10<host>
loop txqueuelen 1000 (Local Loopback)
RX packets 1464 bytes 116468 (113.7 KiB)
RX errors 0 dropped 0 overruns 0 frame 0
TX packets 1464 bytes 116468 (113.7 KiB)
TX errors 0 dropped 0 overruns 0 carrier 0 collisions 0

wlp3s0: flags=-28669<UP,BROADCAST,MULTICAST,DYNAMIC> mtu 1500
ether 8c:70:5a:21:3b:bc txqueuelen 1000 (Ethernet)
RX packets 815 bytes 551196 (538.2 KiB)
RX errors 0 dropped 0 overruns 0 frame 0
TX packets 984 bytes 194547 (189.9 KiB)
TX errors 0 dropped 0 overruns 0 carrier 0 collisions 0

Now, when I run 's6opts switch Live', I get my wired connection back, and ifconfig now outputs the following:

enp0s25: flags=-28605<UP,BROADCAST,RUNNING,MULTICAST,DYNAMIC> mtu 1500
inet 192.168.0.7 netmask 255.255.255.0 broadcast 192.168.0.255
inet6 2604:2000:f1cf:a00::e prefixlen 64 scopeid 0x0<global>
inet6 2604:2000:f1cf:a00:f2de:f1ff:feae:5658 prefixlen 64 scopeid 0x0<global>
inet6 fe80::f2de:f1ff:feae:5658 prefixlen 64 scopeid 0x20<link>
ether f0:de:f1:ae:56:58 txqueuelen 1000 (Ethernet)
RX packets 3417 bytes 2001631 (1.9 MiB)
RX errors 0 dropped 0 overruns 0 frame 0
TX packets 4546 bytes 611773 (597.4 KiB)
TX errors 0 dropped 0 overruns 0 carrier 0 collisions 0
device interrupt 20 memory 0xf2500000-f2520000

lo: flags=73<UP,LOOPBACK,RUNNING> mtu 65536
inet 127.0.0.1 netmask 255.0.0.0
inet6 ::1 prefixlen 128 scopeid 0x10<host>
loop txqueuelen 1000 (Local Loopback)
RX packets 1496 bytes 118788 (116.0 KiB)
RX errors 0 dropped 0 overruns 0 frame 0
TX packets 1496 bytes 118788 (116.0 KiB)
TX errors 0 dropped 0 overruns 0 carrier 0 collisions 0

wlp3s0: flags=-28669<UP,BROADCAST,MULTICAST,DYNAMIC> mtu 1500
ether 8c:70:5a:21:3b:bc txqueuelen 1000 (Ethernet)
RX packets 815 bytes 551196 (538.2 KiB)
RX errors 0 dropped 0 overruns 0 frame 0
TX packets 984 bytes 194547 (189.9 KiB)
TX errors 0 dropped 0 overruns 0 carrier 0 collisions 0

My wired interface is now back.

I'm not sure if wpa_supplicant has anything to do with this. Maybe there is something with the s6 tools that I need to do? Any thoughts/help is appreciated.

- Brandon
There is wpa-supplicant-s6serv and wpa-supplicant-s6rcserv
Do you have one of those installed
With wpa-supplicant-s6serv after installation do as root:
# s6opts enable wpa-supplicant
# s6opts status wpa-supplicant

This should get the service up and running till you use disable with s6opts

Also, if you don't have more than one network cards or wifi cards you may want to use the old scheme of interface names like eth0, wlan0
To do so add on your grub linux line net.ifnames=0 or go to the /etc/default/grub and edit the line as such: GRUB_CMDLINE_LINUX="net.ifnames=0"
Then rerun grub-mkconfig
fungalnet, thanks for your quick reply! BTW, nice to see you on this forum (I'm also on the AntiX forum - your tag-line was what actually got me to become involved with this rather well-done distro, so thanks for that!)

Your advice did help - I installed both of those packages, and did the enable steps; however, one
strange thing still remains:

I was, in fact, able to get connman back, but only if I run it as root/sudo.

Specifically, this is what happens: I boot into the desktop, and notice I don't have wifi. I run connman-gtk, and get a blank GUI. Then, I run connman-gtk either as root or under sudo, and get a fully functioning GUI, which reports that it failed to connect to my wifi. I simply hit the "Reconnect" button, and I'm connected to my wifi as I should be.

However, I'd like to be able to use connman/connman-gtk as an underprivileged user!

In the terminal, I notice the following:

s6opts enable wpa-supplicant => wpa-supplicant does not exist.
sudo s6opts enable wpa-supplicant => enables and bring up wpa-supplicant.

connman-gtk => blank GUI
sudo connman-gtk => functions as normal

It looks like I need to know what the correct s6opts command is? I have a feeling I'm close to an easy solution, but I need a little help!

Thanks in advance,

Brandon
if you installed wpa...s6rcserv it should start itself after next boot, if you run the s6serv (I think this is the difference in general with s6serv and s6rcserv) you have to enable it once for it to be added to your database.

edit: Just installed and checked
% sudo s6opts enable wpa-supplicant

:: Enable wpa-supplicant
:: Bringing up wpa-supplicant
About connman running as user, it should be done, unless there is a group setting specific to connman. Is your user on wheel and network groups (/etc/group) is there a connman group in there. As far as I know it is just an interface using network tools.
I only use dhcpcd for my networking.

I can't remember, if you run connman-gtk as root does it have an option to share the connection? If so for wifi connections to be used by users root has to make them available I think.
what i do to get connman-gtk to work for my user:
1. be in the network group
2. edit /etc/dbus-1/system.d/connman.conf to look like:
<!DOCTYPE busconfig PUBLIC "-//freedesktop//DTD D-BUS Bus Configuration 1.0//EN"
 "http://www.freedesktop.org/standards/dbus/1.0/busconfig.dtd">
<busconfig>
    <policy user="root">
        <allow own="net.connman"/>
        <allow send_interface="net.connman.Agent"/>
        <allow send_interface="net.connman.Counter"/>
        <allow send_interface="net.connman.Notification"/>
    </policy>
    <policy group="network">
       <allow send_interface="net.connman.Agent"/>
       <allow send_interface="net.connman.Manager"/>
    </policy>
    <policy context="default">
        <allow send_destination="net.connman"/>
    </policy>
</busconfig>
i think it's the line:
<allow send_interface="net.connman.Manager"/>
that does the trick(i haven't kept the old version)
i keep a version, connman.conf.mine for when updates (connman i think) overwrite it..
The file for me happens to be '/usr/share/dbus-1/system.d/connman.conf', but yes - that extra line does the trick! Thanks, ncmprhnsbl, for that very comprehensible knowledge! Indeed, I was in both the 'wheel' and 'network' groups, as a quick application of 'less /etc/group | grep brandon' tells me.

Also, connman-gtk as root doesn't offer to share the connection with users.

When I use the apt package manager in a Debian system (or, for that matter, even something like the Slackware package manager), package upgrades always give an option to keep your existing config files - should not there be a way in pacman to do this? Anyway, for now, I'm going to use that jedi ".mine" trick :)
ah, it seems /etc/dbus-1/system.d/connman.conf is no longer included in the connman package, so it probably won't be affected by updates any more( and it overrides the one in /usr/share)
When I use the apt package manager in a Debian system (or, for that matter, even something like the Slackware package manager), package upgrades always give an option to keep your existing config files
yeah, arch has that too: https://wiki.archlinux.org/index.php/Pacman/Pacnew_and_Pacsave
it's set in the PKGBUILD (which in the case of connman, it's not : https://framagit.org/obarun-pkgbuild/connman/blob/master/PKGBUILD )
(also, you can set it in /etc/pacman.conf : NoUpgrade=path/to/file (way smarter than what i was doing) )
although, in this case, we should probably request eric add the line : <allow send_interface="net.connman.Manager"/>
to this patch : https://framagit.org/obarun-pkgbuild/connman/blob/master/allow_group_network.diff
On most of my reboots, wifi connectivity is automatic. But on one reboot,
it failed to connect, and the GUI gave me this error in a dialog box:

GDBus.Error:org.freedesktop.DBus.Error.AccessDenied: Rejected
send message, 3 matched rules; type="method_call", sender=":1.575"
(uid=1000 pid=2555 comm="connman-gtk ") interface="net.connman.Technology"
member="Scan" error name="(unset)" requested_reply="0" destination=":1.6"
(uid=0 pid=887 comm="/usr/bin/connmand --config=/etc/connman/main.conf ")

Also, even when I'm wifi-connected and run connman-gtk from the console,
I get that same error outputted to the console.

So, unfortunately, the addition of that one line in 'connman.conf' doesn't
completely resolve the issue (though it does do a lot :) )

Another interesting thing is when I try to disconnect from my
current wifi connection from the GUI. I get a dialog box saying: "Failed
to toggle connection state", again with the same error message as above.

Since I still have my Obarun Live USB, I checked to see what was different
about that configuration (since connman-gtk works perfectly there),
but couldn't make much sense of it as of yet. All I know is that,
on my system, the directory system.d has more files in it than in the
live system.

I'm convinced that the problem was that certain packages/files were
upgraded, and it consequently did something weird to the configuration,
but I can't possibly tell where. For instance, in the live
USB, connman-gtk works perfectly fine without adding the line
' <allow send_interface="net.connman.Manager"/>', so the root of the problem may
well lie elsewhere.

If anybody has any further suggestions, I'd love to hear them! At any
rate, it's back to the drawing board for me!

- Brandon
7 days later
The following just gave me a huge idea:
ncmprhnsbl wroteah, it seems /etc/dbus-1/system.d/connman.conf is no longer included in the connman package, so it probably won't be affected by updates any more( and it overrides the one in /usr/share)
Who would've thought. I simply copied

/usr/share/dbus-1/system.d/connman.conf
(that is, the version without the "manager" line added)

to

/etc/dbus-1/system.d/connman.conf

and everything works fine now - both my user and sudo/root can now toggle wifi.

For reference, here is what my connman.conf currently looks like:
<!DOCTYPE busconfig PUBLIC "-//freedesktop//DTD D-BUS Bus Configuration 1.0//EN"
"http://www.freedesktop.org/standards/dbus/1.0/busconfig.dtd">
<busconfig>
<policy user="root">
<allow own="net.connman"/>
<allow send_interface="net.connman.Agent"/>
<allow send_interface="net.connman.Counter"/>
<allow send_interface="net.connman.Notification"/>
</policy>
<policy group="network">
<allow send_interface="net.connman.Agent"/>
</policy>
<policy context="default">
<allow send_destination="net.connman"/>
</policy>
</busconfig>
Notice that it's simply the default one.
you're right, the unmodified one works fine..
it would seem that dbus works better with configs in /etc/ ..
fyi, if you're not aware, connman-gtk is an AUR package, so pacman won't track it's updates..
not sure if the iso you installed from includes an AUR helper.. https://wiki.archlinux.org/index.php/AUR_helpers
I believe obarun/cower is on all isos. If not # pacman -S cower will get you AUR support.

Powered by Obarun