How can I make Ubuntu display different messages and icon for my connection to internet is limited

Asked by elfisico on 2017-07-11

How can I make Ubuntu display different messages and icon for my connection to internet is limited as windows 10 and android phone.

Question information

Language:
English Edit question
Status:
Answered
For:
Ubuntu network-manager Edit question
Assignee:
No assignee Edit question
Last query:
2017-07-11
Last reply:
2017-07-12

How do you mean "limited"?

elfisico (angelmejiabrito) said : #2

Limited WiFi connection or Or No Connectivity In Ubuntu

You could cron a task to ping 8.8.8.8 and flag something up when it's not connecting. Simple script would do it.

#!/bin/bash
IP='8.8.8.8'
fping -c1 -t300 $IP 2>/dev/null 1>/dev/null
if [ "$?" = 0 ]
then
  echo "Host found" > /dev/null
else
  notify-send -u critical -i "No Internet Connection"
fi

Make that a script. Something like in:

sudo gedit /usr/bin/checkmywebconnection; sudo chmod +x /usr/bin/checkmywebconnection

Paste the script into the file. You can now schedule the command to run every 30 seconds or minute or however frequently you like using crontab

elfisico (angelmejiabrito) said : #6

In windows 10 and android phone show icon for Limited WiFi connection in Ubuntu not.

Those are different OSes. I could point out a tonne of points for the opposite way around..... Different systems do things differently.

Can you help with this problem?

Provide an answer of your own, or ask elfisico for more information if necessary.

To post a message you must log in.