Pop!_OS Flameshot: Complete Guide to Advanced Screenshots
Flameshot is the most powerful and versatile screenshot tool available on Linux, offering advanced editing, annotation, and automation features that go far beyond the default tools. This guide walks you from an optimized Pop!_OS installation to professional screenshot workflows.
In this article
- Complete installation: All methods (APT, Flatpak, Snap, build)
- Advanced configuration: Custom keyboard shortcuts and system tweaks
- Professional editing: Full annotation and editing toolset
- Workflow automation: Scripts and integrations with other tools
- Multi-monitor setup: Optimal configuration for multiple displays
- Performance tuning: Optimizations for System76 hardware
- Troubleshooting: Common issues and debugging
- Alternatives and integrations: Comparison with other tools and the ecosystem
Table of Contents
๐ Part I - Setup and Installation
- Introduction and Flameshot Overview
- Installation on Pop!_OS
- Post-Installation and Verification
โจ๏ธ Part II - Keyboard Shortcuts and Configuration
- Keyboard Shortcut Setup
- Advanced Shortcuts and Customizations
- GNOME and Pop Shell Integration
- Multi-Monitor Configuration
๐ผ๏ธ Part III - Features and Editing
- Capture Tools
- Built-in Editor and Annotations
- File Management and Export
โ๏ธ Part IV - Automation and Workflow
- Cloud Storage Integration
- Professional Workflows
๐ง Part V - Advanced and Troubleshooting
- Performance Optimization
- Common Troubleshooting
- Alternatives and Comparisons
- Migration and Configuration Backups
Introduction and Flameshot Overview
What Is Flameshot?
Flameshot is an open-source cross-platform screenshot tool designed for Linux, also available for Windows and macOS. It is especially optimized for Linux desktop environments like GNOME (used in Pop!_OS) and offers features that make it superior to other screenshot tools.
Key features:
- In-app annotation: Built-in editor with professional tools
- Customizable shortcuts: Full keyboard shortcut configuration
- Multi-monitor support: Optimal handling of multi-display setups
- Cloud integration: Direct uploads to cloud services
- Command-line interface: Full automation via CLI
- Plugin ecosystem: Extensibility via plugins and scripts
Benefits on Pop!_OS
Pop!_OS, an Ubuntu-based distribution optimized by System76, offers an ideal environment for Flameshot:
1
2
3
4
5
|
โ
GNOME integration: Seamless desktop environment integration
โ
System76 hardware: Optimization for System76 laptops and desktops
โ
Pop Shell compatibility: Works perfectly with the tiling manager
โ
Ubuntu base: Access to Canonical repositories for updates
โ
Wayland support: Compatible with Wayland and X11
|
Comparison with Alternatives
| Feature |
Flameshot |
GNOME Screenshot |
Shutter |
Spectacle |
| In-app Editing |
โ
Advanced |
โ Basic |
โ
Full |
โ
Basic |
| Keyboard Shortcuts |
โ
Full |
โ
Limited |
โ
Full |
โ
Good |
| Multi-monitor |
โ
Excellent |
โ
Basic |
โ
Good |
โ
Good |
| Cloud Upload |
โ
Integrated |
โ No |
โ
Plugin |
โ No |
| CLI Interface |
โ
Full |
โ
Basic |
โ
Limited |
โ
Basic |
| Active Development |
โ
Active |
โ
Active |
โ Limited |
โ
Active |
| Pop!_OS Integration |
โ
Perfect |
โ
Native |
โ
Good |
โ Limited |
Installation on Pop!_OS
Method 1: APT Installation (Recommended)
APT installation is the simplest and most integrated method:
1
2
3
4
5
6
7
8
9
10
|
# Update repositories
sudo apt update && sudo apt upgrade
# Install Flameshot
sudo apt install flameshot
# Verify installation
flameshot --version
# Expected output: Flameshot v12.1.0 (or a newer version)
|
APT benefits:
- โ
System integration: Perfect Pop!_OS integration
- โ
Automatic updates: Via Pop!_Shop or apt
- โ
Managed dependencies: Automatic dependency resolution
- โ
Optimal performance: Built for the system architecture
Method 2: Flatpak Installation
Flatpak provides newer versions and better sandboxing:
1
2
3
4
5
6
7
8
9
10
11
12
|
# Check Flatpak availability (preinstalled on Pop!_OS)
flatpak --version
# Install Flameshot
flatpak install flathub org.flameshot.Flameshot
# Verify installation
flatpak run org.flameshot.Flameshot --version
# Create a convenience alias
echo 'alias flameshot-flatpak="flatpak run org.flameshot.Flameshot"' >> ~/.bashrc
source ~/.bashrc
|
Flatpak benefits:
- โ
Newer versions: Often more up-to-date than APT
- โ
Sandboxing: Better security via isolation
- โ
Consistency: Same runtime across distributions
- โ
User installation: No admin privileges required
Method 3: Snap Installation
1
2
3
4
5
6
7
8
9
|
# Install via Snap
sudo snap install flameshot
# Verify installation
snap list | grep flameshot
# Permission management
sudo snap connect flameshot:desktop
sudo snap connect flameshot:wayland
|
Method 4: Build from Source
For advanced users who want the latest development version:
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
|
# Install build dependencies
sudo apt install git build-essential cmake qt5-qmake qttools5-dev-tools \
libqt5svg5-dev qttools5-dev libqt5dbus5 libqt5network5 \
libqt5core5a libqt5widgets5 libqt5gui5 libqt5dbus5
# Clone repository
git clone https://github.com/flameshot-org/flameshot.git
cd flameshot
# Build
mkdir build && cd build
cmake ../
make
# Install (optional)
sudo make install
# Verify
./flameshot --version
|
Setup Build Dependencies Script:
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
|
#!/bin/bash
# install_flameshot_deps.sh - Setup build environment
install_build_deps() {
echo "=== Installing Flameshot Build Dependencies ==="
# Core build tools
sudo apt update
sudo apt install -y \
git \
build-essential \
cmake \
ninja-build
# Qt5 dependencies
sudo apt install -y \
qt5-qmake \
qttools5-dev-tools \
libqt5svg5-dev \
qttools5-dev \
libqt5dbus5 \
libqt5network5 \
libqt5core5a \
libqt5widgets5 \
libqt5gui5 \
libqt5dbus5
# Additional libraries
sudo apt install -y \
libxcb-util1 \
libxcb-ewmh-dev \
libxcb-randr0-dev \
libxcb-xinerama0-dev
echo "โ
Build dependencies installed successfully"
}
# Execute
install_build_deps
|
Post-Installation and Verification
Basic Installation Tests
1
2
3
4
5
6
7
8
9
10
11
12
13
14
|
# Test basic functionality
flameshot gui
# Test version
flameshot --version
# Test help
flameshot --help
# Test screen capture
flameshot screen -n 0
# Test full screen capture
flameshot full -p ~/Pictures/
|
Multi-Monitor Feature Verification
1
2
3
4
5
6
7
8
|
# List available monitors
xrandr --listmonitors
# Test capture on a specific monitor
flameshot screen -n 1 -p ~/Pictures/test-monitor.png
# Test full desktop capture (all monitors)
flameshot full -p ~/Pictures/test-full-desktop.png
|
Default Directory Setup
1
2
3
4
5
6
7
8
9
|
# Create screenshot directories
mkdir -p ~/Pictures/Screenshots/{Daily,Work,Temp}
# Set permissions
chmod 755 ~/Pictures/Screenshots
chmod 755 ~/Pictures/Screenshots/*
# Verify structure
tree ~/Pictures/Screenshots
|
Keyboard Shortcut Setup
Basic Configuration via GNOME Settings
1. Open Keyboard Settings
1
2
3
4
|
# Open keyboard settings directly
gnome-control-center keyboard
# Or via GUI: Settings โ Devices โ Keyboard
|
2. Create Basic Shortcuts
Selected Area Screenshot (Recommended: Print Screen):
1
2
3
|
Name: Flameshot GUI
Command: flameshot gui
Shortcut: Print Screen (or Alt+Shift+S)
|
Active Window Screenshot (Alt+Print Screen):
1
2
3
|
Name: Flameshot Current Window
Command: flameshot gui --region
Shortcut: Alt+Print Screen
|
Full Desktop Screenshot (Shift+Print Screen):
1
2
3
|
Name: Flameshot Full Screen
Command: flameshot full -c -p ~/Pictures/Screenshots/
Shortcut: Shift+Print Screen
|
Advanced Configuration via dconf-editor
For fine-grained control over shortcuts:
1
2
3
4
5
|
# Install dconf-editor if needed
sudo apt install dconf-editor
# Open dconf-editor
dconf-editor
|
dconf path:
1
|
/org/gnome/settings-daemon/plugins/media-keys/custom-keybindings/
|
Automatic Shortcut Setup Script:
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
|
#!/bin/bash
# setup_flameshot_shortcuts.sh - Automated keyboard shortcuts setup
setup_flameshot_shortcuts() {
echo "=== Setting up Flameshot Keyboard Shortcuts ==="
# Define shortcuts array
declare -A shortcuts=(
["flameshot-gui"]="Print"
["flameshot-full"]="<Shift>Print"
["flameshot-launcher"]="<Alt>Print"
)
# Define commands
declare -A commands=(
["flameshot-gui"]="flameshot gui"
["flameshot-full"]="flameshot full -c -p ~/Pictures/Screenshots/"
["flameshot-launcher"]="flameshot launcher"
)
# Counter for custom shortcuts
counter=0
for name in "${!shortcuts[@]}"; do
# Create custom shortcut path
shortcut_path="/org/gnome/settings-daemon/plugins/media-keys/custom-keybindings/custom${counter}/"
# Set shortcut properties
gsettings set "org.gnome.settings-daemon.plugins.media-keys.custom-keybinding:${shortcut_path}" \
name "${name}"
gsettings set "org.gnome.settings-daemon.plugins.media-keys.custom-keybinding:${shortcut_path}" \
command "${commands[$name]}"
gsettings set "org.gnome.settings-daemon.plugins.media-keys.custom-keybinding:${shortcut_path}" \
binding "${shortcuts[$name]}"
echo "โ
Created shortcut: ${name} โ ${shortcuts[$name]}"
((counter++))
done
# Add to custom keybindings list
existing_shortcuts=$(gsettings get org.gnome.settings-daemon.plugins.media-keys custom-keybindings)
new_shortcuts="['/org/gnome/settings-daemon/plugins/media-keys/custom-keybindings/custom0/', '/org/gnome/settings-daemon/plugins/media-keys/custom-keybindings/custom1/', '/org/gnome/settings-daemon/plugins/media-keys/custom-keybindings/custom2/']"
gsettings set org.gnome.settings-daemon.plugins.media-keys custom-keybindings "$new_shortcuts"
echo "๐ Flameshot keyboard shortcuts configured successfully!"
}
# Execute setup
setup_flameshot_shortcuts
|
Advanced Shortcuts for Power Users
Advanced Custom Shortcuts
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
|
# Set up advanced shortcuts via command line
#!/bin/bash
# Screenshot with timestamp in filename
gsettings set "org.gnome.settings-daemon.plugins.media-keys.custom-keybinding:/org/gnome/settings-daemon/plugins/media-keys/custom-keybindings/flameshot-timed/" \
name "Flameshot Timestamped"
gsettings set "org.gnome.settings-daemon.plugins.media-keys.custom-keybinding:/org/gnome/settings-daemon/plugins/media-keys/custom-keybindings/flameshot-timed/" \
command "flameshot gui -p ~/Pictures/Screenshots/ -f screenshot_\$(date +%Y%m%d_%H%M%S).png"
gsettings set "org.gnome.settings-daemon.plugins.media-keys.custom-keybinding:/org/gnome/settings-daemon/plugins/media-keys/custom-keybindings/flameshot-timed/" \
binding "<Ctrl><Alt>s"
# Screenshot with automatic upload (requires cloud setup)
gsettings set "org.gnome.settings-daemon.plugins.media-keys.custom-keybinding:/org/gnome/settings-daemon/plugins/media-keys/custom-keybindings/flameshot-upload/" \
name "Flameshot Auto Upload"
gsettings set "org.gnome.settings-daemon.plugins.media-keys.custom-keybinding:/org/gnome/settings-daemon/plugins/media-keys/custom-keybindings/flameshot-upload/" \
command "flameshot gui -u"
gsettings set "org.gnome.settings-daemon.plugins.media-keys.custom-keybinding:/org/gnome/settings-daemon/plugins/media-keys/custom-keybindings/flameshot-upload/" \
binding "<Ctrl><Shift>u"
# Screenshot with delay
gsettings set "org.gnome.settings-daemon.plugins.media-keys.custom-keybinding:/org/gnome/settings-daemon/plugins/media-keys/custom-keybindings/flameshot-delay/" \
name "Flameshot Delayed"
gsettings set "org.gnome.settings-daemon.plugins.media-keys.custom-keybinding:/org/gnome/settings-daemon/plugins/media-keys/custom-keybindings/flameshot-delay/" \
command "flameshot gui -d 3000"
gsettings set "org.gnome.settings-daemon.plugins.media-keys.custom-keybinding:/org/gnome/settings-daemon/plugins/media-keys/custom-keybindings/flameshot-delay/" \
binding "<Ctrl><Alt><Shift>s"
|
INI File Configuration
Flameshot uses a configuration file for persistent settings:
1
2
|
# Configuration path
~/.config/flameshot/flameshot.ini
|
Example advanced configuration:
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
|
[General]
buttons=@Variant(\0\0\0\x7f\0\0\0\vQList<int>\0\0\0\0\x10\0\0\0\0\0\0\0\x1\0\0\0\x2\0\0\0\x3\0\0\0\x4\0\0\0\x5\0\0\0\x6\0\0\0\x12\0\0\0\f\0\0\0\r\0\0\0\xe\0\0\0\xf\0\0\0\x10\0\0\0\x11\0\0\0\x13\0\0\0\x14\0\0\0\x15)
closeAfterScreenshot=false
copyAndCloseAfterUpload=true
copyPathAfterSave=true
copyURLAfterUpload=true
disabledTrayIcon=false
drawColor=@Variant(\0\0\0\x43\x1\xff\xff\xff\xff\0\0\0\0\0\0\0\0)
drawThickness=2
filenamePattern=screenshot_%F_%T
savePath=/home/user/Pictures/Screenshots
savePathFixed=true
showDesktopNotification=true
showHelp=false
showSidePanelButton=true
startupLaunch=true
uiColor=@Variant(\0\0\0\x43\x1\xff\xff\x80\x80\x80\x80\x80\x80\0\0)
uploadHistoryMax=25
useJpgForClipboard=false
userColors=@Invalid()
[Shortcuts]
TYPE_ARROW=A
TYPE_CIRCLE=C
TYPE_CIRCLECOUNT=
TYPE_COMMIT_CURRENT_TOOL=Ctrl+Return
TYPE_COPY=Ctrl+C
TYPE_DELETE_CURRENT_TOOL=Del
TYPE_DRAWER=D
TYPE_EXIT=Ctrl+Q
TYPE_IMAGEUPLOADER=Return
TYPE_MARKER=M
TYPE_MOVESELECTION=Ctrl+M
TYPE_MOVE_DOWN=Down
TYPE_MOVE_LEFT=Left
TYPE_MOVE_RIGHT=Right
TYPE_MOVE_UP=Up
TYPE_OPEN_APP=Ctrl+O
TYPE_PENCIL=P
TYPE_PIN=
TYPE_PIXELATE=B
TYPE_RECTANGLE=R
TYPE_REDO=Ctrl+Shift+Z
TYPE_RESIZE_DOWN=Shift+Down
TYPE_RESIZE_LEFT=Shift+Left
TYPE_RESIZE_RIGHT=Shift+Right
TYPE_RESIZE_UP=Shift+Up
TYPE_SAVE=Ctrl+S
TYPE_SELECTION=S
TYPE_SELECTIONINDICATOR=
TYPE_SIZEDECREASE=Ctrl+Down
TYPE_SIZEINCREASE=Ctrl+Up
TYPE_TEXT=T
TYPE_TOGGLE_PANEL=Space
TYPE_UNDO=Ctrl+Z
|
GNOME and Pop Shell Integration
Pop Shell Configuration
Pop Shell is the tiling window manager in Pop!_OS. Flameshot integrates seamlessly:
1
2
3
4
5
6
7
8
|
# Check if Pop Shell is enabled
gsettings get org.gnome.shell enabled-extensions | grep pop-shell
# Configure Flameshot to work with tiling
gsettings set org.gnome.mutter.wayland xwayland-allow-grabs true
# Allow screenshots in tiling mode
gsettings set org.gnome.desktop.wm.preferences focus-mode 'sloppy'
|
Compatible GNOME Extensions
Installing screenshot extensions:
1
2
3
4
5
6
7
|
# Install extensions via command line
gnome-extensions install screenshot-window-sizer@gnome-shell-extensions.gcampax.github.com
gnome-extensions enable screenshot-window-sizer@gnome-shell-extensions.gcampax.github.com
# Screenshot Tool Extension
gnome-extensions install gnome-screenshot@ttll.de
gnome-extensions enable gnome-screenshot@ttll.de
|
Custom Desktop Entry
Create a custom desktop launcher:
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
|
# Create desktop entry
cat > ~/.local/share/applications/flameshot-custom.desktop << 'EOF'
[Desktop Entry]
Name=Flameshot Screenshot
GenericName=Screenshot Tool
Comment=Powerful yet simple to use screenshot software
Exec=flameshot gui
Icon=flameshot
Terminal=false
Type=Application
Categories=Graphics;Photography;
Keywords=screenshot;screen;capture;
StartupNotify=true
StartupWMClass=flameshot
MimeType=
Actions=TakeScreenshot;OpenLauncher;
[Desktop Action TakeScreenshot]
Name=Take Screenshot
Exec=flameshot gui
[Desktop Action OpenLauncher]
Name=Open Launcher
Exec=flameshot launcher
EOF
# Update applications database
update-desktop-database ~/.local/share/applications/
|
Multi-Monitor Configuration
Automatic Monitor Detection
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
|
# Script to detect monitor configuration
#!/bin/bash
# detect_monitors.sh - Monitor detection for Flameshot
detect_monitor_setup() {
echo "=== Monitor Configuration Detection ==="
# Get monitor count
monitor_count=$(xrandr --listmonitors | head -n1 | awk '{print $2}')
echo "Monitors detected: $monitor_count"
# List all monitors
echo -e "\n๐บ Monitor Details:"
xrandr --listmonitors | tail -n +2 | while read line; do
monitor_id=$(echo "$line" | awk '{print $1}' | sed 's/://')
monitor_name=$(echo "$line" | awk '{print $4}')
resolution=$(echo "$line" | awk '{print $3}')
echo " Monitor $monitor_id: $monitor_name ($resolution)"
done
# Create monitor-specific shortcuts
if [ "$monitor_count" -gt 1 ]; then
echo -e "\n๐ Recommended Flameshot commands for multi-monitor:"
for i in $(seq 0 $((monitor_count-1))); do
echo " Monitor $i: flameshot screen -n $i"
done
fi
}
# Execute detection
detect_monitor_setup
|
Monitor-Specific Shortcuts
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
|
# Set up shortcuts for specific monitors
setup_monitor_shortcuts() {
local monitor_count=$(xrandr --listmonitors | head -n1 | awk '{print $2}')
for i in $(seq 0 $((monitor_count-1))); do
gsettings set "org.gnome.settings-daemon.plugins.media-keys.custom-keybinding:/org/gnome/settings-daemon/plugins/media-keys/custom-keybindings/flameshot-monitor-${i}/" \
name "Flameshot Monitor $i"
gsettings set "org.gnome.settings-daemon.plugins.media-keys.custom-keybinding:/org/gnome/settings-daemon/plugins/media-keys/custom-keybindings/flameshot-monitor-${i}/" \
command "flameshot screen -n $i -c"
gsettings set "org.gnome.settings-daemon.plugins.media-keys.custom-keybinding:/org/gnome/settings-daemon/plugins/media-keys/custom-keybindings/flameshot-monitor-${i}/" \
binding "<Ctrl><Alt>$((i+1))"
echo "โ
Monitor $i shortcut: Ctrl+Alt+$((i+1))"
done
}
|
Display Scaling Configuration
For mixed DPI or scaling setups:
1
2
3
4
5
6
7
8
9
10
|
# Check current scaling
gsettings get org.gnome.desktop.interface scaling-factor
# Configure Flameshot for high DPI
export QT_AUTO_SCREEN_SCALE_FACTOR=1
export QT_SCALE_FACTOR=1.25 # Adjust based on your scaling
# Add to ~/.bashrc for persistence
echo 'export QT_AUTO_SCREEN_SCALE_FACTOR=1' >> ~/.bashrc
echo 'export QT_SCALE_FACTOR=1.25' >> ~/.bashrc
|
Available Capture Modes
1. GUI Mode (Interactive)
1
2
3
4
5
6
7
8
9
10
11
|
# Standard GUI mode
flameshot gui
# GUI with delay (milliseconds)
flameshot gui -d 3000
# GUI with default path
flameshot gui -p ~/Pictures/Screenshots/
# GUI with custom filename
flameshot gui -f "screenshot_$(date +%Y%m%d_%H%M%S).png"
|
2. Full Screen Capture
1
2
3
4
5
6
7
8
9
10
11
|
# Full screen to clipboard
flameshot full -c
# Full screen with save
flameshot full -p ~/Pictures/Screenshots/
# Full screen with upload
flameshot full -u
# Full screen without notifications
flameshot full --print
|
3. Screen Capture (Monitor Specific)
1
2
3
4
5
6
7
8
9
10
11
|
# Capture monitor 0
flameshot screen -n 0
# Capture monitor 1 with save
flameshot screen -n 1 -p ~/Pictures/
# Capture monitor to clipboard
flameshot screen -n 0 -c
# List available monitors
flameshot screen --help
|
4. Launcher Mode
1
2
3
4
5
|
# Open launcher to select mode
flameshot launcher
# Launcher with specific configuration
flameshot launcher --autostart
|
Advanced Capture Options
Common Parameters
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
|
# Delay in milliseconds
-d, --delay <ms>
# Save path
-p, --path <path>
# Filename
-f, --filename <name>
# Copy to clipboard
-c, --clipboard
# Automatic upload
-u, --upload
# Print file path to stdout
--print
# Raw image data to stdout
-r, --raw
|
Combined Examples
1
2
3
4
5
6
7
8
9
10
11
|
# Screenshot with delay, path, and clipboard
flameshot gui -d 2000 -c -p ~/Pictures/Work/
# Full screen with timestamp in filename
flameshot full -f "fullscreen_$(date +%Y%m%d_%H%M%S).png" -p ~/Pictures/
# Specific monitor with upload
flameshot screen -n 1 -u
# GUI without saving (clipboard only)
flameshot gui -c --print
|
Advanced Wrapper Script
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
|
#!/bin/bash
# flameshot_wrapper.sh - Advanced Flameshot wrapper
# Configuration
SCREENSHOTS_DIR="$HOME/Pictures/Screenshots"
WORK_DIR="$SCREENSHOTS_DIR/Work"
PERSONAL_DIR="$SCREENSHOTS_DIR/Personal"
TEMP_DIR="$SCREENSHOTS_DIR/Temp"
# Ensure directories exist
mkdir -p "$WORK_DIR" "$PERSONAL_DIR" "$TEMP_DIR"
smart_screenshot() {
local mode="$1"
local category="$2"
local timestamp=$(date +%Y%m%d_%H%M%S)
case "$category" in
"work"|"w")
local save_path="$WORK_DIR"
local prefix="work"
;;
"personal"|"p")
local save_path="$PERSONAL_DIR"
local prefix="personal"
;;
"temp"|"t")
local save_path="$TEMP_DIR"
local prefix="temp"
;;
*)
local save_path="$SCREENSHOTS_DIR"
local prefix="screenshot"
;;
esac
local filename="${prefix}_${timestamp}.png"
case "$mode" in
"gui"|"g")
flameshot gui -p "$save_path" -f "$filename"
;;
"full"|"f")
flameshot full -p "$save_path" -f "$filename" -c
;;
"monitor"|"m")
local monitor_id="${3:-0}"
flameshot screen -n "$monitor_id" -p "$save_path" -f "$filename" -c
;;
*)
echo "Usage: $0 <mode> <category> [monitor_id]"
echo "Modes: gui|g, full|f, monitor|m"
echo "Categories: work|w, personal|p, temp|t"
exit 1
;;
esac
# Show notification
if [ -f "$save_path/$filename" ]; then
notify-send "Screenshot Saved" "$filename saved to $save_path" -i flameshot
echo "Screenshot saved: $save_path/$filename"
fi
}
# Parse arguments
smart_screenshot "$@"
|
Wrapper usage:
1
2
3
4
5
6
7
|
# Make executable
chmod +x flameshot_wrapper.sh
# Example usage
./flameshot_wrapper.sh gui work # GUI screenshot for work
./flameshot_wrapper.sh full personal # Personal full screen
./flameshot_wrapper.sh monitor temp 1 # Monitor 1 for temp
|
Built-in Editor and Annotations
- Selection Tool (S) - Selection and resizing
- Rectangle (R) - Rectangles and squares
- Circle (C) - Circles and ellipses
- Arrow (A) - Directional arrows
- Line (L) - Straight lines
- Pencil (P) - Freehand drawing
- Marker (M) - Transparent highlighter
- Text (T) - Text insertion
- Blur/Pixelate (B) - Blur and pixelation
- Undo/Redo (Ctrl+Z/Ctrl+Shift+Z) - Undo/redo
- Copy (Ctrl+C) - Copy to clipboard
- Save (Ctrl+S) - Save file
- Upload (Return) - Upload to cloud services
- Pin - Pin screenshot to the desktop
Color and Thickness Configuration
1
2
3
4
5
6
7
8
9
10
|
# Edit color configuration
# Flameshot GUI > Side Panel > Color picker
# Or via config file:
# ~/.config/flameshot/flameshot.ini
[General]
drawColor=@Variant(\0\0\0\x43\x1\xff\xff\xff\xff\0\0\0\0\0\0\0\0) # Black
drawThickness=3 # 3px thickness
uiColor=@Variant(\0\0\0\x43\x1\xff\xff\x80\x80\x80\x80\x80\x80\0\0) # UI gray
|
Custom Editor Shortcuts
Edit the editor shortcuts in ~/.config/flameshot/flameshot.ini:
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
|
[Shortcuts]
# Tools
TYPE_ARROW=A
TYPE_CIRCLE=C
TYPE_RECTANGLE=R
TYPE_PENCIL=P
TYPE_MARKER=M
TYPE_TEXT=T
TYPE_SELECTION=S
TYPE_BLUR=B
# Actions
TYPE_COPY=Ctrl+C
TYPE_SAVE=Ctrl+S
TYPE_UNDO=Ctrl+Z
TYPE_REDO=Ctrl+Shift+Z
TYPE_EXIT=Escape
TYPE_TOGGLE_PANEL=Space
# Movement
TYPE_MOVE_LEFT=Left
TYPE_MOVE_RIGHT=Right
TYPE_MOVE_UP=Up
TYPE_MOVE_DOWN=Down
# Resize
TYPE_RESIZE_LEFT=Shift+Left
TYPE_RESIZE_RIGHT=Shift+Right
TYPE_RESIZE_UP=Shift+Up
TYPE_RESIZE_DOWN=Shift+Down
# Thickness
TYPE_SIZEINCREASE=Ctrl+Up
TYPE_SIZEDECREASE=Ctrl+Down
|
Advanced Editor Workflow
Annotation Templates
Create templates for common annotations:
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
|
#!/bin/bash
# flameshot_templates.sh - Template system for annotations
create_work_template() {
# Screenshot template for work documents
flameshot gui -d 1000 &
sleep 2
# Automatically add timestamp and watermark
local timestamp=$(date "+%Y-%m-%d %H:%M")
echo "Template: Work Document - $timestamp" | xclip -selection clipboard
}
create_bug_report_template() {
# Template for bug reports
flameshot gui -d 1000 &
sleep 2
# Automatic instructions for bug reports
cat << EOF | xclip -selection clipboard
๐ BUG REPORT
๐
Date: $(date "+%Y-%m-%d %H:%M")
๐ฅ๏ธ System: Pop!_OS $(lsb_release -rs)
๐ง Steps to reproduce:
1.
2.
3.
โ Expected behavior:
โ
Actual behavior:
๐ Additional notes:
EOF
}
create_tutorial_template() {
# Template for tutorials/guides
flameshot gui -d 1000 &
sleep 2
cat << EOF | xclip -selection clipboard
๐ TUTORIAL STEP
Step X: Title
๐ก Instructions:
โ ๏ธ Important notes:
โก๏ธ Next step:
EOF
}
# Menu selection
case "$1" in
"work"|"w")
create_work_template
;;
"bug"|"b")
create_bug_report_template
;;
"tutorial"|"t")
create_tutorial_template
;;
*)
echo "Usage: $0 <template>"
echo "Templates: work|w, bug|b, tutorial|t"
;;
esac
|
Batch Editing Script
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
|
#!/bin/bash
# batch_annotation.sh - Batch processing for screenshots
batch_annotate() {
local input_dir="$1"
local output_dir="$2"
local annotation_text="$3"
if [[ ! -d "$input_dir" ]]; then
echo "โ Input directory not found: $input_dir"
exit 1
fi
mkdir -p "$output_dir"
echo "๐ Processing screenshots in $input_dir..."
find "$input_dir" -name "*.png" -o -name "*.jpg" -o -name "*.jpeg" | while read -r file; do
echo "๐ Processing: $(basename "$file")"
# Use ImageMagick for batch annotation
convert "$file" \
-font "DejaVu-Sans-Bold" \
-pointsize 20 \
-fill white \
-stroke black \
-strokewidth 2 \
-gravity southeast \
-annotate +10+10 "$annotation_text" \
"$output_dir/annotated_$(basename "$file")"
echo "โ
Saved: $output_dir/annotated_$(basename "$file")"
done
echo "๐ Batch annotation completed!"
}
# Usage
batch_annotate "$@"
|
File Management and Export
Flameshot supports several export formats:
1
2
3
4
5
6
7
8
9
10
11
|
# PNG (default, best quality)
flameshot gui -f screenshot.png
# JPG (smaller files)
flameshot gui -f screenshot.jpg
# BMP (uncompressed)
flameshot gui -f screenshot.bmp
# Raw data (for processing)
flameshot gui -r > screenshot_data.raw
|
Automatic Path Configuration
Smart Directory Setup
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
|
#!/bin/bash
# smart_file_organization.sh - Intelligent file organization
setup_screenshot_organization() {
local base_dir="$HOME/Pictures/Screenshots"
# Create directory structure
mkdir -p "$base_dir"/{Daily,Work,Projects,Bugs,Tutorials,Archive}
mkdir -p "$base_dir/Daily/$(date +%Y)"/"$(date +%m-%B)"
# Set up symlinks for easy access
ln -sf "$base_dir/Daily/$(date +%Y)/$(date +%m-%B)" "$base_dir/Today"
ln -sf "$base_dir/Work" "$base_dir/Current"
# Create config for automatic organization
cat > "$base_dir/.flameshot_config" << EOF
# Flameshot organization config
BASE_DIR=$base_dir
DAILY_DIR=$base_dir/Daily/$(date +%Y)/$(date +%m-%B)
WORK_DIR=$base_dir/Work
PROJECT_DIR=$base_dir/Projects
BUG_DIR=$base_dir/Bugs
TUTORIAL_DIR=$base_dir/Tutorials
ARCHIVE_DIR=$base_dir/Archive
EOF
echo "๐ Screenshot organization setup complete!"
tree "$base_dir" -L 3
}
# Execute setup
setup_screenshot_organization
|
Automatic File Naming
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
|
# Intelligent filename generation
generate_smart_filename() {
local category="$1"
local window_title=$(xdotool getactivewindow getwindowname 2>/dev/null | tr ' ' '_' | tr -cd '[:alnum:]_-')
local timestamp=$(date +%Y%m%d_%H%M%S)
case "$category" in
"work")
echo "work_${window_title}_${timestamp}.png"
;;
"bug")
echo "bug_${window_title}_${timestamp}.png"
;;
"tutorial")
echo "tutorial_step_${timestamp}.png"
;;
*)
echo "screenshot_${timestamp}.png"
;;
esac
}
# Enhanced Flameshot wrapper with smart naming
smart_flameshot() {
local mode="$1"
local category="$2"
# Source organization config
source "$HOME/Pictures/Screenshots/.flameshot_config" 2>/dev/null || {
echo "โ Configuration not found. Run setup first."
exit 1
}
# Determine save directory
case "$category" in
"work") local save_dir="$WORK_DIR" ;;
"bug") local save_dir="$BUG_DIR" ;;
"tutorial") local save_dir="$TUTORIAL_DIR" ;;
"daily") local save_dir="$DAILY_DIR" ;;
*) local save_dir="$BASE_DIR" ;;
esac
# Generate smart filename
local filename=$(generate_smart_filename "$category")
# Execute Flameshot
case "$mode" in
"gui")
flameshot gui -p "$save_dir" -f "$filename"
;;
"full")
flameshot full -p "$save_dir" -f "$filename" -c
;;
*)
echo "Usage: $0 <gui|full> <work|bug|tutorial|daily>"
exit 1
;;
esac
# Post-processing notification
if [[ -f "$save_dir/$filename" ]]; then
# Show notification with file info
local file_size=$(du -h "$save_dir/$filename" | cut -f1)
notify-send "Screenshot Saved" \
"File: $filename\nSize: $file_size\nLocation: $save_dir" \
-i flameshot -t 5000
# Log to activity file
echo "$(date '+%Y-%m-%d %H:%M:%S') - $category - $filename - $file_size" >> "$BASE_DIR/.screenshot_log"
fi
}
|
Cloud Storage Integration
Google Drive Integration
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
|
#!/bin/bash
# gdrive_upload.sh - Google Drive upload integration
setup_gdrive_integration() {
echo "๐ง Setting up Google Drive integration..."
# Install rclone if not present
if ! command -v rclone &> /dev/null; then
echo "๐ฆ Installing rclone..."
sudo apt install rclone
fi
# Configure Google Drive (interactive)
echo "๐ Configuring Google Drive access..."
rclone config
# Create upload script
cat > ~/.local/bin/flameshot-gdrive << 'EOF'
#!/bin/bash
# Flameshot + Google Drive upload
# Take screenshot and save locally
temp_file="/tmp/flameshot_$(date +%s).png"
flameshot gui -p /tmp -f "$(basename "$temp_file")"
# Check if screenshot was taken
if [[ -f "$temp_file" ]]; then
# Upload to Google Drive
remote_path="Screenshots/$(date +%Y)/$(date +%m-%B)/$(basename "$temp_file")"
echo "โ๏ธ Uploading to Google Drive..."
if rclone copy "$temp_file" "gdrive:$remote_path" --progress; then
# Get shareable link
share_link=$(rclone link "gdrive:$remote_path" 2>/dev/null)
# Copy link to clipboard
echo "$share_link" | xclip -selection clipboard
# Show success notification
notify-send "Screenshot Uploaded" \
"Uploaded to Google Drive\nLink copied to clipboard" \
-i flameshot -t 5000
# Clean up temp file
rm "$temp_file"
echo "โ
Screenshot uploaded successfully!"
echo "๐ Share link: $share_link"
else
echo "โ Upload failed"
notify-send "Upload Failed" "Could not upload to Google Drive" -i error
fi
else
echo "โ No screenshot taken"
fi
EOF
chmod +x ~/.local/bin/flameshot-gdrive
echo "โ
Google Drive integration setup complete!"
echo "Usage: flameshot-gdrive"
}
|
Dropbox Integration
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
|
#!/bin/bash
# dropbox_integration.sh - Dropbox integration for Flameshot
setup_dropbox_integration() {
echo "๐ง Setting up Dropbox integration..."
# Install Dropbox Uploader
if [[ ! -f ~/.local/bin/dropbox_uploader.sh ]]; then
echo "๐ฆ Installing Dropbox Uploader..."
curl -o ~/.local/bin/dropbox_uploader.sh \
"https://raw.githubusercontent.com/andreafabrizi/Dropbox-Uploader/master/dropbox_uploader.sh"
chmod +x ~/.local/bin/dropbox_uploader.sh
# Configure Dropbox access
~/.local/bin/dropbox_uploader.sh
fi
# Create upload wrapper
cat > ~/.local/bin/flameshot-dropbox << 'EOF'
#!/bin/bash
# Flameshot + Dropbox upload
temp_file="/tmp/flameshot_$(date +%s).png"
flameshot gui -p /tmp -f "$(basename "$temp_file")"
if [[ -f "$temp_file" ]]; then
remote_path="/Screenshots/$(date +%Y-%m-%d)/$(basename "$temp_file")"
echo "โ๏ธ Uploading to Dropbox..."
if ~/.local/bin/dropbox_uploader.sh upload "$temp_file" "$remote_path"; then
# Get shareable link
share_link=$(~/.local/bin/dropbox_uploader.sh share "$remote_path" | grep -o 'https://[^"]*')
# Copy to clipboard
echo "$share_link" | xclip -selection clipboard
# Notification
notify-send "Screenshot Uploaded" \
"Uploaded to Dropbox\nLink copied to clipboard" \
-i flameshot -t 5000
rm "$temp_file"
echo "โ
Upload successful: $share_link"
else
echo "โ Upload failed"
fi
fi
EOF
chmod +x ~/.local/bin/flameshot-dropbox
echo "โ
Dropbox integration setup complete!"
}
|
Common Troubleshooting
Wayland Compatibility Issues
Pop!_OS uses Wayland by default, which can cause problems with Flameshot:
1
2
3
4
5
6
7
8
9
10
11
|
# Check current session
echo $XDG_SESSION_TYPE
# If Wayland, required settings:
gsettings set org.gnome.mutter.wayland xwayland-allow-grabs true
# Alternative: force X11 session
sudo sed -i 's/#WaylandEnable=false/WaylandEnable=false/' /etc/gdm3/gdm.conf
# Restart GDM
sudo systemctl restart gdm3
|
Multi-Monitor Issues
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
|
# Multi-monitor diagnostics
#!/bin/bash
# monitor_diagnostics.sh
diagnose_monitor_issues() {
echo "๐ฅ๏ธ Monitor Diagnostics for Flameshot"
echo "=================================="
# Monitor count and info
echo -e "\n1. Monitor Detection:"
xrandr --listmonitors
# Current scaling
echo -e "\n2. Display Scaling:"
gsettings get org.gnome.desktop.interface scaling-factor
# Wayland/X11 check
echo -e "\n3. Display Server:"
echo "Current: $XDG_SESSION_TYPE"
# Test each monitor
echo -e "\n4. Testing Monitor Capture:"
monitor_count=$(xrandr --listmonitors | head -n1 | awk '{print $2}')
for i in $(seq 0 $((monitor_count-1))); do
echo "Testing monitor $i..."
if timeout 5 flameshot screen -n "$i" --print 2>/dev/null; then
echo " โ
Monitor $i: OK"
else
echo " โ Monitor $i: FAILED"
fi
done
# Flameshot version
echo -e "\n5. Flameshot Version:"
flameshot --version
# Qt environment
echo -e "\n6. Qt Environment:"
echo "QT_AUTO_SCREEN_SCALE_FACTOR: ${QT_AUTO_SCREEN_SCALE_FACTOR:-not set}"
echo "QT_SCALE_FACTOR: ${QT_SCALE_FACTOR:-not set}"
# Suggested fixes
echo -e "\n๐ง Suggested Fixes:"
if [[ "$XDG_SESSION_TYPE" == "wayland" ]]; then
echo "- Enable Wayland grabs: gsettings set org.gnome.mutter.wayland xwayland-allow-grabs true"
echo "- Or switch to X11 session"
fi
echo "- Set Qt scaling: export QT_AUTO_SCREEN_SCALE_FACTOR=1"
echo "- Update Flameshot: sudo apt update && sudo apt upgrade flameshot"
}
diagnose_monitor_issues
|
Permission Issues
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
|
# Fix permission issues
fix_flameshot_permissions() {
echo "๐ Fixing Flameshot Permissions"
# Screenshot directory permissions
chmod 755 ~/Pictures/Screenshots
chmod 755 ~/Pictures/Screenshots/*
# Config file permissions
chmod 644 ~/.config/flameshot/flameshot.ini
# Desktop entry permissions
chmod 644 ~/.local/share/applications/flameshot*.desktop
# Binary permissions (if compiled from source)
if [[ -f ~/.local/bin/flameshot ]]; then
chmod 755 ~/.local/bin/flameshot
fi
# Flatpak permissions (if using Flatpak)
if flatpak list | grep -q flameshot; then
flatpak permission-set screenshot screenshot org.flameshot.Flameshot yes
flatpak permission-set desktop desktop org.flameshot.Flameshot yes
fi
echo "โ
Permissions fixed"
}
|
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
|
# Performance optimization
optimize_flameshot_performance() {
echo "โก Optimizing Flameshot Performance"
# Increase Qt application performance
export QT_X11_NO_MITSHM=1
export QT_QUICK_BACKEND=software
# Add to bashrc for persistence
cat >> ~/.bashrc << 'EOF'
# Flameshot performance optimizations
export QT_X11_NO_MITSHM=1
export QT_QUICK_BACKEND=software
EOF
# Optimize screenshot directory (SSD optimization)
screenshot_dir="$HOME/Pictures/Screenshots"
if [[ -d "$screenshot_dir" ]]; then
# Enable compression for PNG files
find "$screenshot_dir" -name "*.png" -exec optipng -quiet {} \;
# Clean old screenshots (older than 30 days)
find "$screenshot_dir" -name "*.png" -mtime +30 -delete
echo "๐งน Cleaned old screenshots and optimized existing ones"
fi
# GPU acceleration check
if lspci | grep -i nvidia > /dev/null; then
echo "๐ฎ NVIDIA GPU detected - consider GPU acceleration"
echo "Install nvidia-utils: sudo apt install nvidia-utils-535"
fi
echo "โ
Performance optimization complete"
}
|
Recovery Script
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
|
#!/bin/bash
# flameshot_recovery.sh - Complete recovery script
flameshot_recovery() {
echo "๐ Flameshot Recovery Script"
echo "=========================="
# Backup current config
if [[ -f ~/.config/flameshot/flameshot.ini ]]; then
echo "๐พ Backing up current configuration..."
cp ~/.config/flameshot/flameshot.ini ~/.config/flameshot/flameshot.ini.backup.$(date +%s)
fi
# Remove and reinstall
echo "๐๏ธ Removing current installation..."
sudo apt remove --purge flameshot
flatpak uninstall org.flameshot.Flameshot -y 2>/dev/null
# Clean config
rm -rf ~/.config/flameshot
# Fresh install
echo "๐ฆ Fresh installation..."
sudo apt update
sudo apt install flameshot
# Reset shortcuts
echo "โจ๏ธ Resetting keyboard shortcuts..."
gsettings reset-recursively org.gnome.settings-daemon.plugins.media-keys
# Verify installation
echo "โ
Verifying installation..."
if flameshot --version; then
echo "๐ Recovery successful!"
echo "Run 'flameshot gui' to test"
else
echo "โ Recovery failed - manual intervention required"
fi
}
# Execute recovery
flameshot_recovery
|
Alternatives and Comparisons
| Tool |
Pop!_OS Native |
Editing |
Cloud |
CLI |
Multi-Monitor |
Rating |
| Flameshot |
โ
Excellent |
๐ข Advanced |
๐ข Yes |
๐ข Full |
๐ข Perfect |
โญโญโญโญโญ |
| GNOME Screenshot |
โ
Native |
๐ด None |
๐ด No |
๐ก Basic |
๐ก Good |
โญโญโญ |
| Shutter |
๐ก Good |
๐ข Advanced |
๐ก Plugins |
๐ก Limited |
๐ก Good |
โญโญโญโญ |
| Spectacle |
๐ด KDE Only |
๐ก Basic |
๐ด No |
๐ก Limited |
๐ก Good |
โญโญโญ |
| Ksnip |
๐ก Good |
๐ข Good |
๐ก Limited |
๐ก Basic |
๐ก Good |
โญโญโญโญ |
| Greenshot |
๐ด Windows |
๐ข Advanced |
๐ข Yes |
๐ด No |
๐ก Good |
โญโญโญ |
Installation Commands Comparison
1
2
3
4
5
6
7
8
9
10
11
|
# Flameshot (Recommended)
sudo apt install flameshot
# Alternatives
sudo apt install gnome-screenshot # GNOME default
sudo apt install shutter # Feature-rich but older
sudo apt install spectacle # KDE tool (works on GNOME)
# Modern alternatives
flatpak install flathub org.kde.ksnip # Cross-platform
snap install ksnip # Snap version
|
Feature Comparison Details
Editing Capabilities
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
|
Flameshot:
โ
Rectangle, Circle, Arrow, Line, Pencil
โ
Text with custom fonts
โ
Blur/Pixelate
โ
Marker/Highlighter
โ
Undo/Redo
โ
Color picker
โ
Thickness adjustment
Shutter:
โ
Similar tools to Flameshot
โ
Effects and filters
โ Less intuitive interface
โ Older codebase
GNOME Screenshot:
โ No editing capabilities
โ Basic save/copy only
|
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
|
# Benchmark script
#!/bin/bash
# screenshot_benchmark.sh
benchmark_tools() {
echo "๐ Screenshot Tools Performance Benchmark"
echo "======================================="
local test_iterations=5
for tool in flameshot gnome-screenshot shutter; do
if command -v "$tool" &> /dev/null; then
echo "Testing $tool..."
case "$tool" in
"flameshot")
local cmd="flameshot full -p /tmp"
;;
"gnome-screenshot")
local cmd="gnome-screenshot -f /tmp/gnome-test.png"
;;
"shutter")
local cmd="shutter -f -o /tmp/shutter-test.png -e"
;;
esac
# Measure time
local total_time=0
for i in $(seq 1 $test_iterations); do
local start_time=$(date +%s.%N)
timeout 10 $cmd &> /dev/null
local end_time=$(date +%s.%N)
local iteration_time=$(echo "$end_time - $start_time" | bc)
total_time=$(echo "$total_time + $iteration_time" | bc)
done
local avg_time=$(echo "scale=3; $total_time / $test_iterations" | bc)
echo " Average time: ${avg_time}s"
else
echo "$tool: Not installed"
fi
done
}
# Run benchmark
benchmark_tools
|
From Shutter to Flameshot
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
|
#!/bin/bash
# migrate_from_shutter.sh
migrate_shutter_to_flameshot() {
echo "๐ Migrating from Shutter to Flameshot"
# Backup Shutter config
if [[ -d ~/.shutter ]]; then
echo "๐พ Backing up Shutter configuration..."
tar -czf ~/shutter_backup_$(date +%s).tar.gz ~/.shutter
fi
# Install Flameshot
sudo apt install flameshot
# Migrate keyboard shortcuts
echo "โจ๏ธ Setting up equivalent shortcuts..."
# Common Shutter shortcuts โ Flameshot equivalents
gsettings set "org.gnome.settings-daemon.plugins.media-keys.custom-keybinding:/org/gnome/settings-daemon/plugins/media-keys/custom-keybindings/flameshot-selection/" \
name "Selection Screenshot (Flameshot)"
gsettings set "org.gnome.settings-daemon.plugins.media-keys.custom-keybinding:/org/gnome/settings-daemon/plugins/media-keys/custom-keybindings/flameshot-selection/" \
command "flameshot gui"
gsettings set "org.gnome.settings-daemon.plugins.media-keys.custom-keybinding:/org/gnome/settings-daemon/plugins/media-keys/custom-keybindings/flameshot-selection/" \
binding "Print"
# Migrate screenshot directory
local shutter_dir="$HOME/Pictures"
local flameshot_dir="$HOME/Pictures/Screenshots"
if [[ -d "$shutter_dir" ]] && [[ ! -d "$flameshot_dir" ]]; then
mkdir -p "$flameshot_dir"
echo "๐ Created Flameshot directory: $flameshot_dir"
fi
# Configure Flameshot to use same directory
echo "savePath=$flameshot_dir" >> ~/.config/flameshot/flameshot.ini
echo "โ
Migration complete!"
echo "๐ก Tips for transition:"
echo " - Flameshot GUI: flameshot gui"
echo " - Full screen: flameshot full"
echo " - Config location: ~/.config/flameshot/flameshot.ini"
}
migrate_shutter_to_flameshot
|
Professional Workflows
Developer Workflow
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
|
#!/bin/bash
# developer_screenshot_workflow.sh
setup_developer_workflow() {
echo "๐จโ๐ป Setting up Developer Screenshot Workflow"
local dev_dir="$HOME/Pictures/Screenshots/Development"
mkdir -p "$dev_dir"/{Bugs,Features,Documentation,Reviews,UI}
# Git integration for screenshots
cat > ~/.local/bin/git-screenshot << 'EOF'
#!/bin/bash
# Git-integrated screenshot tool
# Get current branch and commit
branch=$(git branch --show-current 2>/dev/null || echo "no-git")
commit=$(git rev-parse --short HEAD 2>/dev/null || echo "no-commit")
project=$(basename "$(git rev-parse --show-toplevel 2>/dev/null)" || basename "$PWD")
# Create filename
timestamp=$(date +%Y%m%d_%H%M%S)
filename="${project}_${branch}_${commit}_${timestamp}.png"
# Take screenshot
dev_dir="$HOME/Pictures/Screenshots/Development"
flameshot gui -p "$dev_dir" -f "$filename"
# If screenshot was taken, add to git (optional)
if [[ -f "$dev_dir/$filename" ]]; then
echo "๐ธ Screenshot saved: $filename"
# Optionally add to git repository
read -p "Add screenshot to git repository? [y/N] " -n 1 -r
echo
if [[ $REPLY =~ ^[Yy]$ ]]; then
cp "$dev_dir/$filename" "./docs/screenshots/"
git add "./docs/screenshots/$filename"
echo "๐ Screenshot added to git staging area"
fi
fi
EOF
chmod +x ~/.local/bin/git-screenshot
# Bug report template
cat > ~/.local/bin/bug-screenshot << 'EOF'
#!/bin/bash
# Bug report screenshot with automatic info
# System info collection
get_system_info() {
echo "=== SYSTEM INFO ==="
echo "OS: $(lsb_release -d | cut -f2)"
echo "Kernel: $(uname -r)"
echo "Desktop: $XDG_CURRENT_DESKTOP"
echo "Date: $(date)"
echo "User: $USER"
echo "==================="
}
# Create bug report
bug_dir="$HOME/Pictures/Screenshots/Development/Bugs"
mkdir -p "$bug_dir"
timestamp=$(date +%Y%m%d_%H%M%S)
filename="bug_report_${timestamp}.png"
# Take screenshot
flameshot gui -p "$bug_dir" -f "$filename"
if [[ -f "$bug_dir/$filename" ]]; then
# Create accompanying info file
info_file="$bug_dir/bug_report_${timestamp}.txt"
{
get_system_info
echo
echo "Screenshot: $filename"
echo "Location: $bug_dir"
echo
echo "BUG DESCRIPTION:"
echo "=================="
echo "Steps to reproduce:"
echo "1. "
echo "2. "
echo "3. "
echo
echo "Expected behavior:"
echo ""
echo
echo "Actual behavior:"
echo ""
echo
echo "Additional notes:"
echo ""
} > "$info_file"
echo "๐ Bug report created:"
echo " Screenshot: $bug_dir/$filename"
echo " Info file: $info_file"
# Open info file for editing
if command -v code &> /dev/null; then
code "$info_file"
elif command -v gedit &> /dev/null; then
gedit "$info_file" &
fi
fi
EOF
chmod +x ~/.local/bin/bug-screenshot
echo "โ
Developer workflow setup complete!"
echo "Commands available:"
echo " git-screenshot - Git-integrated screenshots"
echo " bug-screenshot - Bug report with system info"
}
setup_developer_workflow
|
Content Creator Workflow
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
|
#!/bin/bash
# content_creator_workflow.sh
setup_content_creator_workflow() {
echo "๐จ Setting up Content Creator Screenshot Workflow"
local content_dir="$HOME/Pictures/Screenshots/Content"
mkdir -p "$content_dir"/{Tutorials,Social,Blog,YouTube,Reviews}
# Tutorial screenshot system
cat > ~/.local/bin/tutorial-screenshot << 'EOF'
#!/bin/bash
# Tutorial screenshot with step numbering
tutorial_dir="$HOME/Pictures/Screenshots/Content/Tutorials"
step_file="$tutorial_dir/.current_step"
# Initialize or read step counter
if [[ -f "$step_file" ]]; then
current_step=$(cat "$step_file")
else
current_step=1
echo "$current_step" > "$step_file"
fi
# Get tutorial name
tutorial_name="${1:-tutorial}"
# Create filename
filename="step_$(printf "%02d" "$current_step")_${tutorial_name}.png"
echo "๐ธ Taking tutorial screenshot - Step $current_step"
# Take screenshot with step overlay
flameshot gui -p "$tutorial_dir" -f "$filename"
if [[ -f "$tutorial_dir/$filename" ]]; then
# Add step number overlay using ImageMagick
if command -v convert &> /dev/null; then
convert "$tutorial_dir/$filename" \
-font "DejaVu-Sans-Bold" \
-pointsize 48 \
-fill "rgba(255,255,255,0.9)" \
-stroke "rgba(0,0,0,0.8)" \
-strokewidth 2 \
-gravity northwest \
-annotate +20+20 "Step $current_step" \
"$tutorial_dir/$filename"
fi
echo "โ
Tutorial step $current_step saved: $filename"
# Increment step counter
((current_step++))
echo "$current_step" > "$step_file"
echo "โก๏ธ Next step will be: $current_step"
else
echo "โ Screenshot cancelled"
fi
EOF
chmod +x ~/.local/bin/tutorial-screenshot
# Social media screenshot with templates
cat > ~/.local/bin/social-screenshot << 'EOF'
#!/bin/bash
# Social media optimized screenshots
social_dir="$HOME/Pictures/Screenshots/Content/Social"
platform="${1:-general}"
case "$platform" in
"twitter"|"x")
# Twitter/X optimized (16:9 recommended)
flameshot gui -p "$social_dir" -f "twitter_$(date +%Y%m%d_%H%M%S).png"
;;
"instagram"|"ig")
# Instagram square format
flameshot gui -p "$social_dir" -f "instagram_$(date +%Y%m%d_%H%M%S).png"
;;
"linkedin"|"li")
# LinkedIn post format
flameshot gui -p "$social_dir" -f "linkedin_$(date +%Y%m%d_%H%M%S).png"
;;
"youtube"|"yt")
# YouTube thumbnail (16:9)
flameshot gui -p "$social_dir" -f "youtube_$(date +%Y%m%d_%H%M%S).png"
;;
*)
echo "Usage: social-screenshot <platform>"
echo "Platforms: twitter/x, instagram/ig, linkedin/li, youtube/yt"
exit 1
;;
esac
echo "๐ฑ Social media screenshot for $platform saved!"
EOF
chmod +x ~/.local/bin/social-screenshot
# Batch watermarking
cat > ~/.local/bin/watermark-screenshots << 'EOF'
#!/bin/bash
# Batch watermark application
watermark_dir="$1"
watermark_text="${2:-ยฉ $(date +%Y) - Created with Pop!_OS}"
if [[ ! -d "$watermark_dir" ]]; then
echo "Usage: $0 <directory> [watermark_text]"
exit 1
fi
echo "๐ท๏ธ Applying watermarks to screenshots in $watermark_dir"
find "$watermark_dir" -name "*.png" | while read -r file; do
echo "Processing: $(basename "$file")"
# Create watermarked version
convert "$file" \
-font "DejaVu-Sans" \
-pointsize 16 \
-fill "rgba(255,255,255,0.8)" \
-stroke "rgba(0,0,0,0.5)" \
-strokewidth 1 \
-gravity southeast \
-annotate +10+10 "$watermark_text" \
"${file%.*}_watermarked.png"
done
echo "โ
Watermarking complete!"
EOF
chmod +x ~/.local/bin/watermark-screenshots
echo "โ
Content creator workflow setup complete!"
echo "Commands available:"
echo " tutorial-screenshot [name] - Step-numbered tutorial screenshots"
echo " social-screenshot <platform> - Platform-optimized screenshots"
echo " watermark-screenshots <dir> - Batch watermark application"
}
setup_content_creator_workflow
|
System Admin Workflow
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
|
#!/bin/bash
# sysadmin_workflow.sh
setup_sysadmin_workflow() {
echo "๐ง Setting up System Administrator Screenshot Workflow"
local admin_dir="$HOME/Pictures/Screenshots/SysAdmin"
mkdir -p "$admin_dir"/{Incidents,Monitoring,Configs,Documentation,Training}
# Incident documentation
cat > ~/.local/bin/incident-screenshot << 'EOF'
#!/bin/bash
# Incident documentation screenshot
incident_dir="$HOME/Pictures/Screenshots/SysAdmin/Incidents"
incident_id="${1:-$(date +%Y%m%d_%H%M%S)}"
echo "๐จ Documenting incident: $incident_id"
# System info collection
collect_system_info() {
cat << EOF > "$incident_dir/incident_${incident_id}_info.txt"
INCIDENT DOCUMENTATION
=====================
Incident ID: $incident_id
Timestamp: $(date)
System: $(hostname)
OS: $(lsb_release -d | cut -f2)
Uptime: $(uptime)
Load: $(uptime | awk -F'load average:' '{print $2}')
Memory: $(free -h | grep Mem)
Disk: $(df -h | grep -v tmpfs)
PROCESSES (top 10 CPU):
$(ps aux --sort=-%cpu | head -11)
PROCESSES (top 10 Memory):
$(ps aux --sort=-%mem | head -11)
NETWORK:
$(ss -tuln | head -10)
LOGS (last 20 lines):
$(tail -20 /var/log/syslog)
SCREENSHOT: incident_${incident_id}.png
===========================================
EOF
}
# Take screenshot
flameshot gui -p "$incident_dir" -f "incident_${incident_id}.png"
if [[ -f "$incident_dir/incident_${incident_id}.png" ]]; then
# Collect system information
collect_system_info
echo "๐ Incident documented:"
echo " Screenshot: $incident_dir/incident_${incident_id}.png"
echo " System info: $incident_dir/incident_${incident_id}_info.txt"
# Optional: Open documentation for editing
if command -v code &> /dev/null; then
code "$incident_dir/incident_${incident_id}_info.txt"
fi
fi
EOF
chmod +x ~/.local/bin/incident-screenshot
# Config documentation
cat > ~/.local/bin/config-screenshot << 'EOF'
#!/bin/bash
# Configuration documentation screenshot
config_dir="$HOME/Pictures/Screenshots/SysAdmin/Configs"
config_name="${1:-config}"
timestamp=$(date +%Y%m%d_%H%M%S)
echo "โ๏ธ Documenting configuration: $config_name"
# Take screenshot
flameshot gui -p "$config_dir" -f "${config_name}_${timestamp}.png"
if [[ -f "$config_dir/${config_name}_${timestamp}.png" ]]; then
# Create documentation template
cat << EOF > "$config_dir/${config_name}_${timestamp}_notes.md"
# Configuration Documentation: $config_name
**Date:** $(date)
**System:** $(hostname)
**Screenshot:** ${config_name}_${timestamp}.png
## Configuration Details
### Purpose
<!-- Describe what this configuration is for -->
### Changes Made
<!-- List changes made to the configuration -->
-
-
-
### Before/After
<!-- Describe the state before and after changes -->
**Before:**
**After:**
### Testing
<!-- Document how the configuration was tested -->
- [ ] Configuration syntax validated
- [ ] Service restarted successfully
- [ ] Functionality tested
- [ ] Monitoring alerts checked
### Rollback Plan
<!-- Document how to rollback if needed -->
1.
2.
3.
### Related Documentation
<!-- Links to related docs, tickets, etc. -->
-
---
*Generated by config-screenshot on $(date)*
EOF
echo "โ
Configuration documented:"
echo " Screenshot: $config_dir/${config_name}_${timestamp}.png"
echo " Notes: $config_dir/${config_name}_${timestamp}_notes.md"
fi
EOF
chmod +x ~/.local/bin/config-screenshot
echo "โ
System administrator workflow setup complete!"
echo "Commands available:"
echo " incident-screenshot [id] - Incident documentation with system info"
echo " config-screenshot [name] - Configuration change documentation"
}
setup_sysadmin_workflow
|
Migration and Configuration Backups
Full Configuration Backup
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
|
#!/bin/bash
# flameshot_backup.sh - Complete configuration backup
create_flameshot_backup() {
local backup_dir="$HOME/.config/flameshot-backup-$(date +%Y%m%d_%H%M%S)"
mkdir -p "$backup_dir"
echo "๐พ Creating complete Flameshot backup..."
# Backup configuration files
if [[ -f ~/.config/flameshot/flameshot.ini ]]; then
cp ~/.config/flameshot/flameshot.ini "$backup_dir/"
echo "โ
Configuration backed up"
fi
# Backup keyboard shortcuts
gsettings list-recursively org.gnome.settings-daemon.plugins.media-keys > "$backup_dir/keyboard_shortcuts.txt"
echo "โ
Keyboard shortcuts backed up"
# Backup desktop entries
if [[ -f ~/.local/share/applications/flameshot*.desktop ]]; then
cp ~/.local/share/applications/flameshot*.desktop "$backup_dir/"
echo "โ
Desktop entries backed up"
fi
# Backup custom scripts
if [[ -d ~/.local/bin ]]; then
find ~/.local/bin -name "*flameshot*" -o -name "*screenshot*" -exec cp {} "$backup_dir/" \;
echo "โ
Custom scripts backed up"
fi
# Create restoration script
cat > "$backup_dir/restore.sh" << 'EOF'
#!/bin/bash
# Restoration script for Flameshot backup
echo "๐ Restoring Flameshot configuration..."
# Restore config file
if [[ -f flameshot.ini ]]; then
mkdir -p ~/.config/flameshot
cp flameshot.ini ~/.config/flameshot/
echo "โ
Configuration restored"
fi
# Restore desktop entries
if ls flameshot*.desktop 1> /dev/null 2>&1; then
mkdir -p ~/.local/share/applications
cp flameshot*.desktop ~/.local/share/applications/
update-desktop-database ~/.local/share/applications/
echo "โ
Desktop entries restored"
fi
# Restore custom scripts
mkdir -p ~/.local/bin
for script in *screenshot* *flameshot*; do
if [[ -f "$script" && "$script" != "restore.sh" ]]; then
cp "$script" ~/.local/bin/
chmod +x ~/.local/bin/"$script"
fi
done
echo "๐ Flameshot restoration complete!"
echo "Note: Keyboard shortcuts need to be restored manually"
EOF
chmod +x "$backup_dir/restore.sh"
# Create archive
tar -czf "$backup_dir.tar.gz" -C "$(dirname "$backup_dir")" "$(basename "$backup_dir")"
rm -rf "$backup_dir"
echo "๐ฆ Backup created: $backup_dir.tar.gz"
echo "๐ก To restore: extract archive and run restore.sh"
}
create_flameshot_backup
|
Migration Script
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
|
#!/bin/bash
# flameshot_migration.sh - Migration between systems
migrate_flameshot_config() {
local source_backup="$1"
if [[ ! -f "$source_backup" ]]; then
echo "โ Backup file not found: $source_backup"
echo "Usage: $0 <backup_file.tar.gz>"
exit 1
fi
echo "๐ Migrating Flameshot configuration..."
# Extract backup
local temp_dir="/tmp/flameshot-migrate-$$"
mkdir -p "$temp_dir"
tar -xzf "$source_backup" -C "$temp_dir"
# Find backup directory
local backup_dir=$(find "$temp_dir" -name "*flameshot-backup*" -type d | head -1)
if [[ -z "$backup_dir" ]]; then
echo "โ Invalid backup file format"
rm -rf "$temp_dir"
exit 1
fi
# Install Flameshot if not present
if ! command -v flameshot &> /dev/null; then
echo "๐ฆ Installing Flameshot..."
sudo apt update && sudo apt install flameshot
fi
# Restore configuration
cd "$backup_dir"
bash restore.sh
# Cleanup
rm -rf "$temp_dir"
# Test installation
echo "๐งช Testing Flameshot..."
if flameshot --version; then
echo "โ
Migration successful!"
echo "๐ฏ Test with: flameshot gui"
else
echo "โ Migration failed"
fi
}
migrate_flameshot_config "$@"
|
Conclusions
Further Resources
Final Best Practices
Tips for optimal use
- Consistent Shortcuts: Use intuitive and consistent shortcuts
- File Organization: Maintain a logical directory structure
- Regular Backups: Perform periodic configuration backups
- Performance Monitoring: Monitor performance on less powerful hardware
- Security Awareness: Watch for screenshots containing sensitive information
- Team Standardization: Standardize configurations across teams and organizations
- Automation First: Automate repetitive workflows
- Update Regularly: Keep Flameshot updated for new features