cli-google: google search from terminal

Who wants to leave the comfort of the terminal and open a browser to search Google? ūüėČ We explored several ways to search google in our earlier articles (GoogleCL, Surfraw). How about some cool utilities that do not need much setup or learning? I revived one myself. Continue reading cli-google: google search from terminal

Goosh: Google shell for browsers

google_compHere’s a stylish way to flaunt your browser’s home page – Goosh. It’s an unofficial Google shell from where you access some of the Google services. There are several supported commands (with easy aliases) which you can use to fetch results. The results appear 4 at a time and you can fetch more if you want. The search result links open in a new browser tab.


  • Use Google search, blogs, news, feeds
  • Use the lucky option to get the first result
  • Search¬†Wikipedia or Amazon. Use the site¬†keyword (as in the regular Google search) to search a specific site.
  • Use Google search modifiers like double qoutes, define…
  • Mathematical calculations
  • Shows suggestions in case of typos
  • Open source


List of supported commands (at the time of writing):

command aliases parameters function
web (search,s,w) [keywords] google web search
ls [command] lists commands
wiki (wikipedia) [keywords] wikipedia search
site (in) <url> <keywords> search in a specific website
read (rss,r) <url> read feed of url
clear (c) clear the screen
amazon (am) [keywords] amazon search
settings (set) [name] [value] edit settings
feeds (feed,f) [keywords] google feed search
help (man,h,?) [command] displays help text
more (m) get more results
lucky (l) [keywords] go directly to first result
calculate (calc) [mathematical expression] evaluate a mathematical expression
go (g) <url> open url
open (o) <url> open url in new window
blogs (blog,b) [keywords] google blog search
news (n) [keywords] google news search
cd <command> change mode
addengine add goosh to firefox search box
load <extension_url> load an extension

– Enter green commands without parameters to change default mode.
– Anything that’s not a command will search in current default mode.
– Aliases will expand to commands. Numbers will expand to corresponding search results.
– Use cursor up and down for command history.
– Enter keyword and hit the tab-key for tab-completion.
– Commands marked with * are experimental, use them with care and please report any bugs.

Here’s an example custom search:> s "cli tools"

Fetch more results:> m

To add Goosh search to your browser, run:> addengine

Webpage: Goosh

Surfraw: web search from terminal

           ______  _     _  ______   _______  ______   _______  _  _  _
          / _____)(_)   (_)(_____ \ (_______)(_____ \ (_______)(_)(_)(_)
         ( (____   _     _  _____) ) _____    _____) ) _______  _  _  _
          \____ \ | |   | ||  __  / |  ___)  |  __  / |  ___  || || || |
          _____) )| |___| || |  \ \ | |      | |  \ \ | |   | || || || |
         (______/  \_____/ |_|   |_||_|      |_|   |_||_|   |_| \_____/

You might have heard the allegations about¬†search giants recording your data or tracking it. And you might have heard about Julian Assange. Would it be surprising to know that Assange wrote a cmdline perl based tool to search Google (and many other web services) at lightning speed… a tool sans the tracking? I guess not.

Such a tool exists, written in 2000. It’s Surfraw.

Each supported search engine or database (like Google, Wikipedia, Slashdot etc.) is called an elvi in Surflaw, apparently as a tribute to Elvis (Ref: Wikipedia).


  • Search tons of websites in addition to¬†Google. To get the full list
    $ surfraw -elvi
  • Supports bookmarks
  • Supports bash completion (elvi names, options, arguments) using <Tab>
  • Use Google Translate, images, news, mps, video etc.
  • Supports safe search filter
  • Works best with text-based browsers like links, lynx, w3m


To install Surfraw on Ubuntu, run:

$ sudo apt-get install surfraw surfraw-extra


The user-specific configuration file is ~/.surfraw.conf. The syntax is simple –¬†defyn is used for boolean configuration variables, def for all others. Example configuration:

def SURFRAW_text_browser      /usr/bin/lynx
defyn SURFRAW_graphical       yes
def SURFRAW_graphical_browser firefox
def SURFRAW_results           10
def SURFRAW_lang              uk


Surfraw has many options, many of them specific to the elvi (search service). If you do not want to type surfraw all the time, sue the alias sr.

  • The general syntax
    sr elviname [options] search terms..
  • Search Google with multiple terms and limit results to 100
    $ sr google -results=100 foo "bar baz" bam
  • Search Wikipedia
    $ sr wikipedia surfraw
  • Search a phrase
    $ sr austlii -method=phrase dog like
  • Get a rhyming word
    $ surfraw rhyme Julian
  • Search a RFC about mime
    $ sr rfc s/mime
  • Translate a word
    $ sr translate logiciel

Webpage: Surfraw (with love, from Julian Assange)

Convert WEBP images from Google Play to JPG

image_editor_compWEBP file or Google Image file is the format in which Google stores images on Google Play. It is a relatively new format developed by Google after purchase of On2 technologies. Many applications do not recognize it yet. Though with Firefox on Linux you can save them directly as PNG, Google Chrome users can only save them as webp files on the disk. Here’s a way to convert and download webp files as jpg files:

  • Head on to online convert website for conversion to JPG. You can choose any other format if you wish.
  • Enter the URL of the image.
  • Set your preferences like image quality etc.
  • Press the Convert file button.
  • Download the image.

Simple, isn’t it?

GoogleCL: Google services from cmdline

google_compGoogleCL is a handy way to access many of Google services from the terminal that console addicts are going to love. The currently supported services (with example usage) are:

  • Blogger
    $ google blogger post --title "foo" "cmdline posting"
  • Calendar
    $ google calendar add "Lunch with Jim at noon tomorrow"
  • Contacts
    $ google contacts list Bob --fields name,email > the_bobs.csv
  • Docs
    $ google docs edit "Shopping list"
  • Finance
    $ google finance create-txn "Savings Portfolio" NASDAQ:GOOG Buy
  • Picasa
    $ google picasa create "Cat Photos" ~/photos/cats/*.jpg
  • Youtube
    $ google youtube post --category Education killer_robots.avi

The developers provide a manual and example scripts with more common examples of how to use the utility. Packages are available for Debian based Linux platforms and Windows. Find the instructions to install from source code here.

Webpage: GoogleCL

Google Calendar client for Ubuntu

I was looking for a simple way to integrate my Google Calendar to my desktop. I keep forgetting things and it would help me a lot in quickly adding tasks in Google Calendar and get an SMS 10/15 minutes before the time I have set. But I couldn’t find anything other than bulky solutions like Sunbird, Evolution integration, Rainlendar etc. A few minutes back I found Fogger, a great app which turns any website to a desktop app on Ubuntu. I tried the apps I created for my Gmail and Google Calendar and to say the least I am hugely impressed! God bless the developers; you have saved me a lot of daily pain.

If you are a heavy Google Calendar user, there are many ways to integrate it with your Ubuntu desktop.

I would love to see some settings added for user-level customization like changing fonts. The fonts look different from that in Firefox. Right now it can be done using CSS which is not possible for all users.


  • The¬†best solution now is the quick in-built app creation support that come with Google Chrome. Check here.
  • calendar-Indicator is a handy brand new app with a lot of regular functionality that makes the job pretty easy. It’s a much better alternative to the above and tiny as well. To install on Ubuntu:
    $ sudo add-apt-repository ppa:atareao/atareao
    $ sudo apt-get update
    $ sudo apt-get install calendar-indicator
  • Unity Web Apps
    Comes integrated with the Unity desktop on Ubuntu.
  • gcalcli is another option to use Google Calendar from the cmdline.

Quick Tip

You can just bookmark the Google Calendar mobile page and check your agenda quickly. For fast results you must be logged in to Google.

Gmail SMS send error [feature removed]

gmail_compNOTE: This feature is now removed from Gmail.

If you are wondering what the following error means when you are trying to send an SMS to a friend in India from Google, the reason is not related to google.

Your message was not delivered. The mobile user is not accepting SMS messages.

The reason is the intended recipient has¬†DND¬†(Do Not Disturb) activated for the number. I guess it might get fixed by enabling only category 6.¬†Communication OR Broadcasting… as listed in the website. Please leave a comment if anyone has tried it successfully.

Google the latest information & other tips

google_compHere’s a small tip to optimize your Google searches by reducing the duration to search in case you haven’t noticed it yet (searching Google news is always there but I am speaking of any latest info on the web):

If you are looking for the latest information/news on some topic, for example Baseball, search Baseball in Google and in the search results page click on Show search tools on the left column and then select your preferred timeline. There are many other options below the time section to customize your results further.

Some nice tips:

  1. Instead of using site: for site specific search, you can simply use at.
  2. define is no longer required to find meanings of words.
  3. You can use AROUND(n), where n is numeric to search two terms separated by n words.
  4. Get results having synonymous words using ~ e.g. – ~good books.
  5. Middle-click on Google search result links to open them in new background tabs. This holds for any link. Tested on Firefox and Google Chrome.

View full resolution photos in Picasa (web)

google_compTime and again you see images in Picasa Explore section which are fascinating. But all you can do is try something like View Image in Firefox and see a smaller resolution of the image. Well, there is still a way to view the images in full resolution using Firefox. Try this:

  1. Click on the image in Explore section to open it in My Photos tab.
  2. Check the Photo information section for the horizontal resolution of the image. Let’s assume it is 3600.
  3. Click on Full screen to the top left of the image to open the image in slideshow viewer.
  4. Right click on the image in slideshow viewer and select View Image to view only the image in a tab.
  5. In the address bar you will find a path token just before the image name starting with s, like s1024 (e.g. – This is the horizontal resolution of the smaller image being shown in the slideshow viewer. Replace the resolution after s with the original resolution from step 2, for example, s3600 and refresh. You can view the image in original resolution now.

In a few cases the image does not load when you try the original horizontal resolution, specially when the resolution is uncommon, like 3651. In that case try a resolution like 2048; the in-built viewer resizes the image and renders it on the page.