Saturday, October 19, 2024

Linux Mint tutorial part 3 - Overview and customization

Previous part: Linux Mint dual boot part 2 - How to install Linux Mint.

Now that Linux Mint is successfully installed (hopefully), we can move on configuring it and getting familiar with some of its features.

Contents

 

Welcome screen

Linux Mint customization 01 - Default theme

The Welcome screen app presents the user the most common apps used to set up your system and can be disabled by unchecking the "Show this dialog at startup". This apps can also be found by launching the System Settings from the Start menu or by searching the app in the Start menu.

Linux Mint customization 02 - Settings icon

Linux Mint customization 03 - System settings
 

Linux Mint Theme

Linux Mint customization 04 - Theme

Here you can choose a light, dark or a mixed theme. Changing the Style will also change how Icons look, so try something that you like. I keep the file explorer open during this to have a better idea how the design will be affected. If you want more control over default styles, switch to Advanced settings.

Linux Mint customization 04 - Theme Advanced

On the Add/Remove tab you can install themes made by other users but keep in mind that some my cause issues. I recommend to first use Linux for a few days or weeks and then try these so that in case you have issues at least you know what could be the cause.

Desktop Background

Linux Mint customization 05 - Desktop Background

To change the desktop background, right-click anywhere on the desktop and click "Change Desktop Background". Here you can select one from available ones or use + to add your own.

Desktop Icons

To change the desktop icons layout or grid spacing, right-click on the desktop and select Customize.

Linux Mint customization 06 - Desktop Grid Icons

Here you can open the Desktop Settings window, to select what system icons to show. I prefer to enable the Trash icon and to disable Mounted Drives since I can find them in the file explorer.

Linux Mint customization 07 - Desktop Icons

Linux Mint Applets

Linux Mint applets are small applications designed to run on the panel (the bar at the bottom of the screen). They provide quick access to specific functionalities or information, such as system monitoring tools, weather forecasts, or news updates. Applets can be added, removed, and customized.

To add or configure an applet to the Linux Mint panel right-click on an empty space on the panel and select "Applets" from the context menu. From the Download tab you can install other applets, then in the Manage tab use the + button to add it to the panel or the trash icon to uninstall.

To remove an applet, right-click on it and select "Remove from panel" from the context menu.

In the Manage tab you can configure the Start menu for example.

Linux Mint customization 08 - Applets

There is also Desklets that work in a similar fashion as Applets except they appear on the Desktop. You can use them to display CPU or RAM usage for example.

Show window title in the panel button

Linux Mint customization 10 - Panel

I prefer having the window title near the icon like Windows does, to make it more clear what apps are open. To do this, click on the cog wheel next to the Grouped window list applet and in the Panel tab set Button label to show the Windows title or Application name.

Linux Mint customization 09 - Grouped window list

Firewall

To enable the firewall, search for it in the start menu and after entering the password set the Status to enabled.

Linux Firewall

Linux will automatically add rules for some native apps to open necessary ports, but if you use P2P apps you need to add them manually.

If you need more control over your internet traffic, for example to block certain apps, IPs or web domains, take a look at Portmaster. The app is free but there is also a paid version for more functionality if you need it. You can also use it to see what apps and services are connecting to the internet.

Software Manager

Linux Mint Software Manager

The Software Manager can be used to search and install applications. Some applications can have two versions: System Package or Flatpak.

Flatpaks are a universal, cross-distribution software packaging format for Linux systems. They provide a sandboxed, self-contained runtime environment for applications, allowing them to run consistently across different Linux distributions without requiring dependencies to be installed on the host system. When installing first flatpak app it will require around 2-3 GB but subsequent apps will use that so even if you see in the download description that it needs x gigs it will only download that if no flatpak is present.

Most often the Flatpak version will be more up to date. You can also download the .deb package from the developer's website and install it manually. I do that with Wine since the one in the manager was version 7 and on the Wine website was version 9. Each app is tested for your Linux version to ensure it works correctly but that has the drawback of being sometimes a bit outdated.

In Software Manager Preferences you can enable unverified Flatpaks.

Software Manager preferences

This is not recommended since there is a risk the app could have malicious code. There is no risk of enabling this. When you try to install an app you can see which one is verified or not and decide if you want to install it. You can visit the developers page, usually on GitHub, check the code or do some research online about it.

Update Manager

Linux Mint Update Manager

By default updates need to be installed manually but automatic updates can be enabled in Edit -> Preferences. Here you can also set how often the system will check for updates.

Some software maintenance can be done in Edit -> Software Sources -> Maintenance.

After Linux kernel is updated, the old ones will not be removed and this can add up and take some space. Outdated kernels can be removed in View -> Linux Kernels. I usually keep only the previous version. You can boot to a different kernel at boot time using the GRUB boot-loader.

The Linux kernel is the core component of the Linux operating system. It is responsible for managing the system's resources, such as the CPU, memory, and peripheral devices. The kernel provides an abstraction layer between the hardware and the software, allowing applications to interact with the system's resources in a consistent and efficient manner.

Driver Manager

Linux Mint Driver Manager

Most hardware components are recognized by the Linux kernel and work automatically
without the need to install drivers. Some however require proprietary drivers to be
recognized or to work better.

System Snapshots (Timeshift)

Linux Mint System Snapshots (Timeshift)

This is similar to System Restore in Windows and can be used to restore your computer to a previous state in case of software issues. You can configure how often the backup will be done, how many snapshots to keep and where to save them. If you don't want automatic snapshots, you can make a manual one instead using Create. Make sure there is enough free space for this. Many people keep the original save location on the same disc as the OS that is usually an SSD with smaller capacity, the disc gets filled and the computer will not start anymore do to the lack of space. Use an external HDD if you have one to prevent this issues.

Here is a video tutorial on Timeshift: When Timeshift helps (and when it doesn't) - For casual users

File Manager in Cinnamon

The default file manager in Linux Mint Cinnamon in Nemo. Additional file managers such as Krusader, Thunar, can be installed that can provide other features that you might like.

When copying files I use Thunar because is the only file manager as far as I know that checks the copied file against the source file using checksum. This needs to be enabled in Preferences. On Windows I used to use TeraCopy but unfortunately is not available for Linux. Some might say this feature is not really necessary but it happened to me on a few occasions when the copied file had different checksum than the source file. It turned out the HDD wire connections were not so good. Regardless, I think this feature should be included in all file managers since the extra few seconds it adds to file copying for me is nothing compared to the assurance that the file was copied correctly.

There are many options in Nemo Preferences and I recommend taking some time to see what it can do and how you can configure to suit your needs. The first setting that I modify on a fresh install is 'Ask before moving files to the Trash' under the Behavior tab. That prevents deleting files by mistake in case you accidentally press the delete key. I wonder what would happen if the delete key was not making good contact and sending multiple signals in one press. Batch deletion? What I don't like about Thunar is you cannot enable any confirmation dialog when you delete something. You cannot recover something from Trash if you don't notice it was deleted and you empty the Trash periodically.

You can use the file manager as in Windows with the tree view in a left pane or you can navigate using the location path above. Using View -> Extra Pane (F3) you can use another navigation method with a dual split interface. Another method is to use tabs like in a web browser and when moving or copying files drag-and-drop them in the desired tab.

Nemo Plugins

To extend the functionality of the file manager, you can search for nemo in the Software Manager and install Nemo extensions.

Nemo plugins

GtkHash

The GtkHash extension for nemo allows users to compute message digests or checksums using the mhash library.

Nemo GtkHash extension

When this extension is installed, the Checksum tab will appear in the Properties of any file. This is useful for example when downloading a file and the website provides an SHA256 hash to check if the downloaded file matches the original one. To copy the hash right-click on SHA256 and copy. To verify the hash, simply copy the provided one from the website and paste it in the Check input field. If the hashes match, a green check mark will appear.

Nemo media columns

This extension makes available extra columns when in List View. To add more columns in the file explorer besides name, size, date... right-click a column and select other types. The Length column shows duration for video and audio files.

Nemo media columns

Nemo Share

Nemo Share allows you to quickly share a folder from the Nemo file manager without requiring root access. Useful for when you want to share files over SMB protocol on the local network. For me this caused noticeable delay when browsing folders but probably was due to some wrong SMB configuration. I will show how to debug Nemo in the Issues and Debugging part.

Mounting Points

In Linux, drives are typically mounted as a directory, known as a mount point. When a drive is mounted on a mount point, the files and directories on the drive become accessible at that location in the file hierarchy.

The specific mount point for a drive depends on the type of drive and the way it is configured. Here are a few common examples:

  • Removable drives, such as USB flash drives and external hard drives, are typically mounted on the /media or /mnt directory. For example, if you insert a USB flash drive into your system, it might be mounted on the /media/<username>/<drive_label> directory, where <username> is your username and <drive_label> is the label of the drive.
  • The root file system (/) is typically mounted on the / directory.
  • The /home directory, where user home directories are located, is typically mounted on the /home directory.
  • The /usr directory, where user programs and libraries are stored, is typically mounted on the /usr directory.
  • The /var directory, where variable files, such as log files and databases, are stored, is typically mounted on the /var directory.
  • The /tmp directory, where temporary files are stored, is typically mounted on the /tmp directory.

Mounting NTFS drives on Linux

Disk Manager in Linux Mint

The Disks application can be used to manage drives on Linux. At first I had a lot of issues using NTFS on Linux but with the following mounting configuration I can use NTFS formatted drives without issues. However it is preferred to use the Ext4 file system on Linux especially since is not recommended to repair NTFS issues on Linux. You would have to use chkdsk on Windows using either dual boot or a virtual machine.

To edit mount options, select the desired drive in the left pane and then a partition in the right pane, then click the cog wheel and select Edit Mount Options.

NTFS mount options in Linux Mint

The Display Name is a custom name that will show in the file explorer. Mount Point is the location where the drive will be mounted and i prefer to use the media folder. In my case the pc is the user name and storage is a custom folder. If the folder doesn't exist you have to create one. The important part is the Filesystem Type that initially was ntfs and not ntfs-3g that has a better performance.

The mounting arguments that I use are:

nosuid,nodev,nofail,x-gvfs-show,uid=1000,gid=1000,x-gvfs-name=D_STORAGE

This mounting options are specific to etc/fstab which is a file system configuration file and i don't know much about them but I will leave a few links if you want to read more about them.

nosuid and nodev: https://serverfault.com/questions/547237/explanation-of-nodev-and-nosuid-in-fstab#547240

nofail: allows the boot sequence to continue even if the drive fails to mount.

x-gvfs-show: if the directory for a device is known and outside /media, $HOME (typically /home/foo) or /run/media/$USER then the device is not shown in the user interface. Additionally, if any of component directories in its directory starts with a dot ("."), the device is not shown either. This policy may be overridden by use of the options x-gvfs-show and x-gvfs-hide.

uid=value and gid=value: set the owner and group of all files. So, a user with uid 1000 is the first normal user (non-root user) created on the system, the next would be 1001. You can replace uid=1000 with uid=fred if that is your username. 

Creating Shortcuts

To create a shortcut to an application or file, there are various ways.

Method 1 - Using the file manager (Nemo)

First enable this feature inside the file manager which in Linux Mint Cinnamon is called Nemo. The feature is called Make Link and can be enabled in Edit -> Preferences -> Context Menus.

Enabling Make Link in Nemo, Linux Mint Cinnamon

Now right-click on a file or application inside Nemo, and in the context menu select Make Link. Or press Ctrl + Shift and drag-and-drop the icon.

Make Link in Nemo context menu

The file link is created in the same folder but can be moved to Desktop if desired.

Desktop shortcut on Linux Mint blender example no icon

To change the Icon of the Link, right-click it and in the Properties click on the current icon then select one from the searchable list or browse to a custom image file.

Changing shortcut icon in Linux Mint

Now the Blender shortcut has a proper Icon.

Desktop shortcut on Linux Mint blender example with icon

Method 2 - Using Start Menu

Find the application using the Start Menu and right-click to bring up the context menu.

Linux Mint shortcut using Start Menu

Method 3 - Create Launcher

Right click on the Desktop and press Create a new launcher here.  The pop-up window will ask you to either enter a terminal command that will launch it, or browse through the directories.

Application shortcut using Create Launcher in Linux Mint

This method is more powerful allowing the user to create more complex shortcuts using the command field.

Adding file and folders to Favorites

The Nemo file manager offers a handy way to quickly access the most commonly used files or folders. To add a file or folder to Favorites list, right-click it and select Add to favorites.

Adding files to Favorites in Nemo

Then a star icon will appear in the right hand side of the panel, somewhere near the clock.

Panel Favorites menu in Linux Mint

Removing from Favorites is the same way as adding it but this time the menu entry is Remove from favorites.

Dot desktop entry files

Suppose you have a portable application and you want to use it to open a certain file types. In Linux you can create a desktop entry file that has the extension .desktop which is basically a text file. When you install an app, the desktop entries that appear in the Start Menu are located in '/usr/share/applications/'. The custom ones are placed in '~/.local/share/applications/'. You can place the file here manually by pasting the address in the file explorer to open the folder or by creating the file anywhere and then opening a terminal in that folder by right-clicking anywhere in a white part of the file explorer and Open in Terminal. The latter method is easier, you just need to use the following command.

Tip: folders that start with a dot '.' are hidden folders so in order to view them enable 'show hidden files' in the file manager or press Ctrl + H.

Tip 2: ~ in front of a location address means your home folder. So for example if your user name is Linus, the path '/home/Linus/.local/share/applications' can be '~/.local/share/applications'.

In the Terminal run the following command replacing the app.desktop with your app name. This will place and register your .desktop file in the '~/.local/share/applications' folder. The file that you created can then be removed since it was copied to the proper location.

desktop-file-install --dir=$HOME/.local/share/applications ~/app.desktop

Creating a .desktop entry

In this example I'm using a portable application called SubtitleEdit to associate it with subtitle files. First create a text file and name it 'userapp-SubtitleEdit.desktop'. I'm not sure if userapp- prefix is needed or is just a convention. Open the file by using Open With then Text Editor.

Editing dot desktop entry in Text Editor Linux

And here is the file example.

[Desktop Entry]

# The type as listed above
Type=Application

# The version of the desktop entry specification to which this file complies
Version=1.0

# The name of the application
Name=SubtitleEdit

# A comment which can/will be used as a tooltip
Comment=Subtitle editor

# The path to the folder in which the executable is run
Path=/media/pc/STORAGE/Software Portable/Linux/SubtitleEdit_407

# The executable of the application, possibly with arguments.
Exec=SubtitleEdit.exe

# The name of the icon that will be used to display this entry
Icon=/media/pc/STORAGE/Software Portable/Linux/SubtitleEdit_407/subtitleEdit-icon.png

# Describes whether this application needs to be run in a terminal or not
Terminal=false

MimeType=application/x-subrip;
StartupNotify=false

The MimeType can be found in the file properties, in this case a .srt file. Multiple types can be added separated by ';'.

Validating the .desktop entry

In the Terminal use the command:

desktop-file-validate <your desktop file

This will give you very verbose and useful warnings and error messages.

Update database of desktop entries

Usually, desktop entry changes are automatically picked up by desktop environments.

If this is not the case, and you want to forcefully update the desktop entries defined in ~/.local/share/applications, run the following command: 

update-desktop-database ~/.local/share/applications

Tip: Add the -v (verbose) argument to show possible desktop entry errors.

Desktop entries documentation: https://wiki.archlinux.org/title/Desktop_entries.

Desktop entry for Wine applications

If you have applications installed with Wine there is this issue that the application doesn't get the correct path of the file or folder when is received as arguments. For example if you try to open an image that you associated with IrfanView, the application will start but the image will not be loaded. To correct the file path you need to add some extra code like this:

Exec=/usr/bin/env sh -c "winepath -w -0 %F | WINEPREFIX='/home/Linus/.wine' xargs -0 wine '/home/Linus/.wine/drive_c/Program Files/IrfanView/i_view64.exe'"

You just need to replace the user name, in this example Linus, with your user name, and the path to the executable which in this case belongs to IrfanView.

I found this solution thanks to: https://dev.to/dan1ve/running-irfanview-on-ubuntu-2210-using-wine-3n6g.


No comments:

Post a Comment