The following article is especially dedicated to all those users who use Ubuntu on a laptop. In order to reduce the consumption of resources of our team and thus extend the life of our battery as much as possible, in the next tutorial we will show you how disable Wi-Fi automatically in this operating system.
In addition to being a energy saving measure for our team, block any type of media that we are not going to use is a basic safety step for a system, so it is also recommended as a measure of isolation against any type of external attack.
If you are users who do not make general use of the Wi-Fi connectivity of your equipment, either because you connect through a network cable or because you do not need it, it is advisable to keep this means disabled by default within the system. To disable connectivity from the moment we log into the computer simply we will edit as administrator user the file located in the /etc/rc.local path of our team.
Once inside, we will go to the end of the file and add the following line, just before the one that says exit 0.
rkfill block wifi
The previous sentence applies to any user who makes use of the equipment. Once the file is modified we will have to restart the computer to check the results. Later, if we want to re-enable the Wi-Fi connectivity of our computer, we can do so through the indicator located in the respective area.
In case we want to disable Wi-Fi connectivity for one or more specific users of the system, but not all, we must add a new file within the path ~ / .config / autostart / with the name of nowifi.desktop. Its content must be the following:
[Desktop Entry] Type=Application Exec=rfkill block wifi Hidden=false NoDisplay=false X-GNOME-Autostart-enabled=true Name=no-wifi-on-start Comment=No wifi on start
In this case, in order to check the effectiveness of this script no need to restart the computer. It will be enough that we close the user session that we have open and re-enter.
I think that "
" NO va en lo que le vamos a colocar al archivo "rc.local" ni al "nowifi.desktop"
¡que se ha colado el código html al blog!
«fe de errata»
{ ¿o estoy equivocado? ;-) }
ha ha ha and comments DO NOT LET HIM DRAIN the html code, this is ironic! 😎
Here it goes again:
I think that
"_"
It does NOT apply to what we are going to place in the file «rc.local» or the «nowifi.desktop»
The html code has been leaked to the blog!
"Errata"
{ or I'm wrong? 😉}
To the third time the charm upsssss
https://twitter.com/ks7000/status/737256440746913796
So it goes, haha.
Enga that I correct it 🙂