Open nelsonic opened 2 years ago
tried:
ip_address=$(ifconfig "$default_interface" | awk 'sub(/.* inet addr:/, "") {print $1}')
Got:
: error fetching interface information: Device not found
Replaced with:
ip_address=$(hostname -I)
Now:
echo $ip_address
192.168.1.196
Success.
mkdir ~/bin
vi ~/bin/indicator-sysmonitor-display
#!/bin/bash
ip_address=$(hostname -I)
echo "$ip_address" # sysmon-indidicator will echo string
exit 0
sudo add-apt-repository ppa:fossfreedom/indicator-sysmonitor
sudo apt-get update
sudo apt-get install indicator-sysmonitor
Sadly, this turned out to be more than the T5m
I was hoping it would be. so I'm shelving it for now.
Just going to run hostname -I
whenever I need the IP and will revisit this when I have more time.
Note: if you know of an easier way, please share!!
I find myself constantly having to check the IP address of the PI before attempting to SSH into it. Want to have the IP address visible somewhere so that I never need to check for it again.
This looks like it might do the trick: https://askubuntu.com/questions/1024866/is-it-possible-to-show-ip-address-on-top-bar-near-the-time
Going to try it now. 🤞