Gentoo Forums
Gentoo Forums
Gentoo Forums
Quick Search: in
Tools for automatic connections on startup
View unanswered posts
View posts from last 24 hours

 
Reply to topic    Gentoo Forums Forum Index Networking & Security
View previous topic :: View next topic  
Author Message
drudox
l33t
l33t


Joined: 28 Jan 2016
Posts: 919

PostPosted: Fri Aug 17, 2018 9:49 am    Post subject: Tools for automatic connections on startup Reply with quote

Hi everybody !

I'm using gentoo with I3 wm in a relatively new laptop , I well remember that when I use my previous laptop I had insert a line for exec on startup a networking tool
that automatically connect the system to the ethernet dhcpcd or to a known wireless that I had already used remembering its password ..

Now I don't want know which was this tools .. but I would like to know how can I obtain this behavior ...
Thanks in advance
Back to top
View user's profile Send private message
xaviermiller
Bodhisattva
Bodhisattva


Joined: 23 Jul 2004
Posts: 8723
Location: ~Brussels - Belgique

PostPosted: Fri Aug 17, 2018 10:10 am    Post subject: Reply with quote

Hi,

Nowadays, dhcpcd + wpa_supplicant can do that trick. You just have to start both services and dhcpcd will manage your networks.
_________________
Kind regards,
Xavier Miller
Back to top
View user's profile Send private message
potuz
Guru
Guru


Joined: 30 Jan 2010
Posts: 378

PostPosted: Fri Aug 17, 2018 11:49 am    Post subject: Reply with quote

I've used wpa_supplicant+dhcpcd for years but lately I caved in and finally decided to install net-misc/networkmanager. Its fingerprint is nothing compared to the usual beasts that I need to recompile everyone and then and having a curses interface (nmtui) is useful when in places that I need to search for a network (instead of running wpa-cli look for search results and hope that the screen doesn't scroll fast, go and edit the .conf file and so forth)
Back to top
View user's profile Send private message
drudox
l33t
l33t


Joined: 28 Jan 2016
Posts: 919

PostPosted: Fri Aug 17, 2018 12:20 pm    Post subject: Reply with quote

so basically how I can automatically run networkmanager ?

Last edited by drudox on Fri Aug 17, 2018 12:24 pm; edited 1 time in total
Back to top
View user's profile Send private message
potuz
Guru
Guru


Joined: 30 Jan 2010
Posts: 378

PostPosted: Fri Aug 17, 2018 12:23 pm    Post subject: Reply with quote

drudox wrote:
so basically how I ca automatically run networkmanager ?

Code:
#systemctl  enable NetworkManager.service
Back to top
View user's profile Send private message
drudox
l33t
l33t


Joined: 28 Jan 2016
Posts: 919

PostPosted: Fri Aug 17, 2018 12:26 pm    Post subject: Reply with quote

no i'm using openrc .. not systemd
Back to top
View user's profile Send private message
potuz
Guru
Guru


Joined: 30 Jan 2010
Posts: 378

PostPosted: Fri Aug 17, 2018 12:31 pm    Post subject: Reply with quote

EDIT: It seems NM adds a service:
Code:
$ equery files networkmanager  | grep init
/etc/init.d
/etc/init.d/NetworkManager

the systemd service reads as follows:
Code:
 $ cat /lib/systemd/system/NetworkManager.service | grep Exec
ExecReload=/usr/bin/dbus-send --print-reply --system --type=method_call --dest=org.freedesktop.NetworkManager /org/freedesktop/NetworkManager org.freedesktop.NetworkManager.Reload uint32:0
#ExecReload=/bin/kill -HUP $MAINPID
ExecStart=/usr/sbin/NetworkManager --no-daemon


So I suppose adding a hook to those should work.
Back to top
View user's profile Send private message
Jaglover
Watchman
Watchman


Joined: 29 May 2005
Posts: 8291
Location: Saint Amant, Acadiana

PostPosted: Fri Aug 17, 2018 12:48 pm    Post subject: Reply with quote

I suppose reading the Gentoo Wiki would help. No?
_________________
My Gentoo installation notes.
Please learn how to denote units correctly!
Back to top
View user's profile Send private message
Fitzcarraldo
Advocate
Advocate


Joined: 30 Aug 2008
Posts: 2056
Location: United Kingdom

PostPosted: Fri Aug 17, 2018 3:40 pm    Post subject: Reply with quote

potuz wrote:
...having a curses interface (nmtui) is useful when in places that I need to search for a network

Agreed. I like nmcli and nmtui, particularly nmtui. The latter has made life easier when a DE won't start for whatever reason and I need to connect to a network in order to install/re-install some package or other to fix something. Had to use it again just last week.
_________________
Clevo W230SS: amd64, VIDEO_CARDS="intel modesetting nvidia".
Compal NBLB2: ~amd64, xf86-video-ati. Dual boot Win 7 Pro 64-bit.
OpenRC systemd-utils[udev] elogind KDE on both.

My blog
Back to top
View user's profile Send private message
Display posts from previous:   
Reply to topic    Gentoo Forums Forum Index Networking & Security All times are GMT
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum