Exploit-DB updates

Friday, December 31, 2010

Shell script to check IP (For use with conky)

Well as I used conky on BT4 I began to like having my private IP displayed, so I decided to look at the script it used and it's as simply as this, make a file on your desktop named ip.sh and add the following;

#!/bin/bash
wget -q -O - checkip.dyndns.org|sed -e 's/.*Current IP Address: //' -e 's/<.*$//'

Save this file and make it executable with the following command;

chmod 775 ip.sh

This allows you to read, write and execute the file. You can now try it out with "./ip.sh" and it should display your IP in the shell. If so then it's ready for use with conky. To use a shell script in conky you need to add the following command to the .conkyrc;

${execi 300 /home/youruser/Desktop/ip.sh}

If all's well, it's displaying your IP now.

No comments:

Post a Comment