HOWTO - prevent your Inkjet Nozzles from clogging (mostly)

Write tutorials for Linux Mint here
More tutorials on https://github.com/orgs/linuxmint/discu ... /tutorials and (archive) on https://community.linuxmint.com/tutorial
Forum rules
Don't add support questions to tutorials; start your own topic in the appropriate sub-forum instead. Before you post read forum rules
Post Reply
User avatar
rossdv8
Level 7
Level 7
Posts: 1736
Joined: Wed Apr 23, 2014 4:48 am
Location: Within 2,000 kilometres of Alice Springs, Australia
Contact:

HOWTO - prevent your Inkjet Nozzles from clogging (mostly)

Post by rossdv8 »

WARNING !
This is one of my 'Long and rambling' posts (I have brain injuries) - but it might be useful for newbies who don;t print much and are sick of finding the ink in their inkjet nozzles is dried when they do need to print. It usually happens when you urgently need to print a resume :-)

Keeping Inkjet nozzles clear has been a problem for a lot of people for years. I first noticed it in my businesses when I changed from Dye ink to Pigment ink in one of my signwriting printers, but even with the Dye Sublimation printers it happens if I leave them sitting unused for a few weeks.

We get cold weather, humid weather and hot weather here, and it has different effects on out machines. I was so sick of trying to fix these problems on my printers and also on my customers' printers that I did some thinking and found that regardless of ink freshness, it was mostly after a machine was idle for a week or two that the problem occurred. And it didn;t matter the brand. I use mostly Brother inkjets, but we have HP and Epsons showing the same problem.

Once a print test shows a few blocked nozzles, clearing them can be a tiresome frustrating exercise, and wastes a LOT of ink.

So some years ago I came up with a solution that works for me.
It wastes a small amount of ink per printer, but far less than a printhead cleaning operation on the printer, and adds about 30 seconds boot time for each printer each time you start the computer. But as long as I do this I have clear nozzles almost always. I should add, my computers used to be set to boot automatically about 6am and shutdown about midnight if I went away for a few weeks. (A setting in BIOS on computers for many years now). So I made sure the printers had enough paper and ink.

You need to be sure there is always paper in the printer. I save paper by recycling the old pages from this test over and over. I only use new paper when I actually want to check the nozzles (usually with the printer's built in test page), and have to remember to put sufficient fresh paper in the printer if I am printing 'stuff'..

Ok.
The lp command is useful. We can use it to find the name of the printer to set up. Since I retired all my computers are on Wifi, but the lp command will tell me which ones are where. It previously worked with my USB printers too.
We will also use in in the script to actually print a test page.

It is a sudo command so it will ask for your password.

$ sudo lpstat -s
[sudo] password for ross:
no system default destination
device for Brother_MFC_J6520DW: ipp://BRW7429AF3A3893.local:631/ipp/print
device for Photosmart_5520_series_B24DD9_: ipp://HPF0921CB24DD9.local:631/ipp/print

That tells me I have 2 printers installed on this computer. ipp: means they are connected over WiFi. (I ipp means 'Internet Printing Protocol'). USB printers will show differently. But it is the device names I am interested in.
The Photosmart computer is used mainly by a different computer upstairs.
The Brother Computer is the one I don't use daily and is the one that was getting blocked nozzles from sitting idle.

What you need is the name (in this example mine is: Brother_MFC_J6520DW )

And you need a PDF test print file. You can download one from the net (I'll also upload one with the post) I keep mine in the same folder as the script below.


I wrote a little script to announce that the computer is about to print a test print image and to pop up a notice on screen when it is printed, on each boot. The script just has to be made executable and saved in your Bash-Scripts directory (folder) or whatever folder in /home is convenient.

Then, open 'Session and Startup' from your Menu then the 'Application and Autostart' tab, and add the script as a command.
Click the 'Add' button at the bottom, fill in the fields for a name, then where it says 'Command', click the button at the end and follow the path to your script. It should already say 'On Login' under Trigger for when to run the script.
You can use the [x] check box at the left in Session and Startup at any time to turn those commands on and off, or to rEdit them or Remove them.
It is useful to know about, but be careful not to turn off something you may later rely on if asked about in court....

A couple of things to remember:
The script takes a little while before it runs (the 'sleep commands'). That is because I found my system took a while to find WiFi peripherals. And it takes a while longer before the pop up to say printing is finished.
You can change the text displayed. (you can re-use the script for Appointment Reminders etc).
If you want the spoken announcement that the script has started, you need espeak installed (sudo apt install espeak).
If you want the message popup on the screen you need imagemagick, which is probably already installed. (sudo apt install imagemagick). I have also added the important bits of this info in the actual script below.
testprint.pdf
(78.63 KiB) Downloaded 114 times

Code: Select all

#!/bin/sh 
# RossDV8's Print Test with MESSAGE Pop Up --needs imagemagick --needs espeak
# imagemagick is usually in a Default Mint install.  If not: $ sudo apt install imagemagick
# I name my message scripts something like 0message.sh   So I can find them easily in a folder
# if desired: 
#	sudo apt install espeak   (hash out the espeak line if you don't want it announcing)
# Remove previous message       (script will replace it again -with any changes- when you run it)
# If script won;t run initially, copy any PNG into the folder and call it '0done.png'

# READ the     N O T E    10 lines from the Bottom   !!!

# Wait for computer to find peripherals
sleep 20 

# remove old completed message
 	rm 0done.png
 	
# create the TEXT message to pop up on the screen
# put the WRITTEN message words after label: between '    '
# \n means 'new line'
# change -size to suit your screen

convert -background white -fill blue -font Arial -pointsize 156 -size 1200x900  \
          -gravity center    label:'NOTE!\nBrother\nTest\nPrint\nCOMPLETE\' \
          0done.png
           
          #Test Print
# spoken message (leave volume about 50% when you shut down computer)
          espeak "printer test"
#send test file to printer.  You can use any PDF test image or download mine from the next post

# N O T E !!!!
# Change the Printer Name and PATH in the next line to match YOUR OWN Printer and Test FILE 
     
lp -d Brother_MFC_J6520DW /home/ross/0-Printer-Test/testprint.pdf 

#wait for print job to finish
   sleep 30
          
# Show Message when job is done

          display 0done.png  
#If you want the message in a Maximized window, hash out the previous line and un-hash the next line.          
          #display -backdrop 0done.png 


# End of Script  
Current main OS: MInt 21.3 with KDE Plasma 5.27 (using Compiz as WM) - Kernel: 6.5.0-15 on Lenovo m900 Tiny, i5-6400T (intel HD 530 graphics) 16GB RAM.
Sharks usually only attack you if you are wet
User avatar
lsemmens
Level 11
Level 11
Posts: 3949
Joined: Wed Sep 10, 2014 9:07 pm
Location: Rural South Australia

Re: HOWTO - prevent your Inkjet Nozzles from clogging (mostly)

Post by lsemmens »

Great solution. I am not in a business where inkjets are a necessary evil (I'm not in any business now - also brain injury) so my solution was to dispose of inkjet all together and go with a colour laser printer.

I purchase one at auction (ex govt) and only ever purchase my toner the same way. Just last week I purchased three toners (CMY) for the princely sum of $63AUD. I got black a couple of months back for less than that. If the printer dies, I'll donate it to my favourite political party, i.e. rubbish tip. Given that toners last for up to 20,000 pages I doubt that I'll need a new toner, or printer for a looong time.
Fully mint Household
Out of my mind - please leave a message
User avatar
rossdv8
Level 7
Level 7
Posts: 1736
Joined: Wed Apr 23, 2014 4:48 am
Location: Within 2,000 kilometres of Alice Springs, Australia
Contact:

Re: HOWTO - prevent your Inkjet Nozzles from clogging (mostly)

Post by rossdv8 »

I did something similar, and had a collection of B&W Lasers and a colour laser.

But some photographic images just 'seem' to work better in inkjet, especially printing A3 size or bigger) and some print to fabric jobs (my hobby now) have been traditionally inkjet based Dye Sublimation or Heat Transfer, although OKI lasers with white toner are making inroads into the heat transfer on coloured materials, especially cotton.
I also make my own satin-gloss photo paper for A2 size wall prints, and that uses inkjet.

Anyway, for people stuck with Inkjets for home use this is one 'simple' solution. I'm sure there are others.

Inkjets are so cheap now they are like Bic lighters. You can often buy a new inkjet printer with ink for less than the price of a new cartridge! But it's the amount of wasted ink trying to do head cleans to unblock nozzles that drove me crazy.
And yes, I do have syringes and head cleaner. And I refill my own laser cartridges and inkjet cartridges, although the refills seem less prone to clogging.

I found I use less ink just preventing the problem in the first place.
Current main OS: MInt 21.3 with KDE Plasma 5.27 (using Compiz as WM) - Kernel: 6.5.0-15 on Lenovo m900 Tiny, i5-6400T (intel HD 530 graphics) 16GB RAM.
Sharks usually only attack you if you are wet
User avatar
Lady Fitzgerald
Level 15
Level 15
Posts: 5805
Joined: Tue Jan 07, 2020 3:12 pm
Location: AZ, SSA (Squabbling States of America)

Re: HOWTO - prevent your Inkjet Nozzles from clogging (mostly)

Post by Lady Fitzgerald »

Over the long term, it is far more economical to repurpose an existing inkjet printer for target practice, then replace it with a laser printer. For occasional photo printing, one can farm them out to a pharmacy or other store that does photo printing.
Jeannie

To ensure the safety of your data, you have to be proactive, not reactive, so, back it up!
HaveaMint
Level 6
Level 6
Posts: 1085
Joined: Fri Feb 02, 2018 9:56 pm

Re: HOWTO - prevent your Inkjet Nozzles from clogging (mostly)

Post by HaveaMint »

I just use a tissue soaked in alcohol and wipe the print head a few times. Works good for me.
"Tune for maximum Smoke and then read the Instructions".
cliffcoggin
Level 8
Level 8
Posts: 2297
Joined: Sat Sep 17, 2016 6:40 pm
Location: England

Re: HOWTO - prevent your Inkjet Nozzles from clogging (mostly)

Post by cliffcoggin »

Why spend time and effort trying to solve a problem with a defective ink jet printer when one can avoid it with a laser printer?
Cliff Coggin
rene
Level 20
Level 20
Posts: 12212
Joined: Sun Mar 27, 2016 6:58 pm

Re: HOWTO - prevent your Inkjet Nozzles from clogging (mostly)

Post by rene »

Alternative solution: point a hairdryer at the nozzles for a bit.
User avatar
rossdv8
Level 7
Level 7
Posts: 1736
Joined: Wed Apr 23, 2014 4:48 am
Location: Within 2,000 kilometres of Alice Springs, Australia
Contact:

Re: HOWTO - prevent your Inkjet Nozzles from clogging (mostly)

Post by rossdv8 »

Why spend time and effort trying to solve a problem with a defective ink jet printer
Yep !! My point exactly.
Most of the time ink nozzle clogging is simply caused by lack of use, rather than a defect, and often it occurs in a printer only a couple of weeks old and maybe after paying a couple of hundred dollars. Most of my A3 inkjet printers used to fall into that price range and it is only recently they dropped to about $150 in my country.

A4 printers are disposable, like drink bottles, but why throw one away when a simple trick will keep them running flawlessly for years?

Right at this moment I have an Epson inkjet, a Brother inkjet and a HP inkjet, One is several years old, on is a year old and one is brand new. Each is used for a different type of colour printing, and none of the lasers can do what the inkjets are capable of.

The point of this post was simply to provide an easy way for Mint users who have had this problem and have had the pain in the neck hassle of fixing it, to prevent it in the future, and for users who have not had the problem (but who almost certainly would) to prevent it before it happens, and before they have to work out how to unclog nozzles with alcohol or hair dryers or propane torches..

Anyway, it's a simple preventative solution requiring a copy and paste and a few mouse clicks. If it saves someone some money - great. If nobody wants the idea, it's no loss.
Current main OS: MInt 21.3 with KDE Plasma 5.27 (using Compiz as WM) - Kernel: 6.5.0-15 on Lenovo m900 Tiny, i5-6400T (intel HD 530 graphics) 16GB RAM.
Sharks usually only attack you if you are wet
User avatar
Lady Fitzgerald
Level 15
Level 15
Posts: 5805
Joined: Tue Jan 07, 2020 3:12 pm
Location: AZ, SSA (Squabbling States of America)

Re: HOWTO - prevent your Inkjet Nozzles from clogging (mostly)

Post by Lady Fitzgerald »

rossdv8 wrote: Mon Jun 01, 2020 8:20 am
Why spend time and effort trying to solve a problem with a defective ink jet printer
Yep !! My point exactly.
Most of the time ink nozzle clogging is simply caused by lack of use, rather than a defect, and often it occurs in a printer only a couple of weeks old and maybe after paying a couple of hundred dollars. Most of my A3 inkjet printers used to fall into that price range and it is only recently they dropped to about $150 in my country.

A4 printers are disposable, like drink bottles, but why throw one away when a simple trick will keep them running flawlessly for years?

Right at this moment I have an Epson inkjet, a Brother inkjet and a HP inkjet, One is several years old, on is a year old and one is brand new. Each is used for a different type of colour printing, and none of the lasers can do what the inkjets are capable of.

The point of this post was simply to provide an easy way for Mint users who have had this problem and have had the pain in the neck hassle of fixing it, to prevent it in the future, and for users who have not had the problem (but who almost certainly would) to prevent it before it happens, and before they have to work out how to unclog nozzles with alcohol or hair dryers or propane torches..

Anyway, it's a simple preventative solution requiring a copy and paste and a few mouse clicks. If it saves someone some money - great. If nobody wants the idea, it's no loss.
You seem to be missing the point Cliff, I, and others have been trying to make. Your solution to the problem costs time and ink. Even though it's a small amount each time you employ your solution, it will add up over time. Using a laser printer simply eliminates the problem and the reduced printing cost per page won't take long to offset the cost of replacing an inkjet printer with a laser printer.

The only exception is if one needs to print photo quality prints frequently. However, for occasional photo quality prints, one can just put the files on a USB thumb drive and farm them out to a store that does photo processing or have it done online. it's far less expensive to do that than waste time, ink, etc. trying to maintain an inkjet.
Jeannie

To ensure the safety of your data, you have to be proactive, not reactive, so, back it up!
cliffcoggin
Level 8
Level 8
Posts: 2297
Joined: Sat Sep 17, 2016 6:40 pm
Location: England

Re: HOWTO - prevent your Inkjet Nozzles from clogging (mostly)

Post by cliffcoggin »

rossdv8 wrote: Mon Jun 01, 2020 8:20 am
Why spend time and effort trying to solve a problem with a defective ink jet printer
Yep !! My point exactly.
Most of the time ink nozzle clogging is simply caused by lack of use, rather than a defect,
I do realise that drying ink is the problem. To my way of thinking that is a defect, whether it be in the design or the construction, that I am not prepared to tolerate. It's a choice between cheap & troublesome and expensive & trouble-free. What suits one may not suit another.
Last edited by cliffcoggin on Fri Jun 05, 2020 4:41 am, edited 1 time in total.
Cliff Coggin
User avatar
Lady Fitzgerald
Level 15
Level 15
Posts: 5805
Joined: Tue Jan 07, 2020 3:12 pm
Location: AZ, SSA (Squabbling States of America)

Re: HOWTO - prevent your Inkjet Nozzles from clogging (mostly)

Post by Lady Fitzgerald »

cliffcoggin wrote: Mon Jun 01, 2020 3:09 pm
rossdv8 wrote: Mon Jun 01, 2020 8:20 am
Why spend time and effort trying to solve a problem with a defective ink jet printer
Yep !! My point exactly.
Most of the time ink nozzle clogging is simply caused by lack of use, rather than a defect,
I do realise that drying ink is the problem. To my way of thinking that is a defect, whether it be in the design or the construction, that I am not prepared to tolerate. It's a choice between cheap & troublesome and expensive & trouble-free. What suits one may suit another.
Actually, in the long run, laser printers are less expensive and more trouble free.
Jeannie

To ensure the safety of your data, you have to be proactive, not reactive, so, back it up!
User avatar
rossdv8
Level 7
Level 7
Posts: 1736
Joined: Wed Apr 23, 2014 4:48 am
Location: Within 2,000 kilometres of Alice Springs, Australia
Contact:

Re: HOWTO - prevent your Inkjet Nozzles from clogging (mostly)

Post by rossdv8 »

This post was not about the pros and cons about inkjet vs other types of printers.
It was about a way to prevent one of the most annoying problems with what is arguably the most common type of entry level printer many Linux Mint users will have been sold.

As for cost of ownership, as much as printer manufacturers hate the idea, refillable chipped cartridges are cheap and high quality brand specific ink can easily be bought by the litre for about the price of one refill. Making long term ownership of these devices cost effective, at the expense of a few rainbow coloured fingertips for a day or so.

The fact still remains that if they are sitting unused, inkjet printers of all brands end up with nozzle clogs. And doing one small print job a day can prevent it happening.

I agree, Colour Lasers are great for some jobs. For certain jobs they are as good as, or even better than Inkjet printers. But most colour lasers suck at photo printing. And I am sick of throwing out heavy bulky laser printers every time they break.
Inkjets are also great for some jobs, and for certain jobs they are as good as Laser printers. But most Inkjet printers suck at vivid colours for advertising logos and artwork. And they are often lousy when there's a chance the image will get wet.

Again - the post was not aimed at laser vs inkjet practicality.

If you are stuck with an inkjet for whatever reason, printing one small test page each day can stave off the inevitable nozzle clog.
Relying on memory to print a test page each day often means a week or two can go by without anything at all being printed, resulting in a clogged print head on the very day you really need to print something important.

So, the idea in the first post in this thread is for those of us who for one reason or another, have an inkjet printer, and do not want to buy another printer, and do not want to waste a heap of time trying tun unclog a print head.
If you are only using the thing as a hobby, and also printing a lot every day - maybe a cartridge refill kit (about the cost of a new printer) is a better option. But even then, keeping nozzles clear is worthwhile.
Current main OS: MInt 21.3 with KDE Plasma 5.27 (using Compiz as WM) - Kernel: 6.5.0-15 on Lenovo m900 Tiny, i5-6400T (intel HD 530 graphics) 16GB RAM.
Sharks usually only attack you if you are wet
User avatar
lsemmens
Level 11
Level 11
Posts: 3949
Joined: Wed Sep 10, 2014 9:07 pm
Location: Rural South Australia

Re: HOWTO - prevent your Inkjet Nozzles from clogging (mostly)

Post by lsemmens »

Thank you Ross, I got your point. I'm guilty of causing the thread drift to the pros and cons of Laser vs Inkjet. Yes! for the average Joe, a laser printer is going to serve better in the long run. If you have need for an inkjet, sadly, you need an inkjet.
Fully mint Household
Out of my mind - please leave a message
User avatar
rossdv8
Level 7
Level 7
Posts: 1736
Joined: Wed Apr 23, 2014 4:48 am
Location: Within 2,000 kilometres of Alice Springs, Australia
Contact:

Re: HOWTO - prevent your Inkjet Nozzles from clogging (mostly)

Post by rossdv8 »

And my apologies for sounding defensive.

I love Laser printers and only stopped using them when they became irrelevant to what I needed to do. However that doesn;t stop me keeping both a colour toner and a black toner laser for Justin.

Since I retired my interest lies in various uses for photographs and I find the A4 and A3 inkjet printers are essential to this. Sadly, some of them tend to sit idle, causing the nozzle problem. With some of the people who used to be customers dropping printers in for me to clear nozzles manually, I realised just how many people might have the clogging problem, and thought I would share one preventative solution that works (mostly) for me.
Current main OS: MInt 21.3 with KDE Plasma 5.27 (using Compiz as WM) - Kernel: 6.5.0-15 on Lenovo m900 Tiny, i5-6400T (intel HD 530 graphics) 16GB RAM.
Sharks usually only attack you if you are wet
User avatar
Portreve
Level 13
Level 13
Posts: 4870
Joined: Mon Apr 18, 2011 12:03 am
Location: Within 20,004 km of YOU!
Contact:

Re: HOWTO - prevent your Inkjet Nozzles from clogging (mostly)

Post by Portreve »

rossdv8 wrote: Sat May 30, 2020 8:42 pm WARNING !
This is one of my 'Long and rambling' posts (I have brain injuries) - but it might be useful for newbies who don;t print much and are sick of finding the ink in their inkjet nozzles is dried when they do need to print. It usually happens when you urgently need to print a resume :-)
Thank you so much for your how-to contribution, rossdv8. I'm going to save that script because it might be adaptable for something else.

I haven't owned an inkjet printer in about a decade. I use a monochrome laser printer and go to either Walgreens or Walmart on those 2-3 times a year that I need to print a color photo.
Flying this flag in support of freedom 🇺🇦

Recommended keyboard layout: English (intl., with AltGR dead keys)

Podcasts: Linux Unplugged, Destination Linux

Also check out Thor Hartmannsson's Linux Tips YouTube Channel
BrianI
Level 2
Level 2
Posts: 72
Joined: Fri Apr 12, 2019 6:13 am
Location: Fife, Scotland

Re: HOWTO - prevent your Inkjet Nozzles from clogging (mostly)

Post by BrianI »

I've currently got an HP all in one inkjet printer / scanner device. It's a few years old now, but I've ran it with an external CISS system since new. I'll probably be replacing it soon with an A3 photo printer (Again with a CISS system) since I'm now into photography, much more satisfying printing & mounting your images at home.

It's a good tip to print a test page now and again, rather than running the inkjet printer clean cycle, which dumps ink onto the foam pads deep within the printer, which cannot be removed for cleaning & reuse! Apparently, printer manufacturers make their money through sale of ink, rather than printers!
User avatar
rossdv8
Level 7
Level 7
Posts: 1736
Joined: Wed Apr 23, 2014 4:48 am
Location: Within 2,000 kilometres of Alice Springs, Australia
Contact:

Re: HOWTO - prevent your Inkjet Nozzles from clogging (mostly)

Post by rossdv8 »

Thanks Portreve
I'm going to save that script because it might be adaptable for something else.
I use part of the script as a reminder for things like hospital appointments. Part of the script copies the pop up to my Wallpaper folder and I can set it on one of my Virtuous Desktops if I want something that gets my attention at odd times.
Like the Printer Test script, I just list it in my Startup in Settings and can turn it on and off at will. All I do is edit it for the next appointment.

In case anyone less familiar with bash is trying this I've annotated the script (using # lines) so it is easier to follow.
If you see 'append -s nnn ', the nnn means digits (like -s 140 -g 5)

Code: Select all

#!/bin/bash
# RossDV8's MESSAGE Pop Up --needs imagemagick --needs espeak
# imagemagick is usually in a Default Mint install.  If not: $ sudo apt install imagemagick
# I name my message scripts something like 0message.sh   So I can find them easily in a folder
# if desired: $ sudo apt install espeak   (hash out the espeak line if you don't want it announcing)

# Remove previous message       (script will replace it again -with any changes- when you run it)
# make sure you use the SAME DIRECTORY path for rm (Remove file) and cp (Copy file to a Destination Directory)

 rm Appt-reminder.png
 rm /home/ross/Wallpaper/Appt-reminder.png
 
 # announce with SPEECH before pop up message
 # put your SPOKEN message words after espeak between "    "
 # Weird spelling like Mack eye (for Mackay), is to give some semblance of normal sound to speech
 # append -s nnn to adjust speed of speech and -g nn  to adjust gap between words
 
espeak "Mack eye Base Hospital, 

Appointment for Telehealth Video consultation 

Thursday 21st of May about onefifty pm

EXPECT an SMS before two confirm" -s 140 -g 5

# Make New Message
# create the TEXT message to pop up on the screen
# put the WRITTEN message words after label: between '    '
# Do NOT leave spaces between \n (newlines) i.e. do NOT put new lines 'ON New Lines'
# Change -pointsize and -size to fit text on your display

 convert -background white -fill blue -font Arial -pointsize 100 -size 1300x900  \
          -gravity center \
          label:'Mackay Base Hospital\n1.50pm\nAppt Thursday 21st\n1.50pm\nVideo call\nEXPECT SMS' \
          Appt-reminder.png 
          
          # Copy message to a Destination Directory
          
          cp Appt-reminder.png /home/ross/Wallpaper/
          
          # Show Message when job is done (-backdrop displays in Maximized window)

          display -backdrop Appt-reminder.png
 
# End of Script  
Current main OS: MInt 21.3 with KDE Plasma 5.27 (using Compiz as WM) - Kernel: 6.5.0-15 on Lenovo m900 Tiny, i5-6400T (intel HD 530 graphics) 16GB RAM.
Sharks usually only attack you if you are wet
User avatar
rossdv8
Level 7
Level 7
Posts: 1736
Joined: Wed Apr 23, 2014 4:48 am
Location: Within 2,000 kilometres of Alice Springs, Australia
Contact:

Re: HOWTO - prevent your Inkjet Nozzles from clogging (mostly)

Post by rossdv8 »

U P D A T E - A SIMPLER WAY

I was messing around with command line stuff (as usual) and I wondered if I could bypass my bash script.
I mentioned that I use the script to not only print a test page, but to display an announcement that it has been done as a large popup on the screen.

Recently I found a handy calendar program 'Borg Calendar' and have been using that for medical appointments in conjunction with my script, and thought I might simply bypass the script.
Now, my script uses the command line to send a specific page to a particular printer, but what if I only had one inkjet installed.

I discovered I can sent the standard CUPS test page to whichever CUPS printer is the default by using:

Code: Select all

lpr /usr/share/cups/data/testprint
This works the same way, just using that command in:
Settings > Session and Startup > Autostart Applications
> At login

(in Mint Xfce) - and wherever the equivalent settings are in Cinnamon and Mate.

And it is a whole lot simpler than bothering with a bash script, although as someone pointed out, the bash script can be adapted to a lot of other uses, like big popup reminders..
Current main OS: MInt 21.3 with KDE Plasma 5.27 (using Compiz as WM) - Kernel: 6.5.0-15 on Lenovo m900 Tiny, i5-6400T (intel HD 530 graphics) 16GB RAM.
Sharks usually only attack you if you are wet
Post Reply

Return to “Tutorials”