使用 .desktop 文件在 17.10 Wayland 中运行 gksu 问题

使用 .desktop 文件在 17.10 Wayland 中运行 gksu 问题

我有两个根进程,我想为其设置桌面图标。一个是 Clam,另一个是系统备份。它们在 17.04 中运行良好。Clam 在 17.10 Wayland 中运行良好,但 Root Backup 却不行,尽管我可以从终端手动执行命令。登录时,初创应用程序配置为运行xhost si:localuser:root。.Desktop 文件如下所示:

[Desktop Entry]
Name=ClamTk
GenericName=Virus Scanner
Comment=Scan for threats...
Comment[en]=Scan for threats...
TryExec=clamtk
Exec=gksu "clamtk /"
Icon=clamtk
Type=Application
Terminal=false
Categories=GTK;GNOME;Utility;
StartupNotify=true
Keywords=antivirus;virus;malware;scan;scanner;
Name[en_US]=Root_ClamTk 

注意可执行文件是Exec=gksu "clamtk /"

这是备份:

[Desktop Entry]
Version=1.1
Name=Root_Backups
Comment=Change your backup settings
Icon=org.gnome.DejaDup
Exec=gksu /usr/bin/deja-dup
StartupNotify=true
DBusActivatable=true
Type=Application
Terminal=False
Categories=Utility;Archiving;GNOME;GTK;X-GNOME-Utilities;
Keywords=déjà;deja;dup;
X-GNOME-UsesNotifications=true
Actions=backup;
Name[en_US]=Root_Backup

再次注意,可执行文件是Exec=gksu /usr/bin/deja-dup

如果我$gksu /usr/bin/deja-dup从 shell 执行,它可以工作。双击桌面图标运行则不行。想想我可能做错了什么?

注意:因为我使用的 17.04 版本有很多垃圾并且提到了 Unity,所以我通过从应用程序目录复制旧文件创建了一个新的桌面文件,就像我在 17.04 中所做的那样,并且像 17.04 一样,我手动添加了gksu

这不是所提问题的重复,因为我正在使用 xhost 命令。它适用于 clamtk,但不能用于 deja-dup。

当我尝试运行 root Backup .desktop 时 /var/log/syslog 的输出

1 月 23 日 16:04:33 John-linux nautilus-deskto[5076]: Nautilus_menu_provider_get_background_items: 断言‘NAUTILUS_IS_MENU_PROVIDER (provider)’失败 1 月 23 日 16:04:59

John-linux systemd[1]: 已开始运行 anacron 作业。1 月 23 日 16:04:59

John-linux anacron[10403]: Anacron 2.3 于 2018-01-23 启动

1 月 23 日 16:04:59 John-linux anacron[10403]: 正常退出 (运行 0 个作业)

相关内容