17

A weird thing happened today: I clicked in terminal icon and it didn't launched, just blinked and disappeared. If I press ctrl+alt+t it won't launch. I tried to launch a light terminal by pressing ctrl+alt+f1. The login screen, appeared to put my login and password, the system accepted the login and password but quickly returned to the login screen. Its a kind of loop: I enter the login and the system returns to the login screen. Xterm doesn't work too.

However, unity seems to works correctly.

Its the first time that the terminal doesn't work, and I don't know how to fix this bug.

I would appreciate any kind of help.

UPDATE:

I had installed mysecureshell before the reported issue and when I removed this package the problem was corrected partially. The terminal works (xterm too) but the light terminals (tty), accessed by ctrl+alt+f1, remains in loop during the login.

Below are pasted my bashrc and the result of dmesg:

~/.bashrc: http://paste.ubuntu.com/16918978/

dmesg: http://paste.ubuntu.com/16918993/

  • Can you edit your question and add the last lines of dmesg output, after you have tried to open a terminal. – Videonauth Jun 2 '16 at 0:21
  • 1
    What have you changed lately? ~/.bashrc? It sounds like your shell launches, then immediately exits. – waltinator Jun 2 '16 at 1:49
  • Well, my gnome-terminal is working, but tty not. I will keep working normally and if any problem appear again I update my question. Thanks for all attention. – leobap Jun 3 '16 at 15:32
  • I had a similar problem, and unistalling mysecureshell solved the issue (Ubuntu 17.10). – Cosmin Saveanu Mar 19 '18 at 11:41
  • You can download Visual Studio Code and use it's built-in terminal - I had this same problem and I fixed it using the Visual Studio Code terminal via running the various commands through that terminal to fix the Python stuff code.visualstudio.com/#alt-downloads – Kyle Bridenstine Mar 25 at 19:22
24

In my case I upgraded python3.5 to python3.6.

For that workaround run xterm. Then run the following two commands:

sudo rm /usr/bin/python3

sudo ln -s python3.5 /usr/bin/python3
| improve this answer | |
  • 2
    On Ubuntu 18.04, a similar fix works with "sudo ln -s python3.6 /usr/bin/python3" – Reb.Cabin May 13 '19 at 16:45
  • 1
    When I installed python3.7, not only did term break, but so did apt_get and apt_add_repository. The fix here worked to restore apt as well, and I was able to install python3.5 according to these instructions askubuntu.com/questions/682869/…. – Reb.Cabin May 13 '19 at 16:48
  • I ran sudo rm /usr/bin/python3 command and then my all python versions stopped working! Now I am facing trouble to reinstall python versions!! – Chirag Kalal Jun 21 '19 at 9:59
  • You can download Visual Studio Code and use it's built-in terminal - I had this same problem and I fixed it using the Visual Studio Code terminal via running the various commands through that terminal to fix the Python stuff code.visualstudio.com/#alt-downloads – Kyle Bridenstine Mar 25 at 19:22
10

I was having the same issue, but it was created as I updated python to 3.6 and selected alternative as python3.6. But when I reverted the option to the python3.5, terminal started working again.

So Can anyone tell me why did it happen? I used the command

sudo update-alternatives --config python3

The following message popped up:

There are 2 choices for the alternative python3 (providing /usr/bin/python3).

  Selection    Path                Priority   Status
------------------------------------------------------------
  0            /usr/bin/python3.6   2         auto mode
* 1            /usr/bin/python3.5   1         manual mode
  2            /usr/bin/python3.6   2         manual mode

Press <enter> to keep the current choice[*], or type selection number:

I selected 1 and it started working.

| improve this answer | |
  • changing to 3.7 also works, if you have – Sadap Mar 6 at 18:48
  • You can download Visual Studio Code and use it's built-in terminal - I had this same problem and I fixed it using the Visual Studio Code terminal via running the various commands through that terminal to fix the Python stuff code.visualstudio.com/#alt-downloads – Kyle Bridenstine Mar 25 at 19:22
4

It may be too late for your case or maybe the solution works on me doesn't work on yours. My case is as below.

Recently, I ran into the condition that suddenly, the terminal program could not be started. I googled the web, and found 2 causes: one is incorrect locale settings, and the other is the original python3 being incorrectly replaced. In my case, I did install python3.4.6 while the existing python3 is python3.5.2. After I restore python3.5.2, the terminal program runs well again.

Reference: terminal won't launch after install python 3.5.

Good Luck.

| improve this answer | |
2

For me, the problem was that I wasn't admin.
User Interface solution:

  1. Open settings
  2. Go to "Details" (usually last option on the left side-menu)
  3. Go to "Users"
  4. Select your user.
  5. You will see two options (Standard/Admin). Click on "Admin"
  6. That will ask you to close and open your user session. Do it
  7. Now you can open the terminal with CTRL+ALT+T
| improve this answer | |

Not the answer you're looking for? Browse other questions tagged or ask your own question.