Onedrive in Ubuntu

Installing OneDrive in Ubuntu is not very difficult.

Business accounts and private accounts

this version is tested with Office365 account from Hermann Wesselink College in Ubuntu 16.04.

it doesn't install in Ubuntu 18.04. In that version you simply should follow this tutorial

Features:

* State caching * Real-Time file monitoring with Inotify * Resumable uploads * Support OneDrive for Business (part of Office 365) * Shared folders (not Business) ### What's missing: * While local changes are uploaded right away, remote changes are delayed * No GUI

Open a terminal and run these commands

sudo apt install libcurl4-openssl-dev sudo apt install libsqlite3-dev sudo wget http://master.dl.sourceforge.net/project/d-apt/files/d-apt.list -O /etc/apt/sources.list.d/d-apt.list sudo apt-get update && sudo apt-get -y --allow-unauthenticated install --reinstall d-apt-keyring sudo apt-get update && sudo apt-get install dmd-compiler dub git

To install

git clone https://github.com/skilion/onedrive.git cd onedrive make sudo make install

To uninstall (from the installation directory)

sudo make uninstall# delete the application state rm -rf .config/onedrive

After installing the application you must run it at least once from the terminal to authorize it.

onedriveYou will be asked to open a specific link using your web browser where you will have to login into your Microsoft Account and give the application the permission to access your files. After giving the permission, you will be redirected to a blank page. Copy the URI of the blank page into the application.

Configuration is optional. By default all files are downloaded in `~/OneDrive` and only hidden files are skipped. If you want to change the defaults, you can copy and edit the included config file into your `~/.config/onedrive` directory: mkdir -p ~/.config/onedrive cp ./config ~/.config/onedrive/config gedit ~/.config/onedrive/config

If you want to sync your files automatically, enable and start the systemd service: systemctl --user enable onedrive systemctl --user start onedrive

An older version of a onedrive connector works only with onedrive private accounts

First you need to install git if it isn't allerady installed. Start a terminal and enter these commands:

sudo apt install git

With the Git tool installed, we can use it to clone OneDrive-d’s code directly in the command line. Do this with:

git clone https://github.com/xybu92/onedrive-d.git

cd ~/onedrive-d

./install.sh

onedrive-pref

There are 4 stept you have to go through. The first 2 are the most important.

The first step involves connecting the sync client to your Microsoft account. In the terminal, onedrive-pref will print out a one-time link.

Paste this link into your default browser, and authorize OneDrive-D access to your Microsoft account to continue to step 2 of the process.

After clicking “yes” in the connection window, you’ll need to paste the callback URL back into the terminal.

Not sure what that is? It’s the URL that the connection window redirects to. You’ll know you’re getting the right URL, because refreshing stops. Just copy that URL back into the terminal.

Step two in the process is to tell OneDrive-D where to sync to. If you haven’t got a OneDrive sync folder on your PC already, now is the time to create one. Open another terminal and enter this command:

mkdir -p ~/OneDrive

Then, in step 2, tell the program where the folder is so that it can be used as the sync location. Be sure to use the full path: /home/yourusername/OneDrive/

Then in the terminal start the deamon with:

onedrive-d start

You may want to autostart the deamon with the same command in the start-up settings.

To stop the sevice use

onedrive-d stop

To see the status of the sevice use

onedrive-d status

If you want Nautilus to use a Onedive icon, search for one in google, download it and select it in Nautilus.