Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Proposal for Enhancing User Experience for AriaNG with Aria2 Integration #763

Open
mh-firouzjah opened this issue Oct 29, 2024 · 0 comments

Comments

@mh-firouzjah
Copy link

Hi there,

I wanted to take a moment to express my admiration for the incredible work done on AriaNG. I’m excited to try it out, but I found that there wasn't a detailed manual on how to connect it with aria2. After using ChatGPT for assistance, I was able to figure it out.

To make it easier for non-technical users to set up and use this application, I have a few proposals:

  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 file they could use https://github.com/mayswind/AriaNg/blob/master/src/favicon.png, it could make it easier if this file become part of the AriaNG All-in-One package.

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

Here's a polished version of your instructions for building a Debian package for the AriaNG launcher. I’ll enhance the wording and fix the minor typos. Additionally, I'll clarify the steps and include some details to make it easier for users to follow.


Optional: Build a deb Package

Building a deb package for the AriaNG launcher is possible by following these steps. Utilizing a GitHub Action for automated builds could also be a good option in the future.

Step-by-Step Instructions

  1. Create Necessary Directories:

    mkdir -p ~/ariang-launcher/DEBIAN/
    mkdir -p ~/ariang-launcher/usr/local/bin/
    mkdir -p ~/ariang-launcher/usr/share/applications/
    mkdir -p ~/ariang-launcher/usr/share/icons/hicolor/256x256/apps/
  2. Download the Favicon:

    Make sure you have wget installed, then use the following command to download the AriaNG favicon:

    wget https://raw.githubusercontent.com/mayswind/AriaNg/refs/heads/master/src/favicon.png -O ~/ariang-launcher/usr/share/icons/hicolor/256x256/apps/favicon.png
  3. Create Necessary Files:

    Create the required files for your package:

    touch ~/ariang-launcher/usr/share/applications/ariang.desktop
    touch ~/ariang-launcher/usr/local/bin/ariang-launcher
    touch ~/ariang-launcher/DEBIAN/control

Content of Configuration Files

~/ariang-launcher/usr/share/applications/ariang.desktop

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

~/ariang-launcher/usr/local/bin/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 /usr/share/ariang/index.html

~/ariang-launcher/DEBIAN/control

Package: ariang-launcher
Version: 1.0
Section: utils
Priority: optional
Architecture: all
Depends: aria2
Maintainer: Your Name <[email protected]>
Description: A simple launcher for AriaNG with Aria2.
 This package allows you to launch AriaNG with Aria2 running in the background.

Make the Script Executable

After creating the ariang-launcher script, you need to make it executable:

chmod +x ~/ariang-launcher/usr/local/bin/ariang-launcher

Build the Package

To build the package, navigate to your home directory and use the dpkg-deb command:

cd ~
dpkg-deb --build ariang-launcher

Handling Dependencies

If you encounter any dependency issues after installation, you can resolve them with:

sudo apt-get install -f

Conclusion

I believe these steps can significantly enhance the user experience for AriaNG, making it more accessible to users who may not be technically inclined. Thank you for considering this proposal, and I look forward to any thoughts or suggestions you may have!

Best regards,

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant