17

When I try to start the Terminal by clicking the menu item Applications > Accessories > Terminal, it does not start. I get a Starting Terminal entry in the taskbar. After a few seconds, it goes away. No terminal appears. Other applications launch correctly.

I'm running Ubuntu 11.04, and connecting via Remote Desktop. On the client, I'm using Microsoft's Remote Desktop Connection for Mac; on the server, sesman.

I've checked the following log files, but no messages appear: debug, messages, sesman.log, syslog, and user.log.

ps ax | grep -i term does not list the terminal -- not even when the taskbar shows Starting Terminal. I can still get a command line by sssh'ing in.

When I launch gnome-terminal from xterm, I get the error below:

gnome-terminal: /build/buildd/cairo-1.10.2/src/cairo-image-surface.c:1320: _pixel_to_solid: Assertion `!"reached"' failed.

As for other terminals, I get the same error message when I run Byobu Terminal. And guake didn't install properly from the Software Centre (fixing guake seems beyond the scope of this question). However, xterm runs OK.

Also, I checked my .bashrc file, and it seems fine.

What should I do now? I'd rather not use xterm as my primary terminal.

Update
This is apparently a known bug. The solution is to turn on a desktop background.

  • 2
    how did you ps ax | grep -i term without a terminal!? – Andrew Wonnacott Mar 21 '12 at 18:47
  • also open synaptic and make sure gnome-terminal is installed - you might have uninstalled by accident and then it wasn't removed from the menu – Andrew Wonnacott Mar 21 '12 at 18:48
  • or install guake, another terminal, very useful! , just run it, press f12 to pop up and f11 to get fullscreen.. – user51537 Mar 21 '12 at 18:51
  • The error message is likely to be found in ~/.xsession-errors. – lgarzo Mar 21 '12 at 19:19
  • 1
    In case anyone didn't know, ctrl-alt-f4 should take you back to a non X window. ctrl-alt-F7 usually brings you back again. – thomas-peter Oct 15 '14 at 18:49

10 Answers 10

18

Try starting the terminal manually, e.g. from xterm and see what the output is.

Press Alt + F2 and then enter xterm to get an xterm.

There, simply type gnome-terminal to try to start the terminal.

| improve this answer | |
  • 1
    +1 I'm curious to see what the output of that would be, too. – Aaron Mar 22 '12 at 12:14
  • 3
    I had to pip uninstall gi since it was causing my error – Josh.F Dec 26 '16 at 22:47
10

I had a similar problem after editing the file /etc/default/locale.

The solution for me was changing the locale in /etc/default/locale back to the defaultc contents of that file to:

LANG="en_US.UTF-8"
LANGUAGE="en_US"

As described in this answer.

| improve this answer | |
  • It is usually better to give the answer here itself and just link to the answer. I recommend you edit your answer so that whoever sees this answer will immediately know what to do rather than having to go to another site. – Rumesh Mar 8 '16 at 12:54
  • Thank you, I solved my problem with this – sjlee Jun 8 at 7:34
4

I had set Python 3.6 as the default with

sudo update-alternatives --config python3.

I changed it back to 3.5 and just use the 3.6 Interpreter in PyCharm. It's back and works fine.

| improve this answer | |
  • And still does not solve my pb i did open virtuel terminal and did what u said but still does not solve the pb :( – DINA TAKLIT Feb 10 '19 at 2:51
  • Worked for me. Thank you – Layke Nov 3 '19 at 20:17
4

See if there is anything in your .bashrc file that shouldn't be there. That could make the terminal not work. It's a script that runs every time you launch the terminal, and when you log in with ssh a similar file may be executed on the remote machine.

There should be an unmodified default system version of .bashrc in /etc/skel/.bashrc that you can compare with the one in your home directory (~/.bashrc) to see what changes have been made, if any, to the local file.

| improve this answer | |
  • 1
    or maybe it's only an error on your gnome-terminal ... did you try 'xterm' – maniat1k Mar 21 '12 at 18:41
3

I found that I can go to any folder in the file browser, right click, then select open in terminal.

| improve this answer | |
2

Switch to a virtual terminal by pressing ctrl+alt+f1

Run this command

sudo dpkg --configure -a

to solve the problem.

| improve this answer | |
0

In my case this answer provided me the solution https://stackoverflow.com/a/36151686/1599129, basically:

The error is caused by installing gi package on python3. It is a package for GIST Github commandline for python2. It is not related to gnome object or gnome introspection. Visit it here: python gi on package index

It causes naming conflicts with gi.repository, rather than looking for gir in your python dist-packages, your system init the gi package. And hence the error shows

ImportError: No module named 'gi.repository'

Uninstalling that package will resolve the error.

to uninstall:

$> sudo pip(###) uninstall gi

where ### means all 3.x versions of pip you have in your system.

| improve this answer | |
0

In my case I could not open the terminal after I installed new languages and removed the default one. I founded out that I did not apply the changed to the system, after applying the changes, there was a button in the language settings gui, everything started working again.

cheers,

| improve this answer | |
0

So, if your terminal (gnome-terminal) comes up and then disappears you can try a few methods that have helped me in the past. Mind you, I am working from a Linux Mint AMD64 OS using Cinnamon. This should work with most Linux 64-bit distributions and GUI types.

Often times in the answers online for terminal failure questions are listed terminal commands, however, it's hard to use terminal commands with no terminal, right? You will need a shell/terminal-emu/CLI to run said commands so use your package manager (Synaptic, etc.) to download xterm/uxterm terminal emulators. You can also use your file manager (Nemo, Nautilus, etc. to do some of these fixes) and finally you can run some commands using Alt+F2.

Anyways. Do:

  1. The widely used approach available immediately on most Google searches is this: to remove ~/.gconf/apps/gnome-terminal. Here's how:

    cd ~/.gconf/apps
    sudo rm -r ./gnome-terminal
    reboot
    

    (or possibly, Alt+Ctrl+F1 and then log back in and do sudo apt-get update if you don't want to reboot)

  2. Another approach is to reinstall gnome-terminal and it's dependent gnome-terminal-data. Please read the commands being as you can't simply apt-get remove it most of the time.

    sudo apt-get remove --purge gnome-terminal gnome-terminal-data
    sudo apt-get update
    sudo apt-get install gnome-terminal 
    

    Using the often left out --purge command was the only thing that worked for me when I got the point of needing to do this. --purge additionally removes the configuration files together with the package. If you've tried to change those files and failed this will work.

    Note: Several package managers do not list gnome-terminal or will not work installing it after it's marked. I personally haven't had any luck in doing so.

  3. You can find the website of your distribution, find the gnome-terminal package listed there and manually download and install using your package-installer or by hand. (e.g. GDebi Package Installer and Aptitude Install). This method didn't work for me but after doing some research it can, depending on the reason your terminal is toasted. I find this method the most ineffective for most of the common reasons gnome-terminal auto-closes or simply never opens for because that package will often ask for dependencies you already have or don't exist (I don't know why).

  4. If you've recently changed your terminal preferences, attempted to change the background color or attempted to log history/script your terminal there is sometimes a final option. Inside your Terminal>Profile Preferences>Command un-check all the boxes and be sure the drop-down menu reads "Hold the terminal open". This worked for me, actually. My terminal was set to a profile that had a no-user-input-required command running, followed by an auto-exit terminal on the drop down preferences. (ex. ls, script, history, cd /, anything that doesn't require you to put something else in after it's run)

I hope this helps some of you guys who are having this problem! I am a self-taught Linux user and web designer who has slowly been learning the -nix OS and shell. I use this site and Stack Overflow often and I want to give back what I can! One love.

| improve this answer | |
0

You can try this as well. It worked for me when I was in your situation. I reset my desktop configuration to default settings.

https://www.omgubuntu.co.uk/2017/10/how-to-reset-ubuntu-desktop-to-default

| improve this answer | |

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.