Ubuntu – Googling query from anywhere

command linegooglesearch

At times when I am working on my terminal I run into some errors. To resolve these I have to manually paste the error message to google and search for a solution.

Is it possible to select the message and right click to get a "Google it" option rather than having to manually paste and search?

I am not asking about performing a Google search from the terminal or browsing the web from the terminal. What I want is something more general. I want to be able to select a piece of text and get a "Google selected text" with a right-click (or with a keyboard shortcut). I would prefer the search to take place in a browser.

Best Answer

Luckily for you, tualatrix did a small hack on gnome-terminal and added support to search on Google upon right clicking a message.

You need to add a third-party PPA for it to work though. Run these commands in a terminal:

sudo add-apt-repository ppa:tualatrix/personal
sudo apt-get update
sudo apt-get install gnome-terminal

Once updated, close all terminal windows and reopen again. It will work as intended.

gnome-terminal with Google support hack