TOPIC: ADWAITA
Customising Nautilus (or Files) in Ubuntu GNOME 13.04
12th September 2013The changes made to Nautilus, otherwise known as Files, in GNOME Shell 3.6 were contentious and the response of the Linux Mint was to create their own variant called Nemo from the previous version of the application. On the Cinnamon or MATE desktop environments, the then latest version of GNOME's file manager would have looked like a fish out of water without its application menu in the top panel on the GNOME Shell desktop. It is possible to make a few modifications that help Nautilus to look more at home on those Linux Mint desktops, and I have collected them here because they are useful for GNOME Shell users too. Here they are in turn.
Adding Application Menu entries to Location Options Menu
The Location Options menu is what you get on clicking the button with the cog icon on the right-hand side of the application's location bar. Using Gsettings
, it is possible to make that menu include the sort of entries that are in the application menu in the GNOME Shell panel at the top of the screen. These include an entry for closing the whole application, as well as setting its preferences (or options). Running the following command does just that (if it does not work as it should, try changing the single and double quotes to those understood by a command shell):
gsettings set org.gnome.settings-daemon.plugins.xsettings overrides '@a{sv} {"Gtk/ShellShowsAppMenu": <int32 0>}'
Adding in the Remove App Menu GNOME Shell extension will clean up the GNOME Shell a little by removing the application menu altogether. If, for some reason, you wish to restore the default behaviour, then the following command does the required reset:
gsettings set org.gnome.settings-daemon.plugins.xsettings overrides '@a{sv} {}'
Stopping Hiding of the Application Title Bar When Maximised
By default, GNOME Shell can hide the application title bars of GNOME applications such as Nautilus on window maximisation and this is Nautilus now works by default. Changing the behaviour so that the title bar is kept on maximised windows can be as simple as adding in the ignore_request_hide_titlebar extension. The trouble with GNOME Shell extensions is that they can stop working when a new version of GNOME Shell is used, so there's another option: editing metacity-theme-3.xml but /usr/share/themes/Adwaita/metacity-1
. The file can be opened using superuser privileges using the following command:
gksudo gedit /usr/share/themes/Adwaita/metacity-1/metacity-theme-3.xml
With the file open, it is a matter of replacing instances of ' has_title="false" '
with ' has_title="true" '
, saving it and reloading GNOME Shell. This may persevere across different versions of GNOME Shell, should the extension not do so.
Disabling Recursive Search
This discovery is what led me to bundle these customisations in an entry on here in the first place. In Nemo and older versions of Nautilus, just typing with the application open would lead you down a list towards the file that you wanted. This behaviour was replaced by an automatic recursive search from GNOME Shell 3.6 where the search functionality was extended beyond the folder that was open in the file manager to its subdirectories. To change that to subsetting within the open folder or directory, you need to install a patch version of Nautilus using the following commands:
sudo add-apt-repository ppa:dr3mro/personal
sudo apt-get update && sudo apt-get upgrade
The first of these adds a new repository with the patched version of Nautilus, while the second combination installs the patched version. With that done, it is time to issue the following command:
gsettings set org.gnome.nautilus.preferences enable-recursive-search false
That sets the value of the new enable-recursive-search option to false for searching within an open directory. It also can be found using Dconf-Editor
in the following hierarchy: org -> gnome -> nautilus -> preferences
. The obsession of the GNOME project team with minimalism is robbing users of some options, and this would be a good one to have by default too. Maybe the others should be treated in the same way, even if you need to use Gsettings
or Dconf-Editor
to change them to avoid clutter. Having GNOME Tweak Tool able to set them all would be even better.
Adding GNOME 3 to Linux Mint 11
3rd June 2011On the surface of it, this probably sounds a very strange thing to do: choose Linux Mint because they plan to stick with their current desktop interface for the foreseeable future, and then stick a brand new one on there. However, that's what last weekend's dalliance with Fedora 15 caused. Not only did I find that I could find my way around GNOME Shell, but I actually got to like it so much that I missed it on returning to using my Linux Mint machine again.
The result was that I started to look on the web to see if there was anyone else like me who had got the same brainwave. In fact, it was Mint's being based on Ubuntu that allowed me to get GNOME 3 on there. The task could be summarised as involving three main stages: getting GNOME 3 installed, adding extensions and adding the Cantarell font that is used by default. After these steps, I gained a well-running GNOME 3 desktop running on Linux Mint, and it looks set to stay that way unless something untoward emerges.
Installing GNOME 3
The first step is to add the PPA repository for GNOME 3 using the following command:
sudo add-apt-repository ppa:gnome3-team/gnome3
The, it was a case of issuing my usual update/upgrade command:
sudo apt-get update && sudo apt-get upgrade && sudo apt-get dist-upgrade
When that had done its thing and downloaded and installed quite a few upgrades along the way, it was time to add GNOME Shell using this command:
sudo apt-get install gnome-shell
When that was done, I rebooted my system to be greeted by a login screen very reminiscent of what I had seen in Fedora. While compiling this piece, I noticed that GNOME Session could need to be added before GNOME Shell, but I do not recall doing so myself. Maybe dependency resolution kept any problems at bay, but there weren't any issues that I could remember beyond things not being configured as fully as I would have liked without further work. For the sake of safety, it might be a good idea to run the following before adding GNOME Shell to your PC.
sudo apt-get install gnome-session && sudo apt-get dist-upgrade
Configuration and Customisation
Once I had logged in, the desktop that I saw wasn't at all unlike the Fedora one and everything seemed stable too. However, there was still work to do before I was truly at home with it. One thing that was needed was the ever useful GNOME Tweak Tool. This came in very handy for changing the theme that was on display to the standard Adwaita one that caught my eye while I was using Fedora 15. Adding buttons to application title bars for minimising and maximising their windows was another job that the tool allowed me to do. The command to get this goodness added in the first place is this:
sudo apt-get install gnome-tweak-tool
Since the next thing that I wanted to do was add some extensions, I added a repository from which to do this using the command below. Downloading them via Git and compiling them just wasn't working for me, so I needed another approach.
sudo add-apt-repository ppa:ricotz/testing
With that is place, I issued the following commands to gain the Dock, the Alternative Status Menu and the Windows Navigator. The second of these would have added a shutdown option in the me-menu, but it seems to have got deactivated after a system update. Holding down the ALT key to change the Suspend entry to Power off... will have to do me for now. Having the dock is the most important and that, thankfully, is staying the course and works exactly as it does for Fedora.
sudo apt-get install gnome-shell-extensions-dock
sudo apt-get install gnome-shell-extensions-alternative-status-menu
sudo apt-get install gnome-shell-extensions-windows-navigator
Adding Cantarell
The default font used by GNOME 3 in various parts of its interface is Cantarell, and it was defaulting to that standard sans-serif font on my system because this wasn't in place. That font didn't look too well, so I set to tracking the freely available Cantarell down on the web. When that search brought me to Font Squirrel, I downloaded the zip file containing the required TTF files. The next step was to install them and, towards that end, I added Fontmatrix using this command:
sudo apt-get install fontmatrix
That gave me a tool with a nice user interface, but I made a mistake when using it. This was because I (wrongly) thought that it would copy files from the folder that I wanted the import function to use. Extracting the TTF files to /tmp
meant that would have had to happen, but Fontmatrix just registered them instead. A reboot confirmed that they hadn't been copied or moved at all, and I had rendered the user interface next to unusable through my own folly; the default action on Ubuntu and Linux Mint is that files are deleted from /tmp
on shutdown. The font selection capabilities of the GNOME Tweak Tool came in very handy for helping me to convert useless boxes into letters that I could read.
Another step was to change the font line near the top of the GNOME Shell stylesheet (never thought that CSS usage would end up in places like this...) so that Cantarell wasn't being sought and text in sans-serif font replaced grey and white boxes. The stylesheet needs to be edited as superuser, so the following command is what's needed for this and, while I used sudo, gksu
is just as useful here if it isn't what I should have been using.
sudo gedit /usr/share/gnome-shell/theme/gnome-shell.css
Once I had extricated my system from that mess, a more conventional approach was taken and the command sequence below was what I followed, with extensive use of sudo to get done what I wanted. A new directory was created and the TTF files copied in there.
cd /usr/share/fonts/truetype
sudo mkdir ttf-cantarell
cd ttf-cantarell
sudo mv /tmp/*.ttf .
To refresh the font cache, I resorted to the command described in a tutorial in the Ubuntu Wiki:
sudo fc-cache -f -v
Once that was done, it was then time to restore the reference to Cantarell in the GNOME Shell stylesheet and reinstate its usage in application windows using the GNOME Tweak Tool. Since then, I have suffered no mishap or system issue with GNOME 3. Everything seems to be working quietly, and I am pleased to see that replacement of Unity with the GNOME Shell will become an easier task in Ubuntu 11.10, the first alpha release of which is out at the time of my writing these words. Could it lure me back from my modified instance of Linux Mint yet? While I cannot say that I am sure of those, but it certainly cannot be ruled out at this stage.