Is there a terminal command to disable the mobile data connection?
-
Is there a simple command to disable mobile data in a script?
nmcli radio wwan off
nmcli connection downgsettings set com.lomiri.touch.connectivity.cellular data-enabled false
gsettings set com.lomiri.touch.connectivity.cellular data-active falsedbus-send ... com.canonical.Unity.Connectivity.SetCellularDataEnabled boolean:false
/usr/share/ofono/scripts/deactivate-context /ril_0 1 (APN-Kontext entladen)
/usr/share/ofono/scripts/set-gprs-powered /ril_0 false (GPRS-Modul abschalten)
/usr/share/ofono/scripts/set-tech-preference /ril_0 gsm (Drosselung auf 2G/GSM)Nothing disables mobile data
-
try
dbus-send --session --type=method_call --print-reply --dest=com.lomiri.connectivity1 /com/lomiri/connectivity1/Private org.freedesktop.DBus.Properties.Set string:com.lomiri.connectivity1.Private string: MobileDataEnabled variant:boolean:true -
@gpatel-fr Thank you so much for the crucial tip! With just a few tweaks, it now works on my device. I was also able to successfully determine my location this way.
The one-click “NOKIA 3210 mode” is now complete!
Battery life is 3 days, but I can always be reached by phone or text message. -
@gpatel-fr
Unfortunately, disabling location tracking doesn't work quite as well as it should. It turns off location tracking, but it also disables the toggle switch.## Turn off location services sudo -u phablet DBUS_SESSION_BUS_ADDRESS="unix:path=/run/user/32011/bus" dbus-send --session --type=method_call --print-reply --dest=com.lomiri.location.Service /com/lomiri/location/Service com.lomiri.location.Service.SetEnabled boolean:false 2>/dev/null sudo -u phablet DBUS_SESSION_BUS_ADDRESS="unix:path=/run/user/32011/bus" dbus-send --session --type=method_call --print-reply --dest=com.ubuntu.location.Service /com/ubuntu/location/Service com.ubuntu.location.Service.SetEnabled boolean:false 2>/dev/null -
try
sudo dbus-send --system --type=method_call --print-reply --dest=com.lomiri.location.Service /com/lomiri/location/Service org.freedesktop.DBus.Properties.Set string:com.lomiri.location.Service string:IsOnline variant:boolean:truedbus-monitor is your friend for this kind of problem.
sudo dbus-monitor --system >system.txtor
dbus-monitor --session >session.txt
Hello! It looks like you're interested in this conversation, but you don't have an account yet.
Getting fed up of having to scroll through the same posts each visit? When you register for an account, you'll always come back to exactly where you were before, and choose to be notified of new replies (either via email, or push notification). You'll also be able to save bookmarks and upvote posts to show your appreciation to other community members.
With your input, this post could be even better 💗
Register Login