Metadata-Version: 2.4
Name: onedrive-gui
Version: 2.4.0
Summary: A simple GUI for Linux OneDrive Client, with multi-account support.
Requires-Python: >=3.8
Description-Content-Type: text/markdown
License-File: LICENSE
Requires-Dist: PySide6_Essentials
Requires-Dist: requests
Dynamic: license-file

![GitHub all releases](https://img.shields.io/github/downloads/bpozdena/OneDriveGUI/total)

# OneDriveGUI

## About
A GUI for [Linux OneDrive Client](https://github.com/abraunegg/onedrive) with multi-account support.
![image](https://github.com/user-attachments/assets/00769399-1a65-4648-8705-7dee81ee4f52)

## Feature Highlights
- Management and configuration of multiple OneDrive accounts.
- Asynchronous real-time monitoring of multiple OneDrive accounts.
- Setup wizard for easy OneDrive profile creation and import.
- Auto-sync on GUI startup.
- Login via the system browser (handled by the OneDrive client) or by pasting the response URL manually.
- System tray (if supported by your desktop environment).
- Start minimized to tray/dock.
- Remembers window size and position between sessions.
- Input validation to prevent configuration of incompatible OneDrive client options.
- Progress monitoring of multiple simultaneous file transfers.
- Failed transfers are grouped behind a `N failed` toggle, with the reason shown on hover.
- Files skipped because of an invalid name or failing transfers to the local Recycle Bin are reported as failed.
- Overall sync state from the client's `monitor-status.json` on OneDrive client v2.5.12+ (with v2.5.11 the state is derived from the client output).
- OneDrive clients are stopped gracefully when OneDriveGUI exits or the session logs out (configurable); a client already running outside the GUI can be taken over on startup.
- Import and management of SharePoint Shared Libraries.
- Tooltips with brief explanations of various OneDrive Client configuration options.
- Prompt for re-sync authorization to prevent unexpected data loss.

## Known Limitations
- No window shadows for Wayland sessions.
- No window icon when using AppImage on Wayland sessions.
- AppImage: the built-in QWebEngine login window is unavailable; login uses the system browser instead.
- On Wayland, the compositor decides the window position; only the window size is guaranteed to be restored.
- Check for other reported [issues/limitations](https://github.com/bpozdena/OneDriveGUI/issues).

## Compatibility
- Minimum supported OneDrive client version: **v2.5.11** (required for the client-based browser login flow).
- OneDrive client **v2.5.12 or newer is recommended**: the GUI then shows the overall sync state from the client's `monitor-status.json`, supports the new client options (`disable_time_check`, `monitor_status`, `notify_monitor_start`), and reports Recycle Bin move failures and system clock drift. With v2.5.11 everything except these additions works the same.
- You will be shown warnings if your OneDrive Client is not up to date.

## Other Notes
- Questions, suggestions, contributions, and bug reports are welcome. 
- Backup your OneDrive config files before importing them to the GUI.
- Backup your data before use to prevent accidental file deletion due to OneDrive misconfiguration. 
- No warranty.

# Running and Installing OneDriveGUI
| :exclamation:        | Ensure the latest version of [OneDrive for Linux](https://abraunegg.github.io/) is installed based on [instructions](https://github.com/abraunegg/onedrive/blob/master/docs/install.md) for your distro. |
|-----------------------|:----------------------------------------------------------------------------------------------------------------|

## AppImage 
1) Download the latest `OneDriveGUI-*-x86_64.AppImage` from the [release assets](https://github.com/bpozdena/OneDriveGUI/releases).
1) Make the `.AppImage` file executable with `chmod +x ./OneDriveGUI-<**version**>-x86_64.AppImage` and run it. 

| :memo:        | Users of Ubuntu 22.04+ may also need to install FUSE2 with `sudo apt install libfuse2`.      |
|---------------|:--------------------------------------------------------------------------------------------|

## AUR
- An AUR package [onedrivegui-git](https://aur.archlinux.org/packages/onedrivegui-git) is available (maintainer: Integral).

## Python Package

Use setuptools and build to build the package:

```
python3 -m pip install setuptools build
python3 -m build
```

That produces a wheel package in the directory `dist/` that can be installed (this also provides an `onedrive-gui` command):

```
python3 -m pip install dist/onedrive_gui-*.whl
```

## Running from Source

1) Ensure Python3 and [pip](https://pip.pypa.io/en/stable/installation/) are installed on your system. 
1) Clone or download the content of this repository and `cd` into the resultant folder:
    ```sh
    git clone https://github.com/bpozdena/OneDriveGUI.git
    cd OneDriveGUI
    ```
1) Install dependencies:
    ```sh
    python3 -m pip install -r requirements.txt
    ```

1) Start OneDrive GUI:
    ```sh
    cd src/
    python3 -m onedrive_gui
    ```

    Optionally, you can detach the GUI from the terminal by using the command below:
    ```sh
    cd src/
    nohup python3 -m onedrive_gui > /dev/null 2>&1 &
    ```

# Usage
- Once the GUI starts, you will be able to create a new OneDrive profile or import your pre-existing one. Just follow the wizard steps.
- You can adjust your OneDrive profile options as needed. 
- Start OneDrive sync in monitor mode via the GUI by pressing the `Play` button.

# Additional Notes
- When importing a OneDrive config file, all comments will be removed.
- If multi-line options `skip_file` and `skip_dir` are used, they will be consolidated into a single line.
- Options removed from the OneDrive client (`sync_business_shared_folders`, `min_notify_changes`, `force_http_2`) are dropped from the config on the first start after upgrading. The client then detects the config change and asks for a one-time `--resync`.
- The list of managed OneDrive profiles is stored in `~/.config/onedrive-gui/profiles`. You can manually rename your profile or path to the config file there.
- Newly created OneDrive config files are stored in `~/.config/onedrive/accounts/<profile_name>`.
- Logs are written to the file configured in the GUI settings (default `/tmp/onedrive-gui/onedrive-gui.log`) and rotate based on the configured interval and maximum file size.

# Attribution
- Icons by <a target="_blank" href="https://icons8.com">Icons8</a>
