What is involved in writing a Printer Driver? - SOLVED
What is involved in writing a Printer Driver? - SOLVED
Just before switching to MX, my printer died. I looked for a new printer that had Linux support and found a Canon TR8520 "all in one" printer that stated that they had a Linux driver, so I bought the printer. I used it for a while on Windows 7 and liked its features. Then I changed over the computer's OS to MX and downloaded the Linux driver from the Canon site. The first time I tried to print from MX I discovered that something was amiss. This Linux driver only allows you to print from the cassette on one side of the paper, doesn't allow you to print from the rear tray and can't scan from the printer to the computer as it did under Windows 7. I called Canon tech support and was told that "they chose not to include the additional functions in the Linux driver". Great!
The printer download from the Canon site included the source code for the driver, but the chances are that it only reflects the functions that the Linux driver supports. I would like to be able to use all of the available functions that were included in the Windows driver and in order to do this, I will need to write some driver code. The only problem is that my only programming experience was with BASICA in the 1980s. What is involved in writing a driver for this printer? Am I likely to need more documentation from Canon in order to see how to implement the additional functions that I want? Which programming language would be best to use? Like I said, I haven't done any programming in years, but I'm not adverse to learning something new unless those of you who are more knowledgeable think that I would probably be in over my head. Any information will be appreciated.
The printer download from the Canon site included the source code for the driver, but the chances are that it only reflects the functions that the Linux driver supports. I would like to be able to use all of the available functions that were included in the Windows driver and in order to do this, I will need to write some driver code. The only problem is that my only programming experience was with BASICA in the 1980s. What is involved in writing a driver for this printer? Am I likely to need more documentation from Canon in order to see how to implement the additional functions that I want? Which programming language would be best to use? Like I said, I haven't done any programming in years, but I'm not adverse to learning something new unless those of you who are more knowledgeable think that I would probably be in over my head. Any information will be appreciated.
Last edited by Falcon on Wed Sep 25, 2019 12:45 pm, edited 1 time in total.
Re: What is involved in writing a Printer Driver?
Yup, way over your head, mine too
... Canons are pretty notorious for minimal Linux support ... that's why there are developer PPAs for Ubuntu-based distros to deal with the lack ... Unfortunately pure Debian/Debian-based distros like MX don't recommend using PPAs ... NEVER ... they'll bork your system.
If you installed all the software from the Canon site, you should have no problem printing ... also if you installed the ScanGear MP .deb you should be able to scan as well ... but not with native Debian scanner apps ... so ....
(1) Turn on your printer, turn the scanner off then on (you only have to do this once so that the driver is detected)
(2) To run ScanGear, you open a terminal session and type
Cheers

If you installed all the software from the Canon site, you should have no problem printing ... also if you installed the ScanGear MP .deb you should be able to scan as well ... but not with native Debian scanner apps ... so ....
(1) Turn on your printer, turn the scanner off then on (you only have to do this once so that the driver is detected)
(2) To run ScanGear, you open a terminal session and type
Code: Select all
scangearmp2
Re: What is involved in writing a Printer Driver?
CrackMeUp,
Thanks for the reply.
I installed both the printer driver and the Scangear driver. Unfortunately I can only print on one side of the paper from the cassette. Can't print double-sided and can't print from the rear tray at all, which makes it pretty much useless if I want to print photos.
Using Scangear from the computer, I can scan either a single sheet from the platen, or multiple sheets from the document feeder. But I can't scan multiple sheets from the platen and combine them in a single document like I can with the Windows version. I guess I'll have to keep my older computer on Windows 7 so that I can still utilize the full set of features that the printer offers.
Thanks for the reply.
I installed both the printer driver and the Scangear driver. Unfortunately I can only print on one side of the paper from the cassette. Can't print double-sided and can't print from the rear tray at all, which makes it pretty much useless if I want to print photos.
Using Scangear from the computer, I can scan either a single sheet from the platen, or multiple sheets from the document feeder. But I can't scan multiple sheets from the platen and combine them in a single document like I can with the Windows version. I guess I'll have to keep my older computer on Windows 7 so that I can still utilize the full set of features that the printer offers.
Re: What is involved in writing a Printer Driver?
While this statement is, in general, true there is one way I know of to make it work and work cleanly. Take the source code and compile it on your system to generate a .deb file. Then install the .deb file.CrackMeUp wrote: Wed Sep 11, 2019 12:37 pm Unfortunately pure Debian/Debian-based distros like MX don't recommend using PPAs ... NEVER ... they'll bork your system.
For the first few years of my Linux life, I did this with darktable and it worked out quite well.
Of course, this only makes sense if you can find a PPA that includes a driver for your printer that supports all the functionality of the printer.
AsusTek PRIME B450-Plus
AMD Ryzen 7 2700 (8-Core, 16 threads)
Radeon HD 6570/7570/8550 / R5 230
Realtek RTL8111/8168/8411 - driver: r8169
Samsung SSD 860 EVO 500GB
DDR4 3200MHz CL16 2x8GB
AMD Ryzen 7 2700 (8-Core, 16 threads)
Radeon HD 6570/7570/8550 / R5 230
Realtek RTL8111/8168/8411 - driver: r8169
Samsung SSD 860 EVO 500GB
DDR4 3200MHz CL16 2x8GB
Re: What is involved in writing a Printer Driver?
If you do find a PPA, you can post the details in the Package Requests subforum and ask the Packaging Team if the packages within the PPA are compatible with MX18 or whether the packaging team would be able to rebuild it to be Debian-compatible.
https://mxlinux.org/wiki/help-files/mx-faqs/
Important thing is to ask first.
https://mxlinux.org/wiki/help-files/mx-faqs/
Important thing is to ask first.
Desktop: Intel i5-4460, 16GB RAM, Intel integrated graphics
Clevo N130WU-based Ultrabook: Intel i7-8550U (Kaby Lake R), 16GB RAM, Intel integrated graphics (UEFI)
ASUS X42D laptop: AMD Phenom II, 6GB RAM, Mobility Radeon HD 5400
Clevo N130WU-based Ultrabook: Intel i7-8550U (Kaby Lake R), 16GB RAM, Intel integrated graphics (UEFI)
ASUS X42D laptop: AMD Phenom II, 6GB RAM, Mobility Radeon HD 5400
Re: What is involved in writing a Printer Driver?
Gentlepersons,
Thanks for the ideas and suggestions about this issue. Rather than asking the developers to do a bunch of work for me to try to get this printer functioning fully on MX, it's probably easier to just keep Windows 7 on my older computer and use it in the instances where I need the additional features of the printer. These printers don't last forever, and when it dies, then I will be back to square one trying to find another printer that will work with Linux and asking someone to try to modify a PPA file for me. While it's not the best solution, I think that using the Windows computer is the easiest solution for everyone in the long run.
Thanks for the ideas and suggestions about this issue. Rather than asking the developers to do a bunch of work for me to try to get this printer functioning fully on MX, it's probably easier to just keep Windows 7 on my older computer and use it in the instances where I need the additional features of the printer. These printers don't last forever, and when it dies, then I will be back to square one trying to find another printer that will work with Linux and asking someone to try to modify a PPA file for me. While it's not the best solution, I think that using the Windows computer is the easiest solution for everyone in the long run.
Re: What is involved in writing a Printer Driver?
@ Falcon
BTW Win 7 is dead/obsolete/kaput come January 2020 ... you obviously made a bad (luck) choice purchasing that printer ... one of the very few that don't function well/completely with Linux OSes. In my experience with Canons, the Linux drivers (even third-party) are very limited and do not exploit all the features of the printer ... sell the sucker and get yourself a similar HP product ... No-brainer and work(s) OOTB ... any Linux OS will automatically detect/download the drivers for full functionality ... choose the model that fits your needs and go for it ...
https://developers.hp.com/hp-linux-imag ... ices/index ...
Cheers
BTW Win 7 is dead/obsolete/kaput come January 2020 ... you obviously made a bad (luck) choice purchasing that printer ... one of the very few that don't function well/completely with Linux OSes. In my experience with Canons, the Linux drivers (even third-party) are very limited and do not exploit all the features of the printer ... sell the sucker and get yourself a similar HP product ... No-brainer and work(s) OOTB ... any Linux OS will automatically detect/download the drivers for full functionality ... choose the model that fits your needs and go for it ...
https://developers.hp.com/hp-linux-imag ... ices/index ...
Cheers
Re: What is involved in writing a Printer Driver?
When you do shop for another printer, check it first at http://www.openprinting.org/printers/ to see how well or poorly it works under Linux.Falcon wrote: Thu Sep 12, 2019 10:03 am Gentlepersons,
Thanks for the ideas and suggestions about this issue. Rather than asking the developers to do a bunch of work for me to try to get this printer functioning fully on MX, it's probably easier to just keep Windows 7 on my older computer and use it in the instances where I need the additional features of the printer. These printers don't last forever, and when it dies, then I will be back to square one trying to find another printer that will work with Linux and asking someone to try to modify a PPA file for me. While it's not the best solution, I think that using the Windows computer is the easiest solution for everyone in the long run.
Please read the Forum Rules, How To Ask For Help, How to Break Your System and Don't Break Debian. Always include your full Quick System Info (QSI) with each and every new help request.
Re: What is involved in writing a Printer Driver?
@JayM
The link you offered is handy, but unfortunately outdated in it's compatibility database, especially as new printer/model versions are concerned, e.g., the OP's printer (Canon TR8520) isn't even listed ... many others as well ... could list many other reasons not to fully trust their database ... Google-it yourself and you'll get the picture ... therefore, HP is, de facto, one's best choice simply because Linux systems already have the HPLIP software installed ... Google-it yourself and you'll get the picture ...
The link you offered is handy, but unfortunately outdated in it's compatibility database, especially as new printer/model versions are concerned, e.g., the OP's printer (Canon TR8520) isn't even listed ... many others as well ... could list many other reasons not to fully trust their database ... Google-it yourself and you'll get the picture ... therefore, HP is, de facto, one's best choice simply because Linux systems already have the HPLIP software installed ... Google-it yourself and you'll get the picture ...

Re: What is involved in writing a Printer Driver?
Guys,
Thanks for the info on the HP printer. I'm sure that I can find someone to give the Canon printer to who will be using the Windows 7 or 10 OS. So are you saying that I can just buy any HP printer and be sure that it will be fully functional? If so, great! I've got a lot of Reward Points stacked up on Amazon and a new printer might be a good way to make use of them.
I only use the Windows 7 computer to run a couple of programs that I need that have no Linux counterpart. When Microsoft ends support for 7, the computer will still be usable for what I need.
BTW I put a Review of the TR8520 printer on Amazon telling prospective buyers that it's Linux support is almost worthless. I hope that someone will think twice before buying it and trying to make it work with their Linux computer.
Thanks for the info on the HP printer. I'm sure that I can find someone to give the Canon printer to who will be using the Windows 7 or 10 OS. So are you saying that I can just buy any HP printer and be sure that it will be fully functional? If so, great! I've got a lot of Reward Points stacked up on Amazon and a new printer might be a good way to make use of them.
I only use the Windows 7 computer to run a couple of programs that I need that have no Linux counterpart. When Microsoft ends support for 7, the computer will still be usable for what I need.
BTW I put a Review of the TR8520 printer on Amazon telling prospective buyers that it's Linux support is almost worthless. I hope that someone will think twice before buying it and trying to make it work with their Linux computer.