Skip to content

Instantly share code, notes, and snippets.

@mh-firouzjah
Created October 30, 2024 14:34
Show Gist options
  • Save mh-firouzjah/056631bbae38ef683ea89b2c83d4b926 to your computer and use it in GitHub Desktop.
Save mh-firouzjah/056631bbae38ef683ea89b2c83d4b926 to your computer and use it in GitHub Desktop.
Enhencing AriaNg A GUI For Aria2 DownloadManager

Enhencing AriaNg A GUI For Aria2 DownloadManager

  1. Install the aria2 package: Ensure that users have the necessary dependencies.
  2. Download the AriaNG All-in-One package: Extract it to a convenient location, such as ~/.local/opt/AriaNg.
  3. Create an executable script: This script would run aria2 before opening the HTML interface. I named it ariang-launcher.
  4. Create a desktop entry: This entry would allow users to add the application to their system's application menu for easy access.
  5. Ensure clean shutdown: Before closing the web page, User should ensure that aria2 shuts down properly to prevent it from running in the background. They could use the shutdown button in the Aria2 status page for this purpose.
  6. For the icon use https://github.com/mayswind/AriaNg/blob/master/src/favicon.png.

Sample Scripts

Here’s an example of how I set this up:

~/.local/opt/AriaNg/ariang-launcher

#!/bin/bash

# Start Aria2
aria2c --enable-rpc --rpc-listen-all --rpc-allow-origin-all &

# Wait a moment to ensure Aria2 starts
sleep 2

# Open AriaNG in the default web browser
xdg-open ~/.local/opt/AriaNg/index.html

~/.local/share/applications/ariang.desktop

[Desktop Entry]
Categories=Network;FileTransfer;
Comment[en_US]=Launch AriaNG with Aria2
Comment=Launch AriaNG with Aria2
Exec=~/.local/opt/AriaNg/ariang-launcher
GenericName[en_US]=Download Manager
GenericName=Download Manager
Icon=~/.local/opt/AriaNg/favicon.png
MimeType=application/metalink+xml;application/x-bittorrent;
Name[en_US]=AriaNG
Name=AriaNG
StartupNotify=true
Terminal=false
Type=Application
Version=1.0

And that's it. Now using the app icon from the aka start menu aria2 gets launch and the interface would be opened within the default browser.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment