25

A weird thing happened today: I clicked on the terminal icon and it didn't launch - 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 to put my login and password appeared, the system accepted the login and password but quickly returned to the login screen. It's 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 work correctly.

It's 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 partially corrected. The terminal works (xterm too), but the light terminals (tty), accessed by Ctrl+Alt+F1, remain in loop during the login.

Below are pasted my .bashrc and the result of dmesg:

5
  • 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). 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 Mar 25 '20 at 19:22
31

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
5
  • 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!! 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 Mar 25 '20 at 19:22
  • No, just no. Anyone reading this in 2020, just don't. This should not have a single upvote. (Changing the version of the default system python is completely unrelated to the original question, but in case anyone wants/needs to do that, they also need to be aware of the (serious) caveats (i.e., breaking the entire system); see: unix.stackexchange.com/questions/410579/… )
    – michael
    Dec 12 '20 at 9:41
12

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.

3
  • changing to 3.7 also works, if you have
    – bb1950328
    Mar 6 '20 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 Mar 25 '20 at 19:22
  • I changed from 3.7 to 3.6 and mine started working again. Thank you!
    – JackKalish
    Aug 16 '20 at 3:07
5

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.

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

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