天天看點

如何使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/