AskOverflow.Dev

AskOverflow.Dev Logo AskOverflow.Dev Logo

AskOverflow.Dev Navigation

  • 主页
  • 系统&网络
  • Ubuntu
  • Unix
  • DBA
  • Computer
  • Coding
  • LangChain

Mobile menu

Close
  • 主页
  • 系统&网络
    • 最新
    • 热门
    • 标签
  • Ubuntu
    • 最新
    • 热门
    • 标签
  • Unix
    • 最新
    • 标签
  • DBA
    • 最新
    • 标签
  • Computer
    • 最新
    • 标签
  • Coding
    • 最新
    • 标签
主页 / ubuntu / 问题 / 1264465
Accepted
Mansoor Ahmed Memon
Mansoor Ahmed Memon
Asked: 2020-08-05 03:05:32 +0800 CST2020-08-05 03:05:32 +0800 CST 2020-08-05 03:05:32 +0800 CST

更改 Ubuntu 20.04 登录主题

  • 772

我想使用Materia主题作为我的登录屏幕 (gdm) 主题。我使用登录的应用程序来更改主题,我在拱门上使用它并且效果很好。但它不适用于 ubuntu 20.04。

themes gdm 20.04
  • 1 1 个回答
  • 3018 Views

1 个回答

  • Voted
  1. Best Answer
    UnKNOWn
    2020-08-05T04:37:58+08:002020-08-05T04:37:58+08:00

    从文件中/usr/share/themes/Materia/gnome-shell/README.md..请先阅读警告..如果您在了解其中的警告后仍想继续..

    按照以下步骤为 gdm 登录欢迎程序创建一个 Materia 主题。

    请注意,这只是解决方法之一..有不同的方法..

    安装所需的包

    sudo apt install libglib2.0-dev-bin
    

    先备份原主题。

    sudo cp -av /usr/share/gnome-shell/gnome-shell-theme.gresource{,~}
    

    将目录更改为 Materia 主题

    cd /usr/share/themes/Materia/gnome-shell/
    

    创建 gnome-shell.css 的副本作为 gdm3.css

    sudo cp gnome-shell.css gdm3.css
    

    编辑文件gnome-shell-theme.gresource.xml以添加行<file>gdm3.css</file>

    sudo -H gedit gnome-shell-theme.gresource.xml
    

    观察,我在这条线<file>gdm3.css</file>下添加了这条线<file>gnome-shell.css</file>

    <file>extensions/workspaces-to-dock/workspaces-to-dock.css</file>
    <file>gnome-shell.css</file>
    <file>gdm3.css</file>
    <file>icons/eye-not-looking-symbolic.svg</file>
    <file>icons/eye-open-negative-filled-symbolic.svg</file>
    

    保存文件并关闭。

    创建所需的“gresource”文件替换原始文件/usr/share/gnome-shell/gnome-shell-theme.gresource

    sudo glib-compile-resources --target=/usr/share/gnome-shell/gnome-shell-theme.gresource gnome-shell-theme.gresource.xml
    

    好的,操作完成。现在告诉 gdm 使用上面的操作文件登录屏幕,并选择与文件相关的数字/usr/share/gnome-shell/gnome-shell-theme.gresource。

    sudo update-alternatives --config  gdm3-theme.gresource
    

    例子:

    admin@i7-4770:~$ sudo update-alternatives --config  gdm3-theme.gresource 
    [sudo] password for admin: 
    There are 2 choices for the alternative gdm3-theme.gresource (providing /usr/share/gnome-shell/gdm3-theme.gresource).
    
      Selection    Path                                                           Priority   Status
    ------------------------------------------------------------
      0            /usr/share/gnome-shell/theme/Yaru/gnome-shell-theme.gresource   15        auto mode
    * 1            /usr/share/gnome-shell/gnome-shell-theme.gresource              10        manual mode
      2            /usr/share/gnome-shell/theme/Yaru/gnome-shell-theme.gresource   15        manual mode
    
    Press <enter> to keep the current choice[*], or type selection number: 1
    admin@i7-4770:~$ 
    

    重新启动以查看更改..

    在此处输入图像描述

    在此处输入图像描述

    或者,您可以更改背景颜色或图像或任何部分。

    如果出现错误并且无法看到登录屏幕.. 请按照 README.md 文件。


    以上仅将登录屏幕主题更改为Materia..对于锁定屏幕您需要单独配置。按照这个链接如何在 Ubuntu 20.04 中自定义锁屏主题来理解这个概念,一旦理解,你可以使用这个内容进行正确的配置。

    {
        "parentMode": "user",
        "stylesheetName": "gnome-shell.css",
        "themeResourceName": "gnome-shell-theme.gresource",
        "debugFlags": ["backtrace-crashes-all"],
        "enabledExtensions": ["[email protected]", "[email protected]", "desktop-icons@csoriano"]
    }
    

    在此处输入图像描述

    • 1

相关问题

  • 我可以使用哪些工具和技术来制作 GTK 主题?

  • 从登录屏幕启动访客会话

  • 如何更改 GDM 中的登录屏幕主题?

  • 如何获取和安装更多主题、图标和指针?

Sidebar

Stats

  • 问题 205573
  • 回答 270741
  • 最佳答案 135370
  • 用户 68524
  • 热门
  • 回答
  • Marko Smith

    如何运行 .sh 脚本?

    • 16 个回答
  • Marko Smith

    如何安装 .tar.gz(或 .tar.bz2)文件?

    • 14 个回答
  • Marko Smith

    如何列出所有已安装的软件包

    • 24 个回答
  • Marko Smith

    无法锁定管理目录 (/var/lib/dpkg/) 是另一个进程在使用它吗?

    • 25 个回答
  • Martin Hope
    Flimm 如何在没有 sudo 的情况下使用 docker? 2014-06-07 00:17:43 +0800 CST
  • Martin Hope
    Ivan 如何列出所有已安装的软件包 2010-12-17 18:08:49 +0800 CST
  • Martin Hope
    La Ode Adam Saputra 无法锁定管理目录 (/var/lib/dpkg/) 是另一个进程在使用它吗? 2010-11-30 18:12:48 +0800 CST
  • Martin Hope
    David Barry 如何从命令行确定目录(文件夹)的总大小? 2010-08-06 10:20:23 +0800 CST
  • Martin Hope
    jfoucher “以下软件包已被保留:”为什么以及如何解决? 2010-08-01 13:59:22 +0800 CST
  • Martin Hope
    David Ashford 如何删除 PPA? 2010-07-30 01:09:42 +0800 CST

热门标签

10.10 10.04 gnome networking server command-line package-management software-recommendation sound xorg

Explore

  • 主页
  • 问题
    • 最新
    • 热门
  • 标签
  • 帮助

Footer

AskOverflow.Dev

关于我们

  • 关于我们
  • 联系我们

Legal Stuff

  • Privacy Policy

Language

  • Pt
  • Server
  • Unix

© 2023 AskOverflow.DEV All Rights Reserve