96 lines
2.7 KiB
Markdown
96 lines
2.7 KiB
Markdown
<header><h1>
|
|
OneDrive - Linux
|
|
</h1></header>
|
|
|
|
It's possible to have files from OneDrive on Linux by two ways:
|
|
|
|
----------
|
|
|
|
# 1. Using rClone (Mounting)
|
|
|
|
1. Update the system:
|
|
2. Install rClone:
|
|
``` bash
|
|
sudo apt install rclone
|
|
```
|
|
3. Configure rClone:
|
|
``` bash
|
|
rclone config
|
|
```
|
|
4. Follow the instructions to configure rClone
|
|
5. Create a directory to mount the OneDrive:
|
|
``` bash
|
|
mkdir ~/OneDrive
|
|
```
|
|
6. Mount OneDrive folder:
|
|
``` bash
|
|
rclone --vfs-cache-mode writes mount [rCloneProfilName]: ~/OneDrive
|
|
```
|
|
7. Automount OneDrive folder on Startup <br>
|
|
On `Startup Applications` add a new entry with the following command:
|
|
``` bash
|
|
sh -c "rclone --vfs-cache-mode writes mount [rCloneProfilName]: ~/OneDrive"
|
|
```
|
|
|
|
----------
|
|
|
|
# 2. Using OneDrive for Linux (Synchronization)
|
|
This tutorial work for Ubuntu 22.04 Jammy
|
|
|
|
## 2.1 Remove any configured PPA and associated 'onedrive' package and systemd service files
|
|
|
|
Remove the PPA repository and the older client, run the following commands:
|
|
``` bash
|
|
sudo apt remove onedrive
|
|
sudo add-apt-repository --remove ppa:yann1ck/onedrive
|
|
```
|
|
If no previous installation, the following command will return an error message, which can be ignored.
|
|
|
|
Remove the symbolic link to the systemd service file:
|
|
``` bash
|
|
sudo rm /etc/systemd/user/default.target.wants/onedrive.service
|
|
```
|
|
|
|
## 2.2 Ensure the system is up to date and verify you system version
|
|
|
|
1. Update the system:
|
|
2. Reboot the system:
|
|
3. Verify the system version:
|
|
``` bash
|
|
lsb_release -a
|
|
```
|
|
The output should be similar to:
|
|
``` bash
|
|
remi@marvin:~$ lsb_release -a
|
|
No LSB modules are available.
|
|
Distributor ID: Ubuntu
|
|
Description: Ubuntu 22.04.4 LTS
|
|
Release: 22.04
|
|
Codename: jammy
|
|
```
|
|
|
|
## 2.3 Install OneDrive for Linux
|
|
|
|
1. Add the OpenSuSE Build Service repository release key:
|
|
``` bash
|
|
wget -qO - https://download.opensuse.org/repositories/home:/npreining:/debian-ubuntu-onedrive/xUbuntu_22.04/Release.key | gpg --dearmor | sudo tee /usr/share/keyrings/obs-onedrive.gpg > /dev/null
|
|
```
|
|
2. Add the OpenSuSE Build Service repository:
|
|
``` bash
|
|
echo "deb [arch=$(dpkg --print-architecture) signed-by=/usr/share/keyrings/obs-onedrive.gpg] https://download.opensuse.org/repositories/home:/npreining:/debian-ubuntu-onedrive/xUbuntu_22.04/ ./" | sudo tee /etc/apt/sources.list.d/onedrive.list
|
|
```
|
|
3. Update the package list:
|
|
``` bash
|
|
sudo apt update
|
|
```
|
|
4. Install the OneDrive for Linux client:
|
|
``` bash
|
|
sudo apt install --no-install-recommends --no-install-suggests onedrive
|
|
```
|
|
5. Autorun OneDrive for linux on Startup <br>
|
|
On `Startup Applications` add a new entry with the following command:
|
|
``` bash
|
|
sh -c "onedrive --monitor"
|
|
```
|
|
|