25 Oct 2016

2 Linux clients for Microsoft's OneDrive. Yes, they work, but...

The Linux notes from DarkDuck blog has recently published a How-to guide for using cloud storage from the Russian company Yandex with native Linux support: Yandex.Disk.

Of course, Yandex is not the only company that offers free and subscription-based cloud storage services. There was even a discussion about one of the alternatives in the comments for that article.

My take on that discussion is that I would not trust my files to a company that only receives revenues from the cloud storage. It is like putting all your eggs in the same basket. That's why I would recommend you use a company with a diverse set of cash cows. How many of them are there? Not that many, I am afraid.

Yandex is a Russia-based company. There is another Russian company Mail.Ru that offers web storage with 25 Gb of free space per user by default. Unfortunately, its site interface is mostly in Russian, that's why I would not talk too much about it here.

Global technology companies also offer cloud storage. The most famous of them is Google Drive, of course. You all are aware that Google does not provide an official Linux client for its Google Drive. There are some unofficial alternatives including JDrivesync that you can read about.

However, there is another cloud storage from a global company. It is OneDrive from Microsoft. You can think of me being a Devil's Advocate here, but let me continue. OneDrive gives you 5Gb of storage space by default that you can extend later on. However, if you use the referral link, you get 0.5 Gb extra, and so will I. Of course, it is less than the 10 Gb you can easily obtain from Yandex, but still enough space for many who prefer US-based Microsoft to Russia-based Yandex.

There are no official clients for running OneDrive on Linux. But there are two unofficial ones.

Let me talk you through installing and using them and compare the features running Xubuntu 16.04.


Onedrive-d by Xybu92

The first option I am going to talk about is onedrive-d by Xybu92. You can read about this project at https://github.com/xybu/onedrive-d-old. As you can see from the link, even the author recognises that this onedrive client is "old". The last update is more than a year old.

You need run the following commands to install that client:
sudo apt install git (only if you don't have git installed)
git clone https://github.com/xybu/onedrive-d-old.git
cd onedrive-d-old
./install.sh
When installation is over, the command onedrive-pref should be started to configure the client.

While configuring, you will be asked to authorise your client. To do so, copy the URL from the terminal session into your browser, follow the on-screen instructions until you reach the empty white web page. Then copy the URL of that page and paste it back in the terminal session.

And finally the command onedrive-d start starts the client daemon.

Unfortunately, the GTK GUI client that is mentioned on the project's page did not start for me in my Xubuntu 16.04 installed OS. It means that you need to make all the config in the onedrive-d client manually either through onedrive-pref command or through configuration files.

onedrive-d does not start automatically after you restart the computer. In order to make it start every time you reboot, you need to put that command onedrive-d start into the autostart routine by the method most suitable for your OS and desktop environment.

OneDrive by Skilion

The second option for a OneDrive client is OneDrive by Skilion. This project gets updates from time to time.

In order to install OneDrive, you need to run the following commands:
sudo apt-get install libcurl4-gnutls-dev
sudo apt-get 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
The project's site recommends to install the DMD (a programming language, alternative to C) package via a pair of commands. They did not work for me, so the workaround is to download the same package through the official site. Assuming you downloaded the package to ~/Downloads, the commands will be:
cd ~/Downloads
sudo dpkg -i dmd_2.071.1-0_amd64.deb
(your file name may be different)
Now you can download the ZIP file with the OneDrive client from the project site and unzip it, for example in your home folder ~/onedrive-master.
Run the following commands:
cd ~/onedrive-master
make
sudo make install
The installation is now over. The next step is configuration. Copy the configuration file into your own home directory:
mkdir -p ~/.config/onedrive
cp /usr/local/etc/onedrive.conf ~/.config/onedrive/config
You can edit the file now, for example specify the local directory to be synchronised with the cloud storage.

And finally you are ready to run the client. It is just a command onedrive. If you run it just like this without any parameters, the synchronization will run one-off. During the first run, the authorisation process will also start. The authorisation process is the same as for the onedrive-d client described above.

If you want to run the client in the monitoring mode, you can start it with onedrive -m key. Unfortunately, you cannot close the terminal session while the client is running. Of course, this command does not start automatically after the system restarts, you need to take care about the autostart routine yourself.

Comparison

There are two clients available for you to use OneDrive on Linux.

First, both of them are command-line interface based. Both installation and use of them requires the CLI. There is no GUI for configuration or running the clients. That already makes them lose the battle with Yandex.Disk where the GUI client is available. There are many downsides of a CLI-only interface for this use. Just to list few:

  • you cannot quickly jump into the local folder or web-storage on OneDrive's site.
  • you cannot generate the sharing links.
  • you can only configure clients via special commands or files.

Second, both clients work with the current state of OneDrive API. Even the "old" onedrive-d client successfully synchronises the files both ways. This is good news.

Third, though the onedrive-d project from Xybu92 has not gotten updates for a longer time than OneDrive project from Skilion has, the installation and use of Xybu92's client is way simpler. In particular, onedrive-d does not require an open terminal session to run.

Fourth, you need to take care of creating an autostart routine yourself in both cases, as neither client has an option to configure autostart.

Do you use OneDrive and any of its clients in your Linux operating systems?


19 comments:

  1. Onedrive by Skilion is crapola, extremely buggy and unstable, I had to setup my own service to monitor it when it crashed -and crashed all the time...

    ReplyDelete
  2. How about Amazon Cloud? Works great with rclone on Linux.

    It is however really a paid only service, but is unlimited storage.

    ReplyDelete
    Replies
    1. I have not found Amazon Cloud. Would you be interested in writing a guide for it for my blog?

      Delete
    2. Amazon s3. If you're CLI averse, you might also pass on it, but as a Unix sysadmin I've found it to be an extremely reliable place to backup my most important files. Integrating the s3 console utilities into a bash script for backups is trivial. If people would just get over their fear of the prompt (whether bash on Linux or PowerShell on Windows), they would find a whole new world of capabilities opened up to them.

      Delete
    3. Phil, will you be interested in a more details guest post article about the same?

      Delete
  3. I use Yandex Disk, because it allows plain WebDAV access. I do not really care about having stuff synced. A similar OneDrive for Business client would be useful (but *not* one that syncs), but I haven't seen one yet.

    ReplyDelete
    Replies
    1. I understand OneDrive for Business is difficult even for sync-clients :)

      Delete
  4. Hi,
    There is a drive synch named hubic provinding 25Go for free, the compagny offering this is OVH.
    You can get it at http://mir7.ovh.net/ovh-applications/hubic/hubiC-Linux/2.1.0/ and get it installed with # dpkg -i hubic.deb

    ReplyDelete
    Replies
    1. Thanks, looks interesting.

      Delete
    2. this service is very poor in terms of performance, uploads are extremely slow, operations take ages, innexistent customer service. Is cheap though ...

      Delete
  5. This comment has been removed by a blog administrator.

    ReplyDelete
  6. Hi. I tried onedrive-d as well as the onedrive by Skilion. Both had issues and I had to give up on both. I have since found storagemadeeasy.com which for a price ($US60) does the job more reliably with a nice GUI and support for all cloud providers (hence the price I guess). I don't work for these people, just sharing the solution I went with. Cheers.

    ReplyDelete
  7. storagemadeasy is very nice

    ReplyDelete
  8. always be coutious with Russian companies because they can be unsafe. Remember exKGB Kaspersky who is working for Kremlin (what irony with Kaspersky internet security)

    ReplyDelete
    Replies
    1. Yes, you have a choice between KGB and NSA.

      Delete
    2. The matter is that half of my life I lived under soviet regime and that was real dystopia. Putin regime is becoming not so different. In Europe or USA isn't any regime, at least not yet ;) That isn't comparabile. Pardon my off-topic.

      Returning to the theme I use Dropbox with its 50GB but it is only free for 2 years and then I get only 2GB which is too small storage for me. I am thinking to try Google Drive (15 GB free) although it doesn't seem comfortable to me.
      AmazonDrive unfortunately isn't free and you need to have Amazon Prime ($10.99 monthly).

      Delete
    3. Remember exKGB Putin who is effectively the Kremlin and seems to have a taste for anyone's data.

      Delete
    4. David, yes, you're right. And your data is of particular interest. Especially the part of secret pr0n browsing! :) LOL

      Delete