Ubuntu 18.04:某些基于 qt 的应用程序缺少“添加到收藏夹”?

DK *_*ose 9 qt .desktop favorites ubuntu-dock

操作系统:Ubuntu 18.04(最小安装选项):

dkb@dkb-ubu1804:~$ cat /etc/X11/default-display-manager
/usr/sbin/gdm3
dkb@dkb-ubu1804:~$ echo $XDG_SESSION_TYPE
x11
dkb@dkb-ubu1804:~$ 
Run Code Online (Sandbox Code Playgroud)

我安装了以下基于 qt 的应用程序apt install:dolphin、featherpad、gwenview、kate 和 qterminal。

其中,当我在启动器中右键单击它们的图标时,dolphin、gwenview 和 kate 没有显示“添加到收藏夹”选项。但是featherpad 和qterminal 有“添加到收藏夹”选项。这是为什么?

(即使重新启动后情况仍然存在。)

他们的 .desktop 文件没有提供任何线索。

• 海豚

[Desktop Entry]
Name=Dolphin
Exec=dolphin %u
Icon=system-file-manager
Type=Application
X-DocPath=dolphin/index.html
Categories=Qt;KDE;System;FileTools;FileManager;
GenericName=File Manager
Terminal=false
MimeType=inode/directory;
InitialPreference=10
X-DBUS-ServiceName=org.kde.dolphin
Run Code Online (Sandbox Code Playgroud)

• 羽毛垫

[Desktop Entry]
Name=FeatherPad
GenericName=Text Editor
Comment=Lightweight Qt5 text editor
Exec=featherpad %F
Icon=featherpad
Terminal=false
Type=Application
MimeType=text/plain;
Categories=Qt;Utility;TextEditor;
X-KDE-StartupNotify=false
Run Code Online (Sandbox Code Playgroud)

• 格温维尤

[Desktop Entry]
Name=Gwenview
GenericName=KDE Image Viewer
Comment=A simple image viewer
Exec=gwenview %U
Terminal=false
Icon=gwenview
Type=Application
Categories=Qt;KDE;Graphics;Viewer;Photography;
MimeType=inode/directory;image/gif;image/jpeg;image/png;image/bmp;image/x-eps;image/x-icns;image/x-ico;image/x-portable-bitmap;image/x-portable-graymap;image/x-portable-pixmap;image/x-xbitmap;image/x-xpixmap;image/tiff;image/x-psd;image/x-webp;image/webp;image/x-tga;
X-DocPath=gwenview/index.html
# InitialPreference should be greater than Okular so that Gwenview is the
# primary application associated with images, but less than Konqueror or Dolphin
# so that Gwenview is not the primary applications for folders.
InitialPreference=8
X-DBUS-ServiceName=org.kde.gwenview
Run Code Online (Sandbox Code Playgroud)

• 凯特

[Desktop Entry]
GenericName=Advanced Text Editor
Name=Kate
Comment=KDE Advanced Text Editor
MimeType=text/plain;
Exec=kate -b %U
StartupNotify=true
X-KDE-HasTempFileOption=true
Icon=kate
X-DocPath=kate/index.html
Type=Application
Terminal=false
InitialPreference=9
X-DBUS-StartupType=Multi
X-DBUS-ServiceName=org.kde.kate
Categories=Qt;KDE;Utility;TextEditor;
Run Code Online (Sandbox Code Playgroud)

• Q终端

[Desktop Entry]
Name=QTerminal
Type=Application
GenericName=Terminal emulator

Comment=Terminal emulator

Icon=utilities-terminal
Exec=qterminal
Terminal=false
Categories=Qt;System;TerminalEmulator;
Actions=Dropdown;

[Desktop Action Dropdown]
Name=Drop-down terminal
Exec=qterminal --drop
Icon=utilities-terminal

Name[en_GB]=Drop-down Terminal
Run Code Online (Sandbox Code Playgroud)

Dolphin(如下所示)、gwenview 和 kate 不显示“添加到收藏夹”选项

海豚

 

Featherpad(如下所示)和 qterminal 具有预期的“添加到收藏夹”选项

羽绒垫

Tah*_*lor 12

对我来说,一个方便的解决方法是将它从 omnibar 添加到我的收藏夹中。

在此处输入图片说明

  • 如果实例打开,解决方法通常会生成两个图标,一个是固定图标,但新图标通常会添加为第二个图标。 (4认同)

N0r*_*ert 4

这是完全奇怪的、不可预测的和意想不到的用户体验。

我确认了您在 Ubuntu 18.04 LTS 甚至 19.10(开发版本)中的 Ubuntu 会话(GNOME Shell)上的结果。

我的第一个想法是该Exec字段指向某个符号链接,但其中声明的所有文件都是简单的 ELF 可执行文件。这些桌面文件没有OnlyShowIn指令也很糟糕......


我在 18.04 LTS 甚至 19.10(开发版本)中的 Unity、MATE(使用 Mutiny 面板布局)和 Lubuntu 会话中没有遇到此问题。
我还可以将这些应用程序对接到 Cairo-Dock、Docky 和 ​​Plank 中。

所以这是 GNOME Shell 中的一个错误。
我向 LaunchPad 报告了错误 1840474 (实际上它是 2018 年 5 月 2 日错误 1768609 的重复)。