在 Ubuntu 16.04 中,通过右键单击 Dock 上的屏幕截图应用程序,可以选择“对选定区域进行屏幕截图”。
在 Ubuntu 18.04 中此选项已消失。
如何恢复?
该org.gnome.Screenshot.desktop
文件包含:
[Desktop Entry]
Name[en_GB]=Screenshot
... other translations
Name=Screenshot
Comment[en_GB]=Save images of your screen or individual windows
... other translations
Comment=Save images of your screen or individual windows
Keywords[en_GB]=snapshot;capture;print;screenshot;
... other translations
Keywords=snapshot;capture;print;screenshot;
Exec=gnome-screenshot --interactive
Terminal=false
Type=Application
Icon=applets-screenshooter
StartupNotify=true
Categories=GTK;GNOME;Utility;X-GNOME-Utilities;
NotShowIn=KDE;
X-GNOME-Bugzilla-Bugzilla=GNOME
X-GNOME-Bugzilla-Product=gnome-utils
X-GNOME-Bugzilla-Component=screenshot
# Disable broken actions https://pad.lv/1720262
# Actions=screen-shot;window-shot;area-shot
Actions=screen-shot;
DBusActivatable=true
[Desktop Action screen-shot]
Name[en_GB]=Take a Screenshot of the Whole Screen
... other translations
Name=Take a Screenshot of the Whole Screen
Exec=gnome-screenshot
[Desktop Action window-shot]
Name[en_GB]=Take a Screenshot of the Current Window
... other translations
Name=Take a Screenshot of the Current Window
Exec=gnome-screenshot -w
[Desktop Action area-shot]
Name=Take a Screenshot of a Selected Area
Exec=gnome-screenshot -a
答案1
window-shot
和area-shot
操作在文件中被禁用.desktop
。更改
Actions=screen-shot;
行至
Actions=screen-shot;window-shot;area-shot;
(或者,window-shot;
如果您只想要“截取选定区域的屏幕截图”操作,请避开该部分)。
附言不建议直接编辑.desktop
中的文件/usr/share/applications/
。而是先将文件复制到您的~/.local/share/applications/
目录,然后编辑复制的文件。
笔记:这些操作被故意禁用,原因是一个错误。看来这个错误现在(部分?)已经修复。如果仍然不起作用,请等待发布适当的修复程序。