Ubuntu / Linux news and application reviews.

Unity Google Docs Launcher

A Reddit user has created a custom Unity launcher that lets you upload documents to Google Docs using drag and drop and once the file is uploaded successfully, it opens the document in your default browser.

The script was then improved by another Reddit user and I've combined everything and slightly modified it so it works with any browser (initially it was using Chromium "apps" and you can still use that if you want by editing the file) so it's easier to install.

  • drag and drop upload to Google Docs
  • automatically opens uploaded files in a new browser tab
  • clicking the icon (without uploading a new file) opens Google Docs
  • you can right click it to create a new Google Docs presentation, document or spreadsheet.

There's one limitation though: you can only upload one file at a time (which is OK actually since each upload opens a new browser tab so if you upload a lot of files at once it gets confusing).

Here's how to set up this Unity launcher Google Docs uploader.

Install GoogleCL

To use this, you must install and set up GoogleCL. To install it, open a terminal and type:
sudo apt-get install googlecl

Now you must authorize GoogleCL with your Google Docs account so open a terminal and paste this:
google docs upload

When it asks "Please specify src:", simply press ENTER. A browser window will open (if not, copy the URL displayed in the terminal into a browser) - here, click the "Grant Access" button and some code will be displayed. Copy this code in the terminal, press ENTER and that's it.

Set up the script

If you want to manually install everything, download it from HERE - have a look at the code (it's really small), manually install it or do whatever you want with it. Or copy/paste the commands below for an easier setup:
sudo apt-get install zenity
cd Downloads/
wget http://webupd8.googlecode.com/files/gdocs-unity.tar.gz
tar -xvf gdocs-unity.tar.gz
mv gdocs-unity/gdocs.desktop ~/.local/share/applications
mv gdocs-unity/docs-128.png ~/.icons/
chmod +x ~/Downloads/gdocs-unity/docsHelper
sed -i "s/Exec=\/path\/to\/docsHelper/Exec\=\/home\/$USER\/Downloads\/gdocs-unity\/docsHelper/" ~/.local/share/applications/gdocs.desktop
rm gdocs-unity.tar.gz

Make sure you don't miss any steps, all are important.

Then open Nautilus, navigate to ~/.local/share/applications (.local is a hidden folder so press CTRL + H to see it), then drag and drop the "gdocs.desktop" file onto the Unity launcher.

DO NOT delete the "gdocs-unity" folder because that's where the script is located. If you want to move it, you'll have to edit the ~/.local/share/applications/gdocs.desktop file and enter the new path.

Remove Unity Google Docs Uploader

If you want to remove the Google Docs Unity uploader and all its files, copy/paste the following commands in a terminal:
rm -r ~/Downloads/gdocs-unity
rm ~/.icons/docs-128.png
rm ~/.local/share/applications/gdocs.desktop

Also see:

Credits for the Google Docs Unity launcher: tjlejeune and BooooooooB @ Reddit.