Showing posts with label #LinuxTips. Show all posts
Showing posts with label #LinuxTips. Show all posts

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.



Friday, May 8, 2020

How to Modify Your Keyboard in Linux Using Xmodmap

Like me, you may have used or are using Quickbooks. If you have, you may have also used the “Use keypad key as a Tab key” function of QB. I used it extensively, like all the time, when I regularly worked in the program as a bookkeeper. Some people prefer having the key set that way, others will simply stick to the Keypad Enter key functioning like the return/enter key when pressed.

When I started using Linux, I discovered GNUCash, which is close (close, but not identical) to QB. One of the ways it isn’t identical to QB is with the keypad enter key being able to act like the Tab key. So, naturally, I looked for a way to make it happen. And I did, as follows. Note: you can use this to reassign most any key on the keyboard to function as a different key; it is known as the “xmodmap” command.

I’ll use Linux Mint’s Cinnamon desktop environment as an example, but you can enter in these shortcuts according to the shortcut-keyboard’s entry process of your particular desktop environment. In Linux Mint, you’ll want to go to your menu → Preferences → Keyboard, then click on the shortcut tab. Once that is open, select “Custom Shortcuts” on the left panel, then click on the button at the bottom of that window where it says “Add custom shortcut.” That will bring up a window. In the first field, it wants the name this will go by. I’ve used the description of the shortcut’s purpose for that field. For instance, in this case, I’ve called this function: KP_Enter → Tab. In the next field goes the actual command. Enter:

xmodmap -e "keycode 104 = Tab"

A keycode is a number given to each key on one’s keyboard. Code 104 is the one listed for the Keypad’s Enter key by my keyboard. A keysym, on the other hand, is a name given to main keys used that are control and function keys. Common ones are Tab, Return, Control_L and Control_R, Alt_L and Alt_R. Note, these names are case sensitive. If you enter “return” or “RETURN,” it will not work, it must be “Return.”

To discover what the keycode and keysym of any key is, enter in a terminal window the following:

xev | grep keycode

Then press a key. It should show the line with the keycode, as well as the keysym name (last entry within the parenthesis) for your keyboard. When you’re done, click the X in the box with your mouse to return to the command line.

Now, you could use keysym alone to do this:

xmodmap -e “keysym KP_Enter = Tab”

Problem is, when you go back, you have to use the keycode 104 as any attempt to point to the Keysym Tab will point one to the wrong key to change. So, to change the key back to operating as an enter or a Return key (Use xev as above to know what the keysym for your main enter key is), you would enter the following:

xmodmap -e “keycode 104 = Return”

Once those two fields are filled in, click the “Add” button. Then you will want to double-click in the first unassigned keyboard binding for the new custom keyboard shortcut you just created, and press the key combinations you wish to assign to that function. For instance, in my example, I use Ctrl-Shift-{ to turn on the Tab functionality of the keypad’s enter key, and Ctrl-Shift-} to return it back to working as an enter key.

Now, it is important to know that this changes the key for all operations and programs. Not just GNUCash. That’s why you’ll want to have a key to change it back, if you tend to use it in some applications as an enter key. Like the calculator, for example. You may be used to hitting that key in doing 10-key entry, expecting it to perform as an enter key to get a total. Thus, the key to change it back on the fly. I, however, tend to leave it on the Tab functionality and use the main Enter key to add the total in calculator or other programs. It’s what you are used to.

Another tip, you can start any preferred changes by entering the appropriate command in your startup file (Menu → Preferences → Startup Applications).

That’s it. You can change most any key to do the job of a different key using the “xmodmap” command.

Happy Linuxing!

Thursday, April 9, 2020

Installing Coapp in Firefox/Download Helper.

When I installed DownloadHelper extension in Firefox recently, in my Makutu Lindoz distro, I ran into a problem when I tried to install a helper app it had to have in order to operate correctly. So, I installed it. However, when I returned to try to download a video, it again acted like I needed to install the coapp, as they called it. I installed it again, only to have it repeat the problem.

I then went on the Internet to see if other people had this problem and any solutions. I found that down through previous versions of Firefox and DownloadHelper have had this problem for some time. And while several people had suggestions, I couldn’t ever find a solution to the problem. However, I seem to have stumbled upon doing something right, because I fixed my issue and now DownloadHelper works as expected. So I’ll tell you what I did, and hopefully if you retrace my steps, you can fix the issue on your machine as well.

One of the suggestions was to check the permission of the file “net.downloadhelper.coapp.json” which is located in either your home directory or more than likely you’ll find it in:

/usr/lib/mozilla/native-messaging-hosts/net.downloadhelper.coapp.json


But, as I later discovered, that wasn’t the problem. Another suggestion was that it shouldn’t be in the “lib” directory, but in one called “lib64”. However, creating a directory with that name and putting the file in it didn’t fix it either.

While going through all that, I found where the DownloadHelper settings could be accessed: by clicking on the icon for the app in the upper right corner of your Firefox browser window, then click on the gear icon in the bottom right of the window that drops down. Then in the following window, there is a spot where you can see whether the helper app is installed or not. It said it wasn’t installed (even though it was) and hitting its reset button didn’t fix it either.

Then I had an idea. I knew on my main computer running Linux Mint, that Download Helper on Firefox worked just fine. So I did some research on my Mint computer to see how it was set up. I couldn’t find any differences save one: On Mint I had installed 74.0, but the one I installed on Lindoz was 74.0.1. I had installed it through the Software Manager. I checked the Synaptic Package Manager; it had 74.0.1 on it as well. On a hunch, I did the following which has fixed it for now.

1. I uninstalled Firefox on the Software Manager.

2. I then went to a terminal and entered the following:

sudo apt-get update
sudo apt-get install firefox


When I went to the settings in DownloadHelper, it now showed the coapp as installed, and when I tested it, it downloaded and converted the file as I expected it would.

I’m not sure how I fixed it. Because it works on the one installed from apt repository as opposed to the repository that Software Manager uses (though I would expect it to be exactly the same program)? Or, could it be that it does better at installing it when Firefox is installed after the coapp is installed? Or some other reason I’ve not considered?

One more note, the file it is looking for to determine whether it is installed or not is:

/opt/net.downloadhelper.coapp/bin/net.downloadhelper.coapp-linux-64


That file was already there with executable privileges; Firefox should be picking it up. All I did to get it working was to uninstall Firefox from the Software Manager (where I had initially installed it) and reinstalled Firefox through the command line. For whatever reason, it worked. Perhaps if you do that, it could solve your problem too. Good luck!

Tuesday, March 24, 2020

How do I Give Sudo Privilege to a GUI application

This will be a quicky tip.

We all know of the sudo giving temporary root privilege to command-line functions, but what about GUI programs? They need the GUI authentication, or there will not be a chance to enter it.

Well, there is a new command in town to accomplish this task, you can enter pkexec and it will give you a graphic authentication for root useage.

Example: to open Nemo files with root privileges, go to a terminal and type in:

pkexec nemo

Once you hit enter, it will allow you to enter your password and run the program with root privilege. That's it!

How to create desktop program launchers in Linux

I've seen some people, like myself, that tend to create shortcut keys for their favorite programs. For others, with only a few favorites, they'll create panel shortcuts. For others, however, they literally litter their desktop with a slew of icons, much like they might for their smart phone.

This tendency probably occurs because when Windows first came out, nearly every program you installed in it would pop in what was called a desktop "shortcut." They called it that because it was a shortcut in contrast to going through the menu to start it. In LInux, they are called "launchers," because, well, they launch programs.

Programs in LInux systems, however, rarely do that, which is why you'll usually see Linux desktops with hardly any icons. Usually just the Computer file system, the home directory of the user, and often any mounted drives like a CD or USB drive.

As with most things in Linux, there are several ways to skin this cat, and which option will work for you depends upon which desktop GUI (Graphical User Interface) you are using.

For example, I use a Cinnamon desktop GUI. The easiest way to create desktop launchers of your most used programs is to use the menu to browse until you've found the program you want to use. Alternately, you can use the search function at the top to easily find any program. Then right-click on the program and select "Add to Desktop" from the pop-up menu. If you try that in whatever GUI you are working in and that option isn't there, never fear. There are other options.

Also, the following method can be used for command-line programs for which there are not graphical interfaces at your ready, like the text-based editor: nano.

In Cinnamon, and other GUIs, you can often right-click on an open spot on your desktop.  There you will see in the pop-up menu, one choice that says, "Create New Launcher Here..." GUIs other than Cinnamon will likely have similar wording. If not, there is still yet another option which I will go through in a minute.

What pops up in Cinnamon looks like this:


Different GUIs will likely have similar fields. First, you will likely want to change the icon to one more resembling the program you are about to enter. To do that, click on the icon above, which resembles a rocket. You can browse or search your options there to select one.

Then you'll want to give your program a name, like "Silly Windows clone of Explorer" Whatever you type there will be displayed below the icon on your desktop.

Next, you'll fill in the command-line part of the program. This is the command you would type into the terminal on a command-line, with an appropriate place holder for any file that would tend to go with it.  Since the default is to include any file after it, there is no need for a place holder for LibreOffice Writer.

For instance, if you wanted to create one for LibreOffice Writer, the command would be lowriter  or libreoffice --writer

Don't know the command-line version of a program? Here's how you find it. Open the terminal (Ctl-Alt-t) and enter the following: man (progam name)  It will then display a "manual page" for the program. Look under the "Synopsis" section, and it will tell you the command to run it, and further on it should tell you if it needs a parameter to use any files passed to it. Another option is to enter in the terminal: libreoffice -h or --help. That will give you a shorter listing of the command-line entry, but man is more complete and you have a chance to see the beginning without having to scroll back up if the help info is larger than a page.

So, if you entered "man libreoffice", you would get an extended help file listing out the things to know. You can also enter "info (your program) to get a cleaner Synopsis information.

Going back to entering the info in our launcher window, the next field is the Comment section. This is a "what this program does" spot and will show up whenever someone hovers over the icon. Something like "A cool word processor"

The next entry is whether or not to click the box next to "Launch in Terminal." You'll want to click it if it is going to run a command-line only program, like nano. Otherwise, you'll want to leave it unchecked.

For instance, let's say you wanted to have a desktop entry that would check if any of your programs from your repositories needed upgrading. You would create a launcher with the name of "Update check," then the command: sudo apt list --upgradable, a comment that says "Check to see if any upgrades need to be done," then click the box that says to Launch in Terminal.  Once you hit OK, it will put an icon on the desktop that will launch the apt program, and after verifying your credentials, it will give you a list of all upgradable programs in the terminal window.

Once you hit OK, it will then give you the option to put it in the menu as well. Just say nope or you can click it and follow the instructions for it to preform that function.

So, you don't have either function, how do you accomplish that ability?

For this option, you'll be creating and editing a desktop file.

Where are these files? For systemwide icons for everyone who might log in, put the desktop files in /usr/share/applications (you'll need root usr privilege). For each logged in person, you can put the files into their home directory: /home/$USER/.local/share/applications or /home/$USER/Desktop on Cinnamon.

The simplest way to accomplish this is to copy a file and paste it right back, then edit the new file to reflect the new information, paying attention especially to the name, exec, and comment sections. You can change the terminal to true if you need it. Don't forget to rename the file itself to (whatever you want to call it).desktop   

You can create the file from scratch. Before you do that, it would be a good idea to check this more detailed article on what to enter.

There you go. Another reason why I like Linux Mint Cinnamon, it makes it real easy to do what would be a more manual and not user friendly functions.

Monday, March 23, 2020

Intro and First Tip: Extracting Audio from a Video File

Howdy, Linux partners!

I'm starting this Linux blog because I keep thinking, once I've figured out how to do something in Linux, that I should share it with the world, so those who are searching for answers will find them.


To that end, i'll state that there are a lot more people with a higher knowledge of Linux than I. They often know all the obscure commands from memory, whereas I often have to look them up. While I don't consider myself an Linux guru, I have used it as my main OS for several years now. I started out using Lubuntu using the LXDE interface (GUI), then moved to Xubuntu using a xfce GUI (Graphical User Interface). I really liked the xfce GUI, save for a couple of small issues.

I kept hearing about Linux Mint, and what a good setup it is. So I decided to give it a spin. I also heard a lot of good things about the Cinnamon GUI, which is one of the GUI's you can get installed, the other two being the other two being MATE and Gnome. Likely you could install other GUI's on top of the Mint system.  I thought about using xfce but I was hoping I could solve the problems that I mentioned. So I tried Cinnamon and I loved it.

My issues? One was the xfce power manager didn't have an option for "do nothing when the lid is closed" and the date/time function required one to look up date coding in order to adjust the display to your preferences.

I was presently sold on Cinnamon when I clicked on the system date. It pops up a calendar, like they all do. However, it has a link at the bottom of the calendar that says, "Date and Time Settings". I clicked on it, expecting the code entry fields. What greeted me, however, was a GUI for setting the date and time so I didn't have to go search for the codes on the web. (LIke a common set of codes looks like this: %h%h:%m%m. That's when you know you have a good system, when the programmers pay attention to small details like that.

But, that is not my first tip on this blog. My first tip will be concerning how to extract music/soundtrack from a video. It is actually easier than you would think.

I use OpenShot to edit my videos. It isn't a full-featured editor, but it gets the job done. One of its drawbacks is being able to separate the audio from the video. Ideally I'd like to edit them in the program. But, without that option, I would need to first extract the music from a video file, edit it with a program, then import it back into your project.

To extract the audio from the file for editing, first you should have a program called Audacity. That one would normally be in the repositories. If not, you can download it from their website.  Once installed, all you do is open the video file with Audacity and it will (at least I've tried it with mp4 files, your mileage may vary) show only the audio in the file, which you can then edit and save as a mp3 file, ready to re-import into OpenShot.

Yes, it really is that easy.