[Bug 618868] Re: sysmonitor screenlet fails to find the computer's IP address

2010-11-15 Thread Michel Leunen
Another possibility that directly gives the right result and uses ifconfig: $ ifconfig | grep 'inet '| grep -v '127.0.0.1' | cut -d: -f2 | awk '{ print $1}' That said, I don't know if the "inet" string stays the same in every locale, though. -- sysmonitor screenlet fails to find the computer's

[Bug 618868] Re: sysmonitor screenlet fails to find the computer's IP address

2010-11-14 Thread Michel Leunen
Something like this should work: def net_get_ip(): # by Whise """Returns ip if it can""" ip = commands.getoutput("ip -o -4 addr show") x = 0 while True: ip = ip[ip.find("inet "):] ip = ip[5:] ipc = ip[:ip.find("/")]

[Bug 618868] Re: sysmonitor screenlet fails to find the computer's IP address

2010-11-14 Thread Michel Leunen
Yes, there is another way: using the command ip from the net-tools package instead of ifconfig. This package is installed by default in Ubuntu. Don't know for other distributions. Use it like this: $ ip addr show On my machine, it prints this: $ ip addr show 1: lo: mtu 16436 qdisc noqueue sta

[Bug 618868] Re: sysmonitor screenlet fails to find the computer's IP address

2010-11-13 Thread Michel Leunen
My analysis of the problem was quite weak, sorry On MY machine, ifconfig still returns "inet adr" with only one "d". Actually, the problem is a problem of locale. In your english ( I presume) version, it has two "d" but in mine which is a french version of Maverick, "inet adr" has only one "d".

Re: [Bug 618868] Re: sysmonitor screenlet fails to find the computer's IP address

2010-08-20 Thread Michel Leunen
Ubuntu) > Status: New => Incomplete > -- Michel Leunen http://linux.leunen.com -- sysmonitor screenlet fails to find the computer's IP address https://bugs.launchpad.net/bugs/618868 You received this bug notification because you are a member of Ubuntu Bugs, which is subscri

[Bug 618868] [NEW] sysmonitor screenlet fails to find the computer's IP address

2010-08-16 Thread Michel Leunen
Public bug reported: Binary package hint: screenlets Using Ubuntu 10.04.1 with screenlets 0.1.2-7ubuntu1 The screenlet sysmonitor doesn't return an IP address but an empty string. This is due to a bug in the function net_get_ip(). Here is the content of the function screenlets.sensors.net_get_ip

[Bug 584926] Re: error when compiling xvidcap from sources

2010-05-24 Thread Michel Leunen
** Attachment added: "patch for xvidcap source in Lucid" http://launchpadlibrarian.net/49014739/xvidcap.patch -- error when compiling xvidcap from sources https://bugs.launchpad.net/bugs/584926 You received this bug notification because you are a member of Ubuntu Bugs, which is subscribed to

[Bug 584926] [NEW] error when compiling xvidcap from sources

2010-05-24 Thread Michel Leunen
Public bug reported: Binary package hint: xvidcap When compiling xvidcap from sources in Lucid, we've got an error in the file capture.c during the 'make' process: capture.c: In function ‘XGetZPixmapSHM’: capture.c:668: error: expected ‘=’, ‘,’, ‘;’, ‘asm’ or ‘__attribute__’ before ‘*’ token ca