- compizomania
- Страницы
- 13 января 2019
- Установить Google Drive в Ubuntu/Linux Mint и производные
- How to Use Google Drive on Ubuntu Linux
- 1) Ubuntu GNOME built-in Method
- Step 1. Installing GNOME Online Accounts feature
- Step 2. Launching GNOME Online Accounts Feature
- 2) Using google drive ocamlfuse
- Features
- Installing Google Drive Ocamlfuse on Ubuntu 18.04
- 3) Insync
- 4) Rclone
- Installation
- Configuring Rclone
compizomania
Азбука в Linux для начинающих и не только. Я знаю только то, что ничего не знаю, но другие не знают и этого. Сократ
Страницы
13 января 2019
Установить Google Drive в Ubuntu/Linux Mint и производные
Google Drive или Google Диск — это файловый хостинг, созданный и поддерживаемый компанией Google. Его функции включают хранение файлов в Интернете, общий доступ к ним и совместное редактирование. В состав Google Диска входят: Google Документы, Таблицы и Презентации — набор офисных приложений для совместной работы над текстовыми документами, электронными таблицами, презентациями, чертежами, веб-формами и другими файлами. Общедоступные документы на Диске индексируются поисковыми системами.
Бесплатный объём хранения файлов на Google Drive равен 15 ГБ.
Компания Google не выпускает официальный клиент Google Drive для операционных систем Linux, но существует несколько неофициальных клиентов, с помощью которых вы можете подключить Google Диск в вашу операционную систему и пользоваться ими.
Одним из таких клиентов является google-drive-ocamlfuse, который позволяет монтировать Google Drive в Linux.
Он предоставит пользователю полный доступ для чтения/записи обычных файлов и папок, просмотр таблиц и презентаций, поддержку нескольких аккаунтов, доступ к корзине и другие полезные функции.
Установка Google Drive в Ubuntu/Linux Mint и производные
Для установки клиента Google Drive, откройте терминал (Ctrl+Alt+T), скопируйте и выполните следующие команды
sudo add-apt-repository ppa:alessandro-strada/ppa
sudo apt update
sudo apt install google-drive-ocamlfuse
После установки, вам понадобится создать директорию/папку /google-диск в Домашней папке.
Для этого скопируйте и выполните в терминале следующую комнду:
И смонтировать диск:
Откроется ваш браузер по умолчанию, в котором нужно ввести свои данные аккаунта Google, и разрешить доступ к диску.
После чего вы увидите вот такое окно:
Теперь вы можете пользоваться вашим облачным хранилищем из файлового менеджера:
К сожалению, Google Drive не монтируется автоматически после нового входа в систему и в файловом менеджере вы найдёте пустую папку /doogle-диск.
Для монтирования/подключения Google Drive после нового входа в систему необходимо выполнить в терминале следующую команду:
Монтировать диск каждый раз таким образом неудобно, да и вся синхронизация по сути теряет смысл. Нужно сделать так, что бы наш google-диск монтировался автоматически при каждом входе в систему. Для этого в автозапускаемые приложения, в поле «Команда», нужно ввести следующее значение: google-drive-ocamlfuse /home/имя пользователя/google-диск, а в поле Имя можно ввести любое — Google Drive или Google Диск, не имеет значения, главное чтобы вам было понятно, что вы ввели в Автозагрузку.
Примечание. Если вы не знаете как правильно прописать полный путь /home/имя пользователя/google-диск, то откройте файловый менеджер и подведите курсор в левой колонке к строке google-диск, после чего откроется всплывающее извещение с полным адресом:
В папке google-диск по умолчанию присутствует скрытая папка .Trash (Корзина). Войдите в папку google-диск и нажмите на клавиатуре Ctrl+H. Либо правый клик на свободном пространстве и контекстном меню активируйте Скрытые файлы:
Источник
How to Use Google Drive on Ubuntu Linux
Its now 2020 and we are still waiting for official google drive client from google, but we have few clients that work flawlessly.
In this tutorial, we’ll focus on how to use Google Drive on Ubuntu 18.04. Ready? Let’s dive in and see how this can be seamlessly achieved.
1) Ubuntu GNOME built-in Method
Step 1. Installing GNOME Online Accounts feature
To start off, log in to your system as the root user or as a regular user with root privileges. Next, run the command below to install the Google Online Accounts feature.
Step 2. Launching GNOME Online Accounts Feature
Once successfully installed, start GNOME Online Accounts by running
This will launch the Online Accounts Window as shown. Thereafter, click on ‘Google‘
This will prompt you for your email address. Type it in and hit Enter.
Next, provide your Account’s password as shown and click on ‘Next‘ or hit Enter.
The next Window, will display the all the features from your Account that GNOME wants to access.
Scroll to the bottom and Click on ‘Allow’
By default, all the features as shown below will be synched. You can choose either to turn the Sync functionality OFF or ON. For best practice, leave the default settings as they are.
Great! We are all set! You can access your Google Drive folder using Nautilus File Manager commonly known as Files.
The drive folder can also be accessed by double-clicking on the mounted partition located on your GNOME’s desktop as shown below.
It is important to note that when using the GNOME Online Accounts feature, Drives files will not be stored locally.
2) Using google drive ocamlfuse
Ocamlfuse is a FUSE-based file system backed by Google Drive. It is written in OCaml and lets you mount your Drive folder on your Linux System and gives you access to your files and folders, either via command line or GUI file manager.
Features
Below is a summary of some of the ocamlfuse features
- Provides support for multiple accounts
- Provides support for Symbolic links
- Can handle duplicate files
- Grants access to the trash directory
- Maintains UNIX permissions and ownership
- Handles read-only access to Google Docs — Sheets, Slides
- Provides full read/write access to ordinary files and folders
Installing Google Drive Ocamlfuse on Ubuntu 18.04
To install the Ocamlfuse run the following commands in that order
Once successfully installed, authorize google-drive-ocamlfuse client with your desired Google account using the following command.
This is going to pop open a page on your browser where will request you to choose a Gmail account to continue with the setup
Next, Gdfuse will request access to your account.
Click on the ‘Allow’ button to allow google-drive-ocamlfuse to access your Drive.
You’ll then be prompted for your password
You will then be asked to choose the account to use
Finally, create a mount point in your home directory and mount the directory
To verify the creation and mounting of the directory, run
using Nautilus, you can click on File on the Menu and be sure to find a Google drive option at the bottom. Click on it and wait for a few seconds for file synchronization to begin. After a short while, you’ll have access to all your files.
3) Insync
Insynch is a paid, powerful cross-platform GUI client tool that adds drive functionality to your Linux desktop. Some of the features include:
- Handling of multiple accounts
- Gmail support
- G-Suite support
- Sync on Demand
- On-demand synching of shared files
- Desktop Notifications
- Provides a common-line for Linux
- Support for Raspberry Pi
- Merging folders
- Support for symlinks
To install Insync head out to Isync’s Official download page and select your System’s distribution. For this case, we will download the Debian package for Ubuntu 18.04. as shown
Select accordingly your Operating System, version and architecture and click on ‘Download’. This will download the Debian package for Ubuntu 18.04 version
Once the Debian package, install Insync by opening the terminal, navigating to the folder containing the Debian package and run
Upon successful installation, Launch the Search Menu, search for the application and launch it.
This will pop open the Insync Window below. Click on ‘Add a Google Account’
This will open a browser page where will ask for your email-id. Provide your email and click ‘Next’.
Next, you will be prompted for your password. Once you’ve keyed in your password hit on ‘Next’
Here, you will be required to Allow Insync to makes changes to your Drive account
Scroll down and hit ‘Allow’
Nautilus integration with Google Drive will thereafter commence.
Click on ‘Yes’ to integrate Insync with Nautilus
Select your preferred pricing
Synching of files will begin
4) Rclone
Rclone is a command line tool used for synchronizing files and directories from a myriad of cloud service. These include DropBox, Amazon S3, Google Drive, OneDrive Nextcloud and many more.
Now, let’s see how we can install Rclone.
Installation
We’ll install Rclone from a precompiled binary. To do this, open a terminal window and issue the following commands:
First, download the rclone zip file using the curl command
Next, unzip the rclone zipped file
Navigate into the file
Now, copy the binary file and give it the proper permissions with the following commands:
Finally, install the manpage with the commands:
Configuring Rclone
Next, we will set up Rclone to sync to Google Drive.
To configure rclone, issue the command:
You will be required to select the type of storage you’d want to configure. Select the appropriate number corresponding
You will be asked a number of questions, most of which are self-explanatory.
The only questions that might give you a headache are
To all of the above, just hit Enter.
For the Value «scope» = you can provide whatever name you want. By default, it will be drive. You can leave that or type something more meaningful.
Eventually, your default browser will pop open, prompting you to select which Google account you’d like to use. If at this point you’ve not already signed into your account, you’ll be required to do so at this point. Once that completes, answer a few more simple questions and then quit the configuration script. Your connection is now set up.
Allow rclone to access your account by clicking on the «Allow» button
You’ll get the following confirmation that it has been successful.
To copy a file to Google-drive using rclone command type
Drive-CLI is another command line utility tool for drive to access, sync, download, upload directly to your drive. We hope that this tutorial has been helpful. Go ahead and try out some tools and let us know what your experience was! Your contribution will be appreciated.
Источник