HOW TO: Install JD2 on Ubuntu in such a way as to be able to connect from Windows PC using PuTTY

This is a note to self for future reference, if it can help you too that is great!

Prereqs:

Problem: Installing JD2 using Snap on Ubuntu box, gives errors when trying to connect from Windows using PuTTY – it seems it can’t connect to the xserver running on my Windows box:

java.awt.AWTError: Can't connect to X11 window server using 'localhost:10.0' as the value of the DISPLAY variable.

Solution: Install JD2 using the silent installer script from http://installer.jdownloader.org, then use a batch script to start JD2 via Plink.

Found at: https://askubuntu.com/a/550412

  1. Download the silent installer script to the Ubuntu box
wget http://installer.jdownloader.org/JD2SilentSetup_x64.sh
  1. Make the script executable
chmod +x JD2SilentSetup_x64.sh
  1. On the Ubuntu box, from terminal (Shift + Ctrl + T) run the script
./JD2SilentSetup_x64.sh
  1. On the Windows box, create a batch file to start JD2
plink [UBUNTU-BOX ADDRESS] -l [username] -pw [password] -batch [path to JD2, e.g.: ~/jd2/JDownloader2]