安装
sudo apt install flameshot
设置快捷键
设置->键盘->自定义快捷键
命令是, 启动截图
flameshot gui
设置完成快捷键后无法截图问题
vi /etc/gdm3/daemon.conf
WaylandEndble=false
!!!最新版本系统
官网使用deb安装[https://github.com/flameshot-org/flameshot]
debian13配置方案(主要问题是wayland默认是true情况下可能是开启了硬件加速之类的问题)导致无法打开
步骤 1:彻底卸载当前 Flameshot(清理所有配置 + 依赖残留)
# 卸载主程序
sudo apt remove -y flameshot
# 清理无用依赖+配置文件(关键,彻底清除旧配置)
sudo apt autoremove -y && sudo apt purge -y flameshot
# 清理用户目录下的Flameshot配置残留
rm -rf ~/.config/flameshot/
步骤 2:重新纯净安装 Flameshot+Wayland 必备组件
sudo apt update && sudo apt install -y flameshot xdg-desktop-portal xdg-desktop-portal-gnome
# 重启门户服务,确保Wayland截图权限正常
systemctl --user restart xdg-desktop-portal
步骤 3:重置 GNOME Wayland 截图权限(通用方案,无弹窗 / 捕获失败)
dbus-send --session --print-reply=literal --dest=org.freedesktop.impl.portal.PermissionStore /org/freedesktop/impl/portal/PermissionStore org.freedesktop.impl.portal.PermissionStore.DeletePermission string:'screenshot' string:'screenshot' string:''
步骤 4:彻底清理 Flameshot 残留进程 + 配置(无残留才会生效)
# 强制杀死所有Flameshot进程(包括后台隐藏的)
pkill -9 flameshot
# 清理用户配置/缓存(彻底重置Flameshot)
rm -rf ~/.config/flameshot/ ~/.cache/flameshot/
# 二次重置GNOME48+截图权限(官方通用方案,针对48版强化)
dbus-send --session --print-reply=literal --dest=org.freedesktop.impl.portal.PermissionStore /org/freedesktop/impl/portal/PermissionStore org.freedesktop.impl.portal.PermissionStore.DeletePermission string:'screenshot' string:'screenshot' string:'org.flameshot.Flameshot'
# 重启门户服务(立即刷新权限,GNOME48+必须做)
systemctl --user restart xdg-desktop-portal xdg-desktop-portal-gnome
步骤 5:配置开机自启动(Wayland 原生模式,后台常驻无报错) 粘贴以下完整内容(覆盖原有内容,无需修改): vim /usr/share/applications/org.flameshot.Flameshot.desktop
[Desktop Entry]
Type=Application
Name=Flameshot
Comment=Powerful yet simple screenshot tool
Exec=env QT_QPA_PLATFORM=wayland flameshot --daemon > /dev/null 2>&1
Icon=flameshot
Terminal=false
Categories=Utility;Graphics;
X-GNOME-Autostart-enabled=true
我的配置文件
[Desktop Entry]
Type=Application
Name=Flameshot
Comment=Powerful yet simple screenshot tool
Exec=env QT_QPA_PLATFORM=wayland flameshot --daemon > /dev/null 2>&1
Icon=flameshot
Terminal=false
Categories=Utility;Graphics;
X-GNOME-Autostart-enabled=true
[Desktop Action Configure]
Name=Configure
Name[zh_CN]=配置
Name[pl]=Konfiguruj
Name[fr]=Configurer
Name[ja]=設定
Name[ru]=Настройки
Name[sk]=Nastaviť
Name[nl]=Instellen
Name[nl_NL]=Instellen
Name[sr]=Подешавања
Name[uk]=Налаштувати
Name[es]=Configurar
Name[de]=Einstellungen
Name[pt_BR]=Configurar
Exec=flameshot config
[Desktop Action Capture]
Name=Take screenshot
Name[zh_CN]=进行截图
Name[pl]=Zrzut ekranu
Name[fr]=Prendre une capture d'écran
Name[ja]=スクリーンショットを撮る
Name[ru]=Сделать скриншот
Name[sk]=Zachytiť obrazovku
Name[sr]=Сними екран
Name[uk]=Зробити знімок
Name[nl]=Schermfoto maken
Name[nl_NL]=Schermfoto maken
Name[es]=Tomar captura de pantalla
Name[de]=Bildschirmfoto aufnehmen
Name[pt_BR]=Capturar tela
Exec=flameshot gui --delay 500
[Desktop Action Launcher]
Name=Open launcher
Name[de]=Starter öffnen
Name[nl]=Starter openen
Name[nl_NL]=Starter openen
Name[sk]=Otvoriť spúšťač
Name[zh_CN]=打开启动器
Name[pt_BR]=Abrir lançador
Exec=flameshot launcher
步骤6快捷键调用截图测试
script --command "QT_QPA_PLATFORM=wayland flameshot gui" /dev/null