Posts filed under ‘Ubuntu’
Python ElementTree Fix for Ubuntu
Did you face the following situation?
$python
>>> import elementtree
Traceback (most recent call last):
File “”, line 1, in
ImportError: No module named elementtree
In case you’ve installed the elementtree package correctly
(python-elementtree) and you’re using Ubuntu,the following
solution will most probably work:
instead of import elementtree, use
import xml.etree.ElementTree
( I believe you must’ve already figured out the cause of the import
failure and why the solution works.
In case you haven’t, read on.
The import failure is due to the directory structure of the
elementtree files being different in Ubuntu. Usually the python
import modules are located in /usr/lib/python
The elementtree import file (ElementTree.py) in Ubuntu however
is located at the path
/usr/lib/python/xml/etree
Hence the above change in the import parameter is necessary )
Cure Of The Notorious Ubuntu futex_wait Bug
It all started two months back, when DC++ suddenly stopped working on my Ubuntu 8.10 – the Intrepid Ibex. Each time I tried running it, it would hang : the Interface Window would turn gray and not respond. I’d have to use the Force Quit application or kill the process from the System Monitor list of processes. I tried reinstalling DC++, but it didn’t solve the purpose. Soon other programs caught the infection and started exhibiting the same strange behaviour : Firefox, Gnome-do, EOG, python, and gvfs-fuse-daemon would hang at different times without issuing any warning. One day I noticed – in the Waiting Channel tab of the System Monitor – that they had a common waiting channel, “futex_wait”. I looked at the futex man page and learnt that futexes ( or better Fast Userspace muTexes ) were semaphores or mutex locks provided by Ubuntu to allow threads to work concurrently. The implications were clear : these multi-threaded applications were waiting on a futex and the duration of the wait indicated a deadlock.
The book “Operating System Principles” by Silberschatz, Galvin and Gagne says that in most Operating Systems, the method of handling deadlocks is to ignore deadlocks altogether and pretend that they never occur in the system. Further, it says that both Windows and UNIX use this solution. I researched a bit on the Internet and found that indeed it was a bug in the latest Ubuntu 2.6.27-* Kernels and the Ubuntu community was working on it to make sure the newer kernels don’t fall prey to this problem.
I had learnt to live with the shortcoming until today when luckily I found a workaround for the problem. It turns out that switching off the “Assistive Technologies” does the trick.
Go to System > Preferences > Assistive Technologies
uncheck the “Enable Assistive Technologies” options.
Setting up a BroadBand Connection on Ubuntu
This post is for Ubuntu Users who wish to set up a BroadBand Connection on their systems.
step 1-> connect the broadband modem to your laptop using the ethernet cable
step 2-> now open the terminal window. in the terminal type :
sudo pppoeconf
step 3-> a text based menu program is activated which will guide you through the next steps, which are :
1. Confirm that your Ethernet card is detected. ( choose yes wherever u can )
2. Enter your username (this is the username provided by your Internet Service Provider)
3. Enter your password (this is the password provided by your Internet Service Provider)
4. If you already have a PPPoE Connection configured, you will be asked if it may be modified. ( choose yes here too )
5. Popular options: you are asked if you want the “noauth” and “defaultroute” options and to remove “nodetach” – choose Yes.
6. Use peer DNS – choose Yes.
7. Limited MSS problem – choose Yes.
8. When you are asked if you want to connect at start up.(Choose no if u wish to connect manually. Choose yes otherwise )
9. Finally you are asked if you want to establish the connection immediately.The job’s done. If you chose Yes in the last step, start using the connection.
If you chose No, you’ll have to manually establish the Internet Connection.
TO CONNECT MANUALLY
in the terminal type command :
sudo pon dsl-provider
TO DISCONNECT MANUALLY
in the terminal type command :
sudo poff dsl-provider
NOTE:
If you’ve been using Internet via a Proxy Server, you might have to disable the Proxy in your Browser.
Recent Comments