While this is not a filesystem mount via the Linux kernel (such as I just described in a previous blog post), KIO GDrive (part of KDE) enables KIO-aware applications (such as the Dolphin file manager, Kate editor, or Gwenview image viewer) to access, navigate, and edit Google Drive files.
kio-gdrive is available as a package in several Linux distributions. If installed, the Dolphin file manager will get an entry “Google Drive” under “Network”. There, an unprivileged desktop user can ‘mount’ a GoogleDrive account via a guided graphical configuration (during which the default browser will be opened where one needs to give KDE KAccounts permission to access the GoogleDrive account).
This method doesn’t provide access to GoogleDrive via a terminal, but it integrates it nicely with a graphical desktop. But the best part is that you don’t have to be root/superuser in order to do this, nor do you have to use the command line or write configuration files!
The following screenshots will walk you through the entire process!
kio-gdrive (on Debian:
apt install kio-gdrive). After installation, Dolphin file manager immediately should get an entry called “Google Drive” under “Network” (see also featured image of this blog post).
Click on “New account” under “Google Drive”. A dialog window opens:
Click on “+ Create” and then on “Google”. It now will ask you to allow access to your Google Drive. A small web frame should open.
Enter your Google credentials and proceed until you are asked to give access to KDE KAccounts Provider.
Once you give permission, you will see:
You will get back to the former dialog:
Exit this dialog and you will already be able to browse your files!
This was surprisingly simple thanks to the excellent google-drive-ocamlfuse project!
For Debian 10 “Buster”, the steps are as follows:
apt install opam
apt install libcurl4-gnutls-dev libfuse-dev libgmp-dev libsqlite3-dev m4 zlib1g-dev # dependencies for google-drive-ocamlfuse
Then, as unprivileged user, you can install
eval `opam config env` # set needed environment variables
opam install depext
opam depext google-drive-ocamlfuse
opam install google-drive-ocamlfuse
This compiles a native binary ~/.opam/system/bin/google-drive-ocamlfuse .
The first time, simply run this binary without arguments:
This will start your default browser where you have to authorize gdfuse to access your Google Drive.
Then, mounting your actual Google Drive is as simple as running
ls -l ~/path/to/where/to/mount
Voila! Problem solved in 10 minutes!