My OLF Conference Presentation

OLF 2022 is over now but videos of both days of the conference are available at YouTube. Each of the two videos is of the entire day for December 2 and December 3. All sessions of December 2 which was held entirely in the main room are included in the video for day 1. Only the main room is available for December 3 as the breakout sessions were not livestreamed.

My presentation, “Using and Configuring Bash,” was on December 2 at 2PM. It starts at about 05:08:24. The link below takes you directly to just a few seconds before my presentation begins.

You can download the tarball containing my presentation from my website. It is, naturally, a Bash program instead of a LibreOffice Impress presentation. After all, it is a Presentation about Bash so why not make it a Bash program. It will also be available on the OLF website.

I will be at Open Libre Free (OLF) Dec 2 and 3

To Speak and Sign My Books

I will be attending Open Libre Free (formerly Ohio LinuxFest) to speak and to do a book signing. OLF will be held on Friday and Saturday, December 2 and 3 at the Hilton Columbus Downtown.

Presentation

I will be presenting “BASH Configuration and Usage.”

Abstract: The Bash shell is the default shell for almost every Linux distribution. As the Lazy SysAdmin, understanding and using the available tools to configure the Bash shell can enhance and simplify our command line experience. In this session, which is largely based on Chapter 17 of my book, “Using and Administering Linux: Volume 1 – Zero to SysAdmin: Getting Started, you will explore” the several Bash configuration files for both global configuration and for users’ local configuration. You will perform simple experiments to determine the sequence in which the Bash configuration files are executed when the shell is launched. You will explore environment variables and shell variables such as $PATH, $?, $EDITOR, and more and how they contribute to the behavior of the shell itself and the programs that run in a shell.

In this session you will learn:

  • The difference between a login shell and a non-login shell. In the interest of clearing up any confusion we will also learn about the nologin shell.
  • How the Bash shell is configured.
  • How to modify the configuration of the Bash shell.
  • Which Bash configuration scripts are run when it is launched as a login shell and as a non-login shell.
  • The names and locations of the files used to configure Linux shells at both global and user levels.
  • Which shell configuration files should not be changed.
  • How to set shell options.
  • How to set environment variables from the command line.
  • How to set environment variables using shell configuration files.
  • The function of aliases and how to set them.
  • How to have some fun on the Bash command line.
  • Book Signing

I will also be signing copies of all five of my books. I will have my newest book,Linux for Small Business Owners: Using Free and Open Source Software to Power Your Dreams,” with co-author Cyndi Bulka, yoga instructor, and coach. I will also have a few copies of my previous books, The Linux Philosophy for SysAdmins,” and all three volumes of my ‘Zero to SysAdmin’ self-study course series, Using and Administering Linux.”

You might want to consider purchasing the books beforehand and then bring them to OLF for me to sign as I will be charging full retail at OLF.

If you wish to purchase one or more of my books on-site, there will be check boxes on the form when you purchase your tickets. You will not need to provide payment until you pick up your books on-site. If you have already purchased your tickets and want to purchase a book on-site, please send me an email to LinuxGeek46@both.org and let me know your selections so I can try to obtain enough copies.

I will attempt to fill all requests, but I usually run out of books despite all efforts to meet the demand. Please bear with me if I run out.

My friend Ben Cotton Will also be at OLF signing copies of his new book, Program Management for Open Source Projects (Pragmatic Bookshelf, 2022).

I hope to see you there.

Saving Old Computers – and the planet

I have written about how Linux can keep old computers running and out of landfills or recycling streams. My most recent article is “How Linux rescues slow computers (and the planet),” at Opensource.com and it discusses one of my computers that has a BIOS date of 2010 so is about 12 years old.

I now have an old Dell I am working on that has a BIOS date of 2005 which makes it at least 17 years old. According to the Intel web site the Pentium 4 processor was released in the 1st quarter of 2004 so that BIOS date is probably as good as anything to estimate the age of the computer.

You can see the specs for this system which are pretty minimal.

#######################################################################
# MOTD for Thu Sep  1 03:23:02 AM EDT 2022
# HOST NAME:            test1.both.org 
# Machine Type:         physical machine.
# Host architecture:    X86_64
#----------------------------------------------------------------------
# System Serial No.:    CXXXXXY
# System UUID:          44454c4c-5900-1051-8033-c3c04f423831
# Motherboard Mfr:      Dell Inc.          
# Motherboard Model:    0F8098
# Motherboard Serial:   ..Cxxxxxxxx00TQ.
# BIOS Release Date:    05/24/2005
#----------------------------------------------------------------------
# CPU Model:            Intel(R) Pentium(R) 4 CPU 3.00GHz
# CPU Data:             1 Single Core package with 2 CPUs
# CPU Architechture:    x86_64
# HyperThreading:       Yes
# Max CPU MHz:  
# Current CPU MHz:      2992.644
# Min CPU MHz:  
#----------------------------------------------------------------------
# RAM:                  3.142 GB
# SWAP:                 3.142 GB
#----------------------------------------------------------------------
# Install Date:         Wed 31 Aug 2022 09:26:13 PM EDT
# Linux Distribution:   Fedora 36 (Thirty Six) X86_64
# Kernel Version:       5.19.4-200.fc36.x86_64
#----------------------------------------------------------------------
# Disk Partition Info
# Filesystem      Size  Used Avail Use% Mounted on
# /dev/sda2       298G  9.8G  287G   4% /
# /dev/sda2       298G  9.8G  287G   4% /home
# /dev/sda1       974M  226M  681M  25% /boot
#######################################################################
# Note: This MOTD file gets updated automatically every day.
#       Changes to this file will be automatically overwritten!
#######################################################################
[root@test1 ~]#

It has a single 3GHz Pentium 4 processor with Hyperthreading so the equivalent of 2 CPUs. It originally had 2GB of DDR 533 RAM so I added 2 GB for a total of 4GB which is the maximum amount of RAM supported by this system.

Naturally, I installed Linux on it just to see how it would work. This old computer works just fine with the most recent version of Fedora. My next test is to see how well it runs a Linux VM using VirtualBox.

So yeah – when I say that Linux keeps old computers running, it is absolutely the truth.

I borrowed this computer from Digital Bridge in Wake Forest NC to do some testing for classes I will be teaching. They have a number of these old computers that were regifted to them but Windows is pretty useless on them. The only way to get them to work reasonably well is with Linux. Linux can also keep your old computers working far beyond the point where it is normally assumed they should be discarded.

In addition, Linux keeps these old computers safe from malware and bloatware which is what really causes them to slow down.

Businesses should dump Windows for the Linux desktop

Here is an interesting article by Steven J. Vaughan-Nichols  at “The Register.”

https://www.theregister.com/2022/08/10/opinion_column_drop_windows_for_linux

Some of the highlights

  • Businesses should dump Windows for the Linux desktop.
  • …Windows’ security mess has never been just because Windows is more popular. I’d argue Windows is insecure by design.
  • It [Windows] was never, ever meant to work in a networked world. So, security holes that existed back in the day of Windows for Workgroups, 1991, are still with us today in 2022 and Windows 11.

DigitalBridge to be at Wake Forest Job Fair

Digital Bridge will be participating in the next Wake Forest Area Chamber of Commerce Job Fair. Make sure you stop by and check out what opportunities we have available to help advance your career or business.

Check out the DigitalBridge Twitter feed.

My Next Book

Linux for Small Business Owners: Using Free and Open Source Software to Power Your Dreams

by David Both, Cyndi Bulka

My next book, Linux for Small Business Owners: Using Free and Open Source Software to Power Your Dreams, with co-author Cyndi Bulka, yoga instructor, coach, and author, is now available.

Description

Learn how you can take complete control and run your small business with powerful, free open source software (FOSS). This book introduces small business owners to the power and security of Linux and other FOSS tools to manage any small business as well as the many advantages it has over expensive, proprietary software. While exploring the reasons for using Free Open Source Software, you’ll investigate the assertion that, “The value of any software lies in its usefulness not in its price,” set forth by Linux Torvalds, the creator of Linux.

This book examines the use of Linux and also the other Free Open Source Software you need to meet your business challenges including the usual accounting, Email, web browsing, word-processing tasks.

Most small business owners perform many tasks including that of administering their computers. This book shows you how to find and install new software you need to run your business and keep it up to date using the tools already provided by Linux and the secure, trusted repositories available online. It also explores how to decide which tasks to do in-house and which you might want to sub out to external resources such as advertising and contact services to attract and keep customers.

Linux for Small Business Owners provides some logic, reason, and explanation for each of the steps that are needed and the tools used to implement Linux in your small business. It is a detailed guide to removing Windows from your computers and installing Linux and some commonly used open source software like the LibreOffice suite of programs, accounting, and other software useful to many small businesses. It also provides the information and tools necessary to manage and maintain Linux and applications up-to-date and secure.

What you’ll learn.

  • Understand what the term “free/open source” means and how you can apply it to your business.
  • Look at the operational and financial advantages of using Free Open Source Software instead of expensive, proprietary software.
  • See why you will never need to pay for anti-virus and anti-malware software again.
  • Replace expensive software like Microsoft Office with open source tools such as LibreOffice
  • Review the factors required to make an informed decision about switching to Linux.
  • Install new applications, updates to Linux, and the application software.
  • Explore why backups are critical, how to create them, and how to use them to restore lost data.

Who This Book Is For

Ideal for small business owners and owner-operated small businesses looking to streamline operations, save money, time and energy managing the common problems associated with using more popular operating systems.

MasterFrame update

I have done some additional hacking on my primary workstation after initial installation in the CoolerMaster MasterFrame 700. The picture shows the current state. There will never be a final result because this frame just cries out to try new things.

The first thing I did was add the pair of fans on the right side of the main frame. The frame I mounted the fans on is not part of the MasterFrame. It was originally part of my Thermaltake Core X9 case and I used it there for fans to cool the hard drives. It works perfectly on this MasterFrame 700 and I mounted it using the small flat-head bolts with washers provided with the MasterFrame. I use these fans to move cool air over the motherboard with its two M.2 SSDs, four memory DIMMS, and two plug-in adapters. One of those adapters is the Radeon Pro WX2100 graphics adapter.

I lowered the 5.25 media dashboard to leave more room at the top of that wing. I also added the BASH sticker.

You can see the original I/O panel just underneath the media dashboard with the power LED in the shape of the CoolerMaster logo. I have a problem with this panel because it has no reset button or storage drive activity LED. So I purchased the add-on box at the bottom of the picture. This little box contains power and reset switches as well as LEDs for power and storage device activity. It does not have USB or Thunderbolt connectors but the original I/O panel does have those. In order to have both panels active with their common functions, I purchased a set of cable splitters designed for just this purpose.

I originally installed the AIO radiator cooling fans on the left wing to suck air through the radiator. Unfortunately that did not allow a good option for air filters on the back side of the wing because the radiator mounting screws interfered with that. So I reoriented the fans to blow air through the radiator but installed 120mm screens with holes already in the right places between the fans and the radiator. So now I have clean air and a clean look on those fans.

It looks great and works extremely well. The motherboard and CPU temperatures are as much as 5 degrees Celsius less than they were in the Thermaltake case.

New Case for my Primary Workstation

I just rebuilt my primary workstation in a new frame, the CoolerMaster MasterFrame 700. This is not a review but I just want to show it off a little.

This is an amazing frame for a gaming computer or a build just to show off. “Frame” is a much better word for this unit than “case.” It is really just a frame on which to mount things. Because of the many options provided, it is not necessary to mount things like the I/O panel with the power switch in one of the two “official” locations. I hacked that a bit and mounted it low on the right wing. The other locations would not allow me to see the power-on light.

The media dashboard that I mounted in the center of the right wing and just above the I/O panel, usually fits into a 5.25 front panel drive bay on most cases. Because there are no front panel bays like that, I drilled a couple small starter holes in the bottom of the dashboard and used the supplied screws to fasten it. Be careful not to drill too deep!!

All the parts in this build were moved from its previous case so there is nothing new here except for the frame.

This computer frame is a hacker’s dream.

I hope you enjoy this.

Creating test files

Some of my books and articles require you to create some files for testing. This can be done easily from the command line.

  • Open a terminal session on your desktop.
  • Copy the line below from this post.
  • Paste it into the terminal session.
  • Press the Enter key.

This Bash program creates 200 files with “Hello world filexxx” in each, where xxx is the file number. You can edit the program and change “200” to any number of files that you need.

for I in `seq -w 200` ; do echo "Hello world file$I" > testfile$I.txt ; done

Download problems with “Using and Administering Linux – Zero to SysAdmin” files

Some files for experiments do not download properly

It was brought to my attention by reader Benjamin Robertson that experiments that use the wget command to download files from GItHub result in unusable files. This is due to an error in the URL and can easily be corrected.

For example, the command:

wget https://github.com/Apress/using-and-administering-linux-volume-2/blob/master/Experiment_6-1.txt

Should be:

wget https://github.com/Apress/using-and-administering-linux-volume-2/raw/master/Experiment_6-1.txt

Note that /blob/ should be changed to /raw/ in the above URL as well as others that use the wget command. The known instances of this problem are in:

  • Volume 1, Experiment 12-1
  • Volume 2, Experiment 6-1
  • Volume 2, Experiment 6-3
  • Volume 2, Experiment 17-1
  • Volume 3, Experiment 17-1

This problem does not occur when the wget command is used with other sites such as RPMFusion and WordPress. It only occurs with GitHub.

I apologize for any problems this has caused you. I am working with Apress to determine why this problem has just shown up.

Fedora 35 First Look

It has been a while since I posted anything here. For that I apologize, but I have been busy with a number of projects and life in general. I do think the release of Fedora 35 today does deserve a bit of attention.

As soon as I received the email notification from the Fedora Project of its availability, I upgraded my primary workstation to Fedora 35 and am now using it to write this post. I have only spent about 45 minutes with Fedora 35 so far. I think the best thing that anyone can say about any upgrade is that it went well – and it did. It was an easy upgrade and there have been no surprises so far. My Xfce desktop looks and works the same. Everything underneath also seems to be working as expected. This is a seamless and – so far at least – painless upgrade.

I did notice some interesting and different process names in htop, several sets of processes with numeric names from 0 through 31. I have an Intel i9 X series processor with 16 cores (32 CPUs) so I suspect that these processes are related to the CPUs. More research is needed.

I will post more when I have upgraded my other systems including my server and my firewall and have more data points.

In the meantime, here is a link to an article in Fedora Magazine, What’s New in Fedora 35.

My Laptop Has No Numlock LED

Note: The tool described in this post worked on Fedora 33 but no longer works with Fedora 34. Because this code is no longer maintained it is unlikely that this problem will be fixed.

In addition to no Numlock LED, my laptop has no Capslock or Scrollock LEDs, either.

I have a great System76 Oryx Pro laptop that meets all of my needs for a powerful, if somewhat large portable computer. I actually have two of these Oryx Pros. One is mine and one belongs to a non-profit organization where I volunteer. Mine is a bit older, larger, and heavier while the one I use for the NPO is redesigned to be smaller, lighter, with more CPUs and the same 17″ screen size. But both of these laptops have different versions of the same simple problem.

My older version has a series of LEDs along the front edge that show all the usual information such as power, charging status, disk activity, and the Numlock and Capslock status. But there is no easy way to tell which light is which – except for the power and disk activity light. All the rest have unreadable text next to them – at least to my old eyes. The newer Oryx Pro has no lock key LEDs at all.

So it can be difficult to tell whether to expect upper or lowercase when typing, or numbers or cursor and page movement from the numeric keypad. What I needed was a status indicator for the lock keys and I found one.

I like and use the Xfce desktop on all of my systems. It is simple, easy, and uses far less system resources than many other desktops. So I did a little searching and came up with a plugin that displays the keyboard LED status in the Xfce panel. The best part is that Fedora provides a ready-built RPM package for this tool. Install it with the following command.

# dnf install -y xfce4-kbdleds-plugin

Then right-click on the top panel and open the Panel Preferences menu. Click on the Items tab and click the + button to add a new item; this opens the Add New Items menu. Locate and select the Kbdleds plugin and click the Add button which adds the item to the panel and closes the Add New Items menu. Back on the Panel Preferences menu you can select the Kbdleds plugin and use the up/down buttons to move it to the desired location on your panel.

Figure 1: The Numlock key is active as shown by the green background highlight.

The indicator is small with three letters, C(aps), N(um), and S(croll). When the corresponding key is activated, the background for that letter turns green as you can see in Figure 1.

Using my own books

One of the things I state in the Introductions about my books is that I use them myself as references and this week was no exception.

I perform many tasks on Linux computers for which I am responsible and a good deal of the time, that means remotely. And I don’t mean just from one room to the next. In many cases I need to do things over a distance of miles. I do a lot of things quite frequently and so I need no reminders of how to perform those tasks. But this week was different.

I had two problems on one computer for which I am responsible at a remote location and I did not have the time to drive there. Well – I didn’t want to drive there in any event. So, to fix both problems, I logged in to the problem computer from home using SSH.

And I used my own books as a reference resource for the tasks I performed.

Kernel problems

The first problem was with VirtualBox, the free open source software I use for running virtual machines. I knew I could fix this easily because I have done it several times; it is a problem in which VirtualBox cannot compile the kernel modules for the new kernel and I need to revert to the previous kernel. So I configured grub to boot to the previous kernel by changing the line GRUB_DEFAULT=saved to GRUB_DEFAULT=1 in /etc/default/grub. Normally the “saved” option specified in that line says that every time that Linux boots, grub saves the identity of the kernel that was booted and that becomes the default kernel for the next boot.

This resolves the problem until a kernel fix can be provided. I did not need much help with this but I did check Chapter 16 of Volume 1 of my self-study series “Using and Administering Linux: Zero to SysAdmin” to verify that I remembered the right option and the right file in which to make that change. I also needed a little help with the syntax of the command required to rebuild the grub configuration file using the revised grub default file.

[root@studentvm1 grub2]# grub2-mkconfig > /boot/grub2/grub.cfg

I don’t cover this specific situation in that series so I have added this information to my technical website at http://www.linux-databook.info/?page_id=6044.

Printer configuration

The second problem is that one of the printers available to the host was not available in the print menu when the office manager tried to print. The network printer was visible but the USB attached local printer was not. So I needed to create the print queue for that USB printer. Unfortunately, this is one of those tasks I only perform once every 3 or 4 years so I don’t really remember how to do it.

Using an SSH login session, I followed the step-by-step directions in Volume 2, Chapter 7, of my self-study series “Using and Administering Linux: Zero to SysAdmin,” Experiment 7-2, to add this print queue and test the result – successfully.

About my books

My books were written to be used as references and all of them started as memory aids for me. I would perform many tasks infrequently and it seemed a waste of time to keep doing the same research many times over. So after discovering new tools, fixes, and solutions, I started recording them so I could find them easily. Eventually I used that material as the basis to create a series of three, 4-day instructor-led courses that I taught for several years.

And then I decided to convert those courses into the books that I have written over the past several years. Because they are written in a way that can be used both for training and reference, I find them to be useful all the time. I think you will, too.

So, yes, I would really like you to purchase my books. You can find all of them listed here and specifically my self-study series “Using and Administering Linux: Zero to SysAdmin.”

Setting the number of desktop workspaces for Xfce4

I just learned something very cool.

Sometimes it is necessary to make remote modifications to a desktop using the command line. In this case I needed to reduce the number of workspaces on the Xfce panel from 4 to 3 at the request of the user. This is actually easy and only required about 20 minutes of searching on the Internet.

The xfconf-query command can be used by non-root users to query and set various attributes for the xfwm4 window manager. In the sample below I have first verified the current setting of 4 workspaces, then set the number to 2, and finally verified the new setting.

[user@test1 ~]# xfconf-query -c xfwm4 -p /general/workspace_count
4
[user@test1 ~]# xfconf-query -c xfwm4 -p /general/workspace_count -s 2
[user@test1 ~]# xfconf-query -c xfwm4 -p /general/workspace_count
2
[user@test1 ~]#

Also, the default workspace count and many other defaults for xfwm4 can be found and changed in the /usr/share/xfwm4/defaults file. So setting “workspace_count=4” to “workspace_count=2” changes the default for all users on the host.

Look for more details about remote Xfce desktop configuration and the xconf-query command here.