Sysmonitor screenlet shows wrong IP address. (vmnet1 instead of wlan0)

Bug #1132812 reported by Anant Aggarwal
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
Individual Screenlets
Fix Committed
Undecided
Unassigned

Bug Description

Sysmonitor screenlet shows IP address (and then the related Download and Upload speeds) of VMWare (vmnet1) instead of the wlan0 that it is currently connected to (even when VMWare guest is properly shut down.)

I tried to locate the function sensors.net_get_ip() in a few files to know what is being passed and fix it or find a workaround but did not want to brick my system since I am a tester and not a development guy, specially since I came to know that python needs to maintain strict indentation to be able to work properly. I only have a couple of days of experience on Ubuntu and am in a learning phase, so kindly be light if you find this bug a little noobish.

Sysmonitor 0.1.7++ by Whise
Screenlets 0.1.6

Revision history for this message
Rastko Karadzic (rastkokaradzic) wrote :

sensors.net_get_ip() returns ip for first (non lo) interface. I've fixed it and it will be in development repo in a few days.
Also, SysmonitorScreenlet.py is changed and now you can select from which interface to obtain ip address. This also should be in development repo in a few days.

Regards,
Rastko Karadzic.

Changed in indiv-screenlets:
status: New → Fix Committed
Revision history for this message
Anant Aggarwal (anantinfosys-deactivatedaccount) wrote :

Thanks Rastko for the pretty fast response.
Would wait for the fixed build with full eagerness.

Secondly if you may answer, can an end user have changed it without the source code?
I mean could I have located sensors function from just the tarball installation or is it hidden?
I am asking since I would love to find reasons and workarounds for any bugs that I encounter.

Thanks in advance and keep up the good work.

Revision history for this message
Rastko Karadzic (rastkokaradzic) wrote :

Because screenlets are written in python end user gets copy of source code and not precompiled binary, which means that you
can change installed files directly (not recommended) or get a copy of source code from tarball and change that.
For example if you want to change sensors.py:
1. download source
2. make changes in SOURCE_PATH/src/lib/sensors.py
3. go to SOURCE_PATH and execute "python setup.py build"
4. run "export PYTHONPATH=SOURCE_PATH/build/lib.linux-x86*/screenlets/" where lib.linux-x86* is folder generated by command above. (it will be for ex. lib.linux-x86_64-2.6, it depends on arch)
5. run desired screenlet and test your changes

It's important to run step 4 and 5 in same terminal because otherwise python will import your installed modules and not those that you have just changed.

When you make a patch which you want to be permanent, execute "sudo setup.py install" in SOURCE_PATH folder. Also, when you do that, post patch upstream ;)

Regards,
Rastko Karadzic.

To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.