Ceci est une ancienne révision du document !
One of the things that I see praised in regards to the GNOME Desktop is how ‘clean’ it is. I personally have always regarded it as ‘sparse’, since the first time I saw it years ago. This may be controversial, but I’ve never been onboard with this ‘clean’ desktop idea, especially not when the operating environment forces it on the end user. The desktop can and should be a very useful part of your computing environment, not just a neat or pretty one.
Many Linux users come from a background of using the command-line to perform a lot of their everyday tasks, and it’s true that the command-line is easy to access, and that many tasks are very easily done from the CLI, or Command Line Interface. Long time readers (both of you) will be well aware that I often use the command-line ‘apt’ commands to install software and updates, and that I generally prefer them to the GUI (Graphic User Interface) alternatives (parenthetically, I do like the new Ubuntu Software app, it feels like you’re shopping online for software in a well-designed store). I think, sometimes, that if you’re more comfortable on the command-line, you can miss out on how a modern GUI can be used to make your computing life more efficient.
My thesis, here, is that the desktop can be used as a very useful place to put program shortcuts, and shortcuts to files and file locations. This can be done in an organized and systematic fashion that promotes efficiency while still keeping the desktop relatively ‘clean’. However, ‘out of the box’ GNOME stymies that by not ALLOWING you to put shortcuts on the desktop, which I find absolutely inexplicable and extremely frustrating. The most superficial consideration of the issue inevitably leads to the conclusion that it should be a matter of CHOICE, not a mandate, as to what you can or cannot reasonably put on your desktop. It is, after all, YOUR desktop, and should work how YOU want it to.
To summarize, I personally don’t want to constantly have to sort through the applications I use from the ‘Show Applications’ drawer (that’s the unmoving set of white squares at the bottom of the Favorites launcher):
nor is there adequate room on GNOME’s Favorites launcher for the applications I use most often (as described in Everyday Ubuntu: FCM#158, page 41). I want to put things on my desktop in order to access them more efficiently, and I regard that as more important than the aesthetic appeal of a ‘clean’ desktop. But, how do we address this GNOME deficiency?
Shown left is the standard GNOME desktop as it appears ‘out of the box’:
As you can see, there are icons on the desktop that represent your Home location, and the Trash, but nothing more. You cannot drag application icons from Show Applications to the desktop, as you can from Unity’s Dash.
Installing GNOME Tweaks
We’re going to need to install additional software to get where we want to go. If you didn’t set up a Terminal icon on the Favorites before (again, Full Circle issue 158, page 41), then we’ll need to invoke the Terminal the ‘hard way’. At the top of the screen, click on Activities.
In the box that says ‘Type to Search’, type in term. This should be sufficient to bring up the Terminal icon. Click to launch the Terminal.
The additional software that we need is GNOME Tweaks. To install it, we’re going to use the apt-get command in the Terminal. At the Terminal prompt, type in:
sudo apt-get install gnome-tweaks
then hit <Enter> on your keyboard. Note you will need to be on the Internet to download and install the software. Respond to any prompts, including the request for your administrator password that you established when setting up Ubuntu. The ‘sudo’ part of the command is short for Super User DO, and tells the operating system that the following command is being executed as an administrator, or Super User, which is why Ubuntu asked for your password. Software installation and updating in Ubuntu can be done only by an administrator, or super user.
Shortly, apt-get will complete the installation of GNOME Tweaks and will give you a message in the Terminal indicating that is the case. Now we can add icons to the desktop by invoking Tweaks and enabling desktop icons.
Click on Activities at the top of the screen.
In the box that says ‘Type to Search’, type in twea. This should be sufficient to bring up the GNOME Tweaks icon. Left-click to launch Tweaks (shown below left).
Click Extensions on the left to get to the desktop icon area (shown below right):
You can now click the slider on the right to turn Desktop Icons on. You can also click the gear icon next to the slider to get options regarding your desktop icons:
Adding a Desktop Icon/Shortcut to the Desktop Using GNOME Tweaks
Now comes the unfortunately very non-intuitive and still awkward part of the process. We need to find the ‘.desktop’ files for any applications we want to add to the desktop, and there are multiple possible locations where these might be installed.
First, launch your file browser. This will be an icon on the Favorites launcher that looks like a file folder.
Once in File Manager, click the ‘hamburger’ menu in the upper right (the one that looks like three straight horizontal lines). This will bring up the File Manager’s options:
If it isn’t already turned on, click the checkbox to Show Hidden Files. Now you’ll see a number of files and folders that start with a ‘.’ - this is how Linux denotes to the operating system that a file or folder should normally remain hidden from view.
The location of your ‘.desktop’ files will vary according to whether or not your system is set up as a single-user system or has multiple users, and on exactly what version of Ubuntu you are using, and may also vary by application. On a single-user Ubuntu 20 installation, most of them will be found under /usr/share/applications. “What does that mean, and how do I get there?” I hear you ask. Well, we’re going to need to access some of the Linux system files that live outside our home directory, where most of our activity in Linux takes place. Don’t worry, it’s not TOO scary.
Finding Our .desktop Files
First, we have to find our way to the system’s root folder. This is not intuitive in Ubuntu, but probably on purpose, as most users never need to navigate there. See the Other Locations on the left hand side of File Manager, at or near the bottom?
Click that and you’ll see ‘Computer’. This is the system root location. Click Computer on the right side, and you’ll see a series of folders. Look for one that says ‘usr’, then double-click it. In ‘usr’, look for ‘share’ and double-click it. Now double-click ‘applications’. Here you’ll see most, if not all, of your ‘.desktop’ files:
These files contain information for the applications they represent, that can be used to create your desktop icon. Since I like to play chess, let’s right-click the ‘3dchess.desktop’ file and select ‘Copy’. Now, minimize the File Manager and you should see the desktop, unless you need to minimize other programs. Once the desktop is visible, right-click on it and select ’Paste’. You’ll get the ‘gear icon’ generic looking file, but we want to see the application’s specific icon:
Now right-click the desktop icon and select ‘Allow Launching’:
The icon, which was a generic ‘gear’ icon, will now change to reflect the application’s normal default icon and will be launchable. Finally, after all this, we have an icon for 3D Chess on our desktop:
In terms of keeping our desktop relatively ‘clean’, we also can now create folders on the desktop by right-clicking and selecting ‘New Folder’:
Use the folders you create as categories (for example, ‘Games’ or ‘Office Applications’, where you can drag and drop your individual application shortcuts:
and you can also create subfolders within the ‘main’ folders to represent subcategories, and organize your desktop that way. But don’t be afraid to make GNOME’s desktop your own, and make it work in a way that suits YOUR needs.