Linux Desktop Player B Guide: 03. Landscaping for Gnome 3 Linux desktops

Source: Internet
Author: User
Tags cairo gtk
Special Instructions


For those of you who want to write a review after my essay, please note that my blog is written using Markdown, and support for Mathjax mathematical formulas is enabled. If there are two in a comment$, Mathjax will think that the$content between the two is a mathematical formula, resulting in a confusing format. If you are sure that your comments are not mathematical formulas, please use\$escape, thank you.


Objective


Four years ago, I wrote a Linux desktop landscaping thing that was based on Ubuntu 14.04, when Ubuntu was still using the Unity desktop. In four years, this essay gained about 60000 of the volume of visits, I am very gratified. World Time Shift, Shing, Ubuntu the current release has abandoned the Unity desktop, the return to Gnome 3, the previous beautification scheme is not very applicable. In this article, I'll talk about the landscaping of the Linux desktop for Gnome 3.



Linux Desktop Landscaping is very necessary, I think, do not talk about landscaping and persuade people to use the Linux desktop is bullying. Even if you put the Linux desktop hype, others installed a look, not beautiful not pleasing to professional, will not continue to use. The desktop of Ubuntu and Fedora has become more beautiful, but there is no perfect system, only according to their own ideas to improve, to achieve a more comfortable experience.



Gnome 3 Desktop Landscaping can be started in the following ways:



1, themes and extensions. You can view and download topics by visiting the site www.gnome-look.org/. In Gnome 3, the main considerations are the Gnome-shell theme, the GTK 3 theme, and the icon theme. In Ubuntu, the default theme is already very good, so I generally do not change. The default theme for Fedora is slightly worse, the low gray 3D texture I don't like, so I tend to change it into a simple, flat style. On the network, there are many by modifying the theme to make the Linux desktop and Mac OS like the appearance, this kind of imitation I do not like, but can really give it a try. In addition, for Gnome-shell, you can also install extensions to extend its functionality and beautify it, in addition to the extensions provided in the official software source, you can also access extensions.gnome.org/to find the latest extensions.



2, Wallpaper. The beautiful wallpaper Of course can light up a good mood. Friends who have seen my essay in front of me should find that I particularly like the translucent full-screen window, revealing the wallpaper behind. So, I collected a ton of wallpaper, and then set to automatic timing switch, how a good word.



3, Font. The font of Linux desktop system has always been a legacy problem, when some people think that the Linux desktop is not good-looking, unprofessional, a large part of the reason is the font caused by the curse. I used to have a period of time because of Redhat Linux fonts Hollow, and the red flag of the Linux font clear and gave up Redhat, even wrote some incorrect articles. Of course, when I realized that Linux fonts were configurable, I deleted the incorrect articles. In the next article, I will discuss the history, status and configuration of fonts in Linux system.



4, desktop widgets. Some beautiful desktop widgets can provide some very useful features, but also can improve the level of desktop beautification. Since I am not particularly fond of desktop widgets, I not only dislike desktop widgets, I do not even have desktop icons, so this part is not a special introduction. Like the desktop Widgets friends, you can learn about Conky.



5, Dock. That allows us to start the program, but also to display something under the screen, to solve the Gnome 3 desktop top-heavy problem. In Gnome 3, using the Dash to dock extension will make a good effect. If you must imitate Apple as cool effect, you can also choose Cairo-dock.



It must be explained that desktop landscaping is a matter of the beholder, benevolent see. It is possible that you think the interface is beautiful, others think the soil is going to get rid of the slag, you may think that the special effects, others think flashy. I am mainly here to let you understand the Linux desktop landscaping mechanism, and provide some landscaping ideas, not to say that all the desktop to make the same as me.


Features of Gnome 3


The industry is blowing heavily on the Gnome 3 desktop, saying it is more than 10 years ahead of the desktop design landscape. But for users like me, but always feel that Gnome 3 default interface is ugly, not fluent. This must be my open way wrong. What are the laudable areas of Gnome 3? Let's take a look at the Gnome Shell's official wiki to introduce it. The images that follow are from the official wiki of the Gnome Shell.



First of all, it's the Desktop interface, which is our main working area.



This is a good desktop, the application window is displayed on the desktop, as long as the color and appearance of not too ugly, it does not affect our work. and Gnome 2, the main change is to remove the panel at the bottom of the desktop, leaving only the panel at the top of the screen. At the same time, the elements in the top panel are greatly reduced, and there is no such element as the Start menu or Window list in Windows, instead the leftmost activities button. Clicking on this button will bring up the activities overview interface.



In this interface, the Dash is displayed on the left, and you can click on the icon to launch a common program. In the middle of the application window, you can see what window is currently open and which window you want to switch to. The right side shows the workspace, or you can switch between the workspaces by clicking the mouse.



The activites overview interface not only displays open windows, but also displays the programs installed in the system, making it easy to start programs that are not in Dash. Programs are large icons, and there are search functions, 


Through the above show, I really do not think that Gnome 3 has what is worth boasting of the black technology, if you really want to say that there are any advanced ideas, is probably the support of touch screen devices. The main manifestations are: 1. Activites overview is a large interface that occupies the entire screen, not just a small portion of the screen like the Start menu of Windows 2. The application interface is a large icon, easy to click on the finger; 3. The workspace icon is also large, easy to click on your finger, and easily preview which Windows are in each workspace.



And our desktop users are not the same, desktop users rely on the keyboard and mouse input, can be precise click, the large icon does not have much reliance. The Gnome 3 experience can be improved if you can use shortcut keys skillfully. For example, you can call the Super key (that is, the Win key on the keyboard) to bring up the Activites overview interface without clicking on the Activities button. A more user-friendly feature is that the Gnome 3 workspace is a dynamic workspace, and as long as it fills the existing workspace, it will automatically create a new workspace immediately, eliminating the need for our own workspaces. You can also use shortcut keys, ctrl+alt+↑, and ctrl+alt+↓ to switch between workspaces. Finally, you can switch between windows by using the shortcut key ALT + TAB. 



What you can do is still not enough to explain how good the Gnome Shell is. We continue to tap the technology behind the Gnome Shell. The technical architecture of the Gnome Shell is this:



It turns out that the entire Gnome Shell is built on OpenGL, so performance should be leverage, and graphics acceleration should be done properly. On top of OpenGL, the Clutter graphics library was built, and the Mutter window manager and the shell Toolkit were built on top of the Clutter, and Shell Toolkit was able to define the appearance using CSS. Further up, a JavaScript engine and gobject-introspection are created so that you can use JavaScript to manipulate the Gnome Shell. Originally the black technology hides here, my heart is much more comfortable. And this whole technology stack can be learned, and our programmer's toys are one more.


Problems with Gnome 3 desktop in Ubuntu


After reading the official introduction of Gnome Shell, we return to Dear Ubuntu. Ubuntu This release is already done to this desktop has been a certain beautification, and Ubuntu has always been the kind of warm red theme, or more pleasing, I like the performance of Eclipse in Ubuntu. However, there are still a lot of improvements to the desktop of Ubuntu.



① Dash on the left. The traditional features of Ubuntu are also features that I have to remove every time. Dash is convenient, but the left edge of the screen is taken out of this space is still unpleasant, and the right edge is asymmetrical. And the Dash's color match does not always have the same style as the Working window on the desktop, so sometimes it looks more abrupt. In previous versions of Ubuntu, I was always set to auto-hide and then the mouse appeared on the left side of the screen. In the current version total, the Dash is provided by the Gnome-shell-extension-ubuntu-dock extension, which can be deleted, or it can be set to display to the bottom of the screen.



② the active button in the upper-left corner. This button is very awkward, originally the "Activities" translated into "activities", it is a little lied. And this button is a bit redundant, do not have it can also, directly using Super key to bring up the activities overview interface more convenient. Use Gnome-shell-extension-hide-activities to hide this button.



③ the top of the desktop takes up too much space. As you can see, when I maximize a window, the top panel of the Gnome Shell, followed by the window's title bar (top bar), then the window's menu bar. These elements occupy too much space on the top of the desktop. To solve this problem, there are two scenarios, one is to put the window's title bar in the top panel, and the other is to put the menu bar in the top panel. You can use the Pixelsaver plugin or the Global application Menu plugin.



④ the clock in the middle of the top panel. To allow enough space in the top panel, we need to move the clock to the right and use the frippery move clock plugin.



The problem of ⑤ top-heaviness. The top elements of the screen are numerous, the bottom of the screen is nothing, a little heavy-headed feeling. You can use the Dash to dock plugin and set the dock to display at the bottom. Of course, you can also use Cairo-dock.



⑥ background picture is too single question. Of course I have a background rotation of DAFA.


Installing the GNOME Shell extension


After analyzing the problem, the following starts the actual combat. Starting with gnome-shell-extension, we can use the extension in the official Ubuntu repositories or download extension to extensions.gnome.org/. We need to install two tools, Gnome-tweak-tool and Chrome-gnome-shell, which are GNOME's setup tools that allow us to install extension directly on extensions.gnome.org/'s Web page. The commands for installing the two tools are as follows:



sudo aptitude install gnome-tweak-toolsudo chrome-gnome-shell


Use thesudo aptitude search gnome-shell-extensioncommands to see what extension are available in the official Ubuntu repositories and open Gnome-tweak-tool to see which extension Ubuntu has preinstalled for us. 


These two plugins are not what we want, unload them. Command:



sudo aptitude purge gnome-shell-extenion-appindicator gnome-shell-extension-ubuntu-dock


Press ALT+F2, enter R, press ENTER to run, you can restart the Gnome Shell, uninstall the following two plugins, the annoying left Dash disappeared.



Now, let's see how to move the clock to the right. Open https://extensions.gnome.org/, search for frippery Move Clock, and then open this extension page.



We have to confirm that the extension can support the Gnome-shell version, Ubuntu 18.04 in the Gnome-shell is version 3.28, so this extension can be installed. Other extension Also, if this version of Gnome-shell is not supported, the installation will go wrong. Directly in the top right corner of the page button, you can install. After installation, the clock automatically moves to the right of the top panel, and the extension status in the Web page changes from off to on.



Some plugins in the official Ubuntu warehouse are good, can be installed directly. For example, Hide activities and Pixelsaver, and remove dropdown arrows. Install using the following command:



sudo aptitude install gnome-shell-extension-hide-activitiessudo aptitude install gnome-shell-extension-pixelsaversudo aptitude install gnome-shell-extension-remove-dropdown-arrows


After installing these three extension, restart Gnome-shell, use Gnome-tweak-tool to turn on these three extension.



As you can see, the "active" button is hidden and you must use the Super key to start the program later. The title bar of the window is merged with the top panel, saving a row of space. The only regret is that the window's maximized, minimized, and close buttons are not on the right-hand side of the screen, and it's a little hard to find a window to close. But it doesn't matter, we can put these three buttons to the left of the window. This is really not to imitate Apple oh, it is the most convenient to put the window to close the time to press. 



Anyway, install extension on these two methods, I will not talk about the installation process, the direct display of extension effect.



Dash to dock, solve top-heavy problems, set the dock to appear below the screen.



Frippery Applications menu, which displays an application menu similar to the Windows Start menu, I personally think that is useless, after all, we can not always use the Windows habit of using the computer. 



Places Status Indicator shows a menu that allows us to quickly locate common locations in a file system. I also think this extension is useless, because the Gnome comes with a file manager that has this quick positioning feature. 



Open Weather, which displays weather features.



System Monitor, systems monitoring.



I still think the above two plugins are useless. Here is the Coverflow Alt-tab, which makes the window switch more visually cool.



Of the extension I examined above, at least four of them I thought were useless, they were: frippery applications Menu, Places Status Indicator, Open Weather, System Monitor. The first two I think is useless because Gnome 3 already has a better overview interface and Dash, the file Manager is good enough, there is no need to come to these two menus. The last two I think is useless, because I think in the field of desktop landscaping, we have been seriously lack of creativity, not display the weather, that is, display system monitoring, if using Conky to make desktop widgets, the display is also the weather, CPU, memory, file location and so on, really bad street. As for the effect of the window switch, I think it doesn't matter, no one has to switch windows all the time to play, and I think the Gnome 3 dynamic workspace and its shortcut keys have been very useful.



So, my desktop is finally the following, the 10 extension I looked at earlier, I only opened five, and closed the Dock auto-hide. 


Change the theme of the Gnome shell


Ubuntu theme I already feel very beautiful, do not want to change. So I'm going to get a Fedora 28 to play. I usually go to www.gnome-look.org/to find the theme, and of course, you can find it on GitHub. Gnome Shell has a lot of themes, one try to find their own satisfaction. I'm just a vulgar place to do the example of the most common Apple-imitating theme on the web.



These are all simulated MacOS themes, choose MacOS High Sierra and MacOS High Sierra Dark Bar, go in, you will find that these two topics are provided for the dash to the dock and for the dash to panel Versions, and each version is also classified as transparent and opaque. Choose the version of the for dash to dock here. Download, unzip, and then copy the folder containing the theme to the/usr/share/themesdirectory. Then, change the Gnome Shell theme with the Gnome Tweak Tool.



As you can see, the color of the TOP panel has changed. Of course, this is not enough, we need all the windows, the controls in the window to change the style. This requires the GTK 3 theme. I chose the X Arc Collection this one.



The installation process is the same, download, unzip, and then copy to the/usr/share/themesdirectory, using the Gnome Tweak Tool to set the GTK 3 theme (application theme).



Once you've set up, you'll find the window much prettier. Now we are missing the dock and icon theme. As for the icon theme, you can choose the classic Numix series. Fortunately, the icon theme is in the official repository of Fedora 28. Install using the following command:



sudo dnf install numix-icon-theme numix-icon-theme-circle





The dock installs the dash to dock, which can be installed in extensions.gnome.org/or directly from the Fedora 28 official repositories. If you are using an official software repository, install it using the following command:



sudo dnf install gnome-shell-extension-dash-to-dock


Set the dock to appear at the bottom of the screen and use the numix-circle icon theme.



As you can see, the Gnome Shell theme has bright and dark colors to choose from, and the corresponding GTK 3 theme also has bright and dark colors to choose from. In general, bright and bright colors, dark and dark color collocation. If you choose dark Color.



It's still pretty, isn't it? Of course, here is just a brief look at the modified theme, in addition to modifying the theme, the aforementioned Hide activities, Pixelsaver, frippery Move Clock, Remove Dropdown Arrow extension can also be installed to further enhance the Fedora 28 experience. If it's almost anything, the desktop wallpaper is not so satisfying. In the next section, let's set up the Gnome 3 to switch wallpaper dynamically.


Dynamic Switch Wallpaper


So we need to go online to download some of their favorite wallpaper, scenery, beautiful, or animation, game movie CG, see their hobbies. The size of the wallpaper matches the resolution of your screen to avoid distortion in the zoomed-out process. To move the downloaded images to the/usr/share/backgrounds/directory, because of the reason for access, you need to usesudo mvcommands.



Gnome 3 comes with the ability to automatically switch wallpapers, this feature is controlled by two XML files. First of all,/usr/share/backgrounds/contestit is necessary to have a live wallpaper definition file in the directory, it defines which wallpapers are involved in switching, as well as the time and frequency of switching, and secondly, the/usr/share/gnome-background-properties/directory requires an XML file, only here the XML configuration file mentioned in the wallpaper and live wallpaper can be in Gnome 3 See in the System Setup interface.


First, write/usr/share/backgrounds/contestthe live wallpaper definition file under the directory. After entering this directory, you can see that the system comes with a live wallpaper definition file Bionic.xml, we can refer to the content, according to gourd painting scoop to write our own live wallpaper definition file. 


The content of this file is very clear, it is to set each wallpaper first hold how many seconds, and then switch to another wallpaper, the process of switching after a few seconds. I downloaded more wallpaper, to manually write a such profile is not possible, one of the input images of the path and name will be exhausted people, so need a Bash script automatically generated a such configuration file. The Bash script I wrote to generate the live wallpaper profile is as follows:


files=`ls -U /usr/share/backgrounds | grep -v contest`
last_file='empty'

echo '<background>'
echo '  <starttime>'
echo '    <year>2016</year>'
echo '    <month>07</month>'
echo '    <day>15</day>'
echo '    <hour>00</hour>'
echo '    <minute>00</minute>'
echo '    <second>00</second>'
echo '  </starttime>'

for current_file in $files
do
    if [[ $last_file == 'empty' ]]
    then
        last_file=$current_file
        echo '  <static>'
        echo '    <duration>300.0</duration>'
        echo "    <file>/usr/share/backgrounds/$last_file</file>"
        echo '  </static>'
    else
        echo '  <transition>'
        echo '    <duration>5.0</duration>'
        echo "    <from>/usr/share/backgrounds/$last_file</from>"
        echo "    <to>/usr/share/backgrounds/$current_file</to>"
        echo '  </transition>'
        echo '  <static>'
        echo '    <duration>300.0</duration>'
        echo "    <file>/usr/share/backgrounds/$current_file</file>"
        echo '  </static>'
        last_file=$current_file
    fi
done

echo '</background>'
 

Save the above script as generate_mywallpaper_xml.sh and then use chmod u+x generate_mywallpaper_xml.sh to add run permissions to the script. This script directly accesses the /usr/share/backgrounds directory and the generated XML configuration file is output directly to standard output. So, generate your own configuration file like this:



./generate_mywallpaper_xml.sh > youxia.xmlsudo mv youxia.xml /usr/share/backgrounds/contest


Then write the XML configuration file in the /usr/share/gnome-background-properties/ directory. After entering the directory, you can also see the configuration files of the two systems, open one of them, refer to the contents, use the sudo vim youxia-wallpapers.xml command to create our own configuration file, in the file, reference the front The generated /usr/share/backgrounds/contest/youxia.xml.


After saving the file, you can set the wallpaper in the system settings, select this custom live wallpaper.


After setting the effect of automatic wallpaper switching in Ubuntu, I have already displayed a lot of methods in the Linux desktop player B guide: 01. The method of playing Linux system, so there is no screenshot here. After completing all the above steps in Fedora 28, you can get the following effects:

to sum up
This essay is mainly about the beautification of the Gnome 3 desktop. This shows the installation of gnome-shell-extension, theme changes (including shell themes, GTK 3 themes and icon themes) and automatic wallpaper switching. Another important aspect that affects whether the Linux desktop is good or not is the font. For the Linux desktop font configuration, stay tuned for my next post.


Copyright statement
The essay was published in the blog garden by Jingshan Ranger on September 12, 2018. Please quote the source, reprint or publish, please contact the blogger. QQ mailbox: 1841079@qq.com

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.