ruserious
Group: Members
Posts: 23
Joined: Dec. 2005 |
|
Posted: Dec. 15 2005,12:29 |
|
torsmo is the system monitor on your desktop (starting with DSL 2.1). It can be customized to show plenty of additional stuff, I'll show how to customize it so it displays the IP(s) of your networkinterfaces.
Granted not very exciting, but I find it helpful, especially when I have to remote administer friends' DSL installs via ssh.
1. First we create a little shell script that outputs the IP for a given interface. Create a file ~/.myip with this content:
Code Sample | #!/bin/sh ifconfig $1 2>&1 | awk '/inet/ { gsub(/[a-z:[:space:]]/,"",$2);printf $2}'
|
2. chmod 775 ~/.myip to make it executable
3. Test if it's working with: ~/.myip eth0 or if you are on a PPPoE connection try ~/.myip ppp0 This should return one IP-Adress and the shell-prompt should appear right next to it.
4. If the above is ok, you can edit your torsmo-config file ~/.torsmorc and add the output of this script to it. For example find the line that reads:
Code Sample | ${color grey}Uptime$color $uptime
|
and replace it with:
Code Sample | ${color grey}Uptime$color $uptime IP: ${execi 60 ~/.myip eth0}
|
execi 60 will refresh the value every 60 seconds. Also we are passing the name of the interface, so if you wanted to, you could show multiple interfaces.
5. If you want to immediately see the changes you can pkill torsmo and restart it torsmo&
|