1

When I attempt to start Gnome Terminal via the favorites bar, ctrl-alt-t, Activities → Terminal it does not start.

I have x-term installed and it runs fine.

From the x-term shell, I run gnome-shell --version and it reports: GNOME Shell 3.28.4

  • What steps are recommended to troubleshoot to diagnosis what is wrong?
  • Is there a way to safely reinstall the Gnome terminal so that it works?

Thanks to Byte Commander for the suggestion, I ran gnome-terminal from the x-term CLI and saw the following output:

$ gnome-terminal
Traceback (most recent call last):
  File "/usr/bin/gnome-terminal", line 9, in <module>
    from gi.repository import GLib, Gio
  File "/usr/lib/python3/dist-packages/gi/__init__.py", line 42, in <module>
    from . import _gi
ImportError: cannot import name '_gi' from 'gi' (/usr/lib/python3/dist-packages/gi/__init__.py)

Now I realize what happened that broke things. A few days ago I decided to build my own Python3. For whatever reason, it looks like I have a bad install or build of Python3.

Given the above output, what suggestions are there to fix it?

1
  • Can you try launching gnome-terminal from xterm and see if you get any diagnostic output? – Byte Commander Aug 16 '19 at 14:14
2

Thanks (so much) to Byte Commander for the clue to resolve the problem.

I found the following link: Solve the ubuntu16.04 terminal can not open - Programmer Sought

With a slight variation from the instructions to match the version numbers that I was working with (moving from Python 3.6 and going to Python 3.7) I simply ran the following:

sudo cp _gi_cairo.cpython-36m-x86_64-linux-gnu.so _gi_cairo.cpython-37m-x86_64-linux-gnu.so
sudo cp _gi.cpython-36m-x86_64-linux-gnu.so _gi.cpython-37m-x86_64-linux-gnu.so

Once I did this, I was able to run:

gnome-terminal

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

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