如何删除 Ubuntu gnome-shell 主题并恢复原始主题?我已经尝试过sudo update-alternatives --config gdm3.css
(gnome-shell.css)。但是,这只完成了 75% 的工作。登录屏幕现在如我所愿变成了默认的灰色,但当我挂起计算机时,登录屏幕又变成了紫色。当 gnome-shell 加载时,我还会看到紫色的角落。
答案1
如果我理解正确的话,你想回到默认主题。你可以再次使用相同的命令并选择数字0
sudo update-alternatives --config gdm3.css
$ sudo update-alternatives --config gdm3.css
[sudo] password for mkr:
There are 2 choices for the alternative gdm3.css (providing /usr/share/gnome-shell/theme/gdm3.css).
Selection Path Priority Status
------------------------------------------------------------
0 /usr/share/gnome-shell/theme/Yaru/gnome-shell.css 15 auto mode
1 /usr/share/gnome-shell/theme/Yaru/gnome-shell.css 15 manual mode
* 2 /usr/share/gnome-shell/theme/gnome-shell.css 10 manual mode
Press <enter> to keep the current choice[*], or type selection number: 0
update-alternatives: using /usr/share/gnome-shell/theme/Yaru/gnome-shell.css to provide /usr/share/gnome-shell/theme/gdm3.css (gdm3.css) in auto mode
$
如果您也想将更改应用于解锁屏幕,这个答案可能会有所帮助。
https://askubuntu.com/a/1107377/739431
编辑:根据评论,您已手动删除Yaru
要安装yaru-theme
包的文件夹,请运行以下命令,
sudo apt install yaru-theme-gnome-shell
$ sudo apt install yaru-theme-gnome-shell
[sudo] password for mkr:
Reading package lists... Done
Building dependency tree
Reading state information... Done
yaru-theme-gnome-shell is already the newest version (18.10.6).
yaru-theme-gnome-shell set to manually installed.
0 upgraded, 0 newly installed, 0 to remove and 17 not upgraded.
$
它说这已经是最新版本,可能是因为我们手动删除了该文件夹Yaru
所以,sudo apt purge yaru-theme-gnome-shell
$ sudo apt purge yaru-theme-gnome-shell
Reading package lists... Done
Building dependency tree
Reading state information... Done
The following package was automatically installed and is no longer required:
xwayland
Use 'sudo apt autoremove' to remove it.
The following packages will be REMOVED:
ubuntu-desktop* ubuntu-session* yaru-theme-gnome-shell*
0 upgraded, 0 newly installed, 3 to remove and 17 not upgraded.
After this operation, 637 kB disk space will be freed.
Do you want to continue? [Y/n]
请注意,该命令sudo apt purge yaru-theme-gnome-shell
还将删除 ubuntu-desktop* 和 ubuntu-session* 以及 yaru-theme-gnome-shell*
一旦我们继续选择“是”,
我们需要再次安装 ubuntu-desktop 和 ubuntu-session 包。
sudo apt install ubuntu-desktop ubuntu-session
$ sudo apt install ubuntu-desktop ubuntu-session
Reading package lists... Done
Building dependency tree
Reading state information... Done
The following additional packages will be installed:
yaru-theme-gnome-shell
The following NEW packages will be installed:
ubuntu-desktop ubuntu-session yaru-theme-gnome-shell
0 upgraded, 3 newly installed, 0 to remove and 17 not upgraded.
Need to get 113 kB of archives.
After this operation, 637 kB of additional disk space will be used.
Do you want to continue? [Y/n]
答案2
您也可以直接修改 CSS。
我写了一个关于如何从 Ubuntu 主题中删除紫色的指南。
http://teknorants.blogspot.com/2020/01/changing-ubuntus-royale-purple.html
答案3
只需安装gnome-session
。然后登录它(例如,“Xorg 上的 GNOME”)。
然后启用 Ubuntu 扩展:
gnome-shell-extension-tool -e [email protected]
gnome-shell-extension-tool -e [email protected]
并更改锁屏壁纸。