天天看点

如何使Ubuntu中的Gnome面板完全透明

如何使Ubuntu中的Gnome面板完全透明

We all love transparency, since it makes your desktop so beautiful and lovely—so today we’re going to show you how to apply transparency to the panels in your Ubuntu Gnome setup. It’s an easy process, and here’s how to do it.

我们都喜欢透明性,因为它使您的桌面如此漂亮和可爱-因此今天我们将向您展示如何在Ubuntu Gnome设置中将透明性应用于面板。 这是一个简单的过程,并且这是操作方法。

This article is the first part of a multi-part series on how to customize the Ubuntu desktop, written by How-To Geek reader and ubergeek, Omar Hafiz.

本文是由How-To Geek读者和ubergeek Omar Hafiz撰写的有关如何自定义Ubuntu桌面的系列文章的第一部分。

使Gnome面板透明 (Making the Gnome Panels Transparent)

Of course we all love transparency, It makes your desktop so beautiful and lovely. So you go for enabling transparency in your panels , you right click on your panel, choose properties, go to the Background tab and make your panel transparent. Easy right? But instead of getting a lovely transparent panel, you often get a cluttered, ugly panel like this:

当然,我们所有人都喜欢透明性,它使您的桌面如此美丽可爱。 因此,您可以在面板中启用透明效果,右键单击面板,选择属性,转到“背景”选项卡并使面板透明。 容易吧? 但是,除了获得一个可爱的透明面板之外,您通常会得到一个混乱,丑陋的面板,如下所示:

如何使Ubuntu中的Gnome面板完全透明

Fortunately it can be easily fixed, all we need to do is to edit the theme files. If your theme is one of those themes that came with Ubuntu like Ambiance then you’ll have to copy it from /usr/share/themes to your own .themes directory in your Home Folder. You can do so by typing the following command in the terminal

幸运的是,可以轻松修复它,我们所需要做的就是编辑主题文件。 如果您的主题是Ambiance之类的Ubuntu随附的主题之一,则必须将其从/ usr / share / themes复制到主文件夹中的.themes目录中。 您可以通过在终端中键入以下命令来执行此操作

cp -R /usr/share/themes/theme_name ~/.themes

cp -R / usr / share / themes / theme_name〜/ .themes

Note: don’t forget to substitute theme_name with the theme name you want to fix.

注意:不要忘记用要修复的主题名称替换theme_name。

But if your theme is one you downloaded then it is already in your .themes folder. Now open your file manager and navigate to your home folder then do to .themes folder. If you can’t see it then you probably have disabled the “View hidden files” option. Press Ctrl+H to enable it.

但是,如果您下载的主题是主题,则它已经在您的.themes文件夹中。 现在打开文件管理器,导航到主文件夹,然后转到.themes文件夹。 如果看不到,则可能已禁用“查看隐藏文件”选项。 按Ctrl + H启用它。

如何使Ubuntu中的Gnome面板完全透明

Now in .themes you’ll find your previously copied theme folder there, enter it then go to gtk-2.0 folder. There you may find a file named “panel.rc”, which is a configuration file that tells your panel how it should look like. If you find it there then rename it to “panel.rc.bak”. If you don’t find don’t panic! There’s nothing wrong with your system, it’s just that your theme decided to put the panel configurations in the “gtkrc” file.

现在,在.themes中,您将在其中找到以前复制的主题文件夹,将其输入然后转到gtk-2.0文件夹。 在那里您可以找到一个名为“ panel.rc”的文件,该文件是一个配置文件,可以告诉您的面板外观。 如果在那里找到它,则将其重命名为“ panel.rc.bak”。 如果找不到,不要惊慌! 您的系统没有任何问题,只是您的主题决定将面板配置放入“ gtkrc”文件中。

如何使Ubuntu中的Gnome面板完全透明

Open this file with your favorite text editor and at the end of the file there is line that looks like this “include “apps/gnome-panel.rc””. Comment out this line by putting a hash mark # in front of it. Now it should look like this “# include “apps/gnome-panel.rc””

使用您喜欢的文本编辑器打开该文件,并且在文件末尾有一行类似于“ include” apps / gnome-panel.rc”的行。 通过在其前面加上井号#来注释掉此行。 现在看起来应该是这样的“#include“ apps / gnome-panel.rc””

如何使Ubuntu中的Gnome面板完全透明

Save and exit the text editor. Now change your theme to any other one then switch back to the one you edited. Now your panel should look like this:

保存并退出文本编辑器。 现在将主题更改为其他主题,然后切换回您编辑的主题。 现在,您的面板应如下所示:

如何使Ubuntu中的Gnome面板完全透明

Stay tuned for the second part in the series, where we’ll cover how to change the color and fonts on your panels.

请继续关注本系列的第二部分,我们将介绍如何更改面板上的颜色和字体。

翻译自: https://www.howtogeek.com/howto/43673/how-to-make-the-gnome-panels-in-ubuntu-totally-transparent/