Skip to content

Instantly share code, notes, and snippets.

@n-peugnet
Last active May 1, 2022 10:50
Show Gist options
  • Save n-peugnet/c561e71bcad9af2c0b71f9d347ba7bd0 to your computer and use it in GitHub Desktop.
Save n-peugnet/c561e71bcad9af2c0b71f9d347ba7bd0 to your computer and use it in GitHub Desktop.
Script to install processing properly on Debian and derivatives
#!/bin/bash
sudo apt install default-jre wget
tag=processing-1283-4.0b8
version=$(echo $tag | cut -d- -f3)
tgz=processing-$version-linux-x64.tgz
path=/opt/processing-$version
lapps=$HOME/.local/share/applications
java=$(readlink /etc/alternatives/java | sed 's#/bin/java##')
wget -nv https://github.com/processing/processing4/releases/download/$tag/$tgz
sudo tar -xf $tgz -C /opt/
sudo rm -rf $path/java
sudo ln -s $java $path/java
rm $tgz
mkdir -p $lapps
echo "[Desktop Entry]
Encoding=UTF-8
Name=Processing
Comment=Processing Integrated Development Environment
Exec=_JAVA_OPTIONS='-Dawt.useSystemAAFontSettings=lcd' $path/processing
Terminal=false
Type=Application
Icon=$path/lib/icons/pde-256.png
Categories=Application;Graphics;
MimeType=text/x-processing;" > $lapps/processing.desktop
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment