View previous topic :: View next topic |
Author |
Message |
drudox l33t
Joined: 28 Jan 2016 Posts: 919
|
Posted: Fri Aug 17, 2018 9:49 am Post subject: Tools for automatic connections on startup |
|
|
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 |
|
|
xaviermiller Bodhisattva
Joined: 23 Jul 2004 Posts: 8723 Location: ~Brussels - Belgique
|
Posted: Fri Aug 17, 2018 10:10 am Post subject: |
|
|
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 |
|
|
potuz Guru
Joined: 30 Jan 2010 Posts: 378
|
Posted: Fri Aug 17, 2018 11:49 am Post subject: |
|
|
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 |
|
|
drudox l33t
Joined: 28 Jan 2016 Posts: 919
|
Posted: Fri Aug 17, 2018 12:20 pm Post subject: |
|
|
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 |
|
|
potuz Guru
Joined: 30 Jan 2010 Posts: 378
|
Posted: Fri Aug 17, 2018 12:23 pm Post subject: |
|
|
drudox wrote: | so basically how I ca automatically run networkmanager ? |
Code: | #systemctl enable NetworkManager.service |
|
|
Back to top |
|
|
drudox l33t
Joined: 28 Jan 2016 Posts: 919
|
Posted: Fri Aug 17, 2018 12:26 pm Post subject: |
|
|
no i'm using openrc .. not systemd |
|
Back to top |
|
|
potuz Guru
Joined: 30 Jan 2010 Posts: 378
|
Posted: Fri Aug 17, 2018 12:31 pm Post subject: |
|
|
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 |
|
|
Jaglover Watchman
Joined: 29 May 2005 Posts: 8291 Location: Saint Amant, Acadiana
|
|
Back to top |
|
|
Fitzcarraldo Advocate
Joined: 30 Aug 2008 Posts: 2056 Location: United Kingdom
|
Posted: Fri Aug 17, 2018 3:40 pm Post subject: |
|
|
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 |
|
|
|