12

After upgrading from 17.10 to 18.04 I can't open a terminal by any method.

After reinstalling and updating the problem is still unsolved.

What can I do to fix this?

1

5 Answers 5

18

This mostly happens if the language setting on your system got messed up, to fix this simply re-set your language settings (see Screenshot).

enter image description here

After this your terminal should work as expected.

1
  • 1
    The question here: What does make the system to mess or loss the language settings? This is usually happens with me randomly!
    – SaidbakR
    Nov 5, 2018 at 18:22
10

So I came across the same issue and no language settings seemed to help. Turnout the issue was with my PPA. I had recently upgraded my python3 to 3.7.5 from 3.6. This would have been fine but then I make my default python3 to be 3.7 which made some issues. So the solution to this is: Run this command

 sudo gedit /usr/bin/gnome-terminal

and than change #! /usr/bin/python3 to #! /usr/bin/python3.6 This seems to solve my isuue. Thanks!

3
  • Never use sudo in combination with grafical programs. It is pkexec your program or sudo -H your program. It would be better to set python3 version back to the ubuntu one.
    – nobody
    Feb 6, 2020 at 17:01
  • I knew it was related but could not figure it out! Jun 13, 2020 at 8:57
  • Another option appears to be sudo update-alternatives --config python3 and then pick the line for python3.6. It completely blows me away that installing Python3.7 or 3.8 and setting it as the default breaks terminal! And there is ZERO warning against this. To get a terminal, and enter the command, right click desktop and "open terminal" or install xterm. Apr 17, 2021 at 17:32
6

Open XTerm and run the following code

  1. sudo locale-gen
  2. sudo localectl set-locale LANG="en_US.UTF-8"

And then reboot

1
  • How do you open XTerm? My terminal has gone too, but alt-f2 says xterm not installed. Dec 10, 2019 at 18:12
5

This fix seemed to work for me. But did not survive a reboot.

When running localectl some entries showed as "n/a" - this seems to be key.

Any command-line activity can be run in xterm (Alt-F2, xterm).

Actual fix (for me):

  1. Make sure /etc/locale.conf has your locale(s) uncommented.
  2. Run locale-gen.
  3. Run localectl set-locale LANG="en_US.UTF-8" (or you LANG value)
  4. Run localectl to see if anything remains set to "n/a"
  5. In my case, run localectl set-keymap "us"
  6. Logout, login - now Terminal works.

(Credits to this thread: https://bbs.archlinux.org/viewtopic.php?id=180103)

3
  • He will have problem to run your steps, without terminal, it's impossible to run your commands line after step 2
    – damadam
    Aug 30, 2018 at 6:41
  • @damadam I have modified my comment to add that xterm works for these changes - thanks for catching that. That said, if the original steps are followed - terminal will be available until reboot to make my changes. Sep 10, 2018 at 14:01
  • You can also run these commands from a physical console... press e.g. Ctrl-Alt-F1 to get to a physical console. Press Alt-F7 (typically) to go back to the graphical console.
    – jlp
    Aug 20, 2019 at 14:12
4

I was facing the same problem, but accidently resolved it.
So try this one...

Right Click anywhere on the Desktop and select "Open Terminal". It is working for me, at least. Just to let you know, I am still unable to open terminal by clicking on the Terminal icon or through the Keyboard Shortcut.

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .