Whatbox Logo
Login for certain variables to be updated with your slot's information

Wiki > OneDrive

Microsoft OneDrive is a file synchronization service operated by Microsoft.

OneDrive Free Client

OneDrive Free Client is "a complete tool to interact with OneDrive on Linux."

Installation

  1. Connect to your slot through SSH

  2. Install the D language compiler

     curl -fsS https://dlang.org/install.sh | bash -s dmd
    
  3. Run the full source command provided by the output of the above install script

  4. Download OneDrive Free Client's source

     git clone https://github.com/skilion/onedrive.git
    
  5. Change to the source directory

     cd onedrive
    
  6. Use the following command to edit the prefix defined in Makefile

     sed -i 's|/usr/local|/home/user|g' Makefile
    
  7. Compile and install OneDrive Free Client

     make && make install
    
  8. Deactivate the source command

     deactivate
    
  9. Add ~/bin to your PATH so that you can run binaries in ~/bin without specifying the path. Ignore this step if you have performed it for a different program.

     echo "PATH=\$HOME/bin:\$PATH" >> ~/.bashrc && source ~/.bashrc
    
  10. You can now run OneDrive Free Client with onedrive. To run it in the background, you can use:

    screen -dmS onedrive onedrive -m
    

onedrive-d (old client)

A Microsoft OneDrive desktop client / daemon for Linux, written in Python 3.

Github page

Installation

To execute the following commands you need to connect to your server via SSH

Create a virtualenv

  1. Download virtualenv

     wget -O virtualenv-15.0.3.tar.gz https://github.com/pypa/virtualenv/archive/15.0.3.tar.gz
    
  2. Extract virtualenv

     tar xvf virtualenv-15.0.3.tar.gz
    
  3. Create the environment

     python3 virtualenv-15.0.3/virtualenv.py --system-site-packages ~/onedrive-d/
    
  4. Activate virtualenv

     source ~/onedrive-d/bin/activate
    

Configure and run onedrive-d

  1. Change to the virtualenv directory above

     cd onedrive-d
    
  2. Download onedrive-d from github and enter its directory

     git clone https://github.com/xybu/onedrive-d-old.git
     cd onedrive-d-old
    
  3. Add onedrive-d (virtualenv) directory to the PYTHONPATH

     export PYTHONPATH=/home/user/onedrive-d/lib/python3.7/site-packages
    
  4. Install onedrive-d

     python3 setup.py install --prefix "/home/user/onedrive-d"
     python3 setup.py clean
    
  5. Complete installation

     mkdir -p ~/.onedrive-d
     cp ~/onedrive/onedrive-d-old/onedrive_d/res/default_ignore.ini ~/.onedrive-d/ignore_v2.ini
    
  6. Configure onedrive-d

     onedrive-pref --help
     onedrive-pref
    
     onedrive-d --help
     onedrive-d start
    

The onedrive-pref command will initiate a configuration wizard in which you will connect your OneDrive account (via visiting the provided link, logging in and copying the resulting URL into the SSH client). onedrive-d allows you to 'stop', 'start', 'restart' and check the 'status' of the program. To run these commands in the future, activate the virtualenv first.

    source ~/onedrive-d/bin/activate
    onedrive-d

Note: This software isn't an official release nor is it bug-free. You may find it necessary to restart the service on occasion, if it isn't syncing.