Sunday, February 19, 2017

16.04 - Suddenly Unable to Launch Terminal




I am using Ubuntu 16.04 and everything had been working fine with the terminal until very recently but now the shortcut (CTRL+ALT+T) and clicking on the terminal from the application menu do nothing. I am however able to launch by right clicking on the desktop and selecting “open terminal”. At the same time this issue occurred I began getting a red icon on the upper right part of the screen for the first time, clicking on it shows the message “A problem occurred when checking for the updates”.



The only actions I took between everything working fine and these issues were reassigning different default versions of python and python3. I had remapped python to a version of python3 several days ago which seems to have broken Autokey but caused no other noticeable problems. In un-breaking that I have caused these new issues. Below are all of the terminal commands I entered prior to the trouble. I omitted a handful of version checks, ie. “python --version”.



dpkg -s autokey-gtk
sudo update-alternatives --config python
sudo update-alternatives --install /usr/bin/python python /usr/bin/python2.7 3
sudo update-alternatives --config python
autokey-gtk -c
sudo update-alternatives --config python3

sudo update-alternatives --install /usr/bin/python python3 /usr/bin/python3.7 1
sudo update-alternatives --install /usr/bin/python3 python3 /usr/bin/python3.7 1
sudo update-alternatives --config python3


After restarting and still having the issues I tried the following command and another restart, but without any change other than the python3 command no longer working (as expected).



sudo update-alternatives --remove-all python3



I have checked the keyboard shortcuts and the one for opening a terminal is still set as CTRL+ALT+T. So far I have not noticed issues opening any other applications. Any help would be much appreciated.



I was able to fix the issues by changing the system defaults for Python 2 and Python 3 back to their original versions using update-alternatives. As I have now learned, it is a bad idea to change the system versions of Python; doing so can cause a whole host of issues.



I don't yet understand why advancing a couple minor versions (ie. 3.5 > 3.7) causes such trouble and would love to know more if anyone reading this can fill me in.


No comments:

Post a Comment

11.10 - Can't boot from USB after installing Ubuntu

I bought a Samsung series 5 notebook and a very strange thing happened: I installed Ubuntu 11.10 from a usb pen drive but when I restarted (...