TOPIC: FEDORA PROJECT
Contents not displaying for Shared Folders on a Fedora 32 guest instance in VirtualBox
26th July 2020While some Linux distros like Fedora install VirtualBox drivers during installation time, I prefer to install the VirtualBox Guest Additions themselves. Before doing this, it is best to remove the virtualbox-guest-additions
package from Fedora to avoid conflicts. After that, execute the following command to ensure that all prerequisites for the VirtualBox Guest Additions are in place before mounting the VirtualBox Guest Additions ISO image and installing from there:
sudo dnf -y install gcc automake make kernel-headers dkms bzip2 libxcrypt-compat kernel-devel perl
During the installation, you may encounter a message like the following:
ValueError: File context for /opt/VBoxGuestAdditions-<VERSION>/other/mount.vboxsf already defined
This is generated by SELinux, so the following commands need to be executed before repeating the installation of VirtualBox Guest Additions:
sudo semanage fcontext -d /opt/VBoxGuestAdditions-<VERSION>/other/mount.vboxsf
sudo restorecon /opt/VBoxGuestAdditions-<VERSION>/other/mount.vboxsf
Without doing the above step and fixing the preceding error message, I had an issue with mounting of Shared Folders whereby the mount point was set up, but no folder contents were displayed. This happened even when my user account was added to the vboxsf
group, and it proved to be the SELinux context issue that was the cause.
A few more shell commands
8th July 2015Here are some Linux commands that I encountered in a feature article in the current issue of Linux User & Developer that I had not met before:
cd -
This returns you to the previous directory where you were before with having to go back through the folder hierarchy to get there and is handy if you are jumping around a file system and any other means is far from speedy.
lsb_release -a
It can be useful to uncover what version of a distro you have from the command line and the above works for distros as diverse as Linux Mint, Debian, Fedora (it automatically installs in Fedora 22 if it is not installed already, a more advanced approach than showing you the command like in Linux Mint or Ubuntu), openSUSE and Manjaro. These days, the version may not change too often, but it still is good to uncover what you have.
yum install fedora-upgrade
This one can be run either with sudo or in a root session started with su
and it is specific to Fedora. The command performs an upgrade of the Fedora distro itself, and I wonder if the functionality has been ported to the dnf
command that has taken over from yum. My experiences with that in Fedora 22 so far suggest that it should be the case, though I need to check that further with the VirtualBox VM that I have created.
Surveying changes coming in GNOME 3.10
20th October 2013GNOME 3.10 was released last month, but I only saw it when it appeared in the Arch and Antergos repositories. Despite stability risks, this showcases a strength of rolling distributions: they let you see the latest software before others. Otherwise, you might need to wait for the next Fedora release to view GNOME updates. This delay isn't always negative, as Ubuntu GNOME typically uses the previous version. Since many GNOME Shell extension developers don't update until Fedora includes the latest GNOME in a stable release, this approach ensures the desktop environment is well established before reaching Ubuntu. Debian takes this further by using a stable version from years ago, which has merits for system reliability.
As I regularly use GNOME Shell extensions, I'm interested in which ones still work, which need tweaking, and which no longer function. The main change in the top panel is the replacement of separate sound and user menus with a single combined menu. Extensions that modified the user menu now need reworking or abandoning. The GNOME project has adopted an irritating habit similar to WordPress, with frequent API changes that break extensions (or plugins in WordPress). However, GNOME should copy WordPress's approach to documentation, particularly for the API, which is barely documented anywhere.
GNOME Shell theme developers face challenges too. When I used Elementary Luna 3.4, a large border appeared around the panel, so I switched to XGnome Enhanced (found via GNOME-Look.org). The former theme is no longer maintained as its developer has stopped using GNOME Shell. Perhaps someone else could take it over, since it worked well until version 3.8. The new theme works well for me and will be an option if I upgrade to GNOME 3.10 on one of my PCs in the future.
Returning to the subject of extensions, I tested the included Applications Menu extension, which has improved stability and looks very usable. I no longer need to wait for the Frippery equivalent to be updated. The GNOME Shell backstage view hasn't changed much since 3.8, which may disappoint some, but the workaround works well. Several extensions I use frequently haven't been updated for GNOME Shell 3.10 yet. After some success before a possible upgrade to Ubuntu GNOME 13.10 and GNOME Shell 3.8 (though I'm staying with version 13.04 for now), I tried to port some of these to the latest interface. Below are my updated extensions, which you can use until they're officially updated on the GNOME Shell Extensions website:
GNOME 3.10 brings other modifications beyond GNOME Shell, which is mainly a JavaScript construction. Application title bars continue to be consolidated in GNOME applications, with a prominent exit button now appearing. You can still apply the previously mentioned modifications to Nautilus (also called Files), many of which work with other applications like Gedit. Gedit now includes useful 'x of y' numbering for search results, showing the current match number and total matches. The GNOME Tweak Tool has been overhauled, but no longer includes the setting for showing folder paths in Nautilus. To enable this feature, open dconf-editor
, navigate to org > gnome > nautilus > preferences and tick the always-use-location-entry box.
The GNOME project continues on its path established a few years ago. While I wish GNOME Shell were more mature, significant changes are still coming, making me wonder when this will stop. This might be the result of introducing a controversial experiment when users were content with GNOME 2. Fedora 20 should bring more updated GNOME shell extensions. Antergos provides a good way to see the latest GNOME version if it remains stable. Cinnamon fans may be happy that Cinnamon 2.0 is another desktop option for the Arch-based distribution, one that I may discuss this further once the Antergos installer stops failing at package downloads. I'm setting up a separate VM to examine Cinnamon because it destabilised GNOME during a previous review.
Adding Microsoft Core Fonts to Fedora 19
6th July 2013While I have a previous posting from 2009 that discusses adding Microsoft's Core Fonts to the then current version of Fedora, it did strike me that I hadn't laid out the series of commands that were used. Instead, I referred to an external and unofficial Fedora FAQ. That's still there, yet I also felt that I was leaving things a little to chance, given how websites can disappear quite suddenly.
Even after next to four years, it still amazes me that you cannot install Microsoft's Core Fonts in Fedora as you would on Ubuntu, Linux Mint or even Debian. Therefore, the following series of steps is as necessary now as it was then.
The first step is to add in a number of precursor applications such as wget
for command line file downloading from websites, cabextract
for extracting the contents of Windows CAB files, rpmbuild
for creating RPM installers and utilities for the XFS file system that chkfontpath
needs:
sudo yum -y install rpm-build cabextract ttmkfdir wget xfs
Here, I have gone with terminal commands that use sudo
, but you could become the superuser (root) for all of this and there are those who believe you should. The -y switch tells yum to go ahead with prompting you for permission before it does any installations. The next step is to download the Microsoft fonts package with wget
:
sudo wget http://corefonts.sourceforge.net/msttcorefonts-2.0-1.spec
Once that is done, you need to install the chkfontpath
package because the RPM for the fonts cannot be built without it:
sudo rpm -ivh http://dl.atrpms.net/all/chkfontpath
Once that is in place, you are ready to create the RPM file using this command:
sudo rpmbuild -ba msttcorefonts-2.0-1.spec
After the RPM has been created, it is time to install it:
sudo yum install --nogpgcheck ~/rpmbuild/RPMS/noarch/msttcorefonts-2.0-1.noarch.rpm
When installation has completed, the process is done. Because I used sudo
, all of this happened in my own home area, so there was a need for some housekeeping afterwards. If you did it by becoming the root user, then the files would be there instead, and that's the scenario in the online FAQ.
Renaming multiple files in Linux
19th August 2012The Linux and UNIX command mv
has a number of limitations, such as not overwriting destination files and not renaming multiple files using wildcards. The only solution to the first that I can find is one that involves combining the cp
and rm
commands. For the second, there's another command: rename. Here's an example like what I used recently:
rename s/fedora/fedora2/ fedora.*
The first argument in the above command is a regular expression much like what Perl is famous for implementing; in fact, it is Perl-compatible ones (PCRE) that are used. The s before the first slash stands for substitute, with fedora
being the string that needs to be replaced and fedora2
being what replaces it. The third command is the file name glob that you want to use, fedora.* in this case. Therefore, all files in a directory named fedora
will be renamed fedora2
regardless of the file type. The same sort of operation can be performed for all files with the same extension when it needs to be changed, htm
to html
, for instance. Of course, there are other uses, but these are handy ones to know.
Getting Gnome Shell going for Fedora 16 running in VirtualBox
5th December 2011There are a number of complaints out there about how hard it is to get GNOME Shell running for a Fedora 16 installation in a VirtualBox virtual machine. As with earlier versions of Fedora, preparation remains a matter of having make
, gcc
and kernel-devel
(kernel headers, in other words). While I have got away with just those, adding dkms
(dynamic kernel module support) to the list might be no bad idea either. To get all of those instated, it is a matter of running the following command as root or using sudo
:
yum -y install make gcc kernel-devel dkms
The -y
switch ensures that any Y/N prompts that usually appear are suppressed and that the installation is completed. Just leave it out if you are inclined to get second thoughts. Another item that has been needed with a previous release of Fedora is libgomp
, but I haven't had to add this for Fedora 16 if I recall correctly.
Once those are in place, it is time to install the VirtualBox Guest Additions. Going to Devices > Install Guest Additions... mounts a virtual CD that can be used for the installation of the various drivers that are needed. To do the installation, first go to where the installer is located using the following command:
cd /media/VBOXADDITIONS_4.1.6_74713/
Note that this location will change according to the release and build numbers of VirtualBox, yet the process essentially will be the same aside from this. Once in there, issue the following command as root or using sudo:
./VBoxLinuxAdditions.run
Hopefully, this will complete without errors now with the precursor software that has been added beforehand. However, there is one more thing that needs doing, or you will get the GNOME 3 fallback desktop instead. It pertains to SELinux, an old adversary of mine that got in the way when I was setting up a web server on a machine running Fedora. It doesn't recognise the new VirtualBox drivers as it should, so the following command needs executing as root or using sudo
:
restorecon -R -v /opt
Doing this restores the SELinux contexts for the /opt
directories within which the VirtualBox software directories are found. The -R
switch tells it to act recursively and -v
makes it verbose. When it has done its work, hopefully successfully, it is time to reboot the virtual machine, and you should have a GNOME Shell desktop interface when you log in.
Improving Font Display in Fedora 15
30th May 2011When I first started to poke around Fedora 15 after upgrading my Fedora machine, the definition of the font display was far from being acceptable to me. Thankfully, it was something that I could resolve, and I am writing these words with the letters forming them being shown in a way that was acceptable to me. The main thing that I did to achieve this was to add a file named 99-autohinter-only.conf
in the folder /etc/fonts/conf.d
. The file contains the following:
<?xml version="1.0"?>
<!DOCTYPE fontconfig SYSTEM "fonts.dtd">
<fontconfig>
<match target="font">
<edit name="autohint" mode="assign">
<bool>true</bool>
</edit>
</match>
</fontconfig>
Enabling autohinting improves font appearance in Fedora 15. The TrueType bytecode interpreter (BCI) was recently added to FreeType after its patent expired, but this actually decreased font quality on my system. I applied Kevin Kofler's autohinting fix and installed GNOME Tweak Tool, which lets you adjust autohinting settings. This combination solved my problems, particularly with letters like "k". Now, I am considering trying the same solution in openSUSE, which also has unsatisfactory font rendering, though I'll have to wait for GNOME Tweak Tool until they release a GNOME 3 version.
GNOME 3 in Fedora 15: A Case of Acclimatisation and Configuration
29th May 2011When I gave the beta version of the now finally released Fedora 15 a try, GNOME 3 left me thinking that it was even more dramatic and less desirable a change than Ubuntu's Unity desktop interface. In fact, I was left with serious questions about its actual usability, even for someone like me. It all felt as if everything was one click further away from me, and thoughts of what this could mean for anyone seriously afflicted by RSI started to surface in my mind, especially with big screens like my 24" Iiyama being commonplace these days. Another missing item was somewhere on the desktop interface for shutting down or restarting a PC; it seemed to be a case of first logging off and then shutting down from the login screen. This was yet another case of adding to the number of steps for doing something between GNOME 2 and GNOME 3 with its GNOME Shell.
After that less than positive experience with a Live CD, you'd be forgiven for thinking that I'd be giving the GNOME edition of Fedora 15 a wide berth, with the LXDE one being chosen in its place. Another alternative approach would have been to turn off GNOME Shell altogether by forcing the fallback mode to run all the time. The way to do this is start up the System Settings application and click on the System Info icon. Once in there, click on Graphics and turn on the Forced Fallback Mode option. With that done, closing down the application, logging off and then back on again will gain you an environment not dissimilar to the GNOME 2 of Fedora 14 and its forbears.
Even after considering the above easy way to get away from and maybe even avoid the world of GNOME Shell, I still decided to give it another go to see if I could make it work in a way that was less alien to me. After looking at the handy Quickstart guide, I ventured into the world of GNOME Shell extensions and very useful these have come to be too. The first of these that I added was the Alternate Status Menu, and I ran the following command to do so:
yum install gnome-shell-extensions-alternative-status-menu
The result was that the "me" menu gained the ever useful "Power Off..." entry that I was seeking once I refreshed the desktop by running the command r in the command entry box produced by the ALT + F2 keyboard combination. Next up was the Place Menu and the command used to add that is:
yum install gnome-shell-extensions-place-menu
Again, refreshing the desktop as described for the Alternate Status Menu added the new menu to the (top) panel. Not having an application dock on screen all the time was the next irritation that was obliterated, and it helps to get around the lack of a workspace switcher for now too. The GNOME Shell approach to virtual desktops is to have a dynamic number of workspaces, with there always being one more than what you are using. It's an interesting way of working that doesn't perturb more pragmatic users like me, but there are those accustomed to tying applications to particular workspaces aren't so impressed by the change. The other change to workspace handling is that keyboard shortcuts have changed to CTRL + ALT + [Up Arrow] and CTRL + ALT + [Down Arrow] from CTRL + ALT + [Left Arrow] and CTRL + ALT + [Right Arrow].
To add that application dock, I issued the command below and refreshed the desktop to get it showing. Though it stops application windows becoming fully maximised on the screen, that's not a problem with my widescreen monitor. In fact, it even helps to switch between workspaces using the keyboard because that doesn't seem to work when you have fully maximised windows.
yum install gnome-shell-extensions-dock
After adding the application dock, I stopped adding extensions though there are more available, such as Alternate Tab Behaviour (restores the ALT-TAB behaviour of GNOME 2), Auto-Move Windows, Drive Menu, Native Window Placement, Theme Selector and Window Navigator. Here are the YUM commands for each of these in turn:
yum install gnome-shell-extensions-alternate-tab
yum install gnome-shell-extensions-auto-move-windows
yum install gnome-shell-extensions-drive-menu
yum install gnome-shell-extensions-native-window-placement
yum install gnome-shell-extensions-theme-selector
yum install gnome-shell-extensions-user-theme
yum install gnome-shell-extensions-windowsNavigator
One hope that I will retain is that more of these extensions will appear over time, but Ranjith Siji seems to have a good round up of what is available. Other than these, I also have added the DCONF Editor and GNOME Tweaks Tool, with the latter restoring buttons for minimising and maximising windows to their title bars for me. As ever, yum
was called to add them using the following commands:
yum install dconf-editor
yum install gnome-tweaks-tool
There are other things that can be done with these, but I haven't explored them yet. All yum
commands were run as root, and the ones that I used certainly have helped me to make myself at home in what once was a very unfamiliar desktop environment for me. In fact, I am beginning to like what has been done with GNOME 3 though I have doubts as to how attractive it would be to a user coming to Linux from the world of Windows. While everything is solidly crafted, the fact that I needed to make some customisations of my own raises questions about how suitable the default GNOME set-up in Fedora is for a new user, though Fedora probably isn't intended for that user group anyway. Things get more interesting when you consider distros favouring new and less technical users, both of whom need to be served anyway.
Ubuntu has gone its own way with Unity and, having spent time with GNOME 3, I can see why they might have done that. Unity does put a lot more near at hand on the desktop than is the case with GNOME 3 where you find yourself going to the Activities window a lot, either by using your mouse or by keystrokes like the "super" (or Windows) key or ALT-F1. Even so, there are common touches like searching for an application like you would search for a web page in Firefox. In retrospect, it is a pity to see the divergence when something from both camps might have helped for a better user experience. Nevertheless, I am reaching the conclusion that the Unity approach feels like a compromise and that GNOME feels that little bit more polished. Saying that, an extra extension or two to put more items nearer to hand in GNOME Shell would be desirable. If I hadn't found a haven like Linux Mint where big interface changes are avoided, maybe going with the new GNOME desktop mightn't have been a bad thing to do after all.
On upgrading from Fedora 13 to Fedora 14
7th November 2010My Fedora box recently got upgraded to the latest version of the distribution (14) and I stuck to a method that I have used successfully before and one that isn't that common with variants of Linux either. What I did was to go to the Fedora website and download a full DVD image, burn it to a disk and boot from that. Then, I chose the upgrade option from the menus and all went smoothly with only commonplace options needing selection from the menus and no data got lost either. Apparently, this way of going about things is only offered by the DVD option because the equivalent Live CD versions only do full installations.
However, there was another option that I fancied trying, but was stymied by messages about a troublesome Dropbox repository. As I later discovered, that would have been easily sorted, only for my opting for a tried and tested method instead. This was a pity because only two commands would have needed to be issued when logged in as root, and it would have been good to have had a go with them:
yum update yum
yum --releasever=14 update --skip-broken
These may have done what I habitually do with Ubuntu upgrades but trying them out either will have to await the release of the next version or my getting around to setting up a Fedora virtual machine to see what happens. The latter course of action might be sensible anyway to see if all works without any problems before doing it for a real PC installation.
Ridding Fedora of Unwanted Software Repositories
4th November 2010Like other Linux distributions, Fedora has the software repository scheme of things for software installation and updating. However, it could do with having the ability to remove unwanted repositories through a GUI, only it doesn't. What you need to do instead is switch to root in a terminal using the command su -
and enter your root user password before navigating to /etc/yum.repos.d/
to delete the troublesome [file name].repo file. Recently, I needed to do this after upgrading to Fedora 14 or yum
wouldn't work from the command line, which is the way that I tend to update Fedora (yum -y update
is the command that I use because it automatically does all installations unattended until it is finished doing what's needed). The offending repository, or "Software Source" as these things are called in the GUI, belonged to Dropbox and even disabling it didn't make yum
operate from the command like it should, so it had to go. Maybe Dropbox hasn't caught up with the latest release of Fedora, but that can be resolved another day.