Skip to content

Instantly share code, notes, and snippets.

@felipsmartins
Last active August 30, 2024 22:46
Show Gist options
  • Save felipsmartins/99310a1787535b932f5e176532c3c96e to your computer and use it in GitHub Desktop.
Save felipsmartins/99310a1787535b932f5e176532c3c96e to your computer and use it in GitHub Desktop.
Flameshot install (AppImage)
#!/usr/bin/env bash
# WHY use this script?
# 1. Sometimes deb or flatpak packages can't play well with wayland system (under debian 12 for example), so appimage do.
# 2. AppImage can't configure desktop entry and app icon and you can't install appimagelauncher (TheAssassin/AppImageLauncher).
set -euo pipefail
FLAMESHOT_TEMPDIR=/tmp/flameshot
FLAMESHOT_RELEASE_URL="https://github.com/flameshot-org/flameshot/releases/download/v12.1.0/Flameshot-12.1.0.x86_64.AppImage"
mkdir $FLAMESHOT_TEMPDIR -p && cd $FLAMESHOT_TEMPDIR
curl -L "$FLAMESHOT_RELEASE_URL" -o flameshot.AppImage && chmod a+x ./flameshot.AppImage
sudo cp -v ./flameshot.AppImage /usr/local/bin && sudo ln -svf /usr/local/bin/flameshot.AppImage /usr/local/bin/flameshot
# install desktop entry
./flameshot.AppImage --appimage-extract
sudo cp -v ./squashfs-root/org.flameshot.Flameshot.desktop /usr/local/share/applications
# or: xdg-desktop-menu install --novendor ./squashfs-root/org.flameshot.Flameshot.desktop
sudo cp -v ./squashfs-root/org.flameshot.Flameshot.png /usr/share/pixmaps
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment