Automatic connection to the wireless network

Non release banter
Kulle
Warlord
Warlord
Posts: 598
Joined: 28 Jan 2017, 10:39
Distribution: v4.0 64bit Xfce
Location: Berlin

Automatic connection to the wireless network

Post#1 by Kulle » 11 Nov 2019, 14:30

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.

User avatar
Ed_P
Contributor
Contributor
Posts: 8360
Joined: 06 Feb 2013, 22:12
Distribution: Cinnamon 5.01 ISO
Location: Western NY, USA

Automatic connection to the wireless network

Post#2 by Ed_P » 11 Nov 2019, 18:23

I connect automatically when I startup. To connect to the network do you have to sign on to it? And are you saving changes?
Ed

Kulle
Warlord
Warlord
Posts: 598
Joined: 28 Jan 2017, 10:39
Distribution: v4.0 64bit Xfce
Location: Berlin

Automatic connection to the wireless network

Post#3 by Kulle » 12 Nov 2019, 08:47

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?

Kulle
Warlord
Warlord
Posts: 598
Joined: 28 Jan 2017, 10:39
Distribution: v4.0 64bit Xfce
Location: Berlin

Automatic connection to the wireless network

Post#4 by Kulle » 12 Nov 2019, 11:05

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

User avatar
ncmprhnsbl
DEV Team
DEV Team
Posts: 3933
Joined: 20 Mar 2012, 03:42
Distribution: v5.0-64bit
Location: australia
Contact:

Automatic connection to the wireless network

Post#5 by ncmprhnsbl » 12 Nov 2019, 12:23

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)
Forum Rules : https://forum.porteus.org/viewtopic.php?f=35&t=44

User avatar
Ed_P
Contributor
Contributor
Posts: 8360
Joined: 06 Feb 2013, 22:12
Distribution: Cinnamon 5.01 ISO
Location: Western NY, USA

Automatic connection to the wireless network

Post#6 by Ed_P » 12 Nov 2019, 16:22

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)
:)
Ed

Kulle
Warlord
Warlord
Posts: 598
Joined: 28 Jan 2017, 10:39
Distribution: v4.0 64bit Xfce
Location: Berlin

Automatic connection to the wireless network

Post#7 by Kulle » 13 Nov 2019, 09:01

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

Kulle
Warlord
Warlord
Posts: 598
Joined: 28 Jan 2017, 10:39
Distribution: v4.0 64bit Xfce
Location: Berlin

Automatic connection to the wireless network

Post#8 by Kulle » 13 Nov 2019, 10:07

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?

User avatar
Ed_P
Contributor
Contributor
Posts: 8360
Joined: 06 Feb 2013, 22:12
Distribution: Cinnamon 5.01 ISO
Location: Western NY, USA

Automatic connection to the wireless network

Post#9 by Ed_P » 13 Nov 2019, 16:40

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.
Ed

Kulle
Warlord
Warlord
Posts: 598
Joined: 28 Jan 2017, 10:39
Distribution: v4.0 64bit Xfce
Location: Berlin

Automatic connection to the wireless network

Post#10 by Kulle » 15 Nov 2019, 09:28

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?

User avatar
Ed_P
Contributor
Contributor
Posts: 8360
Joined: 06 Feb 2013, 22:12
Distribution: Cinnamon 5.01 ISO
Location: Western NY, USA

Automatic connection to the wireless network

Post#11 by Ed_P » 15 Nov 2019, 12:59

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?
Ed

Kulle
Warlord
Warlord
Posts: 598
Joined: 28 Jan 2017, 10:39
Distribution: v4.0 64bit Xfce
Location: Berlin

Automatic connection to the wireless network

Post#12 by Kulle » 17 Nov 2019, 09:28

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.

User avatar
Ed_P
Contributor
Contributor
Posts: 8360
Joined: 06 Feb 2013, 22:12
Distribution: Cinnamon 5.01 ISO
Location: Western NY, USA

Automatic connection to the wireless network

Post#13 by Ed_P » 17 Nov 2019, 14:37

I always leave it at the default value, which is 1.
Ed

Kulle
Warlord
Warlord
Posts: 598
Joined: 28 Jan 2017, 10:39
Distribution: v4.0 64bit Xfce
Location: Berlin

Automatic connection to the wireless network

Post#14 by Kulle » 18 Nov 2019, 11:13

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?

User avatar
Ed_P
Contributor
Contributor
Posts: 8360
Joined: 06 Feb 2013, 22:12
Distribution: Cinnamon 5.01 ISO
Location: Western NY, USA

Automatic connection to the wireless network

Post#15 by Ed_P » 18 Nov 2019, 16:43

The address of your pc. If you're connected to your WiFi does it matter? Are you connecting automatically now?
Ed

Post Reply