Pad*_*dau 5 gnome desktop-icons
几周前,在我全新安装 Ubuntu 20.04 时,我一直遇到 Ubuntu 默认 Gnome 扩展桌面图标的问题,此外它的功能也严重有限。
不幸的是,它无法以正常方式卸载。
因此,我按照说明(按照几个地方的建议)卸载它,如下所示。
sudo rm --recursive /usr/share/gnome-shell/extensions/desktop-icons@csoriano/ # After making a backup
Run Code Online (Sandbox Code Playgroud)
有了这个,我就可以安装名称奇怪但更高级的Desktop Icons NG (DING)(由同一作者编写),它运行得非常好。
不幸的是,我每天多次收到以下错误通知:
Can't install "desktop-icons@csoriano":
This is an extension enabled by your current mode, you can't install manually any update in that session.
Run Code Online (Sandbox Code Playgroud)
我不知道如何阻止这个错误再次发生。我尝试了三件事。
gnome-shell-extension-desktop-icons,这就是桌面图标最初的安装方式。重新启动后,这只会让我回到第 1 步。(我无法卸载gnome-shell-extension-desktop-icons,因为它会删除ubuntu-desktop。)我不知道还能做什么。
我随后重新安装了Desktop Icons NG (DING),否则我的桌面上什么都没有,但这个错误仍然每天通知我几次。
这是我的扩展列表。
$ gnome-extensions list
caffeine@patapon.info
clipboard-indicator@tudmotu.com
clock-override@gnomeshell.kryogenix.org
user-theme@gnome-shell-extensions.gcampax.github.com
TopIcons@phocean.net
ding@rastersoft.com
wsmatrix@martin.zurowietz.de
ubuntu-appindicators@ubuntu.com
ubuntu-dock@ubuntu.com
Run Code Online (Sandbox Code Playgroud)
我正在使用标准 Ubuntu 20.04 和 Gnome 3.36.3
请问我怎样才能停止这些通知?
我遇到了同样的问题,并通过desktop-icons@csoriano使用 git 存储库手动重建文件夹来修复它。
显然,您无法真正从系统中删除desktop-icons@csoriano和其他扩展。/usr/share/gnome-shell/extensions/预计 Ubuntu 20.04 中它们将在全球范围内存在。在我看来,他们的更改只能被其他(全局和本地)扩展主动覆盖。另一种方法是重建扩展的“修改”版本,该版本根本不执行任何操作。
以下是删除后完全重建原始内容的步骤/usr/share/gnome-shell/extensions/desktop-icons@csoriano/:
# Corona-like I stayed at home for this. You can also do this in another location, doesn't matter much for the following steps...
cd ~
# Install the building tools used by the makers of desktop-icons@csoriano
sudo apt update
sudo apt install meson git
# Clone their repository to ~/desktop-icons/.
# MAKE SURE there is no file or directory in home called "desktop-icons"!
git clone https://gitlab.gnome.org/World/ShellExtensions/desktop-icons
# Enter the cloned repository.
cd desktop-icons
# Prepare building the extension using meson.
# This will set the location of the build in it's config. So even if /usr/ is a root location, we don't need sudo for now.
meson --prefix=/usr/ --localedir=share/gnome-shell/extensions/desktop-icons@csoriano/locale .build
# Build the extension. You can execute this using sudo, otherwise you'll be asked for the root password by ninja.
ninja -C .build install
# We're technically done. Now let us clean up what we needed for the above.
# Remove the cloned repository.
rm -rf ~/desktop-icons/
# Remove building tools. You can keep these packages if you like, but they aren't needed for the extension anymore.
sudo apt remove meson git
sudo apt autoremove
# Apply changes (you might do that after you continued reading this post to the end).
# Alternatively you can just restart gnome, for that see https://stackoverflow.com/q/46565019/7638119
sudo reboot
Run Code Online (Sandbox Code Playgroud)
有关更多信息,如果您在执行这些步骤时遇到麻烦,请访问官方存储库,也许还有他们的问题页面。
以下是修改扩展以使其不执行任何操作的步骤:
cd /usr/share/gnome-shell/extensions/desktop-icons@csoriano
# empty its entry script
sudo mv extension.js extension.js.old
sudo touch extension.js
Run Code Online (Sandbox Code Playgroud)
(这可能会导致 Ubuntu 20.04 的未来更新出现问题。要撤消此修改,只需运行cd /usr/share/gnome-shell/extensions/desktop-icons@csoriano; sudo mv extension.js.old extension.js。)
您可能会遇到这种情况,因为您按照官方解决方法通过安装 nemo来修复 Ubuntu 20.04 的桌面图标,就像我一样。我强烈建议您撤消此操作并等待官方补丁。补丁更新可以在 launchpad.net 上查看。还可以在那里看到其他解决方法。
如果您想卸载nemo并等待该问题的官方补丁,请反向执行替代安装:
# Remove nemo from local autostart.
rm ~/.config/autostart/nemo-autostart-with-gnome.desktop
# Remove the nemo package.
sudo apt remove nemo
sudo apt autoremove
# Apply changes.
# Alternatively you can just restart gnome, for that see https://stackoverflow.com/q/46565019/7638119
sudo reboot
Run Code Online (Sandbox Code Playgroud)