Answers

10 min read

Got a burning question about open source or the kernel? Whatever your level, email it to answers@linuxformat.com

Neil Bothwick learned to count in binary before decimal.

Q Wrong live user

Until Linux Mint 21.3, the Linux Mint live session user is mint and $HOME is /home/mint. But in Linux Mint 21.3, the live session user is linux and $HOME is /home/linux, though it is mentioned as mint on the official website. I am confused. How did I go wrong?

I have tried beta and stable versions of Linux Mint 21.3 Cinnamon, Mate and Xfce downloaded from http://linuxmint.com. In all three beta versions and three stable versions, the live session user is linux, the shell prompt is linux@linux and the home directory is /home/linux and $HOME is /home/linux. There is no mint live session user or mint group. I have been using Linux Mint Cinnamon live sessions since 2009. Being a frequent traveller, practically, I live in live sessions. I have so many scripts as a mint user. The most intriguing factor is the anomaly. I have made some posts on this subject; but I could not get any answers. Kindly help me solve the mystery.

A This is indeed a mystery, because we just booted a freshly downloaded ISO of 21.3 Cinnamon and both the username and hostname were mint. Are you booting from the ISO copied to a USB stick or optical disc, or are you using a more customised setup? The reason for asking is that the GRUB menu specification includes this:

You can see that the username and hostname can be specified at boot time and default to mint. If you are using a custom setup, make the appropriate changes in your boot menu. If you are booting directly from a copy of the ISO, we are at a bit of a loss to see why this setting has changed for your system, but check the menu entry to see what is actually used. When the boot menu is on screen, press Tab to see the options used, and change them if necessary. You can also see the options after booting with this terminal command: $ cat /proc/cmdline

You can also mount the ISO image from any normal distro session like this: $ sudo mount -o loop /path/to/linuxmint- 21.3-cinnamon-64bit.iso /mountpoint However, this all raises another important point. You have hard-coded the username and home directory into your scripts. A more portable solution is to use environment variables in your scripts. The variables $USER, $HOME and $HOSTNAME contain the username, home directory of your user and the hostname of the computer. You may also find $PWD useful; it contains the current directory that starts out as the directory from which the script was run.

Linux Mint live distros still boot with the user mint, but you can change this in the boot options.

Q Wherever I hang my @

I recently purchased a Keychron K10 keyboard from the manufacturer’s site. The advertising said that the keyboard was for Windows and Mac, and they also had a dedicated Linu