50 Tips and Tweaks for Linux Mint - PART ONE


Back to the home page


50 useful tips and tweaks for your Linux Mint (PART 1):

Contents of this page:

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

Make Windows the default option in the Grub boot menu

1. At the beginning of their Linux adventure, many people want Windows to be the operating system that's booted by default, instead of Linux Mint. So that Windows will boot automatically when you make no choice in the boot menu (you'll get over it after a while!).

This is how you do it:

a. First determine on which line in the boot menu of Grub, the Windows boot line currently is (often on line number 5, but not always). This line number is important to know. When you get to see the Grub menu after turning on your computer, simply count the lines.

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

c. Then type in the terminal (use copy/paste):

xed admin:///etc/default/grub

Press Enter.

d. Now you can change some things, among others the default boot line.

Find the following line (nearly at the beginning):

GRUB_DEFAULT=0

This is the default boot line. It's set at 0, because..... Grub starts counting with 0 and not with 1. Don't ask me why; probably because nerds derive a deep satisfaction from counting differently than ordinary people....

You have to keep this in mind when making a change. For example: if Windows is at line 5 in your Grub menu, you have to change the 0 into 4:

GRUB_DEFAULT=4

e. Save and close the configuration file. Note: Please read on, you're not done yet!

f. Apply the change, by regenerating the Grub menu. Copy/paste the following line into the terminal:

sudo update-grub

Press Enter. Type your password when prompted. In Ubuntu this remains entirely invisible, not even dots will show when you type it, that's normal. In Mint this has changed: you'll see asterisks when you type. Press Enter again.

Now you're done! When you reboot, the Windows boot line should be activated by default.

Forgotten password: what to do

2. You can't retrieve a forgotten password, but you can set a new one like this.

Set an automatic periodic file system check

3. An automatic periodic file system check once in a while, does no harm and may help to prevent problems. With tune2fs you can set the application fsck to do that. For example, if you want to set an automatic check during booting, scheduled to happen at every hundredth boot, for partition sda2:

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

Copy/paste the following blue line into the terminal:

sudo tune2fs -c 100 /dev/sda2

Press Enter. Type your password when prompted. In Ubuntu this remains entirely invisible, not even dots will show when you type it, that's normal. In Mint this has changed: you'll see asterisks when you type. Press Enter again.

If you wish to force a one-time check by fsck, you can simply set the boot counter to its maximum (thus causing the check to be performed next time you boot). Using the example given above (adapt it to your own situation), you can do that with the following terminal command:

sudo tune2fs -C 100 /dev/sda2

The parameter here is a capitalized C, whereas the c in the previous command is lower case. For more explanation execute this command:
man tune2fs

Note: This is only applicable for EXT2, EXT3 and EXT4 file systems.

Make your system faster and quieter

4. There's an important thing you can do, in order to improve the performance of Linux Mint: turn off the three-dimensional visual effects.

You can do that like this.

Force a locked-up application to close with xkill

5. It won't happen often, but now and then this trick comes in handy:

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

b. Type: xkill

c. And press Enter. Now the cursor changes into a cross.

d. Click on the application window that you want to kill forcibly. Boom! It's gone. No questions asked....

Change xkill's boring cross back to the original pirate icon

5.1. Back in the old days, before desktop Linux became corporate and respectable, the cross of xkill used to be a fun pirate symbol: a skull with crossed bones. This is how to get it back (the how-to is written for the default mouse cursor theme DMZ-White):

a. Download the original pirate icon file from my Google Drive, to your folder Downloads.

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

c. Delete the current link to the boring respectable cross: copy/paste this command into your terminal:

sudo rm -v /usr/share/icons/DMZ-White/cursors/pirate

Press Enter. Type your password when prompted. In Ubuntu this remains entirely invisible, not even dots will show when you type it, that's normal. In Mint this has changed: you'll see asterisks when you type. Press Enter again.

d. Copy the new icon from Downloads to its proper place: copy/paste the following command into the terminal:

sudo cp -v ~/Downloads/pirate.png /usr/share/icons/DMZ-White/cursors/

Press Enter.

e. Enjoy!

Avoid some fatal mistakes!

6. There are some mistakes that you definitely will want to avoid.

Generate a nice hardware list

7. It's useful to have a hardware list. There are two ways to generate one:

A list of your hardware with inxi

7.1. You can easily create an overview of the most important hardware in your computer, by means of the application inxi.

You can use inxi like this:

Open a terminal window. Make it fullscreen, so that there will be no breaks in the generated lines.
(You can launch a terminal window like this: *Click*)

Copy/paste the following command into the terminal:

inxi -Fxz

Press Enter.

Now you see a handy list. You can use copy/paste to transfer it, for example to put it in a support forum message in which you request help for a problem. That makes life easier for those who are willing to help you.

A complete list of all the hardware in your computer

7.2. For a complete list of every bit of hardware in your computer, do the following:

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

Copy/paste this line into the terminal:

sudo lshw -html > hardware.html

Press Enter. Type your password when prompted. In Ubuntu this remains entirely invisible, not even dots will show when you type it, that's normal. In Mint this has changed: you'll see asterisks when you type. Press Enter again.

Now you'll have a nice document in your personal folder, named hardware.html. Double-click it to view it in your web browser.

Note: Do you want to attach this file to a forum message, so that others can help you better to solve your computer problem?

Many internet fora, like the English Ubuntu Forums, don't accept attachments with the extension .html.

So in that case, compress the file first into hardware.html.tar.gz, using archive manager File-roller. The forum helper can then simply download the file and unpack it.


Optimize your Solid State Drive (SSD)

8. Do you have a Solid State Drive (SSD)? Then optimize it for Linux Mint.

Improve the looks of image editor GIMP

9. GIMP is a fine tool for editing pictures. But its user interface is horrendously awful, particularly because of its three separate windows (what were the developers smoking?).

You can improve GIMP's user interface vastly by merging those three windows into one:

Panel of GIMP - Windows - tick: Single-Window Mode

Create an installer package for an application which is already installed

10. Do you have installed an application manually, which isn't in the software repositories of Linux Mint, and have you lost the installer package (x.deb) of it? Then you can "magically" recreate the installer package on the system that contains this manually installed application, by means of dpkg-repack.

An example is easiest. Suppose you have manually installed 'Nero for Linux' some time ago in your Linux Mint, and you wish to do a clean re-install of your entire operating system. Then you can do this first, in order to get an installer package for Nero:

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

Copy/paste this line into the terminal:

sudo dpkg-repack nerolinux

Press Enter. Type your password when prompted. In Ubuntu this remains entirely invisible, not even dots will show when you type it, that's normal. In Mint this has changed: you'll see asterisks when you type. Press Enter again.

When dpkg-repack has finished its job, there'll be a new .deb package in your home folder, called nerolinux_xxx.deb. You can use that to re-install 'Nero for Linux' (simply double-click it, like a Windows .exe installer), after you've done a clean re-install of your entire Linux Mint.

Cleanse a text from hidden layout code

11. You'll probably know the problem: you want to copy a piece of text from a certain source, but it's chock-full of hidden layout codes like fonts, bold, colours and all that.

Nasty and bad for your blood pressure, because those codes may easily mess up the layout of your target document.

By means of a small detour you can easily cleanse copied text from all hidden layout codes. Namely by means of a simple text editor like Xed.

This is how you use Xed as "washing machine":

- Copy (with the mouse) the text block that you want to purify of all code, and paste it into an empty text file in Xed;

- Now copy the text in the Xed file (a new copy operation also);

- Finally, paste the text into the target document. Now it's entirely clean.

Improve Firefox

12. You can improve and optimize Firefox like this.

Manage the memory of the terminal

13. All terminal commands are being stored in a "memory file", so that you can recall them in the terminal by pressing the "up" arrow key on your keyboard.

They're in the file .bash_history in your home folder. It's a hidden file (with a dot before its name), so first unhide it:

Launch your file manager.

Use the shortcut (key combination) Ctrl h to make the hidden files visible, or do it like this:

In the task bar of the file manager: Files - Preferences - check:
Show hidden and backup files

Now close the file manager and open it again.

The hidden files (with a dot before their names) should be visible now. You can view and edit the contents of .bash_history in a text editor like Xed.

Should you wish to clear all items in the "terminal memory", then you can use this terminal command:

history -c -w ~/.bash_history

Activate the numeric section of your keyboard

14. Does your keyboard (laptop?) have a separate numeric keypad on the right? Then it's useful for Num Lock to be switched on automatically, when you start Linux Mint.

Note: This instruction is only meant for desktops and laptops that have a separate numeric keypad! It's definitely not desirable to have the Num Lock on by default on a laptop that has no such separate keypad.

You can achieve that as follows:

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

b. Copy/paste the following command into the terminal:

sudo apt-get install numlockx

Now from the menu, launch the application Login Window. Tab Settings: enable activate numlock.

Reboot your computer. The numeric keypad should turn on automatically after you log into your user account.

Note: It's possible that during login, Mint will turn Num Lock off again (sigh). If that happens, you can counteract that irritating behaviour as follows:

Menu - Preferences - Startup Applications (Xfce: Session and Startup)

Click the + button (Add) - Custom command

Give the new addition the name Numlockx and the command:
numlockx

Startup delay: set it at 20 seconds.

Click Add.

This will turn Num Lock on, 20 seconds after login. The delay is necessary, because you have to make sure it happens after Mint has turned Num Lock off.

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

Disable the keyring password

15. This tip should only be relevant when you're being logged into your user account automatically, without having to enter your username and password.

The keyring is the safe in which some web browsers store the passwords for websites you visit. Some email clients, chat clients and remote access clients use the keyring too. Even your file manager might use it, for storing network share passwords.

Note: The keyring does not store your root password or user password! It only stores additional network (internet) related passwords.

The keyring password can be annoying when you use automatic login. Some web browsers invoke it when you want to store website passwords or when you have stored those in the past.

The most secure solution by far, is to simply turn off automatic login for your user account! But if you don't want to do that and if you never store passwords anyway (because you're about to leave the door of the password safe open permanently), this is how to disable the keyring password:

a. First delete the current user keyring. Don't be afraid: you won't remove your root password or your user password, but only your personal user keyring. Note: This will delete all the website passwords you've stored in your web browsers!

Proceed like this:

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

Use copy/paste to transfer the following command line to the terminal:

rm -v ~/.local/share/keyrings/*.keyring

Press Enter.

b. The next time when you're being prompted for a keyring password, leave the password field blank (simply click Continue and then again Continue, thus agreeing to unsafe storage). That disables the keyring password for good.

c. Let your web browsers wipe any passwords they've stored, and configure them never to offer to store a password again.

Disable the touchpad while typing, with a delay of one second

16. It's pretty useful to disable the touchpad (trackpad) of your laptop during typing, and tweak the delay. Especially on small laptops.

That's easy to configure:

Note: The tweak I'm going to describe, only disables the touchpad functions of tapping and scrolling. Mouse pointer movements are still allowed. The delay is one second, which should be unobtrusive.

Create an adapted startup application:
Click on the Menu button. Query: startup.
Click Startup Applications - Add
Fill out the fields as follows (use copy/paste, that's easiest):

Name:
Syndaemon

Command:
syndaemon -i 1.0 -K -R -t

Comment:
Disable touchpad while typing, with a reasonable delay and only for tapping and scrolling

Click Add and then Close.

Reboot your computer.

Finally, check whether it's working, with the help of the following terminal command (copy/paste the line below in a terminal and press Enter):

ps aux|grep syndaemon

Note: This is a user preference, so repeat this in every user account.

Copy entire websites to your hard drive

17. You can easily copy an entire website to your hard disk by means of the application httrack. Although httrack is a terminal application without graphical user interface, it's user-friendly and easy.

Note: There's also a graphical frontend called WebHTTrack, but strangely enough this is harder to operate than httrack(!) and even more importantly: it's unstable and unreliable. So I strongly advise against WebHTTrack!

You can install httrack by means of the application Software Manager.

After installation, just type httrack in a terminal window and press Enter. The rest is self-evident, because then a helpful wizard asks you a few simple questions. When in doubt, just press Enter, because the defaults are sensible.

When httrack has done its job, you can find the saved website in the folder "websites" in your home folder. Starting point for viewing is the file index.html, which you can simply double-click, and then it'll be opened by your web browser.

Note: By default, httrack copies an entire website with all its contents, like movies and such. So be careful what you copy, for you can easily flood your hard drive....

Use Xfburn to burn your CD's and DVD's

18. Unfortunately, Brasero is widely used as DVD burning application in Linux Mint. It's, let's put it mildly, often full of nasty surprises.

Luckily, there's a vastly superior alternative: Xfburn. I strongly advise you to install it, because it's simple, stable and won't let you down!

It has just one disadvantage: Xfburn can't burn multisession DVD's. So it can't add to a DVD that already has content.

Installing Xfburn is easy: use the application Software Manager. Or this magical invocation for the terminal:

sudo apt-get install xfburn

Press Enter. Type your password when prompted. In Ubuntu this remains entirely invisible, not even dots will show when you type it, that's normal. In Mint this has changed: you'll see asterisks when you type. Press Enter again.

Increase your disk space by limiting the reserved space for root

19. On the default file system of Linux Mint, which is EXT4, five percent of the disk space is reserved for privileged root processes. On a large hard disk, that can be rather a lot of space.

In such a case you might reduce the amount of reserved space to 1 % or 2 % (only for EXT4, EXT3 and EXT2 format). As a rule of thumb: 1 GB should usually be enough for the reserved root space.

Proceed like this:

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

Example for a hard disk called sda, and a root partition called sda1:

Copy/paste the following line into the terminal:

sudo tune2fs -m 2 /dev/sda1

Press Enter. Type your password when prompted. In Ubuntu this remains entirely invisible, not even dots will show when you type it, that's normal. In Mint this has changed: you'll see asterisks when you type. Press Enter again.

Make an external hard disk sleep until it's needed

20. Do you have an external USB hard disk, which is connected, and which wakes unnecessarily often? Then you can try to tame it like this:

a. First find out how the system calls your external disk (for example: /dev/sdb1):

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

Copy/paste the following command into the terminal:

blkid

Press Enter.

An example makes it easy. Suppose the external USB disk is called /dev/sdb1. In that case the command to put it to rest until needed, is this:

sudo hdparm -y /dev/sdb1

Press Enter. Type your password when prompted. In Ubuntu this remains entirely invisible, not even dots will show when you type it, that's normal. In Mint this has changed: you'll see asterisks when you type. Press Enter again.

Doesn't this work? Then try a more aggressive command, which should induce your external disk to enter a coma instead of an ordinary nap:

sudo hdparm -Y /dev/sdb1

(The difference is, that the Y parameter is uppercase instead of lowercase)

Press Enter.


Want more tips? This is part one of the Tips and Tweaks. You can find part two here and part three here.


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

Back to the home page

Disclaimer