Puppy Linux Discussion Forum Forum Index Puppy Linux Discussion Forum
Puppy HOME page : puppylinux.com
"THE" alternative forum : puppylinux.info
 
 FAQFAQ   SearchSearch   MemberlistMemberlist   UsergroupsUsergroups   RegisterRegister 
 ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in 

The time now is Wed 22 Oct 2014, 01:20
All times are UTC - 4
 Forum index » House Training » HOWTO ( Solutions )
External IP address for use in CONKY
Moderators: Flash, Ian, JohnMurga
Post_new_topic   Reply_to_topic View_previous_topic :: View_next_topic
Page 1 of 1 Posts_count  
Author Message
wuwei


Joined: 15 Sep 2007
Posts: 774
Location: de

PostPosted: Sun 29 Apr 2012, 14:17    Post_subject:  External IP address for use in CONKY  

I have been battling the issue of showing the external IP address in Conky on and off.
It seems that the problem was solved here
http://www.murga-linux.com/puppy/viewtopic.php?p=483184

But since that post none of the codes mentioned there seem to work anymore.
So I did a little research and experimenting and found this code to work alright in establishing a file with just the external IP in it.
Code:
my_ipno=$(wget http://cmyip.com -qO - | grep -Ewo '\b([0-9]{1,3}\.){3}[0-9]{1,3}\b' | uniq)
echo $my_ipno >/tmp/iptest


I found part of it on the forum here, but can't seem to locate the post anymore, where it was mentioned. So credit goes to the unknown author.

More details on the issue can be found in my German thread here
http://murga-linux.com/puppy/viewtopic.php?t=63720
second and third post down the page.
Back to top
View user's profile Send_private_message 
L18L

Joined: 19 Jun 2010
Posts: 2525
Location: Moved from Hosla to www.eussenheim.de

PostPosted: Sun 29 Apr 2012, 15:06    Post_subject: External IP address
Sub_title: I can have IP
 

Hi wuwei,

what about "official" solution
Code:
wget -O - -q icanhazip.com

/usr/sbin/ipinfo wrote:
#!/bin/bash
# AUTHOR: Vovchik
# PURPOSE: GUI to show IP config info
# DATE: 14 May 2009
#120201 BK: internationalized.
#120323 replace 'xmessage' with 'yaf-splash'.

export TEXTDOMAIN=ipinfo
export OUTPUT_CHARSET=UTF-8

# --------------
# functions
# --------------

# --------------
get_data()
# --------------
{
nl='
'
# external ip
var0="`wget -O - -q icanhazip.com`"
Back to top
View user's profile Send_private_message 
wuwei


Joined: 15 Sep 2007
Posts: 774
Location: de

PostPosted: Tue 01 May 2012, 08:04    Post_subject:  

Okay L18L

(schoen dich hier drueben zu sehen)

Your code works, but what is the file for?
I need the number for Conky, not just stand-alone?
Back to top
View user's profile Send_private_message 
L18L

Joined: 19 Jun 2010
Posts: 2525
Location: Moved from Hosla to www.eussenheim.de

PostPosted: Tue 01 May 2012, 11:51    Post_subject: External IP address
Sub_title: 1 known author
 

Code:
 echo `wget -O - -q icanhazip.com` > /tmp/iptest
is shorter than
Code:
my_ipno=$(wget http://cmyip.com -qO - | grep -Ewo '\b([0-9]{1,3}\.){3}[0-9]{1,3}\b' | uniq)
echo $my_ipno >/tmp/iptest

It is not my code, it is vovchik´s
Smile
Back to top
View user's profile Send_private_message 
wuwei


Joined: 15 Sep 2007
Posts: 774
Location: de

PostPosted: Tue 01 May 2012, 14:59    Post_subject:  

A point well taken L18L.

I'll store both codes away safely.
These websites for showing one's IP come and go. So its a good idea to have several options.

Thanks for your input.
Back to top
View user's profile Send_private_message 
Display_posts:   Sort by:   
Page 1 of 1 Posts_count  
Post_new_topic   Reply_to_topic View_previous_topic :: View_next_topic
 Forum index » House Training » HOWTO ( Solutions )
Jump to:  

Rules_post_cannot
Rules_reply_cannot
Rules_edit_cannot
Rules_delete_cannot
Rules_vote_cannot
You cannot attach files in this forum
You can download files in this forum


Powered by phpBB © 2001, 2005 phpBB Group
[ Time: 0.0468s ][ Queries: 11 (0.0038s) ][ GZIP on ]