You are not logged in.
Hi guys,
My first question is : I regularly connect to two different wifi networks, one at home and one at work. Is there a way to say to netctl to connect automatically on startup to the one that is available?
I read the man, but I think I am a little confused about how I can achieve it. For example I have some error when I try to launch netctl-auto :
~ » systemctl status netctl-auto@wlan0.service nico@cotier
netctl-auto@wlan0.service - Automatic wireless network connection using netctl profiles
Loaded: loaded (/usr/lib/systemd/system/netctl-auto@.service; disabled)
Active: failed (Result: exit-code) since sam. 2014-03-22 19:53:53 GMT; 2min 26s ago
Docs: man:netctl.special(7)
Process: 13880 ExecStart=/usr/bin/netctl-auto start %I (code=exited, status=1/FAILURE)
~ » sudo journalctl -xn nico@cotier
-- Logs begin at sam. 2013-06-01 01:02:53 BST, end at sam. 2014-03-22 19:57:23 GMT. --
mars 22 19:54:56 cotier dhcpcd[1210]: wlan0: adding route to 192.168.0.0/24
mars 22 19:54:56 cotier dhcpcd[1210]: wlan0: adding default route via 192.168.0.1
mars 22 19:56:49 cotier sudo[14132]: nico : TTY=pts/1 ; PWD=/home/nico ; USER=root ; COMMAND=/usr/bin/journalctl -xn
mars 22 19:56:49 cotier sudo[14132]: pam_unix(sudo:session): session opened for user root by nico(uid=0)
mars 22 19:56:57 cotier sudo[14132]: pam_unix(sudo:session): session closed for user root
mars 22 19:56:59 cotier sudo[14139]: nico : TTY=pts/1 ; PWD=/home/nico ; USER=root ; COMMAND=/usr/bin/journalctl -xn
mars 22 19:56:59 cotier sudo[14139]: pam_unix(sudo:session): session opened for user root by nico(uid=0)
mars 22 19:57:00 cotier sudo[14139]: pam_unix(sudo:session): session closed for user root
mars 22 19:57:23 cotier sudo[14153]: nico : TTY=pts/1 ; PWD=/home/nico ; USER=root ; COMMAND=/usr/bin/journalctl -xn
mars 22 19:57:23 cotier sudo[14153]: pam_unix(sudo:session): session opened for user root by nico(uid=0)
~ » sudo systemctl start netctl-auto@wlan0.service nico@cotier
[sudo] password for nico:
Job for netctl-auto@wlan0.service failed. See 'systemctl status netctl-auto@wlan0.service' and 'journalctl -xn' for details.
Thanks!
Last edited by Niourf (2014-03-22 23:58:15)
Offline
First, please verify the name of your wireless network interface. Are you certain it is wlan0? Check with ip link
Second, ensure that all other netctl services are not enabled or running. In other words, make certain the individual services for the access points are not running if you are trying to use netctl-auto.
Third, make sure the dhcpcd service is not running.
Also, I assume you don't have wicd or NetworkManger, but make sure they are disabled if you have them installed.
Nothing is too wonderful to be true, if it be consistent with the laws of nature -- Michael Faraday
Sometimes it is the people no one can imagine anything of who do the things no one can imagine. -- Alan Turing
---
How to Ask Questions the Smart Way
Offline
Hi,
You mean if I try to run sudo systemctl start netctl-auto@wlan0.service when connected to the wifi network (with netctl) it cannot work in any case ?
I tried rebooting to be sure none of the services where running, I have the same error. Sorry I did not mentioned, wlan0 is indeed the name of my interface.
Thanks
Offline
Did you install wpa_actiond?
Offline
I did not, do I need to ?
Offline
According to netctl wiki page you do...
Mr Green I like Landuke!
Offline
Without even looking at the wiki page, the output of pacman told you this on install (though it is understandable that this may have been missed since it is part of the 'base' group). But you can also see in the output of pacman -Qi netctl that it is an option dependency for the use of netctl-auto's wireless functionality.
Offline
thanks guys I got it working. Just needed to install wpa_actiond.
I should have took a better look at the wiki page, I thought I would do just fine only with the man.
Thanks a lot
Offline
https://wiki.archlinux.org/index.php/netctl
Give it a good read. It isn't too long to read. Also, learn netctl-auto commands by
man netctl-auto
When I use netctl-auto, I have aliases/scripts that help me switch router connections. I live right next to work so both routers are picked up. Sometimes when I'm at home I get automatically connected on the work wifi and vice versa so I do somethng like
netctl-auto switch-to workwifiprofilename
Also, profiles are stored in /etc/netctl
Offline