Contents




Pop!_OS Flameshot: Complete Guide to Advanced Screenshots

Keyboard shortcut setup, advanced features, and optimization for Pop!_OS


Contents

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

  1. Introduction and Flameshot Overview
  2. Installation on Pop!_OS
  3. Post-Installation and Verification

โŒจ๏ธ Part II - Keyboard Shortcuts and Configuration

  1. Keyboard Shortcut Setup
  2. Advanced Shortcuts and Customizations
  3. GNOME and Pop Shell Integration
  4. Multi-Monitor Configuration

๐Ÿ–ผ๏ธ Part III - Features and Editing

  1. Capture Tools
  2. Built-in Editor and Annotations
  3. File Management and Export

โš™๏ธ Part IV - Automation and Workflow

  1. Cloud Storage Integration
  2. Professional Workflows

๐Ÿ”ง Part V - Advanced and Troubleshooting

  1. Performance Optimization
  2. Common Troubleshooting
  3. Alternatives and Comparisons
  4. 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

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

Capture Tools

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

Available Editing Tools

Basic Tools

  1. Selection Tool (S) - Selection and resizing
  2. Rectangle (R) - Rectangles and squares
  3. Circle (C) - Circles and ellipses
  4. Arrow (A) - Directional arrows
  5. Line (L) - Straight lines
  6. Pencil (P) - Freehand drawing
  7. Marker (M) - Transparent highlighter
  8. Text (T) - Text insertion

Advanced Tools

  1. Blur/Pixelate (B) - Blur and pixelation
  2. Undo/Redo (Ctrl+Z/Ctrl+Shift+Z) - Undo/redo
  3. Copy (Ctrl+C) - Copy to clipboard
  4. Save (Ctrl+S) - Save file
  5. Upload (Return) - Upload to cloud services
  6. Pin - Pin screenshot to the desktop

Tool Customization

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

Supported Export Formats

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"
}

Performance 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
# 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

Screenshot Tools Comparison

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

Performance Comparison

 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

Migration from Other 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
  1. Consistent Shortcuts: Use intuitive and consistent shortcuts
  2. File Organization: Maintain a logical directory structure
  3. Regular Backups: Perform periodic configuration backups
  4. Performance Monitoring: Monitor performance on less powerful hardware
  5. Security Awareness: Watch for screenshots containing sensitive information
  6. Team Standardization: Standardize configurations across teams and organizations
  7. Automation First: Automate repetitive workflows
  8. Update Regularly: Keep Flameshot updated for new features