摘自 解决 fedora 28 桌面图标问题 | cnblog

问题描述

Fedora 30 中,Gnome Desktop 默认是没有桌面图标的,只会显示背景,然而这样并不是很方便,我们可以根据需要手动开启桌面图标

解决办法

1. 安装 nemo

> dnf info nemo
Available Packages
Name         : nemo
Version      : 4.0.6
Release      : 2.fc30
Architecture : i686
Size         : 1.5 M
Source       : nemo-4.0.6-2.fc30.src.rpm
Repository   : fedora
Summary      : File manager for Cinnamon
URL          : https://github.com/linuxmint/nemo
License      : GPLv2+ and LGPLv2+
Description  : Nemo is the file manager and graphical shell for the Cinnamon desktop
             : that makes it easy to manage your files and the rest of your system.
             : It allows to browse directories on local and remote filesystems, preview
             : files and launch applications associated with them.
             : It is also responsible for handling the icons on the Cinnamon desktop.

> dnf install nemo

2. 创建自启动文件

创建~/.config/autostart/nemo-autostart-with-gnome.desktop,并在文件中保存以下内容:

> vim ~/.config/autostart/nemo-autostart-with-gnome.desktop

[Desktop Entry]
Type=Application
Name=Nemo
Comment=Start Nemo desktop at log in
Exec=nemo-desktop
OnlyShowIn=GNOME;
AutostartCondition=GSettings org.nemo.desktop show-desktop-icons
X-GNOME-AutoRestart=true
NoDisplay=true

3. 注销后重新登录

此时已经配置完成,这时只需要注销后重新登录,或者直接按Alt+F2并输入nemo-desktop,就可以看到熟悉的图标出现在桌面上:

4. 解决桌面图标无法移动

这时虽然桌面已经出现了图标,但是无法进行拖拽移动等操作,需要在终端内输入如下命令

> gsettings set org.nemo.desktop use-desktop-grid false

5. Gtk-WARNING **: cannot open display: :0.0

例如以abelsu用户的身份登录系统,之后在终端执行sudo su切换至root用户后,在终端启动应用会报该错误。

切换回abelsu用户,执行如下命令即可解决:

> xhost +
access control disabled, clients can connect from any host

参考文章

  1. 解决 fedora 28 桌面图标问题 | cnblog
  2. Changes to Files in GNOME 3.28 | Fedora Magazine
  3. Remove desktop support - Alternative solution | Gnome GitLab
  4. Fedora 27 Gnome | Gnome-Look.org
  5. Fedora 27 Workstation配置改造全记录+常用软件推荐和安装 | 知乎