Google drive folder linux

Mount Google Drive in Linux?

Now that Google Drive is available, how do we mount it to a Linux filesystem? Similar solutions exist for Amazon S3 and Rackspace Cloud Files.

12 Answers 12

Grive or inSync is a file sync tool which syncs up a local file system and remote Google Drive. You cannot «mount» Google Drive using these tools.

For mounting, use google-drive-ocamlfuse, FUSE-based filesystem for Google Drive.

Installation instructions, and more details about configuration, and authorization are at the Installation of FUSE filesystem over Google Drive wiki page (on GitHub).

The project’s GitHub homepage also has the readme file that is for the google-drive-ocamlfuse source code.

Here are distro-specific instructions to mount Google Drive with google-drive-ocamlfuse.

Welcome to Stack Exchange! This looks like a great tool. One caveat seems to be that it requires a web browser to authenticate with oauth2. You may want to edit your answer to indicate as such.

Yes, but there is a workaround to get authorization on a headless host (github.com/astrada/google-drive-ocamlfuse/wiki/…). You will still need a browser, but it does not have to be on the same machine.

Does OCamlFuse support mounting ONLY certain directories? The Docs has not mentioned such a feature. But I think it’s absolutely necessary. My whole Google Drive will be pretty big, and I don’t need all the directories really.

@aderchox from what I understand, it is mounted as remote storage, much like a samba share. It is not synced on the local system. Files in drive stay in drive. any this you want to move to drive needs to be moved to mounted network drive. So you are not affected how many folders your drive has.

An open source client for Google Drive exists: Grive.

For now, the application is considered experimental and it lacks full sync, but it can upload and download new or changed files already (so you can access your files offline). What it can’t do yet is: wait for changes and automatically sync the files or delete files (when a file is deleted locally, it’s ignored and when it’s deleted remotely, it’s reuploaded if it exists locally).

Sources and binaries are available on Github. A third party, webupd8, has provided a PPA for Ubuntu.

According to the docs, grive seems not to be able to access Google Docs, but for that the other answer could help: . Am I right that they complement each other?

Isn’t that curious that grive tries to mimick the «syncing» behaviour of a Gogle Drive client, rather then following the traditional Unix approach of mounting a filesystem? For me, it would seem more convenient to decide which file on the remote FS I want to open, and only then the transfer would happen. What if I don’t want to sync every file? Of course, syncing rather then mounting can make sense inside an implementation of a distributed FS, rather then centralized remote FS — look at git-annex as a possible implementaton of a distributed FS. Mounting then could be made on top of sync.

Читайте также:  Linux putty копировать файл

rclone

rclone is an option that you can get through your package manager without adding a PPA.

It is a command-line tool for working with various cloud storage services including Google Drive, Amazon S3, Dropbox, Box. and it can be used to mount your Google Drive as a virtual file system:

sudo apt install rclone rclone config # See config process below mkdir ~/drive rclone mount $NAME_OF_RCLONE_REMOTE: ~/drive/ 

Configuring rclone

  1. Enter n for «New remote»
  2. Enter any arbitrary name for your remote, referenced in the steps above as $NAME_OF_RCLONE_REMOTE
  3. The program prints a list of cloud services. Find «Google Drive» and enter the number for it
  4. The program prompts you for a few more pieces of information
  5. You’ll perform an Oauth authentication
  6. Enter q to finish

Oh wow, looks like rclone has had this feature since 2015. It’s one of my favorite tools and I didn’t even realize this! Here is the relevant manual page: rclone.org/commands/rclone_mount

There is an SDK available, so someone will probably make a linux solution soon. There is also a drive on Google+ going on right now to get Google to add a Linux client, in addition to the Windows, Mac, and Android clients (not to mention their plans for an iOS client.)

Then they will be on par with Dropbox 🙂 (with a bit more extra free space by default)

Yeah, they announced it’s on it’s way. But still no Linux client. I was hoping for an implementation by the open community with FUSE or something.

First you need to add the packages provided by Luca and available in his PPA (Ubuntu 11.10 only at present):

sudo add-apt-repository ppa:invernizzi/google-docs-fs sudo apt-get update && sudo apt-get install google-docs-fs 

Once everything that’s needed has been installed log out and back in.

  1. Open Nautilus Create a new folder in your Home folder titled Drive
  2. Open a Terminal and run: gmount Drive username@gmail.com
  3. Input your password
  4. Your Google Drive is now mounted in the Drive folder

It seems it’s only for Google Docs. The docs are just a part of Google Drive; am I right? But then there’s grive from the other answer to access everything but the docs.

On Ubuntu 12.04 (ARM, not the usual i386) I could wget and install with dpkg —install the «gdrive» package form there — after apt-get install python-gdata python-fuse .

Читайте также:  Create admin user on linux

To download the deb and install after the apt-get install python-gdata python-fuse is still working. it didn’t prompt on wrong password.

Insync is a Linux client for Google Drive with the following features:

  • multiple Google accounts support
  • offline Google docs editing
  • right-click share in the context menu
  • recent changes notifications
  • external hard drive support
  • support for the most popular distributions (Ubuntu, Linux Mint, Debian, Fedora, openSUSE)
  • support for the most popuar desktop environments (Unity, MATE, GNOME Shell, Cinnamon, KDE 4, Xfce)
  • support for multiple file managers (Nautilus, Caja, Nemo, Dolphin, Thunar)

Disclaimer: I’m one of the developers of Insync.

I’ve just discovered insync. I don’t know how good it is; it seems to be closed source.

PD (2018/12/28): After several years using insync I can strongly recommend it as a Linux desktop synchronizer for Google Drive. Check this post for more feature details.

An alternative approach is to use an online service to access Google Drive using WebDAV (e.g. using http://synqya.appspot.com) so there is no need for a client installation or other add-ons.

While it is not a filesystem mount via the Linux kernel, 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 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 KAaccounts 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.

Google drive can be mounted with GNOME online accounts. Under settings -> User accounts you can login with your google credentials and get you google drive mounted easily.

Insync is actually the best client for Google Driver around

It’s full featured, and free during the beta phase.

I followed the instructions here:

and got it to work successfully on Fedora 16.

This builds google-drive-ocamlfuse, which is then used to access google drive.

This is your opinion, without supplying any facts as to why «it did not work for you» not really answer and a poor comment too.

You must log in to answer this question.

Linked

Hot Network Questions

Subscribe to RSS

To subscribe to this RSS feed, copy and paste this URL into your RSS reader.

Site design / logo © 2023 Stack Exchange Inc; user contributions licensed under CC BY-SA . rev 2023.7.17.43535

Linux is a registered trademark of Linus Torvalds. UNIX is a registered trademark of The Open Group.
This site is not affiliated with Linus Torvalds or The Open Group in any way.

Читайте также:  Linux установка драйверов от windows

By clicking “Accept all cookies”, you agree Stack Exchange can store cookies on your device and disclose information in accordance with our Cookie Policy.

Источник

Google Drive папка для Linux

Существуют различные дистрибутивы Linux. В Xubuntu используется среда рабочего стола Xfce с файловым менеджером thunar (фунар). Целью данного туториала является описание способа подключения Google Диска к фунару. Этот же способ с небольшими доработкими может быть использован и для подключения Google Диск папки у серверного дистрибутива вроде Ubuntu server.

А вот для очень популярной Ubuntu используется среда рабочего стола Gnome с файловым менеджером GNOME Files, куда еще в 2015 году интегрировали возможность использовать свой Google Диск непосредственно из приложения GNOME Files. Так что кто хочет всё и сразу, ставьте Ubuntu (лично у меня комп не тянет) и не читайте дальше.

Перейдем к созданию Google Drive папки

sudo add-apt-repository ppa:alessandro-strada/ppa sudo apt update sudo apt install google-drive-ocamlfuse

2) Создаем директорию, куда будем монтировать. Пусть директория называется gd и лежит в каталоге пользователя (символ тильда ~ означает домашний каталог текущего пользователя).

Назначим права доступа на директорию

3) Теперь необходимо из-под пользователя (не sudo) выполнить команду

Вы будете перенаправлены в браузер для авторизации (вариант без браузера тут). По ее завершении Google у вас спросит разрешить управлять вашим диском – подтверждаем.

Кажется готово: можно перейти в директорию ~/gd и увидеть там свои файлы из облака.

После перезапуска системы ваша папка на компьютере окажется пуста, потому что не настроено автоматическое монтирование.

4) Настроим автоматическое монтирование с помозью systemd. Необходимо создать файл с именем, пусть google-drive.service по адресу /etc/systemd/system/ Сделать это можно разными способами, я предпочитаю через редактор nano. То есть мы открываем в nano файл на редактирование и через ctrl+c ctrl+v наполняем его. Хотя делать то же можно и через cat, тогда содержимое файла возможно передать не через буфер обмена, а прямо указать в терминале, очень удобно для скриптов. Далее я покажу и этото способ, а пока (создадим и) откроем файл через nano.

sudo nano /etc/systemd/system/google-drive.service

[Unit] Description=FUSE filesystem over Google Drive After=network.target [Service] User=a Group=a ExecStart=google-drive-ocamlfuse -label default ~/gd ExecStop=fusermount -u ~/gd Restart=always Type=forking [Install] WantedBy=multi-user.target
cat /etc/systemd/system/google-drive.service [Unit] Description=FUSE filesystem over Google Drive After=network.target [Service] User=a Group=a ExecStart=google-drive-ocamlfuse -label default ~/gd ExecStop=fusermount -u ~/gd Restart=always Type=forking [Install] WantedBy=multi-user.target EOF

5) Финальный аккорд — вызываем

sudo systemctl daemon-reload sudo systemctl start google-drive

Теперь на компьютере будет папка Google Диска и при включении она будет автомонтироваться. Кстати ocamlfuse поддерживает возможность использования нескольких аккаунтов.

Дополнительные материалы

Аналогичный туториал другими словами тут.

Еще один способ подключения Google Drive в Xubuntu.

Туториал как подключить Google Диск через fstab

Источник

Оцените статью
Adblock
detector