在 Ubuntu 18.04.2 LTS 上注销后更改登录屏幕上的按钮图标

在 Ubuntu 18.04.2 LTS 上注销后更改登录屏幕上的按钮图标

在我的锁屏上,按钮如下所示: 在此处输入图片描述

但是,在我注销或重新启动计算机后,锁定屏幕上的按钮如下所示:在此处输入图片描述

我希望退出后锁定屏幕上的按钮看起来一样(如第一张图片)。

另外,您可能会看到我的用户图片周围有白色边框(在我的第一张图片上),我想将其删除。我知道这是可能的,因为第二张图片。

答案1

您的锁定屏幕正在使用/usr/share/gnome-shell/theme/ubuntu.css文件
,而登录屏幕正在使用/usr/share/themes/Flat-Remix/gnome-shell/gnome-shell.css

运行以下命令
sudo update-alternatives --config gdm3.css

选择对应的数字/usr/share/gnome-shell/theme/ubuntu.css

例子:

pratap@i7-6550U:~$ sudo update-alternatives --config gdm3.css
There are 6 choices for the alternative gdm3.css (providing /usr/share/gnome-shell/theme/gdm3.css).

  Selection    Path                                                                 Priority   Status
------------------------------------------------------------
* 0            /usr/share/themes/Flat-Remix/gnome-shell/gnome-shell.css              20        auto mode
  1            /usr/share/gnome-shell/theme/ubuntu.css                               10        manual mode
  2            /usr/share/themes/Flat-Remix-Dark/gnome-shell/gnome-shell.css         17        manual mode
  3            /usr/share/themes/Flat-Remix-Darkest/gnome-shell/gnome-shell.css      17        manual mode
  4            /usr/share/themes/Flat-Remix-Miami-Dark/gnome-shell/gnome-shell.css   17        manual mode
  5            /usr/share/themes/Flat-Remix-Miami/gnome-shell/gnome-shell.css        17        manual mode
  6            /usr/share/themes/Flat-Remix/gnome-shell/gnome-shell.css              20        manual mode

Press <enter> to keep the current choice[*], or type selection number: 1   
update-alternatives: using /usr/share/gnome-shell/theme/ubuntu.css to provide /usr/share/gnome-shell/theme/gdm3.css (gdm3.css) in manual mode
pratap@i7-6550U:~$

这样,无论我们对 ubuntu.css 文件做什么更改,都将应用于登录屏幕和解锁屏幕。

登录屏幕 在此处输入图片描述

解锁屏幕 在此处输入图片描述

删除用户徽标周围的白色边框。

用你最喜欢的编辑器打开该文件/usr/share/gnome-shell/theme/ubuntu.css..

我的是 gedit..所以 sudo -H gedit /usr/share/gnome-shell/theme/ubuntu.css

查找内容

/* Auth Dialogs & Screen Shield */
.framed-user-icon {
  background-size: contain;
  border: 2px solid #eeeeec;
  color: #eeeeec;
  border-radius: 3px; }
  .framed-user-icon:hover {
    border-color: white;
    color: white; }

并根据您的需要进行必要的更改..我已经像这样改变了..

/* Auth Dialogs & Screen Shield */
.framed-user-icon {
  background-size: contain;
  border: 0;
  color: #eeeeec;
  border-radius: 3px; }
  .framed-user-icon:hover {
    border-color: white;
    color: white; }

结果是

在此处输入图片描述

在此处输入图片描述

相关内容