Post

How to use IDM in linux with extension support

Prerequisite: Flatpak.

Install WINE using Flatpak.

1
flatpak install flathub org.winehq.Wine

Create a 64-Bit WINEPREFIX named IDM using flatpak winetricks. Install IDM in default location.

1
flatpak run --command=winetricks org.winehq.Wine

put below script as idm in ~/.local/bin/idm.
Make it executable. chmod +x ~/.local/bin/idm

Change username and home location inside it. /var/home/ for silverblue. For regular distro it’s /home.

1
2
3
4
5
6
7
8
9
#!/bin/bash

if  [[ $1 == '-d' ]]; then
   flatpak run --env="WINEPREFIX=/var/home/zihad/.var/app/org.winehq.Wine/data/wineprefixes/IDM/" org.winehq.Wine "/var/home/zihad/.var/app/org.winehq.Wine/data/wineprefixes/IDM/drive_c/Program Files (x86)/Internet Download Manager/IDMan.exe" /d "$2"
elif [[ $1 == *://* ]]; then
  flatpak run --env="WINEPREFIX=/var/home/zihad/.var/app/org.winehq.Wine/data/wineprefixes/IDM/" org.winehq.Wine "/var/home/zihad/.var/app/org.winehq.Wine/data/wineprefixes/IDM/drive_c/Program Files (x86)/Internet Download Manager/IDMan.exe" /d "$1"
else
  echo "Usage: idm [URL] or idm -d [URL]"
fi

put idm.png icon in ~/.local/share/icons. Or directly link idm icon.
idm.png source

create application launcher in ~/.local/share/applications.

nano ~/.local/share/applications/idm.desktop

[Desktop Entry]
Name=Internet Download Manager
Exec=flatpak run --env="WINEPREFIX=/var/home/zihad/.var/app/org.winehq.Wine/data/wineprefixes/IDM/" org.winehq.Wine "/var/home/zihad/.var/app/org.winehq.Wine/data/wineprefixes/IDM/drive_c/Program Files (x86)/Internet Download Manager/IDMan.exe" @@u %U @@
Type=Application
Terminal=false
Categories=Internet;
Icon=/home/zihad/.var/app/org.winehq.Wine/data/icons/hicolor/48x48/apps/2829_IDMan.0.png
Comment=Launch Internet Download Manager.
StartupWMClass=Internet Download Manager

Change your username.

NOTE: Change IDM Directory, Home directory & Username as per your distribution. Make sure you have node installed in system. Or use NVM to install node in local.

Extension

Download for your browser.
https://add0n.com/download-by.html
Chromium based browser
Firefox

Turn on the Extension by clicking it. Try Download something. It will prompt you to install Native Messaging. Install it.
Native Messaging source.

Open a terminal window on the top level of the extracted directory and run ./install.sh

That should be it.

This post is licensed under CC BY 4.0 by the author.