adfinis-rclone-mgr

command module
v1.1.0 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Jun 4, 2025 License: GPL-3.0 Imports: 37 Imported by: 0 modules, 0 packages

The first number is the count of modules that contain a package that imports this one. The module count is a better indicator of popularity than the package count. A module with 100 importing packages is counted only once instead of 100 times, reflecting the fact that the choice to use the package was likely made only once, not 100 times.
A '?' means that the value hasn't been computed yet.

README ΒΆ

Mounting Google Drive with Rclone

The Adfinis way πŸ§™βœ¨

Go Report Card golangci-lint testing goreleaser

πŸš€ About the Project

This repository provides a streamlined way to mount Google Drive using Rclone, tailored for Adfinis workflows. It includes:

  • A web-based configuration tool for Google Drive mounts.
  • Systemd service templates for managing Rclone mounts.
  • Nautilus integration for opening files directly in Google Drive and copying shareable links.
  • CLI Tool to mount and umount shares.
  • Better error handling in case of permission errors.

πŸ“¦ Installation

Using GoReleaser Packages
  1. Download the latest release from the Releases page.
  2. Install the package for your distribution:
    • Debian/Ubuntu: sudo apt install adfinis-rclone-mgr-<version>.deb
    • Fedora/RHEL: sudo dnf install adfinis-rclone-mgr-<version>.rpm
    • Arch Linux (AUR): yay -S adfinis-rclone-mgr-bin.
  3. Stop nautilus to make sure the new extension gets picked up: nautilus -q
Manual Installation
  1. Install the dependencies
    # debian / ubuntu
    sudo apt install rclone python3-nautilus xclip zenity
    
    # fedora / rhel
    sudo dnf install rclone nautilus-python xclip zenity
    
    # arch
    sudo pacman -S rclone python-nautilus xclip zenity
    
  2. Clone the repository:
    git clone https://github.com/adfinis/adfinis-rclone-mgr.git
    cd adfinis-rclone-mgr
    
  3. Build the binary:
    go build -o adfinis-rclone-mgr .
    
  4. Install the assets:
    sudo cp assets/rclone@.service /usr/lib/systemd/user/
    sudo cp assets/adfinis-rclone-mgr@.service /usr/lib/systemd/user/
    sudo cp assets/google_drive_opener.py /usr/share/nautilus-python/extensions/
    sudo cp assets/adfinis-rclone-mgr.desktop /usr/share/applications/
    sudo cp assets/adfinis-rclone-mgr.png /usr/share/icons/hicolor/512x512/apps/
    
  5. Optional: Autocompletion
    ./adfinis-rclone-mgr completion --help
    

πŸ› οΈ Usage

adfinis-rclone-mgr assumes you have your own client_id and client_secret.
Make sure to create that or ask your Google Workspace Admin to provide one.

  1. Start the application:
    1. Via Desktop: Just search for adfinis-rclone-mgr
    2. Via Terminal:
    adfinis-rclone-mgr gdrive-config
    
  2. Open the provided URL in your browser to configure Google Drive mounts.
  3. Follow the on-screen instructions to log in, select drives, and generate configurations.
  4. Use the Nautilus context menu to open files directly in Google Drive.
Managing Mounts

You can now manage your Google Drive mounts directly from the terminal using the following commands:

  • List available shares:

    adfinis-rclone-mgr ls
    
  • Mount a configured share:

    adfinis-rclone-mgr mount <share-name>
    

    Replace <share-name> with the name of your configured Google Drive share.
    You can use tab for autocompletion of the share names.

  • Unmount a share:

    adfinis-rclone-mgr umount <share-name>
    

    This will safely unmount the specified share.

These commands allow you to quickly mount or unmount your Google Drive shares as needed.

🐞 Troubleshooting

If there are still pending io operations on a share, or if you have a Drive folder open in your file manager, unmounting a share might fail.
In that case, make sure to close all open files and file manager windows and execute adfinis-rclone-mgr umount <share-name> --force or fusermount -u ~/google/<share-name>.

πŸ§ͺ Development

Make sure to install all dependencies:

go mod tidy

If you make any changes to a .templ file, don't forget to generate a native go code based on the template:

go tool templ generate

To create a release, simply push a tag and the pipeline will do the rest.
Semantic versioning and conventional commits are a must!

git tag vX.Y.Z
git push --tags

πŸ“œ License

This project is licensed under the GNU General Public License v3.0.
You are free to use, modify, and distribute this software under the terms of the license.


Made with ❀️ by Adfinis.

Documentation ΒΆ

The Go Gopher

There is no documentation for this package.

Directories ΒΆ

Path Synopsis
templ: version: v0.3.865
templ: version: v0.3.865

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL
⌂ 捒网址