| | |

How to synchronize Google Drive and Google Docs files in Ubuntu/Debian/Mint Linux using Insync

Google Drive is a nice cloud storage service. It provides a suite of nice online document spreadsheet and slide editors Google Docs, Google Sheets and Google Slides. The collaborative editing and full history tracking features of Google Docs are excellent. Google Drive gives 16GB free storage which is pretty much larger compared to other free cloud storage plans. However, there has never been an official client released for Linux. The best Google Drive client which I find recently that works smoothly and nicely is a software product Insync. We will check how to install and use it in Ubuntu/Debian/Mint Linux in this post.

There are other choices for syncing Google Drive files, such as Gnome Online Accounts. Insync has its unique features available that are useful. Unlike Gnome Online Accounts, Insync files are visible and available in the local file system following the directory structure and file names in Google Drive instead of some “virtual” file systems only available to Nautilus, and Insync does not require accesses to all permissions of the Google account and only limits the access to the Google Drive.

The one most important feature of Insync is that it can download a copy of the converted Office or OpenDocument files for the Google Docs/Sheets/Slides files no matter whether it is created by the account owner or shared to the account owner, and local modifications are sync’ed to the Google Drive automatically. This is a powerful feature, that enables making backup of the files in the Google Docs/Sheets/Slides created by one or shared from others, which is very unique to Insync as so far I find.

Overall, its functions deserve the one time $29.9 fee ($5 discount using this link: Insync) to me and the 15-day free trial can be used to evaluate whether the features are really useful.

Now, let’s look at how to set it up in Ubuntu 18.04.

Register an Insync account

Click Insync ($5 discount from this link).

Click the “Try free for 15 days” and login using your Google Account. After this, you Google account should be ready to use Insync.

Set up the apt repository for Insync

First, add the public GPG key to allow apt to authenticate the Insync repository.

sudo apt-key adv --keyserver keyserver.ubuntu.com --recv-keys ACCAF35C \
|| sudo apt-key adv --keyserver hkp://keyserver.ubuntu.com:80 --recv-keys ACCAF35C

Then, add the Insync repository to install the software.

Create a file `/etc/apt/sources.list.d/insync.list` with the following content

deb http://apt.insync.io/[DISTRIBUTION] [CODENAME] non-free contrib

Replace `[DISTRIBUTION]` with your Linux distro (ubuntu, debian or mint) and `[CODENAME]` with your Linux distro codename (you can get a list of Ubuntu’s codenames from this page).

For Ubuntu 18.04:

echo "deb http://apt.insync.io/ubuntu bionic non-free contrib" \
| sudo tee /etc/apt/sources.list.d/insync.list

For Ubuntu 16.04:

echo "deb http://apt.insync.io/ubuntu xenial non-free contrib" \
| sudo tee /etc/apt/sources.list.d/insync.list

For Ubuntu 14.04:

echo "deb http://apt.insync.io/ubuntu trusty non-free contrib" \
| sudo tee /etc/apt/sources.list.d/insync.list

Update the apt cache

Update the apt caches

sudo apt update

Install Insync

Now install the Insync software package

sudo apt install insync

If everything goes well, you will see output as follows.

$ sudo apt install insync
Reading package lists... Done
Building dependency tree       
Reading state information... Done
The following NEW packages will be installed:
  insync
0 upgraded, 1 newly installed, 0 to remove and 184 not upgraded.
Need to get 139 MB of archives.
After this operation, 370 MB of additional disk space will be used.
Get:1 http://apt.insync.io/ubuntu bionic/non-free amd64 insync amd64 3.0.27.40677-bionic [139 MB]
Fetched 139 MB in 58s (2,404 kB/s)                                                                                                          
Selecting previously unselected package insync.
(Reading database ... 392226 files and directories currently installed.)
Preparing to unpack .../insync_3.0.27.40677-bionic_amd64.deb ...
Unpacking insync (3.0.27.40677-bionic) ...
Setting up insync (3.0.27.40677-bionic) ...
Insync installation has finished. You may now start it.

fs.inotify.max_user_watches = 1048576
Processing triggers for shared-mime-info (1.9-2) ...
Processing triggers for gnome-menus (3.13.3-11ubuntu1.1) ...
Processing triggers for hicolor-icon-theme (0.17-2) ...
Processing triggers for mime-support (3.60ubuntu1) ...
Processing triggers for desktop-file-utils (0.23-1ubuntu3.18.04.2) ...
Processing triggers for man-db (2.8.3-2ubuntu0.1) ...

If you use Nautilus, install the integration tool so that the file and directory status can be shown in Nautilus and there are links in the context short cut menu to Google Drive and Google Docs (very useful feature if you would like to edit a document online)

sudo apt install insync-nautilus

If you are using another file manager, you may check whether Insync has plugins for your tool. So far, those listed are

insync-caja/unknown,unknown 3.0.11.40167 all
  Sync all your Google Drive & OneDrive accounts to your local filesystem

insync-dolphin/unknown,unknown 3.0.22.40446 all
  Sync all your Google Drive & OneDrive accounts to your local filesystem

insync-nautilus/unknown,unknown 3.0.23.40579 all
  Sync all your Google Drive & OneDrive accounts to your local filesystem

insync-nemo/unknown,unknown 3.0.11.40167 all
  Sync all your Google Drive & OneDrive accounts to your local filesystem

insync-thunar/unknown,unknown 3.0.23.40579 all
  Sync all your Google Drive & OneDrive accounts to your local filesystem

After Insync starts, following its GUI instructions to login your Google account(s) and authorize the accesses to your Google Drive and it will start to sync files.

If you would like Insync to convert the documents files, set the options in the “Account Settings” tools as shown in the images shown in the earlier part of this post for that Google Account (per Google Account settings) and Insync will automatically convert the document files.

Similar Posts

  • Git diff with long lines

    I find git diff output is not easy to read when the text file contains long lines that is long enough to exceeds the screen size. We may not forbid the using the long lines for all files. How to handle lone lines in git diff better? Two possible methods to make git diff with…

  • Micosoft招聘部分算法题

    Micosoft招聘部分算法题 1.链表和数组的区别在哪里? 2.编写实现链表排序的一种算法。说明为什么你会选择用这样的方法? 3.编写实现数组排序的一种算法。说明为什么你会选择用这样的方法? 4.请编写能直接实现strstr()函数功能的代码。 5.编写反转字符串的程序,要求优化速度、优化空间。 6.在链表里如何发现循环链接? 7.给出洗牌的一个算法,并将洗好的牌存储在一个整形数组里。 8.写一个函数,检查字符是否是整数,如果是,返回其整数值。(或者:怎样只用4行代码编写出一个从字符串到长整形的函数?) 9.给出一个函数来输出一个字符串的所有排列。 10.请编写实现malloc()内存分配函数功能一样的代码。 11.给出一个函数来复制两个字符串A和B。字符串A的后几个字节和字符串B的前几个字节重叠。 12.怎样编写一个程序,把一个有序整数数组放到二叉树中? 13.怎样从顶部开始逐层打印二叉树结点数据?请编程。 14.怎样把一个链表掉个顺序(也就是反序,注意链表的边界条件并考虑空链表)? 来源:·日月光华 bbs.fudan.edu.cn Read more: The C Programming Style that I Follow fclose – Close a Stream Hashing Library for C Cheatsheet: Git Branching with a Git Server Creating a Child Process using posix_spawn in C in Linux How to Statically…

  • How to configure iptables on Linux Mint 17.1?

    How to configure iptables and make the configuration persistent across system restarting on Linux Mint 17.1? You can use the ‘iptables-persistent’ tool. To install iptables-persistency pachage: sudo aptitude install iptables-persistent The you can manipulate the iptables by the ‘iptables’ command. To save the current iptables rules: sudo /etc/init.d/iptables-persistent store It will store the rules for…

  • How to allow non-root users on Linux to mount and unmount disks?

    On a Linux box, we may allow non-root users mount and umount certain disks, such as /dev/sde1. How to allow non-root users on Linux to mount and unmount disks? Please check the tutorial at Controlling Filesystem Mounting on Linux by Playing with /etc/fstab: Allow non-root users to mount and unmount filesystems. Read more: How do…

  • | |

    Making Thunderbird Not Wrap Long Lines Automatically

    Thunderbird automatically wraps lines by 72 characters by default. But wrapping in 72 characters may not look well on all clients. We may want Thunderbird not to wrap lines and let the receiver’s email client to choose the length to wrap lines. This post introduces how to make Thunderbird not wrap lines automatically. First, open…

Leave a Reply

Your email address will not be published. Required fields are marked *