Skip to main content
Topic: I hate connman and I wish everyone would stop using it (Read 1412 times) previous topic - next topic
0 Members and 3 Guests are viewing this topic.

I hate connman and I wish everyone would stop using it

This is that program which prevents any programs from launching.  I can't remember how or why but I remember that it does.  I uninstalled it out of frustration because I'm so annoyed.  Now I have no working eth0.  But her all my programs launch!

ip a show eth0 - reports it is up but I can't ping anything. 

Short of chroot, what can I do to get a functional eth0 without installing anything???

I can dinitctl start and stop network until my fngers bleed and it makes no difference.
Cat Herders of Linux

Re: I hate connman and I wish everyone would stop using it

Reply #1
why not use  "networkmanager"

Re: I hate connman and I wish everyone would stop using it

Reply #2
Short of chroot, what can I do to get a functional eth0 without installing anything???

Changing the ip addresses to suit whatever your router hands out (and is on itself for the route part)
Code: [Select]
ip link set eth0 up
ip addr add 192.168.1.100/24 broadcast 192.168.1.255 dev eth0
ip route add default via 192.168.1.1
echo "nameserver 1.1.1.1" > /etc/resolv.conf


Re: I hate connman and I wish everyone would stop using it

Reply #3
 
 Just do # dhclient eth0 and boom you have internet


Re: I hate connman and I wish everyone would stop using it

Reply #4
This is that program which prevents any programs from launching.  I can't remember how or why but I remember that it does.  I uninstalled it out of frustration because I'm so annoyed.  Now I have no working eth0.  But her all my programs launch!

ip a show eth0 - reports it is up but I can't ping anything. 

Short of chroot, what can I do to get a functional eth0 without installing anything???

I can dinitctl start and stop network until my fngers bleed and it makes no difference.
If you're only using ethernet, all you need is a dhcp daemon to listen on eth0 and done. Personally I use dhcpcd.

If you're using it to connect to wireless access points, you're one shell script away from replacing connmand:
https://github.com/Lancia-Greggori/lanciautils/blob/main/sh/mbin/umbin/wpad
This is my replacement, very simple, but gets my job done instead of the overcomplicated, constantly sh*t over /etc/resolv.conf connmand. Modify it if you like. The other programs it depends on are in the same directory.

Re: I hate connman and I wish everyone would stop using it

Reply #5
Short of chroot, what can I do to get a functional eth0 without installing anything???

Changing the ip addresses to suit whatever your router hands out (and is on itself for the route part)
Code: [Select]
ip link set eth0 up
ip addr add 192.168.1.100/24 broadcast 192.168.1.255 dev eth0
ip route add default via 192.168.1.1
echo "nameserver 1.1.1.1" > /etc/resolv.conf


I tried this first without reading the whole thread and 
Bash: /etc/resolv.conf:  permission denied.

Rebooted and now eth0 is gone and so is wlan0. Only lo remains
Cat Herders of Linux

Re: I hate connman and I wish everyone would stop using it

Reply #6
This is that program which prevents any programs from launching.  I can't remember how or why but I remember that it does.  I uninstalled it out of frustration because I'm so annoyed.  Now I have no working eth0.  But her all my programs launch!

ip a show eth0 - reports it is up but I can't ping anything. 

Short of chroot, what can I do to get a functional eth0 without installing anything???

I can dinitctl start and stop network until my fngers bleed and it makes no difference.
If you're only using ethernet, all you need is a dhcp daemon to listen on eth0 and done. Personally I use dhcpcd.

If you're using it to connect to wireless access points, you're one shell script away from replacing connmand:
https://github.com/Lancia-Greggori/lanciautils/blob/main/sh/mbin/umbin/wpad
This is my replacement, very simple, but gets my job done instead of the overcomplicated, constantly sh*t over /etc/resolv.conf connmand. Modify it if you like. The other programs it depends on are in the same directory.
winner, winner, chicken dinner
Code: [Select]


sudo dhcpcd eth0
[sudo] password for alltll:
dhcpcd-10.0.2 starting
eth0: waiting for carrier
eth0: carrier acquired
DUID all those numbers
eth0: Iall that number
eth0: adding address some more numbers
eth0: soliciting an IPv6 router
eth0: soliciting a DHCP lease
eth0: offered two more sets of numbers
eth0: probing address another number
eth0: leased that same number for 604800 seconds
eth0: adding route to that same number again
eth0: adding default route via and the final number
forked to background, child pid 5336


editd to remove numbers that shouldnt be posted on the internet
Cat Herders of Linux

Re: I hate connman and I wish everyone would stop using it

Reply #7
the short answer is i'm a duuuuuuuuuuuuunmmmmmmmmmmmmmmmmmmmmy and disabled connman and rebooted without installing network manager in frustration.  see op

the shorter answer is that  - dhcpcd eth0 - brings it up in a moment and neither connman nor network manager are strictly necessary

also my linux retention isnt so good so i need to ask people because reinventing the wheel every time is stictly not necessary with so many kind and knowledgeable people about
Cat Herders of Linux

Re: I hate connman and I wish everyone would stop using it

Reply #8
the shorter answer is that  - dhcpcd eth0 - brings it up in a moment and neither connman nor network manager are strictly necessary
Further than that on a computer which only ever connects via a wired connection they are both unnecessary and add extra layers of potential failure and complication.
Your original problem was most likely caused by connman changing the hostname of the machine after the desktop has started. Which prevents GUI programs starting.
There's lots of threads on here abut it and both  connman and network manager are guilty of doing it under certain circumstances. What circumstances I'm not sure.

Re: I hate connman and I wish everyone would stop using it

Reply #9
TY!  Yah that sounds like it.  I cant remember everything and lets face it my cats demand a lot of attention and the older i get the smaller that pie gets.

Well i'm all for manually starting my eth0 at his point. A lot less frustration!
Cat Herders of Linux

Re: I hate connman and I wish everyone would stop using it

Reply #10
I may add dhclient is for a more static connection, if it changes in any way use dhcpcd instead, even though it was apparently deprecated it's still good for a while

Of course not using any tool is the nicest way to go, hehe. Was among the first answers and the best one. :-)

Changing the ip addresses to suit whatever your router hands out (and is on itself for the route part)
Code: [Select]
ip link set eth0 up
ip addr add 192.168.1.100/24 broadcast 192.168.1.255 dev eth0
ip route add default via 192.168.1.1
echo "nameserver 1.1.1.1" > /etc/resolv.conf

Re: I hate connman and I wish everyone would stop using it

Reply #11
it gave me an error on the last line that i couldn't write to resolv.conf



do i just copy and paste the lines one by one with sudo command at the head?  or am i supposed to supply an actual name server.
Cat Herders of Linux

Re: I hate connman and I wish everyone would stop using it

Reply #12

 Just do # dhclient eth0 and boom you have internet


this does work!  woo!  so dhcpcd is deprecated they said.  i think i missed the sudo command on it last time i tried it.  TY for this answer.    it didnt give me any output like dhcpcd did but it works for sure.
Cat Herders of Linux

Re: I hate connman and I wish everyone would stop using it

Reply #13
it gave me an error on the last line that i couldn't write to resolv.conf



do i just copy and paste the lines one by one with sudo command at the head?  or am i supposed to supply an actual name server.

All those commands need root so either prefix each line with sudo or use su once to get a root shell.
The last line may not be needed if there is already a valid entry in /etc/resolv.conf. That's not always a given.

dhcp is for sure easier but knowing how to make a connection with no 'helpers' is not a bad thing.

Re: I hate connman and I wish everyone would stop using it

Reply #14
Quote
it didnt give me any output

 You can run it with the -v from verbose flag.

 # dhclient -v eth0