Monday, March 8, 2021

How to Deal with a "filter failed" error in CUPS

 I ran across this error recently when I installed a new Linux distribution on my writing computer called "Neptune OS", which is a Debian based distro. I spent about 2 days troubleshooting this problem, and I finally ran across the solution (at least in my case) that allowed me to print again.

So, installed this distro that I wanted to try out for my channel series: "New User Linux Reviews." I installed it, which went smooth enough, Then, in checking out the distro, one of the functions I check out was whether the system installed the printer (I have a network printer, a Brother MFC-L2710DW) or not, how easily it was to install it if it didn't, and did it work or not?

So when I went to check out the printer, I was pleasantly surprised to find the printer had been automatically detected and installed. So I initiated a test page print to see if it would print. Unfortunately, it didn't. And the only error message I found was "filter failed," which I discovered in my research could be caused by several different issues.

Probably the best troubleshooting guide that I found on the web was in the Arch Wiki:

https://wiki.archlinux.org/index.php/CUPS/Troubleshooting#CUPS:_%22Filter_failed%22 

It listed several of the major reasons it could give that error, as well as what to do about them, though it failed to give me a solution to my problem. Still, it pointed me in the right direction to figuring out, quite by accident, my solution.

After scouring the web for potential causes and solutions to this problem, and coming up empty handed, I realized that there wasn't much out on the web to help people address this issue (thus, the reason for this blog post). So after finding the Arch Wiki article mentioned above, I read through my error_log file in

/var/logs/cups/

That is when I discovered that the problem was an app called "pdftopdf" that it failed to create a "log file." Which created a cascade effect of other apps--that CUPS relies upon--to error out as well. Since some of those apps are also cups filters, it gave me the "filter failed" error in the print queue.

But, I still had to figure out what to do about it. After trying out a few other options, and they failed as well, I finally noticed one error message in the error_log file, which read: 

open /usr/share/cups/data/default-testpage.pdf: no such file or directory

On a whim, I decided to go to that directory and find out what was there. What I found were several pdf files that I realized were templates. However, what I also noticed was a file called

default-testpage.pdf.XXXXX

The "XXXXX" stands for some other letters that started with a "C" but I've already forgot exactly what they were (I'm not even sure about the "C" either). I wondered what would happen if I deleted  the extra letters from the end of that file so that it ended in "pdf," whether it might not find the file and print it. So I did that, then I went back to the printer queue and hit the "reprint" button: it printed!

Okay, so that meant that the CUPS system wasn't coordinating with what the printer was looking for as far as file names. I suspected it might be the CUPS system which was at fault, since I've had this printer for some time now, and have installed it on multiple systems without much issues, save for Arch distros, which while they install CUPS, rarely appear to have their daemon active, much less a GUI print manager application installed.

From that data, I wrongfully concluded that the two files I had noticed in that directory (default-testpage.pdf.XXXX, modified to default_testpage.pdf and file testprint which I had modified to testprint.pdf, were still there. I had assumed that these files were temp files that would disappear once they printed. I should have known better, however, that these were templates with names like "standard.pdf, secret.pdf, topsecret.pdf, classified.pdf and unclassified.pdf just to name a few of the other files in the directory.

However, what caused me to realize that bit of truth were the messages that now popped up on all three of the printers I had installed on the system that said something about a missing file, in bright red at the top, and they failed to even acknowledge that I had printed a test page, nothing in the print queue, nothing in the error_log file save something about not being able to create a profile or something along those lines. That is, once I deleted those two files.

So, what was I to do? That's when I wondered if my Linux Mint CUPS folders on my laptop might have the same list of files, like, maybe I could use those files? So I checked and they did have those same files. So I copied them all over to the same directory on my desktop, and guess what? Suddenly, the printers worked!

All I can figure was that one or more of those files were corrupted and/or the printer was looking for names that CUPS had given different names to use as templates. Not finding the expected template pdf file, it crashed. Once I changed the name of that one file, the printer was able to print the file. In copying over the files from a working copy of CUPS in this directory only, I somehow fixed the system.

So for everyone out there who has the same error in the error_log file, that could be your issue and solution as well.

May the Linux Force be with you!

 

UPDATE (3/14/21): I reinstalled the system and here is the file I noticed with the extra ending on it in the PDF templates that are in the /usr/share/cups/data directory:

default-testpage.pdf.distrib

I also printed out a normal text from the Kwrite program successfully, before I ever changed anything. The printer works out of the box. The only part that doesn't appear to work is the test page which should print out when you select "Print Test Page" under the maintenance button on the "Printers" section of the System Settings.

Once I had confirmed that everything else would print, I removed the ".distrib" ending so that the file read: default-testpage.pdf, which is exactly the file name that the error log said CUPS was looking for. Once I made that one change, it would print the test page just fine.

So, the bottom line is that to fix this apparent error, all one has to do is change the file name from:

default-testpage.pdf.distrib

to:

default-testpage.pdf

And you'll be good to go!

You can do that by entering the following command at a terminal prompt:

mv /usr/share/cups/data/default-testpage.pdf.distrib /usr/share/cups/data/default-testpage.pdf

May the Linux force be with you!


Monday, December 28, 2020

How to Use a Bash Script File

 A Bash script file is simply a file containing a list of commands as one might enter from a terminal command prompt, with the addition of some more programming options like If . . . then, for, and while statements. It can be made to do most any function on a Linux, Apple, or other Unix based operating systems. They can greatly simplify and automate certain tasks.

For example, on a Debian based system, to preform an upgrade from the terminal requires entering at least two lines of text-based commands into a terminal. First, one must do an update to update the repositories to ensure one has all the most recent changes to them. Then you accomplish the upgrade, so the terminal commands would look like this:

sudo apt update
sudo apt upgrade

To create a bash file, you open your favorite text editor and give it an appropriate name, like in this case we might name this file "aptup.sh"

Note, the "sh" extension is commonly used for bash script files, but unlike MSWindows, that doesn't make it executable for Linux. You could put any extension on there you want, or none at all.

Now, enter the following to create the bash file:

#!/bin/bash

# This is a script file to make updates simpler!

sudo apt-get update
sudo -y apt-get upgrade

exit

The first line is the same for every bash file. It essentially tells the system what program and where it is at that will run this file.

The second line is optional. It is a comment. Every line that begins with a # will be ignored by the bash program, except the very first line, of course. But it is a good practice to put a general purpose statement at the beginning of your file, if for no other reason, if you forget what this file does, it serves as a good reminder for you, and provides any introductory information for others who might look at your source code. You can put as many or as few comments in a file as you want, put them anywhere you desire, or none at all. As long as a line has a # before it, it will not be run by the system. As a matter of fact, putting a # before lines of code is a good way to not have them run without deleting them entirely.

On the update and upgrade commands, you'll notice two changes I've made from the initial "apt" commands above. First, I've used "apt-get" instead of "apt". Apt is designed to be run interactively by the user, where as apt-get has provisions for running inside a script.

The second change is adding in the -y option. This option allows the script to become more automated by assuming a "yes" answer to any yes/no questions it asks. Typically, an upgrade script will list out the files it intends to upgrade, then ask you if you want to proceed with the upgrade.

The last line is optional at the end of the file, but it is good practice to put it in. It tells the bash script to stop processing and exit the file. It becomes more necessary if you want to stop processing earlier in the script, like during an if . . . then statement.

Once you have saved the file, there are a couple more steps to turn this into an executable file.

One, you should put this file into a directory that is in your path statement. To discover what is in your PATH statement, enter the following into a terminal window:

echo $PATH

Yes, it needs to be in all caps. Variables in Linux are case-sensitive.

What this does is it allows you to run the program no matter where you are in your directory structure. Otherwise, you would have to enter the full path every time you ran the script: /usr/bin/aptup.sh instead of just aptup.sh

The logical place to place this file is in your /usr/bin directory. That will make it available to all users of the computer and is where the bulk of user based programs reside. Or you can put it in a home directory and add that directory to your PATH environment variable by doing the following steps:

I usually create a bin directory in my home folder. You can do this using your file manager, but I'll show you here how to accomplish it from the command line. This is where I put all my scripts.

Bonus Info: In Solus, you don't have to add the user home directory bin to the path statement. If you create the directory, it automatically picks it up and adds it for you!

To create the bin directory ensure you are in your home directory by entering:

cd ~

Then enter (unless you already have one):

mkdir ./bin

Then to enter it into you path variable, enter:

export PATH=$PATH:$HOME/bin

If you run it from a terminal, it will only be good for the life of that terminal session. To have it come up every time a new terminal session is started, enter that command in your .bashrc or .profile file, whichever your system uses to initialize a terminal session. For Debian based systems, that will generally be .bashrc

Two, you'll want to make your file executable. Like the above, you don't have to do this, as long as you wish to preface every command with "bash" and the full path to where the file is, even if it is in a path where your system looks for executable program files. It is an easy command to do. Enter:

chmod +x ~/bin/aptup.sh

To accomplish the same in most file managers. right-click on the file and select "properties" from the menu. Go to the "permissions" tab and make sure to check off the box "make file executable" or something similar.

Now you should be ready to use your script file by simply typing in the name: aptup.sh! And your system will get updated by one command instead of two.

Wednesday, December 23, 2020

How to Install Parrot OS

 I have installed Parrot OS, but despite the Calamaris installer, it ended up not being a simple event. I attempted to install the MATE security edition on a virtual Gnome Box machine. The installation went fine until when it was about 93% of the way done, it stopped and sat on the following command: /usr/sbin/sources-media -u. It sat on it until the 600 seconds was up. I tried installing it with different settings, and still it would hand up at that spot, only to force me to close the installation and failed to install the operating system.

While on the Live installation of the system, I decided to take a look at the file. I discovered that it was a script file, and that the -u switch caused it to go into an update. The switch activates the following commands:

if [ "$1" = "-u" ]; then
    umount $CHROOT/$MEDIUM_PATH
    rm $CHROOT/etc/apt/sources.list.d/debian-live-media.list || true
    chroot $CHROOT apt-get update
    exit 0
fi

The fourth line updates the new system, which can be done equally well either before or after you install the system. However, the reason it was hanging is because as of today, it required almost 1700 updates, which alone would go beyond the 600 seconds it allows it to finish. However, it also ask several questions and requires user interaction to finish. Which means that was why it was hanging up. With no movement as it sat there and waited for my input in vain since the system didn't provide a way for me to do that, naturally it would time out. And since there wasn't any provision made for that in the install process, it ends the installation with only 7% more to go. Also, due to the big amounts of updates, you can't update it before you start the install because there isn't enough room on the "USB", virtual though it may be, to do it.

So with the only option left to update after the install, I had to disable the update in order to finish the installation. So I commented out the update command line in the file by putting a "#" at the beginning of that line so that it now showed:

#    chroot $CHROOT apt-get update

That allowed it to bypass the update and finish the install. Then I was able to do the giant update manually. Here are the commands to do this.

To edit the file, use your favorite text editor to comment out the line as described above. My favorite is nano from the command line BEFORE you start the install process from the live boot up.

sudo nano /usr/sbin/sources-media

Once you boot up into your new system, you can start the upgrade process using the following commands from the terminal, which I recommend you use instead of the GUI interface to update this many files.

sudo apt update
sudo apt upgrade

Then check on it every once in a while because it will wait for your interaction at points. (Note: when you get to the section right after it downloads all the files and displays the change log to you with a ":" waiting for your input, you can just press enter until it tells you you can press "q" to exit it.)

Then enter the following command to remove unneeded files:

sudo apt autoremove

Once you've upgraded all the files, you're good to go!

Saturday, November 14, 2020

How to Fix Non-free Software Error in Debian

 As I mentioned last time, there is some tweaking to do when Debian is installed. Recently, I discovered another needed tweak one needs to do, especially if you need "Non-free" software for some firmware, in my case for my wifi on my HP Laptop. Previously, I tried to install Debian on my HP Laptop, but encountered this error message, which meant I wouldn't be able to use my system. That's when I decided to install Linux Mint Debian Edition on my laptop instead, because I knew it would work.

But it confused me somewhat, because to me, "Non-free" means I need to shell out some money to buy software for, something. Unfortunately, the version of Debian I downloaded (a Cinnamon enabled package), failed to tell me exactly what needed the "non-free" software, and it was the middle of the night and I needed to finish up so I could get some sleep. But, I needed a working system the next day, which is why I installed Linux Mint, because I was sure it would work out of the box.

But, on my Acer Asprire laptop, I was able to install Debian just fine, using the net installer version, which hooks you up to the internet to download most of the packages. So I assumed it was the version of Debian I tried to install, and I tried to install Debian again using the net installer. Yet, again, it encountered this error when I tried to install it, but unlike the previous time, it told me what firmware I needed. So, with that error on my HP Laptop, I opened my Aspire laptop and did some research on this error. Here is what I found out.

I discovered that "non-free" doesn't mean that you have to buy anything--rather it means that the firmware is proprietary software. I read that Debian doesn't enable this "feature" out of the box due to concerns about "non-free" software on their distribution. I found out that to solve this issue, you simply need to edit your repository list file, and add some additional text to the end of each line in the file. Here is the procedure to fix this problem.

First, you need to use a text editor to edit the source.list file. You can use your favorite editor, or use the following command line in a terminal (ensure the user has sudo privileges):

sudo nano /etc/apt/sources.list

Then on the end of each line that begins with "deb", tack on the following words after the "main" keyword:

contrib non-free

For example, one line commonly found in this list would be

deb http://deb.debian.org/debian buster main

When you've edited it, it should look like:

deb http://deb.debian.org/debian buster main contrib non-free

Once you've done that to every line in the file that starts with "deb", save the file edits under the same name, then enter first:

sudo apt update

then us sudo apt install to install your firmware. In my case, it indicated that I needed the:

sudo apt install firmware-iwlwifi

package.  So, with that information, I went ahead with the install, hooking my HP laptop to an Ethernet connection for its internet access, which worked fine. Once I installed Debian, I was able to follow the above steps to install the "non-free" software, then I was able to set up my wifi without further incident and disconnect the Ethernet cable. I'm typing on my Debian system right now, even!

Thanks for reading.

PS: You can reedit the file and take those words off the end if you do fear downloading other proprietary software in the future.

Monday, November 9, 2020

How to Enable Adduser on Debian

 I prefer to use adduser over useradd when possible. It simply is more logical to my mind. One time when I installed Debian, though I knew it was a Debian based program, when I typed in:

sudo adduser

All I saw in return is the "Program not found" or something similar. I discovered after checking on it using:

which adduser

. . . that it resided in the /usr/sbin directory. After doing a check on the $PATH environment variable using:

sudo env

My suspicions were confirmed--that /usr/sbin was not in the $PATH variable. Why doesn't Debian put it there by default? Hard to say. It appears that they do have the /sbin directory in the path, which should point to /usr/sbin since it is a symbolic link At any rate, not knowing at the time how Linux processed the $PATH and where I should put it, I proceeded to do some research. In DOS, everything used to go into the Autoexec.bat file, which always was run on startup. 

To make a long story shorter, what I discovered was that one: There was one difference between how the DOS and Linux path statements were used. For Linux, the big difference is you put "export" before the PATH= part. So the statement to add to the appropriate file is:

export PATH=$PATH:/usr/sbin

All caps on the PATH part is important, and the colon separates each entry. Putting $PATH on the right side of the =, appends what you add to it. So if the PATH statement echos out "/usr/bin" the resulting output from the above export statement would be "/usr/bin:/usr/sbin". The "export" command makes it usable beyond this one instance which is what you want.

Two: Where to put it? That turned out to be more complicated that one might think. There were multiple files to try. There is a file to put it in if you want only one user to use it, another for all users on the system except for root, and yet another if you only want root to have access to it. On top of that, the file you put it in can differ between major distributions. Like the Mandrake version I saw given as an example that one website used ".bash_profile" whereas in Debian, it is ".bashrc".

Since I figured where as the user programs are mostly installed in the /usr/bin directory, which was included in the PATH by default, that the /usr/sbin directory contained programs that would be more system type files that should primarily be accessed by a root user. So obviously, it would go in the root's home directory, which is at /root as it turns out. So, you would want to enter the following to edit that file in the root home directory:

sudo nano /root/.bashrc

Then add the line at the end of the file:

export PATH=$PATH:/usr/sbin

When I did that, it worked when I attempted to access the program from root using sudo, but not as just a simple user.

(Note: the period it begins with means it is a hidden system file. Use Ctrl-H in your file manager to see it or "ls -a" if using the command line.)

You can use

sudo env

To verify that /usr/sbin is now part of the $PATH variable. Now you should be able to run

adduser --help

As well as any other programs in the /usr/sbin directory!

May the Linux force be with you!


Monday, October 19, 2020

How to Fix LibreOffice Not Activating the Alt-[key] Menu Function

 A recent update (I assume) in Libre Office (I'm currently using version 6.1) broke my Alt-Key menu function. I would press on the Alt key, and the lines would appear under the letters of the menu items indicating what letter to push to activate that menu list, only when I hit the key, nothing happened. I tried other Alt functions on the system, which worked fine, like Alt-Tab cycling through the open windows. But no Alt-menu key functionality at all.

So I did some initial research and I pretty much came up with links of old Ubuntu related issues back in the 2011-16 years that didn't seem to apply to me since I use Linux Mint Debian Edition. But one comment at least set me on the right path, as it mentioned something about opening your keyboard layout function and changing something there. I use the Cinnamon desktop, being it is my favorite and the only one that comes with the Debian edition out of the box.

So I opened my system settings and went to my keyboard. After poking around in the Shortcut section to make sure nothing had changed there that may have overwritten the Alt function for menu keys, I went to layout. That appeared in order, but then I noticed an option button on the bottom right corner of the window. I clicked it, and low and behold, I noticed a selection there labeled "Alt/Win key behavior"!

While not getting my hopes up too high, I clicked on it and discovered a whole list of options. "Default" was selected, which seemed normal enough. But if the default action had changed on a recent update...

One of the options was labeled "Add the standard behavior to Menu key." I decided to give it a try. When I went back to LibreOffice Writer, the Alt-Menu key function worked! Strange that they wouldn't make that the default behavior when it has been in use for so long. Anyway, I was glad I found the setting to switch it back, as I use the Alt-F-U function all the time. Hopefully this will be helpful to others having the same problem.


UPDATE: (11/3/2020)

Well, my problem returned. I checked the setting I had above and it hadn't changed. So I started searching for other solutions.

One of the things I noticed is that when I opened up LO writer, that there was no blinking cursor active in the new document that it brought up. If I clicked in the document with the mouse and the cursor was there, then the Alt-key functions would work. So the first thing I checked was the LO settings, in "Tools" and "Options" on the menu. After going through those settings, I could find nothing that would tell LO where to "start" upon opening a new document.

Then I suspected it could have something to do with the Default template that was installed. So I opened that template:

  1. By going to "File," in the menu.
  2. Then "Templates"
  3. Then "Manage Templates."
  4. Select the Default template and open it in the window that pops open.
  5. Then I set it up with the settings in the Styles settings how I like it to open.
  6. Once that was done and I made sure the cursor was at the beginning of the document, I used the mouse to once again click on "Files"
  7. "Templates"
  8. And "Save as Template..." 
  9. In the window that pops up, give it a name (doesn't matter what it is, but it sounds logical to me to name it "MyDefault")
  10. Then make sure you click the box in the bottom left corner of the window labeled "Save as default template."
  11. Select an appropriate category to save the template under and click "Save."

Now when you open Writer, it will open your default template you just created, with the cursor at the beginning of the document, and all the Alt-key functions will be at your command!

Apparently, this is something that will need to be done on all fresh installs of LibreOffice Writer if the Alt keys cannot be accessed right out of the box. Which I would need to do anyway due to how I like it to open with different fonts and layout settings.



Sunday, May 24, 2020

My Linux Journey

It started out innocent enough. Back around 2003 or 04, I ended up with an old laptop that I had no use for. I’d been interested in Linux, so I decided to obtain the installation files for Debian and install it on this laptop. This all happened prior to getting a cable modem; it would have probably taken a week to download them using my modem. So I paid to obtain the disks for the cost of the CDs and shipping. They arrived one day, and I attempted an install. After some time, I finished the install, and I was staring at a command line. The little cursor blinked at me, or was that a sarcastic wink?

It’s not that I was unfamiliar with working from a command line. I learned my chops first on a DCL machine (that’s Digital Command Language) back in the 80s, and after that, on MSDos. I reluctantly bought in 1994, a laptop with Windows 3.11; I was so reluctant to give up my command line, familiar as I was with typing a program’s name into the terminal to run it. Of course, I grew to love Windows, in a love/hate sort of way, and became an “expert” in that interface even as I had in MSDos.

But this wasn’t MSDos. Only one or two of the commands I recalled from my MSDos days appeared to work in this alien world. So I started the process of figuring how to access the help pages and began the task of learning a new system. However, I didn’t get very far. I tried to install X-windows, a graphical “windows manager” (which I now know is not the same thing as a complete desktop environment). All I ever did back then was to see a big “X” across the screen. No menu, no buttons, nothing. Then, as fate would have it, I did something that trapped me in the X-window. I couldn’t use the command line nor do anything. Even reboots would log me back onto the giant X window. I finally gave up.

Ironically, these last two days I’ve been testing out installing the “Vanilla” Debian first in VirtualBox, then on my living room backup laptop, which I had before I received my current one—about a month before we moved to Colorado in 2018. I’ve successfully installed it, though it has a long install process compared to your average Linux distro.

It ended up crashing it in Virtualbox. But not before I learned enough that I was ready to install it onto my living room laptop. So I did, and it is now up and running. It has progressed a lot since the early 2000s. For instance, when a newbie like myself starts tinkering with attempting to pull together a desktop environment, not knowing that was what I needed, I was lost, alone, and clueless about what direction I needed to go. But, the Debian I installed lately had several desktop environments that I could use. So, I picked my favorite so far—Cinnamon--and when it was finally done, I booted up into a fully functional graphical interface that I was already familiar with along with a system that I only had to make about two or three tweaks to obtain a fully functional system.

“Tweaks to obtain a fully functional system? What?”

Yep, you heard right. And my experience probably only will go to show why installing a system like Debian is a bigger task than Linux Mint, especially for someone who is unfamiliar with how Linux works. I, on the other hand, have been using Linux by this point for 9 years. I realized it had been that long when Facebook offered up one of those “Remember When” post for me to share with everyone (which I didn’t share; you can thank me later) that was 9 years old, and wanted me to share a post I had done on my experience of getting a fully functional Linux system up for the first time that had become my default operating system I used on a regular basis. I kept a dual boot into Windows to run QuickBooks, which doesn’t play very well, even using Wine. I’ll give you one example of what I had to do, right out of the box.

Once the install on Debian was done, I started to work on setting up the ssh server. Ssh is a way for a user using a computer, to log in and work on another computer. One can open it up to the Internet, but in my case, I only needed to go over the network. At any rate, one of the first task in setting up an ssh server is adding a user to the new system that will give me the ability to log in from the other computer. I like to use the adduser command. So, I typed in the command, followed by my user name and group. Well, Debian couldn’t appear to locate the command. I thought “What? How could the system be missing such a foundational command?” It didn’t make any sense. I tried useradd, with the same results.

So after a bit of exploring, I attempted to install the adduser command. It said it was already installed. “Ahhhh!” the problem appeared solved, to a degree. Because Linux has at least one similarity with Windows, the PATH variable. It does the same thing as it does in Windows as well, which is to tell the system where to look for executable programs that you want to run, no matter where you initiate them from in the directory structure. So I went to Google and did a search on what directory adduser would be found in (it was in the /usr/sbin directory). Then I printed out the PATH variable, and sure enough it wasn’t there. So, all I had to do was to include it in the PATH directory, and all would be right in the Debian world, right! Well, sort of, in that even that task became something of a problem.

You see, in Windows, there is one file that the path command goes in. The commands for it are very similar. In windows, it is:

PATH=%PATH%;C:\\directory to add to the path statement

Pre-XP, to make it permanent, one would add it to the “autoexec.bat” file, a file Windows would run every time the system booted up. XP and those that followed, it was added to the advanced system under “Environmental Variables” graphically. So, in Windows, for any one version, there was only one file or place you had to edit to add a directory to the PATH variable and have it stick from session to session.

Not so in Linux. First you have several spots you could add it to for the individual user (at least 3 files), or several spots (at least 4 files) for every user. Now, these are easy enough to find upon searching on the internet, as I did. However, whether it was due to it being entered in at the wrong time so that it was overwritten, or the system ignored each file that I put the path statement in, for whatever reason, None of them worked. I believe I tried every file I could find to put my path statement in, which was:

Export PATH=$Path:/usr/sbin

The export command is the part unique to Linux, but it shouldn’t always be used, as I soon discovered. One of the system-wide files I entered this command into was located in the file: /etc/profiles. Once I entered the command in and rebooted, it booted up as far as the login screen. I entered my password, and it went away, only to have the login reappear. So, figuring I must have entered the password in wrong, I entered it again only to have it do the same thing. I must have entered my password in 5-7 times, the last couple of times carefully entering in my password. It still came back. I had to come to one conclusion: that the file required the path statement without the export command. Why? I don’t know. That’s just the way it is.

Now, I could have just deleted the system off of Virtualbox. It was, after all, just a test. However, I wasn’t ready to give up on it, just yet. I had to figure out a way to get into the system, edit that file, and take the “export” part out. After doing a few searches on the internet, the only solution I had found was a cryptic editing of the kernel, by adding a -l on the end of it, that would allow me to bypass the login screen. However, when I reached the point of adding that to the kernel file, it didn’t quite look the same. I was unsure where to put the -l and I said to myself, “There has to be an easier way to do this. Editing the load kernel command was too deep and crazy way to do this.” And, behold! There was an easier, more user friendly way to accomplish this.

I sort of stumbled upon it, though it is probably common knowledge among experienced Linux users. Once the grub boot menu appeared, I selected the “Advanced” option of the operating system. Then I opted for the recovery/command line to go into root. I was in! I edited the “export” off the file, saved it, then rebooted. I went into the login screen and upon entering the password, I stood on the pathway to success! All was well, once again, in the Debian world.

Sort of, because when I checked the PATH variable, it still didn’t show the sbin directory under the usr directory. So I was back to square one. I checked the websites once again, and there was one file I had yet to try: bashrc in the HOME directory. However, the preferred way to add any changes to that file was to enter them in a different file, under a different directory, and include them in the bashrc file. I knew the system processed this file too, because I had already done this with some aliases I had set up. Aliases like twifi, which ran the command:

bash /home/rick/MyScripts/ToggleWiFi.sh

To turn on and off my wifi. All I would have to do in a terminal window to run that would be to enter twifi.

I started to edit the .bashrc file to have it include a different file, when it dawned upon me that the first system upgrade would replaced that file, then I would have to add those lines back in. Though it was sort of like cheating, I knew the .bash_aliases file would to included by default in any new file. So I edited that file to add to the path the desired directories. Once I had saved it, rebooted, and checked the path statement. I held my hands up in a victory shout as the desired directories were in the PATH variable, finally!

That is just one example of my “tweaks” I did to get a more fully functional system. I do have to say, that a major Linux distribution upon which Ubuntu (and several others that are based off of Ubuntu) as well as a smattering of others, who has been around for this long, could have such a simple-to-fix-bug in it. This is exactly the kind of experience that keeps Windows users from moving to Linux. But be assured, Windows user, that distributions such as Ubuntu and Linux Mint don’t have this problem. They generally work like you would expect them too. I’d point any Linux newbie to install one of those distros as your first one. But in Debian’s favor, it has come a long way toward being more user friendly than when I installed it almost 20 years ago.

But between my first attempt at installing Debian and the last successful attempt to install it on my backup laptop—an Acer Aspire—I’ve installed several different distributions on the old laptop. All of the distros, a small handful requiring some tweaking, have been successful installs. I’ve used them for various lengths of time. Most all of them picked up my Brother network printer without a hitch, which for my previous experience is very, very good. In the past, I’ve had to fiddle with the drivers and various settings before I could get it to work.

My first working Linux distro (short for distribution) was Lubuntu using the LXDE desktop environment. I used it on a test laptop that was “resource challenged” before being confident that I could install it on my main laptop. I worked on and off for over 4 or 5 months of setting it up just the way I liked it. This is when I made that Facebook post 9 years ago. I stuck with that OS (operating system) for quite some time before trying other distros. From there I installed Xubuntu (uses the Xfce desktop environment) on my main computer. Then a few months ago, back around Aug. 2018, I ordered a new computer, an HP Laptop with 2 T of HD space. It had Windows 10 installed on it. Up until then, I had a dual-boot system, MS Windows 8 and Xubuntu on my Aspire. With this computer, however, I decided to go totally Linux, something I could do since I no longer needed to use Quickbooks. More on that in a future post. And, I decided to go with a totally new distro, Linux Mint. I was impressed with Mint’s Cinnamon desktop, which I fell in love with. Mainly because of both the slick looking interface and the flexible and intuitive structure of the settings menus. In short, it simply works as a desktop environment.

I also need to back up a bit to describe my Linux HD transplant. My son had bought, some years ago, a new Asus laptop. After a period of use, his hard drive crashed and he was ready to throw it away. I told him to hold on, I would take it. I figured I would get a hard drive for it and I would have a new computer. But, I promptly forgot all about it. Then, a few years later I discovered Lubuntu, a version of Ubuntu that used the memory efficient LXDE desktop environment. While I was on it, I accidentally spilled some coffee on the keyboard, effectively causing the keyboard to be near usable. My immediate solution was to go and get a usb keyboard, and I continued using the computer that way.

Meanwhile, I came across my son’s old Asus laptop. It had been long enough that I forgot what was even wrong with it. An attempt to boot up failed, reminding me that it was the hard drive’s boot blocks on the disk that caused the issue. So I did a search on Amazon for hard drives, and discovered a 1 terabyte drive I could obtain for a reasonable price, so I bought it, and I installed Lubutu on it successfully. Once I had it up and running, I liked using it better than my old Acer computer. So after transferring my files over to the Asus laptop, it became my primary laptop that I used day in and day out. That is, until another cup of coffee, or it may have been sweet tea, was dumped over the keyboard, yet again. This time, it totally made the keyboard unusable as well as affecting the computer itself. I could use the external keyboard, but it became difficult to get around to the point that it was an unusable computer.

Problem was, I didn’t have enough money to buy a new computer. All I had was my Acer Aspire computer to fall back on. The problem with that was my current files and work was on the hard drive now trapped inside an unusable computer. What to do?

Then I had an idea, though I didn’t know if it was even possible at the time. So I did a search on the Internet to find out if it was possible to move a hard drive, and transplant it into a different laptop, and have it work. I expected to find a big negative to that question, but to my surprise I discovered that it was indeed possible. However, in my case, since I was moving from a “Legacy” computer to an EFI booting computer, that I would need to go in and adjust the partitions on the drive to make space to create an EFI partition. Naturally I found this out after I attempted to simply move the HD over to the new computer and it failed to boot. I was successful in reducing the size of the main partition, and creating an EFI partition, and installing the boot software to it, that when I plugged it in the next time, I saw my old system’s login, and after a little checking, I could access all my files. I hadn’t lost one of them. I breathed a big sigh of relief.

For the record, just know that this is something that cannot be done if I still had a Windows system. They link their OS to the computer it comes with. You take that HD out and stick in another computer, you’ll have two broken systems. I was a wee bit proud that I had successfully navigated the “Linux rapids” and had pulled off such a major operation that when I turned on the computer and it began booting up into my familiar system, I said, “It lives! It LIVES!!! Haaaaaa, ha, ha, ha, ha!”

Of course, I was back to using my old computer which required me to use an external keyboard. But hey, at least I was operational again, except this time with a full terabyte HD. So I used it until I had the money for a new computer which happened in the summer of 2018. By that time, I had installed Xubuntu on my old Acer Aspire and had been using it for a few months. So when I bought this HP laptop, that I am currently using, I decided I would move the pre-installed Windows 10 from a dual boot situation and install it in VirtualBox once I had my new Linux system up and running.

I also decided I would install a completely new distro, and I decided to first try Linux Mint. After installing that distro, I immediately fell in love with it. It simply worked out of the box, and it was fairly intuitive. I’ll probably do a post on why I like Linux Mint and why I recommend it to Linux newbies in a later post. I’ve also installed and used briefly the following Linux distros, in no particular order: Linux Mint Debian (this is a version of Linux Mint based on Debian instead of Ubuntu, which the standard one is based on Ubuntu), PCLinusOS with the MATE DE (desktop environment), POP OS, Ubuntu Studio (current installed as a dual boot on my main computer)Ubuntu Bungee, Zorin OS, Manjaro (this is the only Arch-based distro that I tried), and possibly one or two others I might have forgotten. Distro hopping? No, not really. I basically wanted to get a good feel and flavor of the different distros out there. So for a time I was installing a new distro nearly every week. I’ve had Debian installed on it for 2 or 3 weeks now. I’ll probably stick with it, using it to test out desktop environments as well as other distros in a VirtualBox. No more crashed on my main computer in VB. This last crash took out my Windows virtual drive. Luckily I didn’t have much on it of importance.

If you have any suggestions as to topic I could tackle, let me know in the comments. Thanks for reading. My posts are usually not this long.