Ubuntu – Cannot open gnome-terminal from Unity launcher or from side panel shortcut

command linegnome-terminallauncherunity

I've installed Ubuntu 16.04 and everything seems to work fine, except that I cannot start gnome-terminal from Unity launcher or from a shortcut locked to the side panel.

However, gnome-terminal starts fine from Xterm or from right-click>Open Terminal. I can also run gnome-terminal by Alt-F2.

So, this seems to be a problem with Unity?

When pressing on gnome-terminal from Unity launcher or from a shortcut, the gnome-terminal icon just pulsates a bit, after which the shell terminates. I never see the shell itself, just its icon on the sidebar.

Searching for Terminal in Unity launcher, it finds gnome-terminal, but its name is "nlykkei@nlykkei-Ubuntu:~" and not the usual "Terminal".

Also, gnome-terminal doesn't show colors anymore, like green for an executable, etc.

Can someone guide me on how to restore my Unity Terminal? I've already spent 2-3 hours on Google, attempting to solve the problem by configuring locale settings.

Best Answer

Although we only can guess what has happened, two things seem not in order:

  1. The fact that in Dash, you get nlykkei@nlykkei-Ubuntu:~, when looking for the terminal, confirms the fact that you must have a local (error-some) copy of the gnome-terminal.desktop -file. This also explains why it does run from cli in xterm; the .desktop file is surpassed then.
  2. The fact that you lost colors in the terminal points to the fact that there is something wrong in your ~/.bashrc -file.

To solve

  1. Remove any local copy of a .desktop file, calling gnome-terminal (to be found in ~/.local/share/applications). The Unity Launcher and Dash will then use the global one again.

  2. Restore the original ~/.bashrc file by running the command:

     cp /etc/skel/.bashrc ~/
    

Subsequently log out and back in, and it should be fixed.