Five things you can do with the nano editor

In the early stages of my experience with Linux servers, I had to learn how to edit text files using the command line. While there are other powerful text editors in Linux, such as vi and vim, I found Nano to be particularly useful. Nano is a simple yet powerful text editor that comes pre-installed on many Linux distributions. You can easily install it from the command line if it’s not pre-installed on your system.

Debian-based systems:

$ sudo apt install nano

RPM based systems:

$ sudo dnf install nano

Basic Text Editing

Nano is a user-friendly text editor designed for simple and efficient text editing. To open a file, type “nano” followed by the file name in the terminal. Once inside, you can begin typing or editing text immediately. Navigation is easy, using the arrow keys to move around. To save your changes, press Ctrl + O; to exit, press Ctrl + X.

Screen picture by Don Watkins CC by SA 4.0

Search and Replace

Nano has a valuable search and replace feature. To search for a specific term, press Ctrl + W, type your search term, and press Enter. To replace text, press Ctrl + \, enter the text you want to replace, followed by the new text. This feature is handy for quickly updating configuration files or scripts.

Undo and Redo

Mistakes happen, but Nano makes it easy to correct them with its undo and redo functionality. Press Alt + U to undo the last action and Alt + E to redo it. This feature ensures that you can quickly revert changes without losing your progress

Syntax Highlighting

Nano offers syntax highlighting for those working with code, making reading and editing code easier. Syntax highlighting is available for various programming languages and can be enabled by adding the appropriate syntax files to your Nano configuration.

Screen picture by Don Watkins CC by SA 4.0

Custom Key Bindings

Nano enables you to customize key bindings to match your workflow. You can edit the /etc/nanorc file to modify default key bindings or add new ones. This flexibility allows you to personalize the editor based on your specific requirements, enhancing your editing experience and making it more efficient.

Nano’s simplicity and powerful features make it a great choice for text editing in Linux. Whether editing configuration files, writing scripts, or taking notes, Nano has the tools to do the job efficiently.

Getting a hand from Handbrake

I have dozens of VHS tapes recorded, in some cases nearly 30 years ago, of our children when they were young. About ten years ago, I used a Linux computer and dvgrab to capture the video using a Firewire port on the computer and an aging digital video camera. The setup worked quite well. Using this process I could convert many of the analog tape videos to MP4s.

I was eager to share some video clips with our grandson recently. I wanted him to see what his Mom looked and acted like when she was his age. The videos, converted to digital format and reside in a folder on my Linux computer, were ready to be transferred to my iPhone for sharing.

My usual file transfer method, QRCP, has been reliable for moving files between my Linux desktop and iOS devices. However, I was left disheartened this time when the video transferred seamlessly, but the audio track was mysteriously absent. This disappointment led me to consider using Handbrake as a potential solution. I have used Handbrake in the past to convert video files to a format compatible with iOS and other modern digital playback devices

I installed Handbrake as a flatpack on my Linux desktop, but you can install it as easily as a system package.

Debian-based systems:

$ sudo apt install handbrake

RPM-based systems:

$ sudo dnf install handbrake

Once installed, I launched the program

Screenshot by Don Watkins CC by SA 4.0

At the ‘File’ menu, I selected ‘Open Source’, which opens a dialog box where I can select the video file that I want to convert. I select the one-hundred-twenty-eight megabyte MP4 and then click ‘Open’ at the bottom of the program window.

Screenshot by Don Watkins CC by SA 4.0

Looking again at the Handbrake program display I have some choices to make to ensure that the converted video is in the format that will display properly on an iPhone or other iOS device.

Screenshot by Don Watkins CC by SA 4.0

Referring to the screenshot above, it is important to choose the particular format in which you want to save the video. There are three choices: MPEG-4, Matroska, and WebM. I chose MPEG-4, and within that, I also chose ‘Web Optimized’, which will ensure that the converted video will be a smaller file and more easily shared on the web or from a mobile device. At the bottom of the program window, you can choose what you will name the completed file. The default is the original name, but I would suggest a different name so that you don’t overwrite the original, which would be important for archival purposes. The default ‘Save’ location is your ‘Video’ folder but you can easily choose some other folder on your system.

Once you are sure you have made all the proper menu selections, you will use your mouse pointer to click the ‘Start’ button at the top of the program window.

Screenshot by Don Watkins CC by SA 4.0

This begins with converting and transcoding the larger MP4 file to a smaller compatible file for iOS devices. The process takes a brief period of time and will depend in part on your processor’s speed. The new video is 42 megabytes, a reduction from its original size, and can be replayed and reshared on a mobile device. Handbrake has excellent documentation. It is open source and is available for Linux, Mac, and Windows, licensed under the GNU General Public License (GPL) Version 2.

Contributing to open source

I started using Linux and open-source software in the late 1990s, and the more familiar I became with it, the more uses I saw for it, whether on the server side of our school system data infrastructure or software applications for students and teachers.

My contributions to our school system were significant. I developed a content filter using Suse Linux, Squid, and Squidguard and later enhanced it with Dansguardian. We lacked the funds for expensive servers, so I introduced Linux servers and Samba to create user home directories for our teachers. This provided a backup system for our teachers and saved the school system money.

Recognizing the disparity in software accessibility, I sought alternatives. Instead of relying on the special deals school systems get from proprietary software vendors, I introduced Open Office and later LibreOffice. We provided these software on CD-ROMs and later USB drives, empowering students and parents to install them on their home computers.

As we continued to benefit from this free software, I couldn’t shake the feeling that we were taking more than we were giving. Our appreciation, though genuine, was not flowing upstream to the programmers who shared their work with us. This led me to ponder: how could we, as a school system, repay these open-source communities for the fruits of their labor?  

Within a year of my retirement in 2013, I received an invitation to attend All Things Open in Raleigh, NC. There, I was invited to join the team at Opensource.com as a ‘community moderator,’ a person who wrote articles about open-source software and open-source communities. At last, I was contributing to the communities and folks whose work I had been benefitting from for the previous fifteen years.

Coding is not my long suit, but writing is something that comes more naturally, and in the next eight years, I wrote almost three hundred articles about the various aspects of open-source software and open-source communities. I became part of a growing community of writers from all over the world. It became one of the most fulfilling avocations of my life. Opensource.com was shuttered in May of 2023, but the writers’ community lives on both.org and TechnicallyWeWrite.com. You can quickly become part of these vibrant writing communities.

In addition, there are other ways to contribute to the open source community. You can contribute to open source projects and communities using Patreon, PayPal, and other forms of payment for communities such as FedoraLinux MintUbuntuGnuCashand LibreOffice.

Mastering the ‘rm’ command

The “rm” command in Linux is a powerful tool for deleting files and directories. While it may seem simple, mastering this command requires understanding its various options and potential pitfalls. Early on in my Linux journey, I managed an Apache web server and needed to remove files occasionally. That is when I became familiar with the ‘rm’ command. It’s very effective, but its misuse can be devastating without understanding the basics and having proper respect for the command.

Understanding the Basics

The rm command stands for “remove.” Its primary function is to delete files and directories from the filesystem. The basic syntax is:

rm [options] file...

For example, to remove a file named example.txt, you would use:

rm example.txt

Removing Multiple Files

You can remove multiple files at once by listing them separated by spaces:

rm file1.txt file2.txt file3.txt

Using Wildcards

Wildcards allow you to remove multiple files that match a specific pattern. For instance, to remove all .txt files in a directory, you can use:

rm *.txt

 Removing Directories

It would help if you used the -r (recursive) option to remove directories. This tells rm to remove the directory and its contents:

rm -r directory_name

Be cautious with this option, as it will delete everything within the specified directory.

Force Deletion

The -f (force) option allows you to remove files without prompting for confirmation. This is useful for scripts or when you want to bypass confirmation prompts:

rm -f file_name

Combining Options

You can combine options to perform more complex deletions. For example, to forcefully remove a directory and its contents without confirmation, use:

rm -rf directory_name

Safety Tips

Practical Examples

Removing Log Files:

$ rm -rf /var/log/*.log

Removing Temporary Files:

rm -rf ~/tmp/*

Deleting Old Backups:

rm -rf /backups/backup-*.tar.gz

 I had serious file system trouble using ‘rm—rf’ inside my root partition. There is no undoing such a move, and you can quickly render your operating system and its files useless or worse. Always double-check your commands, use interactive mode when needed, and create backups of important data. With these tips, you’ll be well on mastering the rm command. Check the man pages on your Linux system for more information.

A Day Filled With Inspiration and Gratitude

Today has been a day to cherish at the All Things Open 2023 conference. Lunch at the speakers’ lounge with Jen, Lauren P., Lauren M., David, Bryan, and Jason B. was an invigorating reunion. One of the day’s highlights was the delightful conversation with Rikki Endsley. Our discussion on the first day at the conference was a perfect kick-off; I got to meet the members of the Open Source Initiative, with whom we will be working closely as we transition to writing at Opensource.net.

I met Aaron Prisk in person, though our love of all things open source began nearly eight years ago. Today, I saw my friend Jason Hibbets, who invited me to my first All Things Open in 2014. There have been lots of changes in the past nine years.

The warmth of this community filled my heart with joy, reminding me of the beauty of enduring connections. Moments like these are the essence of life’s blessings, leaving me immensely grateful.

This experience at All Things Open has been a transformative part of my journey, and being part of this remarkable conference in the heart of Raleigh is a testament to the positive direction my life has taken. The ambiance of the beautiful hotel where I’m staying amplifies the experience, adding to the overall sense of gratitude and contentment.

The mentorship of the Opensource.com team has been instrumental in my growth as a writer and individual, and their presence continues to inspire me.

While exploring the conference, the Apereo booth caught my attention. Gathering information about their open-source program for higher education ignited a spark within me. The prospect of sharing this knowledge with professionals in higher education inspires me to continue to work towards an open source future in education.

The day’s sessions were equally enriching. Emily Freeman’s opening keynote on the human touch in a GenAI world resonated deeply, reminding us of the significance of humanity in a rapidly evolving technological landscape. Gwyneth Peña-Siguenza’s insights on leveraging AI and GitHub Copilot opened new avenues for exploration, reflecting technology’s limitless possibilities.

James Quick’s talk on navigating career challenges was a guiding light for those who were stagnant professionally. His practical wisdom provided a reassuring perspective on overcoming obstacles and pursuing growth. Similarly, Barton George’s presentation on Project Sputnik and the valuable lessons learned emphasized the power of community-driven innovation within large corporations. Bryan Behrenhausen’s presentation on the Open Organization was impressive and reminded me of conversations we’ve had along those lines in the past. The last session of the day where we met to discuss what licensing should govern the use of open-source artificial intelligence, was very engaging and left me in awe.

As the day ends, I find myself brimming with inspiration and gratitude. All Things Open 2023 has been an event and a catalyst for personal and professional growth, reminding me of the significance of genuine connections, learning, and the continuous pursuit of knowledge and self-improvement.

The Freedom of Linux: A World Beyond Hardware Restrictions

In the ever-evolving world of technology, software updates often bring excitement and anticipation as they promise new features and improvements. However, with operating system updates for proprietary operating systems, the excitement can be tempered by stringent hardware requirements that leave many users facing the inevitable need for a new computer. Fortunately, an alternative,  the Linux kernel which powers the many Linux distributions and open source, allows users to embrace the latest software without hardware limitations.

A Diverse Landscape of Compatibility

Unlike proprietary operating systems with strict hardware prerequisites, Linux distributions offer fresh air. Whether you choose Pop!_OS, Fedora, or Linux Mint, Linux’s open nature ensures compatibility with a wide range of hardware, even aging systems. This remarkable flexibility is a testament to the power of open-source software.

Take, for instance, the case of the Darter Pro laptop from System76, acquired in early 2019 with Pop!_OS 18.10 pre-installed. Despite the years that have passed, this hardware continues to support the latest versions of not just Pop!_OS but also Ubuntu, Fedora, and Arch without breaking a sweat. Such an upgrade would be an unattainable dream if one attempted to install Windows 11 on the same machine. Likewise, the closed ecosystem of MacOS locks users into a world where they can only experience the latest software if they invest in Apple’s proprietary hardware.

The Hidden Treasure of Open Source

Regrettably, many people remain oblivious to the hidden treasure trove that is open-source software. Beyond the Linux kernel that forms the foundation of countless distributions, a vast ecosystem of applications thrives, often outperforming their proprietary counterparts. This abundance of high-quality, open-source software is built on principles prioritizing user freedom and choice.

For instance, consider the MarkText application, a tool I use to craft this article. It’s an exemplary testament to the capabilities of open-source software. With abundant features, a user-friendly interface, and an active community of developers and users, MarkText competes toe-to-toe with proprietary alternatives without any vendor lock-in or hardware mandates that plague proprietary systems. This is the essence of open source—a realm in which the user controls.

Breaking the Chains of Vendor Lock-In

Vendor lock-in is a pervasive challenge in the technology world. Proprietary software and hardware vendors often design their products to ensure consumers remain captive to their offerings. This strategy serves the interests of these companies. Still, it can be detrimental to the user, who may be in a never-ending cycle of purchasing new hardware to stay current.

In contrast, Linux and open-source software operate under a different ethos. They empower users to take control of their technology. With the freedom to choose software and customize their experience, users are no longer chained to a specific vendor’s roadmap. This approach breaks the cycle of forced obsolescence and keeps hardware relevant for years, ultimately saving users money and reducing electronic waste.

A Sustainable Approach

In an era of increasing environmental consciousness, the longevity of hardware takes on added importance. The “throwaway culture” of rapid hardware turnover is financially wasteful and environmentally unsustainable. By embracing Linux and open-source software, users can extend the lifespan of their hardware, contributing to a more sustainable future.

Additionally, the open-source community fosters collaboration and innovation without the limitations of proprietary systems. Developers worldwide work together to create secure, stable, and feature-rich software, often outpacing the development cycles of their proprietary counterparts. This collaborative spirit ensures that Linux users can access cutting-edge technology without the need for frequent hardware upgrades.

Conclusion

In the world of technology, where operating system updates often come with stringent hardware requirements, Linux stands as a beacon of freedom and sustainability. Its compatibility with a wide range of hardware, commitment to open-source principles, and freedom from vendor lock-in make it a compelling choice for those who wish to break free from the shackles of constantly upgrading their hardware.

As we navigate an ever-changing technological landscape, let us remember that there is a world beyond hardware restrictions, a world where Linux and open-source software offer an oasis of choice and longevity. In this realm, the user is king, and technology serves their needs, not vice versa. So, next time you hear the siren call of a new operating system update, consider the boundless possibilities of Linux and liberate yourself from the cycle of forced obsolescence.

Five Open Source Writing Apps

AbiWord: AbiWord is a free and open-source word processor software. It is written in C++, and since version 3, it is based on GTK+ 3. The name “AbiWord” is derived from the root of the Spanish word “abierto,” meaning “open.” AbiWord is openly licensed. It is available on Windows and Linux.

Joplin: Joplin is an open-source note-taking and to-do app that allows you to organize your thoughts and ideas efficiently. It supports markdown and syncing across devices and offers various features like tagging, searching, and encryption. Joplin is available on Windows, MacOS, Linux, iOS, and Android. You can take notes on your mobile platform and edit them when you get home on your laptop or desktop using Joplin Cloud or OneDrive. Joplin has a AGPL license.

Calligra Words: Calligra Words is a free and open-source word processor part of the Calligra Suite of office productivity software. It is available for Linux and Windows. Calligra Words uses the Open Document Format (ODF) as its default file format. Many different office suites support ODF, a vendor-neutral format. Calligra Words has a GPL v2 license.

Etherpad: Etherpad is a real-time collaborative document editor that runs in your browser. With Etherpad, you can write articles, press releases, to-do lists, and more with your friends, fellow students, or colleagues. Everyone can work on the same document simultaneously, and your changes will be reflected instantly. Learn more about Etherpad. Etherpad is open source with an Apache 2.0 license.

LibreOffice Writer: is a full-featured open-source word processor that offers a wide range of tools and features for writing documents. It supports various file formats, provides a familiar interface, and includes features like spell-checking, formatting, and document collaboration. LibreOffice has a Mozilla License.

When considering a writing application, it’s essential to think about how you will use it. Joplin, a Markdown editor designed for note-taking, is available on multiple platforms and has many features that make it well-suited. Joplin also has a built-in web clipper and a sync feature that allows you to sync your notes between multiple devices.

No matter what your decision, all of these applications are open source, and all support open document formats that ensure that your created work is in a format accessible to you and those you share with.

Get Publii – static site generator

Are you looking for a static website generator that’s easy to install and use? Then you need to check out Publii. It’s a GPL v3.0 static site generator that is the best I’ve seen. I have installed and used Jekyll and Hugo and while they are interesting they cannot hold a candle to Publii. Download and install Publii for your operating system and get started having some fun designing your own static CMS. Publii was easy to install on Linux Mint. I downloaded the ‘.deb’ file and easily installed it on my laptop.It also comes in ‘.rpm’ for Fedora users and as an app image if neither of those packages works for you. Download files for Windows and MacOS users are also available.

Publii is menu-driven and you can easily create a rich site on your computer and use it there or upload it to Gitlab, Github, Amazon, Netlify or any other hosting site you would like to use. The menu interface is very intuitive. Entering text is easy and users can choose a WYSIWYG, Block or Markdown editor.

You can see from the graphic that it’s easy to add posts, add tags, add menus, and authors. You can easily change the theme, some of which are provided or choose your own iteration. The settings menu lets a user select the name of the site and choose the language of the site, with many language choices represented. The server menu selection allows users to choose where the site will be hosted and the protocols used.

Publii introduces a novel approach to web development with its innovative concept—a desktop static website CMS, a first of its kind. Engineered with user-friendliness at its core, Publii caters to beginners while offering many advanced options and functionalities, empowering seasoned web developers to implement intricate customizations. By utilizing Publii, crafting secure and high-speed static websites becomes remarkably streamlined, eliminating unnecessary complexities.

Publii serves as a desktop application that empowers you to develop, revise, and enhance your website offline. Subsequently, you can effortlessly synchronize the alterations you’ve made to your site with your server by simply clicking a button. The versatility of Publii extends to accommodating various upload methods, encompassing traditional HTTP/HTTPS servers, Netlify, Amazon S3, GitHub Pages, Google Cloud, and SFTP, among others. Publii also includes software to backup your site, view log files, and import ‘wxr’ files.

You can easily examine Publii source code You can support the project easily too. Documentation is readily available and is menu driven too. If you are a developer Publli has help for you too.

Open Source Software: A Cost-Effective, Secure, and Flexible Option

Open source software is developed and distributed under a license that gives users the right to use, modify, and redistribute the software. When you purchase proprietary software, you don’t own it. In many cases, proprietary software is effectively leased to you for a set period. Many companies force their customers to upgrade to newer versions to continue to have access to their creations. That is not the case with open source software. Open source software is the best value in the market, and here are five reasons why that is so.

1. Lower costs

One of the most significant advantages of open source software is its low cost. This can save businesses a significant amount of money on software licensing fees. I am writing this blog with MarkText , a simple yet elegant editor that’s available for Linux, MacOS and Windows.   It saves my work by default in MarkDown, which is an open source format. I can export the file to HTML or PDF or I can copy and paste it directly into LibreOffice Writer or into my WordPress blog. In all cases, I own my work without needing a license for the software.

2. Flexibility

Open source software is often very flexible and customizable. This means that businesses can tailor the software to their specific needs. Businesses and individuals can modify their software or move from one application to another with compatible formats. One of my clients had files written and saved in a proprietary format that was no longer accessible because the proprietary software was no longer on the market. I was able to open and save the person’s files using LibreOffice Writer because it had the filters built into it that allowed that to happen. You can imagine the delight my client felt when her work of many years was made freely available to her in a format that was accessible using a free product.

3. Community support

Open source software often has a large and active community of users and developers. This community can provide support for the software. These communities are responsive to the needs fo users because they have a share interest in the success of the software and are part of a caring community committed to the development of quality software and the maintenance of the communities, many of which are governed by codes of conduct which ensure respect for the users.

4. Security

Open source software is often very secure. This is because the software is constantly being reviewed and audited by a large community of users and developers. This helps to identify and fix security vulnerabilities before attackers can exploit them. An adequate number of eyes on a project ensures that bugs in the software are quickly identified and quickly fixed.

5. Innovation

Open source software is often a source of innovation. By its very nature open source software frequently leads to rapid innovation as communities form around projects of common interest. With a quick look at Github and Gitlab one can easily find new projects or forks of older projects that are leading to new solutions. The development of the Linux kernel and the subsequent proliferation of nearly six-hundred different distributions, each one customized for its community, is but one example.

Conclusion

There are many good reasons to use open source software. These reasons include lower costs, flexibility, community support, security, and innovation. If you are looking for a cost-effective, flexible, and secure software solution, then open source software is a good option to consider.

Here are some additional resources about open source software:

I hope this blog post has been helpful. If you have any questions, please feel free to comment below.

Introducing Whisper

I love interviews. It’s a great way to get to know a person and it’s often a great way to learn. One of the most challenging aspects of interviews is capturing exactly what the interview subject had to say. I have used my mobile phone to capture a subject’s voice. I have also used Audacity. In both cases, I am left to transcribe that content into written form. Now the paradigm is changing with the advent of Whisper which is an openly licensed program developed by OpenAI. According to OpenAI’s website introducing Whisper, “Whisper is an automatic speech recognition (ASR) system trained on 680,000 hours of multilingual and multitask supervised data collected from the web.”

It’s an amazing software and easy to install on Linux which is my daily driver. I used Pop!_OS but you can easily install Whisper on Fedora-based distributions also. You need to make sure that Python is installed and you can easily test that by entering the following command.

$python3 –version

In my case the result was

Python 3.10.6

Then install a Python virtual environment.

$ sudo apt install python3.10-venv

Next, you need to install Python pip3

$ sudo apt install python3-pip

Initialize the Python virtual environment for Whisper with

$python3 -m venv whisper

I changed into the ‘whisper’ directory with

$cd whisper

Finally, I installed ‘whisper’ with

$ pip3 install whisper

Now I am ready to use this amazing new tool to transcribe mp3 and mp4 files into easily readable text. If you don’t have any and you would like to try out Whisper you can point your web browser at Librivox and download a free book or part of one. I chose Robert Frost’s ‘Mending Wall’

I can use ‘whisper’ from the command line to convert the mending wall mp3 to text

$ whisper 04_mending_wall_frost_bc.mp3 –model base

In a little over a minute ‘whisper’ has converted the ‘mp3’ to text that can easily be read. The conversion outputs 5 files. One of them is a text file with the text of the ‘mp3’. Here are the first few lines taken from 04_mending_wall_frost_bc.mp3.

“Mending Wall by Robert Frost, read for libravox.org by Becky Crackle, November 16, 2006, Canal Winchester, Ohio. Something there is that doesn’t love a wall that sends the frozen groundswell under it and spills the upper boulders in the sun, and makes gaps even too can pass abreast. The work of hunters is another thing. I have come after them and made repair where they have left not one stone on a stone, but they would have the rabbit out of hiding to please the yelping dogs.”

As you can see the results are accurate

You can create a Python script to automate the process.

import whisper

model = whisper.load_model(“base”)
result = model.transcribe(“04_mending_wall_frost_bc.mp3”) print(result[“text”])

Using the Python script provides a much cleaner output.

“Mending Wall by Robert Frost, read for Librevox.org by Becky Crackle, November 16th, 2006, Canal Winchester, Ohio. Something there is that doesn’t love a wall that sends the frozen groundswell under it and spills the upper boulders in the sun, and makes gaps even too can pass abreast. The work of hunters is another thing. I have come after them and made repair where they have left not one stone on a stone, but they would have the rabbit out of hiding to please the yelping dogs. The gaps I mean, no one has seen them made or heard them made, but at spring-mending time we find them there. I let my neighbor know beyond the hill, and on a day we meet to walk the line and set the wall between us once again. ”

Whisper has an MIT license