Sunday, October 4, 2015

prime-indicator problem

Machine: Ubuntu 14.04.3

Problem description:
When I start my Ubuntu today, I come across a problem that prime-indicator crashes with the error "TabError: inconsistent with tabs and spaces" something like this. prime-indicator is a tool used to switch between Intel graphics card and Nvidia graphics card.

Solves:
I guess this problem is related to python, and since I changed the default python to python3.4 and the original python version is python2.7. I did a command like this:

/usr/bin $ sudo rm python
/usr/bin $ sudo ln -s python3.4 python

now I know I shouldn't change the system's python version, instead, I can use alias command to change the default python version only in my account. So first of all I change back to default python which is linked with python2.7 and reboot, prime-indicator comes back!
Then I add this line to my .bashrc file

alias python='python3.4'

and then source .bashrc