Page 1 of 2

Automatic connection to the wireless network

Posted: 11 Nov 2019, 14:30
by Kulle
After the startup I have to connect to the wireless network, because almost always I want to go online.
How can I automate this process at startup?
Thanks.

Automatic connection to the wireless network

Posted: 11 Nov 2019, 18:23
by Ed_P
I connect automatically when I startup. To connect to the network do you have to sign on to it? And are you saving changes?

Automatic connection to the wireless network

Posted: 12 Nov 2019, 08:47
by Kulle
Hi ED_P
I start from the usb device.
I always use copy2ram. I can try a lot. The next time I start the system is clean again.
This principle is optimal for me.
I saved some basic changes in the folder porteus/modules (changes***.xzm)
I've saved configurations (google-chrome, xfce4, etc.) in porteus/rootcopy/home/guest/.config/
I can update/replace these configurations if necessary.

At startup I will be shown all available wireless networks, and I have to connect to my WIFI
How can I automate this process at startup?

Automatic connection to the wireless network

Posted: 12 Nov 2019, 11:05
by Kulle
Postscript
My idea:
At startup, nm-connection-editor (in /usr/bin/) would have to start automatically (with the required parameters).
How is this to be realized?
Thanks

Automatic connection to the wireless network

Posted: 12 Nov 2019, 12:23
by ncmprhnsbl
procedure:
make the connection as you would normally do (and is there a setting somewhere in the connection editor to "always connect automatically" ? )
then run as root: changes-time eg.

Code: Select all

# changes-time
Use this script save Porteus changes made in definied time period.
Enter time interval or press enter for keeping default value (3 minutes):

Following folders will be excluded by default: /dev, /home, /mnt, /root, /tmp
all files created/modified in last 3 minutes were copied to /root/changes2012 folder
this should show you the necessary files to save to a module for your connection (and depending on what else is going on some other stuff you probably don't need)

Automatic connection to the wireless network

Posted: 12 Nov 2019, 16:22
by Ed_P
ncmprhnsbl wrote:
12 Nov 2019, 12:23
there a setting somewhere in the connection editor to "always connect automatically"
This is the key thing to do Kulle. Then save:

Code: Select all

cp -a --parents    /etc/NetworkManager/system-connections/*       /tmp/mod/
cp -a --parents    /var/run/NetworkManager/*                      /tmp/mod/
cp -a --parents    /var/lib/dhcpcd/*                              /tmp/mod/
cp -a --parents    /etc/hosts                                     /tmp/mod/
as a module or to your
Kulle wrote:
12 Nov 2019, 08:47
I saved some basic changes in the folder porteus/modules (changes***.xzm)
:)

Automatic connection to the wireless network

Posted: 13 Nov 2019, 09:01
by Kulle
Thanks ncmprhnsbl
I created a module in this way. But at the next startup: nothing!
I had to manually connect to my WIFI again via Network Manager applet

Automatic connection to the wireless network

Posted: 13 Nov 2019, 10:07
by Kulle
Hi ED_P
I have created a module according to your suggestion.
It did not work. Something is missing?
Note: the folder dhcpcd is empty.
What is dhcpcd?

Automatic connection to the wireless network

Posted: 13 Nov 2019, 16:40
by Ed_P
Did you connect to your network and then set your network connection to "always connect automatically" Kulle?

Did you create your module after you connected to your network?

In my dhcpcd folder I have 3 .leases files for my automatic connection. If your's is empty I think it means you weren't connected to the network.

Automatic connection to the wireless network

Posted: 15 Nov 2019, 09:28
by Kulle
Hi ED_P
after the statup, the NetworkManager applet shows me all available wireless networks.
I connect with my WIFI.
I look now dhcpcd

Code: Select all

guest@porteus:/$ ls /var/lib/dhcpcd/
guest@porteus:/$

The folder dhcpcd is empty!!
I look now /etc/resolf.conf

Code: Select all

guest@porteus:/$ cat /etc/resolv.conf
# Generated by NetworkManager
search local
nameserver fd91:dab6:a2b2:1:e260:66ff:fec2:7214
nameserver 192.168.2.1
guest@porteus:/$ 
Now I disconnect.
I look now again /etc/resolf.conf

Code: Select all

guest@porteus:/$ cat /etc/resolv.conf
# Generated by NetworkManager
guest@porteus:/$ 
The file resolv.conf is now empty
Everything very strange!
There is something wrong with the network configuration?

Automatic connection to the wireless network

Posted: 15 Nov 2019, 12:59
by Ed_P
Kulle wrote:
15 Nov 2019, 09:28
after the statup, the NetworkManager applet shows me all available wireless networks.
I connect with my WIFI.
And do you then set the WIFI connection to Automatically connect to the network?

Automatic connection to the wireless network

Posted: 17 Nov 2019, 09:28
by Kulle
Hi ED_P
yes, I set the WIFI connection to Automatically connect to the network.
But there is an additional option:
Connection priority for automatic activation
You can enter a value (maximum 999)
What value should I enter?
128 or 256 or 999?
The exact meaning of this option is not clear to me.

Automatic connection to the wireless network

Posted: 17 Nov 2019, 14:37
by Ed_P
I always leave it at the default value, which is 1.

Automatic connection to the wireless network

Posted: 18 Nov 2019, 11:13
by Kulle
Hi,
See #10 above
The NetworkManager generates this ipv6 address
But:

http://whois.domaintools.com/fd91:dab6: ... :fec2:7214

IP Information for fd91:dab6:a2b2:1:e260:66ff:fec2:7214
Warning—Incomplete Record
We believe this domain exists, but we are getting incomplete data from the Whois server.

What is this address?

Automatic connection to the wireless network

Posted: 18 Nov 2019, 16:43
by Ed_P
The address of your pc. If you're connected to your WiFi does it matter? Are you connecting automatically now?