Thursday, May 2, 2024
 Popular · Latest · Hot · Upcoming
24
rated 0 times [  24] [ 0]  / answers: 1 / hits: 10541  / 2 Years ago, sun, january 23, 2022, 10:58:03

Because my internet connection is very unstable at the moment, I'd like to use a small indicator applet for the Unity panel.



Since I'm connected through a WLAN/Wifi Router, I can see in the network-applet when the connection to the router is lost, but not when the router loses the connection to the Internet.



A Windows 7 computer of mine has this functionality. It shows a black exclamation mark on yellow ground if it can't "ping" a remote server.



I'm running Ubuntu 11.10 "Oneiric Ocelot" 64-Bit with Unity 3D.


More From » unity

 Answers
5

Whilst you mentioned you wish to do this in the network applet - I don't think you can do this. Here is an alternative.



internet up



enter image description here



internet down



enter image description here



how to for 11.10 & 12.04



It requires an indicator from a PPA together with a custom ping test script:



sudo add-apt-repository ppa:alexeftimie/ppa
sudo apt-get update
sudo apt-get install indicator-sysmonitor
mkdir -p ~/scripts && cd ~/scripts


using:



gedit pingtest.sh


Copy and paste the code below into the new file and save & close.



Give the file execute permission:



chmod +x pingtest.sh


Start the indicator



indicator-sysmonitor &


Then in the indicator-preferences:



enter image description here



click "use this command" and copy and paste the following text:



$HOME/scripts/pingtest.sh


code



#!/bin/bash

if ping -c 1 -W 2 google.com > /dev/null; then
echo "Up"
else
echo "Down"
fi

[#40635] Tuesday, January 25, 2022, 2 Years  [reply] [flag answer]
Only authorized users can answer the question. Please sign in first, or register a free account.
ampust

Total Points: 133
Total Questions: 109
Total Answers: 111

Location: Reunion
Member since Fri, Jul 22, 2022
2 Years ago
;