SlackwareThis Forum is for the discussion of Slackware Linux.
Notices
Welcome to LinuxQuestions.org, a friendly and active Linux Community.
You are currently viewing LQ as a guest. By joining our community you will have the ability to post topics, receive our newsletter, use the advanced search, subscribe to threads and access many other special features. Registration is quick, simple and absolutely free. Join our community today!
Note that registered members see fewer ads, and ContentLink is completely disabled once you log in.
If you have any problems with the registration process or your account login, please contact us. If you need to reset your password, click here.
Having a problem logging in? Please visit this page to clear all LQ-related cookies.
Get a virtual cloud desktop with the Linux distro that you want in less than five minutes with Shells! With over 10 pre-installed distros to choose from, the worry-free installation life is here! Whether you are a digital nomad or just looking for flexibility, Shells can put your Linux machine on the device that you want to use.
Exclusive for LQ members, get up to 45% off per month. Click here for more info.
View Poll Results: Which Do You Use, NetworkManager or Wicd?
I always seem to have a problem with network manager especially after switching users so my daughter can use the laptop, always seems to prompt for a WPA key. Anyway easiest thing for me to do was use rc.inet1, works perfect and all connected before she even types startx. It also means my daughter wont wake me at 7.00am asking for the WPA key.
I use 2 different users on one of my systems but haven't had any problems with it remembering WPA keys. I have noticed if I connect to an AP as UserA, then switch to UserB, I will still be connected to the AP but it won't let me disconnect because NetworkManager remembers the connection was created by a different user.
I have used both Network Manager and WICD on other Slack boxes where and/or when I'm forced to use WiFi but since you didn't specify what interface and I vastly prefer ethernet and only use that on my Main Desktop, I just use /etc/rc.d/rc.inet1.conf. I hope that doesn't muddy up your poll.
Well, seems like I am sticking with Network Manager for now. It's been great to me so far. The only problem I've had has been in Istanbul Ataturk airport and that's only because Starbucks had a monopoly on the wifi, quite literally. Screw them.
with wicd it will run a script either before it connects or disconnects or after it connects or disconnects, look in /etc/wicd there are subfolders to put executable scripts
In case you're not aware, you can do this with NM as well. They're called dispatcher scripts. They are stored in /etc/NetworkManager/dispatcher.d/ and you can have multiple scripts and can have it tied to a specific interface. An example of a single script accomplishing multiple tasks and tied to wlan0 can be seen below:
Code:
#!/bin/bash
INTRFC=$1
STATUS=$2
if [ "$INTRFC" == "wlan0" ]
then
case "$2" in
up)
logger -s "Running something since network is up"
random
commands
here
;;
down)
logger -s "Running something since network is down"
random
commands
here
*)
;;
esac
fi
If you want to simplify it greatly, you can simply check $2 for whatever status you want and then list the commands you want it to run, ignoring what interface had that change.
Code:
if [ "$2" = "up" ]; then
command_to_run_when_connected
fi
exit $?
If you want to write your own script, Network Manager will basically run any scripts in /etc/NetworkManager/dispatcher.d/ as follows:
Code:
/etc/NetworkManager/dispatcher.d/random_script.sh wlan0 up
The full list of statuses that are recognized are as follows, and the details on what each means can be read at the link above:
Code:
pre-up
up
pre-down
down
vpn-pre-up
vpn-up
vpn-pre-down
vpn-down
hostname
dhcp4-change
dhcp6-change
connectivity-change
NOTE: I don't use Network Manager, but I am familiar with its capabilities. If I'm using wireless, 99% of the time, it is using rc.inet1 along with wpa_supplicant.conf.
I love NetworkManager. It can manage WiFi connections, ethernet, and VPNs. TBH, I don't know of any program that can manage multiple VPN connections from multiple providers, except good ol' NetworkManager.
Ironically, NM is maintained by the Gnome people, and I tend to dislike everything I read about Gnome. (I don't mean to offend any Gnome users. Gnome is just plain not for me.)
I use an rc.inet1 replacement on all my laptops. But my network requirements are simple. I need to switch from wireless to wired when wired is plugged in and visa versa. And the wireless is always my home connection except for the rare occasion that I am at a hotel. So a trivial wpa-supplicant setup.
FWIW I disable NetworkManager on my work laptop running Ubuntu. Just gets in the way since the work laptop is always connected via wire.
Desktop wired with netconfig and fixed ip. I have several wireless SBC's around the place and use wicd-curses for access/configs via ssh. I have tried Network manager in the past but am more comfortable with wicd-curses. It might be familiarity but I found it simpler to run ntpdate and logging scripts which need to run after making a wireless connection using a wicd postconnect script. Never tried NM on netbook. When traveling GUI wicd on netbook is simple enough for finding and logging into available wireless networks. Maybe I'm just rusted on .... BTW did Pottering have anything to do with NM? ;-)
Last edited by justwantin; 08-12-2018 at 07:09 PM.
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.