36 tips and tweaks for Ubuntu and Linux Mint - PART 2


Back to the homepage



36 useful tips and tweaks for Ubuntu and Linux Mint (PART 2).



This is part two of the Tips and Tweaks. You can find part one here.

How to install fonts that you've downloaded

1. You can install fonts that you've downloaded, in several ways:

Install fonts for one user account

1.1. In order to install fonts that you've downloaded for one user, you can proceed as follows.

a. First launch your file manager. In Ubuntu and Mint Cinnamon that's the application "Files". For example by clicking its icon in the panel.

b. Use the key combination Ctrl h to make the hidden files visible, or do it like this:

Panel of Files: click View - Show Hidden Files

Now all hidden files and directories are being shown (those whose names begin with a dot).

c. Double-click the hidden folder .local and then double-click its subfolder share. Within that subfolder, create a new folder called fonts

For further clarification: the path should be as follows:
~/.local/share/fonts

d. Finally: copy your downloaded fonts (TTF files) into this new folder. You're done!

Tip: if you have a Windows partition as well, you can copy the Windows fonts, too. They are located in: C:\Windows\Fonts

Note: repeat this for each user account.

Install fonts for all users

1.2. Do you want to install fonts systemwide for all users? This is how you do that:

a. Ensure that the fonts that you want to install, are all in your Downloads folder. This is important for the terminal commands that you're going to execute.

b. Launch a terminal window.
(You can launch a terminal window like this: *Click*)

c. Copy/paste the following line into the terminal window:

sudo mkdir -v /usr/share/fonts/truetype/myfonts

Press Enter and submit your password. Please note that the password will remain invisible, not even asterisks will show, which is normal.

With this command, you've created a new system folder.

d. Then (use copy/paste, this is one line):

sudo cp -v ~/Downloads/*.*tf /usr/share/fonts/truetype/myfonts

Press Enter.

With this command, you've copied the fonts from your Downloads folder to the new system folder.

e. Then (use copy/paste):

sudo fc-cache -fv

Press Enter.

With that final command, you've informed the system about the presence of the new fonts.

You're done! Now you can start using your new fonts, for example in Libre Office Writer.

Where are the installation packages of the Ubuntu repositories?

2. Only for advanced users:
http://archive.ubuntu.com/ubuntu/pool/

Small screen: dialog buttons are outside the screen view. What to do?

3. On a small screen, like that of a netbook, the dialog buttons are sometimes outside the screen view. Very annoying, when you want to click "OK" or "Continue", and you can't reach that button....

You can reach it after all, when you drag the upper side of the dialog window "ouside of the screen". You can do that as follows:

a. Place the mouse pointer on a neutral, non-active part of the dialog screen that you want to drag upwards. So not on a link or something.

b. Press the left Alt key and keep it pressed (with your left index finger, that's easiest).

c. Press the left touchpad button and keep that one pressed as well (with your left thumb, that's easiest). Or when you have a mouse, do this with the left mouse button.

d. Now you can drag the dialog window upwards "outside of the screen". Touchpad: wipe upwards with a finger of your right hand. Mouse: do this by simply moving the mouse pointer upwards. Finally the dialog buttons on the bottom of the dialog window become visible!

As so often, this is actually pretty simple, but you do have to know it first....

Enlarge the letters in the Grub menu

4. Usually, the Grub menu is already shown in the right resolution for your display. That produces the nicest letters, but sometimes they are rather small. Which may cause a problem for people with decreased eyesight.

You can enlarge the size of the letters in the Grub menu as follows.

a. First make sure that you have installed the applications gksu and leafpad:

Launch a terminal window.
(You can launch a terminal window like this: *Click*)

Type (or copy/paste):

sudo apt-get install gksu leafpad

Press Enter and submit your password. Please note that the password will remain invisible, not even asterisks will show, which is normal.

b. Then copy/paste this command into the terminal:

gksudo leafpad /etc/default/grub

Press Enter.

c. In the text file that has opened, find the following text:

# The resolution used on graphical terminal
# note that you can use only modes which your graphic card supports via VBE
# you can see them in real GRUB with the command `vbeinfo'
#GRUB_GFXMODE=640x480


Remove the hash # from the bottom line of that text, so that this bottom line becomes:
GRUB_GFXMODE=640x480

d. Save the modified text file and close it.

e. Then copy/paste this command line into the terminal:

sudo update-grub

Press Enter.

f. Reboot your computer. The letters in the Grub menu should be a lot bigger now.

Letters too big? Then put the resolution at 800x600 instead of 640x480.

How to turn down Windows help requests without offending people

5. Often a problem for Linux users: Windows users among your friends and family, keep asking you for Windows help. Something which we Linux users usually don't like doing anymore. Because we feel we can spend our spare time better, namely on assisting people with a far better alternative: Linux!

But how can you turn down a Windows help request without seeming unfriendly or even rude?

That can be done in many ways, but maybe you'd like to use my own "solution": when asked for Windows help, I give this answer:
"I'm sorry, but my knowledge of Windows has faded and become outdated, because I'm a Linux user. So you'd better ask someone else. However, if you're interested in switching to Linux, I'll be glad to help you with that!"

In my experience, this answer has two benefits: the Windows help seekers that want to stick to Windows don't feel offended and simply seek help elsewhere, and some of them (a minority, but still) want to give Linux a try....

Make the boot process reports visible

6. By default, the boot process reports of your operating system are hidden behind a nice boot splash. For troubleshooting purposes, it can be useful to make them visible.

You can do that as follows:

- In the Grub boot menu, select the boot line of Ubuntu or Linux Mint;

- Press the E key and release it;

- Remove the words "quiet splash" from the boot line;

- Press the Ctrl key and keep it pressed; then press the X key and release both keys.

Now your Ubuntu or Linux Mint will boot once with visible boot process reports.

Pin Ubuntu to a specific kernel version

7. Do you want to pin Ubuntu to a certain kernel version, for example in order to avoid potential complications because of a future kernel update?

That may be useful, e.g. when you've manually installed a driver which would become unusable in a newer kernel. Or when you're a system administrator for remote computers.

Note: in Linux Mint you can simply switch to the update policy "Don't break my computer!", which you can do by means of Update Manager (panel: Edit - Update policy). So the instruction below, is only meant for Ubuntu.

In order to pin the kernel in Ubuntu, you can remove the generic meta packages for the kernel. By that removal Ubuntu won't get kernel updates anymore, because those metapackages ensure that the updates contain newer kernels whenever they become available.

Removal of these metapackages can be done by means of the terminal:

Launch a terminal window.
(You can launch a terminal window like this: *Click*)

Now copy/paste the following command into the terminal (this is one line!):

sudo apt-get purge linux-generi* linux-image-generi* linux-headers-generi* linux-signed-generi* linux-signed-image-generi*

Press Enter and submit your password. Please note that the password will remain invisible, not even asterisks will show, which is normal.

Just to make sure (in certain cases the execution of this command stumbles over missing "signed" packages, which you might not notice), also execute this shortened command (use copy/paste, this is one line!):

sudo apt-get purge linux-generi* linux-image-generi* linux-headers-generi*

The risk of such a pinning of the kernel is limited, especially for desktop users (servers are another matter). Because although kernel updates may contain security fixes, attackers usually focus on other system parts.

How to undo kernel pinning

7.1. Do you wish to undo the pinning of a kernel version in Ubuntu? You can do that by means of Synaptic: install Synaptic and then use it to re-install the "linux-generic" packages that are relevant for your kernel series.

Reboot your computer. It should run on the latest kernel of your kernel series now.


(continued in the column on the right)
This website is being sponsored by Google Ads.

Are you using an ad blocker? Then you're also blocking my earnings from advertisements....

If you wish to support my website, you can configure your ad blocker to make an exception for this website.

Thanks in advance....


Problem with a Microsoft Office Document? Use OneDrive

8. Does Libre Office have a problem with a complex Microsoft Office document? Then open that document in the free cloud service One Drive.

In the free edition of Microsoft OneDrive there are basic editions of Word, Excel and Powerpoint, called Office Online. With those you can open, edit and even create documents.

In my opinion Libre Office is a far superior tool, but in certain cases using Office Online can be a useful emergency measure.... But still only for use in emergencies, because you more or less "hand over your document" to Microsoft.

Need a password manager? Use KeePassX

9. If you need a password manager, you can use KeePassX. It's installable by means of Software Manager or by means of this terminal command:

sudo apt-get install keepassx

Note: don't install its "brother" KeePass! KeePass requires Mono, and a Linux system with Mono is partly vulnerable to Windows malware.

Older versions of KeePassX didn't support the KeePass 2.x (.kdbx) password database format. However, in KeePass 2.x you can create an export in KeePass 1.x database format (.kdb), which those older versions of KeePassX can read (and use as the native password database).

How to add extra DNS name servers to your system

10. It's sometimes useful to add some spare DNS name servers to your system. For example when the default name server of your internet service provider isn't too reliable.

Note: before you proceed, you should realize that the owner of the DNS has the ability to see, log and profile all of your internet traffic! So be careful when you select another DNS.

You can add another DNS as follows:

a. Launch a terminal window.
(You can launch a terminal window like this: *Click*)

Now copy/paste this command line into the terminal:

sudo apt-get install gksu leafpad

Press Enter and submit your password. Please note that the password will remain invisible, not even asterisks will show, which is normal.

b. Now copy and paste the following command line into the terminal (don't type it yourself: it's too easy to make a typing error):

gksudo leafpad /etc/resolvconf/resolv.conf.d/tail

Press Enter.

Add the following two lines to that (probably empty) text file (it concerns two DNS name servers from Google):
nameserver 8.8.8.8
nameserver 8.8.4.4
Save the modified file and close it.

Again in the terminal (copy/paste):

sudo resolvconf -u

Press Enter.

With that, you've added two DNS name servers from Google, that your system can utilize in case of emergency.

Check it with the following terminal command (copy/paste):

more /etc/resolv.conf

Press Enter.

Both new DNS name servers should now be listed as available name servers. As reserve, not as default: the DNS server of your internet service provider remains the default. That's why it's automatically put on top of the list in /etc/resolv.conf.

Do you wish to set another DNS server as the default instead of as a mere reserve? Then don't add it to /etc/resolvconf/resolv.conf.d/tail but to /etc/resolvconf/resolv.conf.d/head instead.

You can safely ignore the warning in "head" that the file should not be edited: that warning is meant for /etc/resolv.conf, which will eventually be generated from "head" and "tail".

Note: after adding the new name server line, you should hit the Enter key one extra time in the "head" text file, because the cursor in that text file should be one line below the new DNS name server. In order to make room for the DNS name server of your internet service provider, which will be put in /etc/resolv.conf automatically as reserve, at the bottom of the list....


How to access the UEFI or BIOS configuration from within Windows 8.x or 10

11. Usually, you need to change some settings in the UEFI or BIOS before you can install Linux Mint or Ubuntu on your computer.

Can't you succeed in accessing the UEFI configuration? Then you can also evoke it from within Windows 10, in an annoyingly cumbersome way (the procedure in Windows 8.x is almost identical):

Click on the magnifier icon in the panel of Windows 10 - let it search your system ("Search Windows") with the term settings
Click on the first (preselected) result, namely the app Settings

Then:
Update & security - Recovery - Advanced startup - Restart now

Then:
Troubleshoot - Advanced options - UEFI Firmware Settings - Restart

Finally, at very long last (sigh....) you should now be able to access the UEFI configuration.

How to check the integrity of an ISO file with SHA256sum

12. A method that's often used to verify the integrity of an iso file that you've downloaded, is the SHA256sum method. On a website where you can download an iso file from, for example an iso of Linux Mint or Ubuntu, there's often also a text file which contains the correct SHA256sum of that iso. You can compare this with a digital fingerprint of the iso.

When you calculate the SHA256sum from the iso file after you've downloaded it, you can compare the outcome with what it should be. The file is only then intact, when both "fingerprints" are exactly the same.

Note that the method I describe below, only provides a corruption check. Not an authenticity check. So it only protects you against an iso that has accidentally been corrupted during the download process, not against a deliberate falsification. Therefore: make sure you download your iso from a reliable mirror!

Such a calculation can be done as follows. An example is easiest.

Suppose you've downloaded the iso of Linux Mint 18.1 Cinnamon, 64-bit. This file is called linuxmint-18.1-cinnamon-64bit.iso. Simple leave the iso file in the folder Downloads.

Then launch a terminal. (You can launch a terminal window like this: *Click*)

Copy/paste this line into the terminal:

cd Downloads

Press Enter.

Then copy/paste this command line:

sha256sum linuxmint-18.1-cinnamon-64bit.iso

Press Enter.

Finally, compare the outcome with what it should be. Tip: launch a simple text editor like Xed, Gedit or Leafpad. Then copy/paste both lines of gibberish into a text document, one below the other. That makes comparing them a lot easier.

Stick to your kernel series

13. Preferably, only install kernels from the same series as the one that's default for your version of Linux Mint or Ubuntu!

If your machine functions well on the default kernel series, I strongly advise to stick with it. Because your Ubuntu or Mint version has been designed around the "engine" of a particular kernel series. Changing the "engine" to one from another series, is likely to diminish stability and may introduce unexpected bugs.

So in the case of Linux Mint 18 / 18.1 and Ubuntu 16.04 / 16.04.1: select kernel 4.4.x. Only install a kernel from a higher series when your machine doesn't run well on the 4.4 kernels.

The kernel is the heart of your system: of course you want a system in which the heart cooperates well with the software around it....

Important exception: very new hardware might not run well on your current kernel series, because it doesn't contain the latest drivers. So for brand new hardware, it's the latest kernel series that's often the best choice.

Privacy enhancement: make many applications forget all recently opened files

14. For the sake of your privacy, it may be advisable to make many applications forget all the files that you've opened recently in them. This is how:

Launch a terminal. (You can launch a terminal window like this: *Click*)

Copy/paste this blue line into the terminal:

cat /dev/null > .local/share/recently-used.xbel

Press Enter.

In Linux Mint Xfce and Xubuntu you can automate that like this:

Menu button - Settings - Session and Startup

Click Add

Name:
Delete file history

Command: (use copy/paste to transfer it)
sh -c "sleep 120 && cat /dev/null > .local/share/recently-used.xbel"

Click OK.

This will make many (not all!) applications forget the files that you've opened previously, two minutes after login. The two minutes delay should be enough for you to use their file history before it's being deleted.

Note: user preference, so repeat this in each user account.

How to reset the terminal to its default settings

15. The terminal window is a mighty instrument. So it's of course annoying when its settings aren't quite right anymore.

Naturally, you can reset most of its settings in the preferences of your terminal window. But some settings are contained in a file called .bashrc. Among other things this contains the default colours of the terminal text: green before the prompt, white after.

You can restore the original .bashrc like this:

cp -v /etc/skel/.bashrc ~/

Close the terminal and relaunch it. All should be well now.

Normalize the sound volume of mp3 files with mp3gain

16. You can use a terminal application called mp3gain, for normalizing the sound volume of your mp3 files.

Get it here:
http://archive.ubuntu.com/ubuntu/pool/universe/m/mp3gain/

Download the latest .deb file (from 2014, not from 2011) for your Mint (32-bit or 64-bit). Then double-click it to install it.

Usage:

Launch a terminal. (You can launch a terminal window like this: *Click*)

Go with the terminal to your music folder. For example, if your mp3's are in a folder called Songs:

cd Songs

Press Enter.

Copy/paste this line into the terminal:

find . -name *mp3 -exec mp3gain -a -k {} \;

Press Enter.

Undo:

find . -name *mp3 -exec mp3gain -u {} \;

It works much better in the terminal, than when handled by the graphical layer Easymp3gain (which often malfunctions).

To the content of this website applies a Creative Commons license.


Comments