Flameshot is a powerful screenshot tool for Linux. This guide shows you how to integrate Flameshot with Zipline to automatically upload screenshots to your server.
Prerequisites
A running Zipline instance
Flameshot installed on your Linux machine
curl and jq installed (for processing uploads)
A Zipline user account with an API token
Quick Setup
Zipline can generate a ready-to-use upload script for Flameshot:
Log in to Zipline
Navigate to your Zipline instance and log in to your account.
Generate Upload Script
Go to Settings → Generators → Flameshot . Download the generated shell script (zipline-flameshot-file.sh).
Make Script Executable
chmod +x zipline-flameshot-file.sh
Run the Script
./zipline-flameshot-file.sh
The script automatically captures a screenshot with Flameshot, uploads it to Zipline, and copies the URL to your clipboard.
Manual Configuration
If you prefer to create the upload script manually:
Basic Upload Script
#!/bin/bash
# Take screenshot and save to temporary file
flameshot gui -r > /tmp/screenshot.png
# Upload to Zipline and copy URL to clipboard
curl -H "authorization: YOUR_API_TOKEN" \
https://your-zipline-instance.com/api/upload \
-F file=@/tmp/screenshot.png \
-H 'content-type: multipart/form-data' \
| jq -r .files[0].url | tr -d '\n' | xclip -selection clipboard
Replace YOUR_API_TOKEN with your actual API token and https://your-zipline-instance.com with your Zipline server URL.
Getting Your API Token
To get your API token:
Log in to your Zipline dashboard
Navigate to Settings → User → API Token
Click Show Token or Regenerate Token
macOS
For macOS users running Flameshot:
#!/bin/bash
/Applications/flameshot.app/Contents/MacOS/flameshot gui -r > /tmp/screenshot.png
curl -H "authorization: YOUR_API_TOKEN" \
https://your-zipline-instance.com/api/upload \
-F file=@/tmp/screenshot.png \
-H 'content-type: multipart/form-data' \
| jq -r .files[0].url | tr -d '\n' | pbcopy
Wayland Compositors
For Wayland users experiencing compatibility issues:
#!/bin/bash
export XDG_CURRENT_DESKTOP = sway
flameshot gui -r > /tmp/screenshot.png
curl -H "authorization: YOUR_API_TOKEN" \
https://your-zipline-instance.com/api/upload \
-F file=@/tmp/screenshot.png \
-H 'content-type: multipart/form-data' \
| jq -r .files[0].url | tr -d '\n' | wl-copy
For Wayland, use wl-copy instead of xclip for clipboard functionality.
Advanced Upload Options
You can customize uploads using additional headers:
With Expiration
With Compression
With Custom Format
Plain Text Response
curl -H "authorization: YOUR_API_TOKEN" \
-H "x-zipline-deletes-at: 24h" \
https://your-zipline-instance.com/api/upload \
-F file=@/tmp/screenshot.png \
| jq -r .files[0].url | tr -d '\n' | xclip -selection clipboard
Available Options
Header Description Example x-zipline-deletes-atSet expiration time 24h, 7d, neverx-zipline-formatFilename format random, uuid, datex-zipline-image-compression-percentCompression quality (0-100) 80x-zipline-max-viewsMax views before deletion 10x-zipline-original-namePreserve original filename truex-zipline-no-jsonReturn plain text URL true
Setting Up Keyboard Shortcuts
GNOME/KDE
Open Keyboard Settings
Navigate to Settings → Keyboard → Custom Shortcuts .
Create New Shortcut
Name : Zipline Screenshot Upload
Command : /path/to/zipline-upload.sh
Shortcut : Choose your preferred key combination (e.g., Ctrl+Shift+U)
i3/Sway
Add to your config file:
bindsym $mod +Shift+u exec /path/to/zipline-upload.sh
For Sway:
bindsym $mod +Shift+u exec /path/to/zipline-upload.sh
URL Shortening Script
You can also create a script for URL shortening:
#!/bin/bash
if [ -z " $1 " ]; then
echo "Usage: $0 <url>"
exit 1
fi
curl -H "authorization: YOUR_API_TOKEN" \
-H "content-type: application/json" \
https://your-zipline-instance.com/api/user/urls \
-d "{ \" destination \" : \" $1 \" }" \
| jq -r .url | tr -d '\n' | xclip -selection clipboard
echo "Shortened URL copied to clipboard!"
Usage:
chmod +x zipline-shorten.sh
./zipline-shorten.sh https://example.com/very/long/url
Troubleshooting
Screenshot not uploading
Check dependencies:
which flameshot curl jq xclip
Install missing dependencies:
# Debian/Ubuntu
sudo apt install flameshot curl jq xclip
# Fedora
sudo dnf install flameshot curl jq xclip
# Arch
sudo pacman -S flameshot curl jq xclip
Clipboard not working on Wayland
Replace xclip -selection clipboard with wl-copy:
sudo apt install wl-clipboard # Debian/Ubuntu
Permission denied errors
Ensure the script is executable:
chmod +x /path/to/zipline-upload.sh
jq: command not found
If you prefer not to install jq, use the plain text response option:
curl -H "authorization: YOUR_API_TOKEN" \
-H "x-zipline-no-json: true" \
https://your-zipline-instance.com/api/upload \
-F file=@/tmp/screenshot.png
Next Steps
Upload API Learn about the upload API endpoint
ShareX Integration Set up ShareX on Windows