Skip to content
Everything Linux 101
  • Home
  • Blog
    • Linux In General Blog
    • Installing Linux
    • Linux-101
    • Linux Reviews
      • Ubuntu GNOME 15.04 Review
      • UEFI Posts
    • Windows 10
  • How To
    • Adding Custom Actions
    • Backup Everything
      • Backup Mint and Ubuntu Installed Programs – Aptik
      • Backup with Active@ LiveCD
      • Backup with Clonezilla
      • Backup with Deja
      • Backup with Grsync
      • Backup with Partclone
        • Part Clone Example
      • Backup with Redo
      • Backup with Acronis True Image
      • Windows Backup or Lose it
    • Creating Desktop Google Apps in Linux
    • Create Windows 10 USB Boot Drive
    • Data Drives
    • Dropbox Install
    • Enable Trim on SSD Drives
    • Encrypt Files Folders
      • Encrypt Files with Ccrypt
      • Encrypt Folders with Ecryptfs on the fly
      • Encrypt Files Folders with Archive Manager
      • Encrypt and Decrypt files-folders in Linux using GnuPG
    • Firewalls in Linux
    • Fresh Cinnamon Mint 17.1 without destroying your Mint 17 programs preferences
    • How to Buy a Android Tablet
    • How to Install OBS in Ubuntu
    • Inbox for Gmail
    • Install Deb Programs Manually
    • Install Latest Kernel in Mint or Ubuntu
    • Install Mint alongside Windows
    • Install Ubuntu Alongside Windows 10
    • Install Snapd in Linux Mint 18
    • Install Mint XFCE Desktop along side Cinnamon
    • Install newer Mint over older version
    • Installing XBMC – Kodi
    • Make MKV Backups
    • Maintenance on your Linux Box
    • Malware and Linux
    • Office Suites
      • Install Libreoffice in Mint 17
      • Setup WPS Office Suite
    • Recovering the Windows Bootloader
    • Samsung MTP file system how to mount in linux
    • Send Anywhere File Transfer
    • SEO
      • Planning your Website for SEOOptimization
    • Splitting Large Files in Linux
    • Things to do first in Linux Mint 18 Cinnamon
    • Virus and Linux
    • Remote Control
      • Chrome Remote Desktop Install for Linux
      • Remote Control with Teamviewer
    • Useful PPAs For Ubuntu
    • VirtualBox How To
      • VirtualBox Extensions
    • Understand Linux Filesystem Hierarchy Standard
    • Update Cinnamon 2.2 to 2.4.1 in Mint 17
    • USB Boot Disks
    • Windows 10 Basics
      • Windows 10 Basics Session 1
      • Windows 10 Basics Session 2
      • Windows 10 Basics Session 3
      • Windows 10 Basics Season 4
    • Wine – Install the Newest
    • WordPress
    • Working with Evernote
    • Working with Google
      • Working with Google Docs
    • XFCE adding the Cinnamon Desktop
  • Links
  • Topics
  • Accessories
  • Website Design
  • Contact
  • Facebook

Posts Tagged ‘Onedrive Install’

onedrive-linux-mount-filemanager

Mount OneDrive In Linux

By Bob L | July 27, 2018

How To Mount OneDrive In Linux Using Rclone (Supports Personal And Business Accounts)

Microsoft OneDrive doesn’t have an official client application for Linux, but you can access your OneDrive files from a file manager on Linux thanks to a third-party tool called Rclone. This article explains how to mount OneDrive in Linux using Rclone.
Microsoft OneDrive (previously SkyDive) is a cloud storage / file synchronization service, part of the Office Online suite. It offers 5 GB of storage free of charge, with additional storage available with a paid subscription.

Rclone is “rsync for cloud storage“. It can synchronize files not only from your filesystem to the cloud (and the other way around), but also from one cloud storage service to another. The tool supports a wide variety of cloud storage services, from Google Drive to Amazon Drive and S3, ownCloud, Yandex Disk, and many others.

Besides on demand file synchronization, Rclone supports mounting any supported cloud storage systems as a file system with FUSE. While this feature exists for some time, it’s still considered experimental, so use it with care.

After mounting Microsoft OneDrive, you’ll be able to access it from your file manager, be it Nautilus (Files), Nemo, Caja, etc. The behavior is similar to the one explained on our article about Google Drive: Mounting Google Drive On Xfce Or MATE Desktops (Ubuntu, Linux Mint). As a side note, you can also use Rclone to mount Google Drive in Linux.

Rclone supports OneDrive for Business / Office 365. However, if the organization is in an unmanaged state (not verified by the domain owner), you won’t be able to mount OneDrive using Rclone with FUSE. Such accounts can be used with Sharepoint though. See this page for more information.

OneDrive Rclone mount limitations:

  • Any files deleted with Rclone are moved to the trash because Microsoft doesn’t provide an API to permanently delete files or empty the trash
  • OneDrive is case insensitive, so you can’t have two files with the same names but different cases in the same folder (example: MyFile.txt and myfile.txt can’t be in the same folder).
  • OneDrive doesn’t support some characters that are not allowed in filenames on Windows operating systems. Rclone maps these characters to identical looking Unicode equivalents, like ? to ?

Also, renaming folders doesn’t seem to work, at least on my system. I’m not sure if this is a Rclone issue or limitation, since Rclone is supposed to support renaming folders in general.

These instructions should work not only on any Linux distribution (from Ubuntu, Linux Mint, or Debian, to Arch Linux, Fedora, openSUSE, and so on), but also on FreeBSD and macOS. It even works on Windows but you’ll need WinFsp.

Related: Cryptomator Secures Your Cloud Storage Data (Open Source, Multi-Platform Client-Side Encryption Tool)

Mount OneDrive as a file system in Linux using Rclone

1. Install Rclone.

You can download Rclone binaries from here. For Linux you’ll find generic binaries, as well as DEB and RPM binaries.

I don’t recommend installing the Rclone Snap package (even if you use Ubuntu), because it fails to find the fusermount executable, even if it’s installed with --classic. When using the Snap package, you’ll get an error similar to the one below when trying to mount a cloud storage service supported by Rclone:

failed to mount FUSE fs: fusermount: exec: "fusermount": executable file not found in $PATH

This was apparently fixed a while back but it looks like the issue occurs again.

2. Add a new OneDrive remote to Rclone. The instructions below may seem long but it only takes a few seconds to set it up.

To start adding the OneDrive remote to Rclone, use this command to enter the Rclone configuration mode:

rclone config

Rclone will display a list of options from which you need to select the New remote option by entering n and pressing the Enter key:

$ rclone config
Current remotes:

Name                 Type
====                 ====
mega                 mega

e) Edit existing remote
n) New remote
d) Delete remote
r) Rename remote
c) Copy remote
s) Set configuration password
q) Quit config
e/n/d/r/c/s/q> n

Next, it will prompt you to enter a name for the new remote. Enter the name you want to use (I’m using onedrive as the name in these instructions):

name> onedrive

After pressing the Enter key, a list of supported cloud storage services is displayed. You need to select the Microsoft OneDrive option by entering its corresponding number (16 right now but it may change in the future):

Type of storage to configure.
Choose a number from below, or type in your own value
 1 / Alias for a existing remote
   \ "alias"
 2 / Amazon Drive
   \ "amazon cloud drive"
 3 / Amazon S3 Compliant Storage Providers (AWS, Ceph, Dreamhost, IBM COS, Minio)
   \ "s3"
 4 / Backblaze B2
   \ "b2"
 5 / Box
   \ "box"
 6 / Cache a remote
   \ "cache"
 7 / Dropbox
   \ "dropbox"
 8 / Encrypt/Decrypt a remote
   \ "crypt"
 9 / FTP Connection
   \ "ftp"
10 / Google Cloud Storage (this is not Google Drive)
   \ "google cloud storage"
11 / Google Drive
   \ "drive"
12 / Hubic
   \ "hubic"
13 / Local Disk
   \ "local"
14 / Mega
   \ "mega"
15 / Microsoft Azure Blob Storage
   \ "azureblob"
16 / Microsoft OneDrive
   \ "onedrive"
17 / OpenDrive
   \ "opendrive"
18 / Openstack Swift (Rackspace Cloud Files, Memset Memstore, OVH)
   \ "swift"
19 / Pcloud
   \ "pcloud"
20 / QingCloud Object Storage
   \ "qingstor"
21 / SSH/SFTP Connection
   \ "sftp"
22 / Webdav
   \ "webdav"
23 / Yandex Disk
   \ "yandex"
24 / http Connection
   \ "http"
Storage> 16

For the next two steps, press Enter without entering any information since there’s no need to enter the Microsoft App Client ID or Secret:

Microsoft App Client Id - leave blank normally.
client_id> 
Microsoft App Client Secret - leave blank normally.
client_secret>

Now you can choose the OneDrive account type (enter b for Business or p for Personal OneDrive accounts):

Remote config
Choose OneDrive account type?
 * Say b for a OneDrive business account
 * Say p for a personal OneDrive account
b) Business
p) Personal
b/p> p

Depending on your setup, you’ll have to enter auto configuration or manual for the next step. For desktop users, type y to use the auto configuration:

Use auto config?
 * Say Y if not sure
 * Say N if you are working on a remote or headless machine
y) Yes
n) No
y/n> y

A new tab should open in your default web browser, asking you to give Rclone access to your OneDrive account. Allow it and you can close the tab.

Rclone runs a webserver on your local machine (on port 53682) to retrieve the authentication token. You may need to unblock it temporarily if you use a firewall.

Now you’ll need to check if everything is correct and save the settings by typing y:


[onedrive]
type = onedrive
client_id = 
client_secret = 
token = {"access_token":"GoKSt5YMioiuCWX1KOuo8QT0Fwy+Y6ZeX7M","token_type":"bearer","refresh_token":"7OMvoEAO3l*8BbhS2AMxpTbJW0Y6np9cdql!bwEdYAhJ6XBG0tnR0UK","expiry":"2018-07-26T15:15:13.696368366+03:00"}
--------------------
y) Yes this is OK
e) Edit this remote
d) Delete this remote
y/e/d> y

And finally, exit the Rclone configuration by typing q:

Current remotes:

Name                 Type
====                 ====
onedrive             onedrive

e) Edit existing remote
n) New remote
d) Delete remote
r) Rename remote
c) Copy remote
s) Set configuration password
q) Quit config
e/n/d/r/c/s/q> q

3. Create a new folder on your system that will be used to mount Microsoft OneDrive.

I suggest creating a folder called OneDrive in your home directory. The instructions below will be using this as the mount point (~/OneDrive).

4. Mount OneDrive (with Rclone using FUSE) as a file system.

To mount Microsoft OneDrive using Rclone, use this command:

rclone --vfs-cache-mode writes mount onedrive: ~/OneDrive

Where onedrive is the name of the Rclone remote, followed by : (we’ve used exactly onedrive in the instructions above so you can use precisely that for the command), and ~/OneDrive is the folder where you want to mount OneDrive on your system.

The mount command uses --vfs-cache-mode writes because according to the Rclone documentation, “many applications won’t work with their files on an Rclone mount” without this or --vfs-cache-mode full. The Rclone file caching section explains this in detail.

You can stop and unmount it by pressing Ctrl + C to close Rclone.

5. (Optional) Mount OneDrive on system startup

To mount OneDrive on startup, open Startup Applications. This depends on the desktop environment you’re using so I’ll list some of them below and how to access startup applications to add a new entry:

  • Gnome / Unity: search for Startup Applications in the Dash / applications thingy, and in Startup Applications click Add
  • Xfce: launch Session and Startup from the menu, go to the Application Autostart tab and click Add
  • MATE: launch Startup Applications from the menu, and click Add

After clicking Add, use the following:

  • Name: Rclone OneDrive Mount
  • Command: sh -c "rclone --vfs-cache-mode writes mount onedrive: ~/OneDrive"

There are other ways of mounting OneDrive automatically, like adding a line in your /etc/fstab file, using systemd, etc. As a starting point you can use the examples from google-drive-ocamlfuse, as they should also work for Rclone.

Read More Here

 

Rclone Config, Rclone Encryption, Rclone Mount, Rclone Sync, Rclone Ubuntu, Rclone Web Interface

Onedrive Account, Onedrive Client, Onedrive Encryption, Onedrive Install, Onedrive On Linux, Onedrive Sync Client

Posted in Blog, General and tagged Onedrive Account, Onedrive Client, Onedrive Encryption, Onedrive Install, Onedrive On Linux, Onedrive Sync Client, Rclone Config, Rclone Encryption, Rclone Mount, Rclone Sync, Rclone Ubuntu, Rclone Web Interface
© 2023 - Everything Linux 101 | Website by CFA Web Designs
This website uses cookies to improve your experience. We'll assume you're ok with this, but you can opt-out if you wish.Accept Reject Read More
Privacy & Cookies Policy

Privacy Overview

This website uses cookies to improve your experience while you navigate through the website. Out of these, the cookies that are categorized as necessary are stored on your browser as they are essential for the working of basic functionalities of the website. We also use third-party cookies that help us analyze and understand how you use this website. These cookies will be stored in your browser only with your consent. You also have the option to opt-out of these cookies. But opting out of some of these cookies may affect your browsing experience.
Necessary
Always Enabled
Necessary cookies are absolutely essential for the website to function properly. This category only includes cookies that ensures basic functionalities and security features of the website. These cookies do not store any personal information.
Non-necessary
Any cookies that may not be particularly necessary for the website to function and is used specifically to collect user personal data via analytics, ads, other embedded contents are termed as non-necessary cookies. It is mandatory to procure user consent prior to running these cookies on your website.
SAVE & ACCEPT
Scroll To Top