Linux安装截屏软件Snipaste
为什么是 Snipaste
我的环境是 debian12+kde 桌面+wayland,尝试了多个截屏软件后,只有 Snipaste 和系统自带的 Spectacle 能正常运行。
两种安装方式
有两种安装方法。第一种在 星火商店 中搜索 Snipaste ,直接安装。这种方法简单,但是版本落后于官网,因为这是网友打包上传的。
第二种是从 Snipaste 官网 下载 AppImage 包安装。
鼠标移动到 Free Download
这一栏,下载 Linux AppImage 包。下载后点击 Snipaste-xxx.AppImage 就能启动它。
AppImage 本质上是一个可执行文件,不像 .deb
包那样自动集成到系统菜单或启动器中。要将 AppImage 添加到启动器(如 GNOME、KDE、XFCE 等桌面环境的应用菜单),可以手动创建一个 .desktop
文件,或者使用 AppImageLauncher。使用 AppImageLaucher 能够在首次启动 AppImage 时自动将其添加到启动器。
使用 AppImageLaucher 管理 AppImage
安装AppImageLaucher
访问 AppImageLaucher Github,下载你电脑的对应版本:https://github.com/TheAssassin/AppImageLauncher/releases
我下载的是稳定版 appimagelauncher_2.2.0-travis995.0f91801.bionic_amd64.deb。安装:
sudo dpkg -i appimagelauncher_2.2.0-travis995.0f91801.bionic_amd64.deb
sudo apt install -f
其他系统请参考:不同系统的安装方式
启动AppImage
sudo /opt/you-app.AppImage
AppImageLancher 检测你通过手动方式启动一个AppImage,点击确定它会帮你在启动器中创建图标。
现在,你能够在程序启动器中看到它了。下一次你可以在菜单中启动Snipaste!
手动管理 AppImage
如果遇到 AppImageLucher 管理不了的 AppImage,你可以下面的步骤进行手动管理。
一、准备工作
- 确保 AppImage 有执行权限:
chmod +x your-app.AppImage
- 建议将 AppImage 移动到某个固定目录(比如
/opt
):
sudo mv your-app.AppImage /opt/
二、创建 .desktop
文件
.desktop
文件用于描述启动器中的应用,路径可以是:
- 用户级别:
~/.local/share/applications/
- 系统级别(需 root 权限):
/usr/share/applications/
以用户级别为例:
nano ~/.local/share/applications/your-app.desktop
示例内容:
[Desktop Entry]
Name=Your App Name
Exec=/opt/your-app.AppImage
Icon=/path/to/your-icon.png
Type=Application
Categories=Utility;
StartupNotify=true
其中:
Name
是显示的名称;Exec
是 AppImage 的完整路径;Icon
是图标路径(可以是 PNG、SVG);Categories
用于归类,比如Utility
、Development
、AudioVideo
等;- 如果 AppImage 内自带图标,也可以解压后提取。
三、让系统识别
update-desktop-database ~/.local/share/applications
四、图标提取(可选)
有些 AppImage 文件支持解压,提取图标:
./your-app.AppImage --appimage-extract
你会得到一个目录./quashfs-root
,图标可能在其中,复制出来使用。
五、验证效果
打开系统菜单(例如 GNOME 的 Activities 或 KDE 的 Launcher),搜索刚添加的名称即可看到应用。