Just switched to Arch from Fedora less than 24 hours ago and ran into issues with the outdated version of KNIME for a project I have been working on. I decided to try and fix the PKGBUILD myself—it was harder than I expected, but eventually I got it working.
Below is my updated PKGBUILD for version 5.9.0. I also adjusted the permissions so the user group has write access, which should help with installing extensions. If you still have permission issues with extensions, running sudo chown -R $USER:$USER /opt/knime-desktop would make extra sure. I also changed the installation path from usr/share/java to opt/knime, thinking that is more fitting as a destination for such a monolithic piece of software. Hope this will be helpful. Perhaps we could open another repo for the LTS version too btw (knime-desktop-lts or simply knime-lts)?
# Co-Maintainer: redponike <proton (dot) me>
# Co-Maintainer: Dogwen <lyw182 at outlook dot com>
# Contributor: Mete Tikici <metetikici at protonmail dot com>
# Contributor: Lukas Zimmermann <luk.zim91 at gmail dot com>
# Contributor: Benjamin Wilhelm <aur@hedgehogcode.de>
# Package creator: Fabien Dubosson <fabien.dubosson@gmail.com>
pkgname=knime-desktop
_upstream_name="knime"
pkgver=5.9.0
pkgrel=1
pkgdesc="A user-friendly graphical workbench for the entire data analysis process"
url="http://www.knime.org/"
license=('custom')
arch=('x86_64')
conflicts=('knime')
provides=('knime')
depends=('java-runtime>=21' 'python' 'gtk3' 'libxtst')
makedepends=('binutils' 'fakeroot' 'imagemagick')
optdepends=('bash: Required for bash-scriptable nodes'
'r: Required for R-scriptable nodes'
'webkit2gtk-4.1: Required for displaying HTML content'
'firefox: External browser support')
options=('!emptydirs')
source=("https://download.knime.org/analytics-platform/linux/${_upstream_name}_${pkgver}.linux.gtk.${arch}.tar.gz")
sha256sums=('2d46c2a0934a08bd5a84a41d7f1939e7831d269cd3912979875e31a2e30f4092')
prepare() {
# Updated wrapper script for Wayland compatibility and file path migration.
cat > knime.sh <<EOF
#!/bin/bash
KNIME_HOME="/opt/knime-desktop"
export ECLIPSE_HOME="\$KNIME_HOME"
# Wayland fix here
if [ -z "\$GDK_BACKEND" ]; then
if [ "\$XDG_SESSION_TYPE" == "wayland" ]; then
export GDK_BACKEND=x11
fi
fi
#For the file path
USER_CONF_DIR="\$HOME/.config/knime-desktop"
mkdir -p "\$USER_CONF_DIR"
exec "\$KNIME_HOME/knime" \
-configuration "\$USER_CONF_DIR/configuration" \
-data "\$HOME/knime-workspace" \
"\$@"
EOF
# Generate the Desktop Entry
cat > knime-desktop.desktop <<EOF
[Desktop Entry]
Type=Application
Name=KNIME Analytics Platform
Comment=A user-friendly graphical workbench for the entire data analysis process.
Exec=/usr/bin/knime-desktop %F
Icon=knime-desktop
Terminal=false
Categories=Development;Education;Science;DataVisualization;
MimeType=application/x-knime-workflow;
EOF
}
package() {
# Changed the installation directory to suit the norms better
local installpath="/opt"
local programpath="${installpath}/${pkgname}"
local bin="${pkgdir}/usr/bin"
local share="${pkgdir}/usr/share"
local _source_dir="${srcdir}/${_upstream_name}_${pkgver}"
install -d -m755 "${pkgdir}/${installpath}"
mkdir -p "${pkgdir}/${programpath}"
cp -r "${_source_dir}/." "${pkgdir}/${programpath}"
install -D -m755 "knime.sh" "${bin}/${pkgname}"
install -d -m755 "${share}/pixmaps"
# convert is deprecated apparently
magick "${_source_dir}/icon.xpm" "${share}/pixmaps/${pkgname}.png"
install -D -m644 "knime-desktop.desktop" "${share}/applications/${pkgname}.desktop"
install -d -m755 "${share}/licenses/${pkgname}"
install -m644 "${_source_dir}/LICENSE"* "${share}/licenses/${pkgname}/"
# Ownership shall fix permission issues with extension installation
chown -R root:users "${pkgdir}/${programpath}"
chmod -R g+w "${pkgdir}/${programpath}"
}
Pinned Comments
Dogwen commented on 2025-02-23 09:12 (UTC) (edited on 2025-02-23 09:14 (UTC) by Dogwen)
To be honest, as a China Mainland maintainer ,I can't get the files so,i can't update sha256sum and i only spend time updating on weekend,sorry
Dogwen commented on 2025-02-23 08:05 (UTC)
When marking as expired, please attach the link to the new version. Thank you.
Baytars commented on 2022-03-24 05:45 (UTC)
KNIME has no write permission in /usr/share/java/knime-desktop/ and is not able to install any plugins.