Trying out Linux Mint
In other pages I discuss Linux as an OS used in embedded devices as well as development environment for these targets. In this page I look at Linux (Mint) as a more general tool - also for daily PC work.
I have developed software for - and on - Linux over the years, but most of my daily work has almost always been on Windows systems.
This means that I never felt truly at home on the Linux desktop.
On the other hand; Windows is going in the direction of advertisements, subscriptions instead of owned software, annoying AI offers and generally looking over my shoulders and dictating my worklife.
So - I decided to see if I could find a Linux solution - including all the development tools, but more Windows-like than Gnome etc., that I could use daily. After a very brief search I decided to try out Linux Mint. Mint comes in different flavors - I chose "Cinnamon" as this seemed to be the obvious choice when you also want to develop software. This page is basically a journal of the "Mint experience".
Download and Install
I downloaded the ISO-image from Linux Mint and flashed it to a USB memory-stick using Rufus on a Windows PC. Note that flashing ISOs is much simpler once you have Mint - you simply right-click the ISO-file in the file-manager and select the Flash option. Next I booted my Linux-PC wannabe from the USB-stick (may require fiddling with the boot menu). The USB-based Linux Mint then used an internet connection (need to setup WiFi or connect Ethernet) to install Linux Mint with bells and whistles on the PC.
When booting Linux Mint on the PC itself, you get a "Welcome" dialog. This dialog appears at every boot until you remove a checkmark at the bottom of the dialog. It may be an idea to leave it for a day or two. If you remove it, you can easily recall it via the Start-menu (by typing "welcome in the seach field").
Working out-of-the-box
As advertised, you instantly get Windows-vibes from the start-button (actually it says "lm" for Linux Mint) in the bottom left corner, the taskbar in the bottom panel and the "Settings" that allow setup of displays, bluetooth, WIFi etc.
You can also right-click in the un-occupied desktop and select "Display-settings" - see picture below.
The OS even marks the two displays as Windows do.
It was very easy to use the "Software Manager" to install tons of nice software. Below I describe some of the main programs I installed to enable website maintenance and daily work.
Easily installed via the Software Manager
- Chromium: Chrome-like webbrowser - incl "DevTools" (Firefox is installed by default)
- Mozilla Thunderbird: Outlook like mail-client. Surprisingly simple to set up the IMAP.
- Filezilla: FTP and sFTP for e.g., uploading to webserver
- LibreOffice: Replacement for the MS Office package (installed by default)
- Spotify: Music Streaming
- Audacity: Sound-file handling
- Gimp: Photo editing
- VLC: Movie streaming
- ImageMagick: Scripted transforms of jpeg, png etc.
- Accessories: Gedit, Nmap, Zenmap, Stacer, Htop and many more
Not only is it very easy to install software via the Software Manager - the programs are also added to the Start-Menu. As this is Linux, they are installed in the few standard locations - all on your "path". This means that any program is easily run from the terminal - without even tampering with the "path" environment variable as you normally need to in Windows.
After some time I noticed that the fan on my ThinkPad was running a lot - even when I only had a browser open in Chromium and had left the PC.
After testing CPU-usage in Stacer (top or htop will do the same) and confirming with ChatGPT, it is evident that Chromium can use up to 10% CPU time just showing a "calm" webpage with built-in java-script. This is enough for the ThinkPad to run its fan. This does NOT happen in Firefox - which uses 1-2% on the same job.
Thus, Chromium on Linux - on a ThinkPad with intel i7 (not using GPU) is more power-hungry than Firefox. See also "Power Management" on this page.
Installed with help from their respective web-sites
The following were not available in the Software Manager, and were installed with scripts from the relevant websites.
- Visual Studio Code
The only Microsoft tool left. Components are installed as usual from within VS-Code. - XAMPP
Fastest way to test and debug web-pages locally. Includes Apache Webserver, Filezilla FTP-server and Database (the latter not used in this site). - STM32CubeIDE and STM32CubeMX
Development environments for STM/ARM-based systems. This was not so simple and is described below.
Once programs are installed via scripts, you may want to have them included in the Start-Menu. When right-clicking on the Start button you get a small menu, which allows you to edit the Start menu. This was only a bit problematic for XAMPP which runs with root-privileges.
Note that when you begin installing with scripts instead of the Software Manager, you need to have a basic understanding of shell-commands like "chmod" and "chown", as well as some insight into the standard Linux "rwx" access-rights applied for owner/group/others. See Linux.
The terminal has an icon in the vertical "favorites" menu (like Ubuntu), that appears when the Start butto is clicked.
Nvidia issues with extra display
Even though Mint should be conservatively stable, I did run into issues with Nvidia - as usual I feel like saying. NVidia has been a problem for me on earlier Linux installations as well.
My ThinkPad has HDMI and USB-C support for an extra display, which I find necessary when working at the desk. Unfortunately, the ThinkPad only routes these connectors to the basic intel GPU, and whenever Nvidia takes over, there is no signal to the display. It turned out that the Nvidia drivers were not compatible with the kernel which was too new. During debugging I realized that Nvidia did not do anything at all for me, so I simply dropped it. This had the side-effect of much longer battery run time.
If you play advanced games, or need local AI, you will however need NVidia.
The USB-C Display-port did not work as smooth as on Windows (issues after suspend/power-cycle), and I ended using the HDMI instad. The USB-C requires a number of protocols to work at the same time - much more sensitive than HDMI.
Login
During the installation I was offered - and against better knowledge accepted - "auto-login" - meaning no login needed. This however, meant that when I started e.g. the Chromium browser, I got a message about the Keyring not being initialized - demanding my password. As the browser needs access to passwords (kept in the keyring) this really is a security help. I decided to enable normal login by starting the "Login Window" application and removing entries from "Automatic Login" After a reboot I now login normally, and do not need a password to run Chromium.
Screenshots
On Windows we have "snip" to make screeshots. There is also a screenshot program on Mint (adeptly named "Screenshot"). It allows you to take screenshots of any of the displays - or all in one PNG. It even allows you to save images in WEBP - nice for a simple program.
I don't know how to delay screenshots, which was necessary in the full-screen screenshot above to avoid the start menu collapsing. Using the ImageMagick commandline below I got the screenshot (including both displays), which could now be cropped in Gimp and exported as both PNG and WEBP from Gimp. As the Log page describes, ImageMagick can also do the conversion to WEBP...
sleep 10;import -window root screenshot.png
Power Management
There are things that takes longer to notice than others. I did not realize at first that my PC did not really go to sleep unless explicitly told so, and I realized that I sort of depend on this on Windows.
Luckily this was easy to fix. Type "Power management" in the search-bar of the startup menu to get to the dialog below. Note that you can get the PC to suspend when closing the lid - and you can make an exception for this when there is an extra display/monitor.
Fun fact: After implementing the above I started to see nasty patches of green in black surfaces on my external display. After I bit of debugging, I found that my HDMI-cable was not correctly inserted after testing without the external display. A good reminder that it's not always the software that is to blame.
STM32CubeIDE and STM32CubeMX
In my book - Microcontrollers with C - I use a development environment from ST to generate code for an ARM-based "Nucleo" board and debug it. The book is mainly based on a Windows setup, however, I did also build and debug in the same environment on an Ubuntu Linux (and also in VS-code on both platforms).
It felt like a good test to see how I could re-create this on Mint.Shooting from the hip, I first tried Mint's Software Manager. Unsurprisingly, there was no help here. So - like before - I had to get the tools from ST's website.
There used to be two tools. STM32CubeIDE is an IDE based on Eclipse for the Edit, Build, Debug workflow, while STM32CubeMX is for low-level selection of pins, clockspeed and general HAL-setup - but also RTOS configuration. This is all described in "Microcontrollers with C". Since I wrote the book, the low-level MX tool is now supposedly integrated in the IDE tool. However, I could not access the MX stuff, and there was no HAL-code in the generated main.c. Not so good.
It became clear that my Mint 22.2 and the latest version of STM32CubeIDE (2.0.0) simply are incompatible. For me the solution was to also install the "classic" standalone MX tool, work here and then import the result into the IDE - as before the tools merged. I also needed to update various libraries and use "sudo" when installing the IDE, in order to have files under the /opt-folder. Having finally built the binary HAL-based code for my Nucleo-board, I had no trouble using the USB-port to update the on-board debugger (a once-in-a-year thing), flash the newly built code and singlestep it. This was a positive surprise, as I have had issues with USB on Linux before.
I think that the morale to this story is that Mint may have done a great job at making everyday life easier, but we are still strugling with vendors that target their tools towards Windows first - then various Linux distros.