在Ubuntu14.04LTS中,我使用MenuLibre应用程序为Unity桌面环境中的应用程序创建菜单项,作为编辑文本文件.desktop of /usr/share/applications的替代方法。
sudo apt-get install menulibre
我所做的定制之一是在Nautilus图标上下文菜单“”中创建一个操作,其中包含/usr/share/applications/nautilus.desktop中的以下行,而不是屏幕截图的路径:
Actions=Window;Administrator;
[Desktop Action Window]
Name=Open a new window
Exec=nautilus --new-window
OnlyShowIn=Unity;
[Desktop Action Administrator]
Name=Open as Administrator
Exec=gksudo "nautilus --new-window"
OnlyShowIn=Unity;以默认情况下已经安装了nautilus-actions扩展为前提,构建在Ubuntu中。
apt-cache show nautilus-actions
apt-cache policy nautilus-actions当我单击"Files“图标Nautilus文件管理器上的鼠标右键时,下拉上下文菜单显示在项目”“中。
然而,在版本15.10的Werewolf中,什么都没有发生,在我看来,nautilus-actions扩展被Nautilus3.14忽略了。
有人知道会发生什么事吗?
PS:我知道nautilus-admin扩展,但它不是默认安装在Ubuntu中的。
发布于 2015-12-05 07:16:00
我发现问题了!
在所有形式的启动中,[Desktop Entry]标记下的Nautilus应用程序都有一个指令NoDisplay=true。这意味着它们都不会呈现给Dash中的用户。唯一出现在Dash中并因此出现在发射器中的图标是由Nautilus自动和动态生成的。
cd /usr/share/applications
ls -l nautilus*
-rw-r--r-- 1 root root 588 Nov 14 08:53 nautilus-autorun-software.desktop
-rw-r--r-- 1 root root 662 Nov 14 08:54 nautilus-classic.desktop
-rw-r--r-- 1 root root 549 Nov 14 08:55 nautilus-connect-server.desktop
-rw-r--r-- 1 root root 723 Dez 4 07:00 nautilus.desktop
-rw-r--r-- 1 root root 642 Nov 14 08:55 nautilus-folder-handler.desktop
-rw-r--r-- 1 root root 603 Dez 4 05:33 nautilus-home.desktop因此,在Dash中只显示一个图标"Files“。当我删除文件NoDisplay=true的指令行nautilus.desktop时,在Dash中出现了两个图标"Files“。因此,我删除了Launcher的图标"Files“,并将第二个图标"Files”从Dash拖到Launcher。
尤里卡!
现在,启动程序中"Files“图标的下拉上下文菜单显示[Desktop Action Administrator]标记的选项”“。
最后的配置文件"nautilus.desktop“如下:
[Desktop Entry]
Name=Files
Name[pt_BR]=Arquivos
Comment=Access and organize files
Comment[pt_BR]=Gerenciador de arquivos
Keywords=folder;manager;explore;disk;filesystem;
Exec=nautilus --new-window %U
Icon=system-file-manager
Terminal=false
Type=Application
StartupNotify=true
Categories=GNOME;GTK;Utility;Core;FileManager;
X-GNOME-Bugzilla-Bugzilla=GNOME
X-GNOME-Bugzilla-Product=nautilus
X-GNOME-Bugzilla-Component=general
X-GNOME-Bugzilla-Version=3.14.2
X-GNOME-UsesNotifications=true
X-Unity-IconBackgroundColor=#af4853
X-Ubuntu-Gettext-Domain=nautilus
Actions=Window;Administrator;
[Desktop Action Window]
Name=Open a new window
Name[pt_BR]=Abrir uma nova janela
Exec=nautilus --new-window
OnlyShowIn=Unity;
[Desktop Action Administrator]
Name=Open as Administrator
Name[pt_BR]=Abrir como Administrador
Exec=gksudo "nautilus --new-window"
OnlyShowIn=Unity;https://askubuntu.com/questions/695818
复制相似问题