2

whilst there are work arounds Permanently Disable Wireless Drivers and Wireless Internet on tablet-PC

, I would like to see the airplane icon in the top bar to prove that wireless is off. (the best way would be to take out the hardware as I never use wifi )

the setting is in settings, wifi , airplane mode.

but this resets to enabled on reboot. I would like it permanently selected there, so it shows in top bar.

ryzen5 22.04.1 gdm3 5.15.0-56-generic

pierrely
  • 653
  • the setting is, as it says, also for bluetooth and mobile broadband, which I also want disabled. it would be nice for that setting to have a 'permantly until notified' setting, or 'lock' – pierrely Dec 20 '22 at 01:01
  • I guess I will have to set a busy script to send keys function + F12 for my ASUS TUF Ryzen laptop here. perhaps query, if possible, if airport mode is on. – pierrely Jan 01 '23 at 04:01
  • update, silly me, I checked the BIOS and I could disable wireless there, and also bluetooth. top bar now has a ? where the airport icon used to be, and wireless and blutooth are not in the menu top right. hardware is asus tuf ryzen5. Ubuntu settings, blutooth not found , and no wireless anything under network. – pierrely Jul 31 '23 at 04:20

3 Answers3

2

this worked for me lovely, and the airport icon shows up the top , I only need to run it on startup/reboot.

not mine, got it from here, so upvote there.

Turn Airplane Mode on/off via terminal

#!/bin/bash

radio="$(nmcli radio all | awk 'FNR == 2 {print $2}')"

if [ "$radio" = "enabled" ] then nmcli radio all off else nmcli radio all on fi

if rfkill list bluetooth | grep -q 'yes$' ; then rfkill unblock bluetooth else rfkill block bluetooth fi

also I ran it as sh, which is dash not bin (as I understand it). else I could run it as 'bash xxxx,sh'

pierrely
  • 653
0

So less about: how make it turn off / how to make the off status remain as such between refresh or reboot

MORE about: relocating the status icon of the setting to a place more prominent.

As with most cel phones where you can rearrange the notification icons and assign them priorities.

You could research and build a macro that turns off the wifi and then add a line to the REBOOT sequence that initiates that macro near the end of rebooting. If you determine a resource for that please be sure to include.

Does the interface, where your icon currently displays, allow you to interact with the icon as a means of interacting with the settings it represents?

  • 2
    I think you might be able to turn this into an answer with some edits. Rather than "Can you", make it a suggestion as a potential (but unverified) workaround. – NotTheDr01ds Jan 01 '23 at 21:59
0
rfkill block all

works a treat from 22.04 thinks my desktop should have wifi, so sets airplane on as I do ot use wifi. This means that bluetooth cannot work. Why? comment in first answer. AND it did not require sudo. simplest solution.

pierrely
  • 653