Fix Lubuntu 14.10 printers with QCAD 3.7.5

Tips and tricks you want to share with other users. Tutorials, user submitted documentation, etc.

Moderator: andrew

Post Reply
decook2k
Registered Member
Posts: 1
Joined: Mon Jan 19, 2015 2:28 pm

Fix Lubuntu 14.10 printers with QCAD 3.7.5

Post by decook2k » Mon Jan 19, 2015 3:40 pm

I recently had to change from an old version of SUSE that went out of life. For me, that usually represents a challenge, as I firmly believe that one (well, me) should get the most of their computer hardware.

I have a 15+ year old Compaq EVO that I do my amateur design work. Everytime something goes out of life, it's time to shop around for the best lightweight linux version I can find. So, over the Christmas 2014 holiday, I elected to convert to Lubuntu 14.10.

There are a few bugs still in this new O/S, but overall I'm pretty impressed that it functions well and pretty fast too. One of my big requirements, of course, is that QCAD community work with whatever I'm using. I figured it was time to upgrade this too, so I installed version 3.7.5 to go with my brand new Lubuntu load. All went well with no surprises, that is until I went to print a target so that my son and I could shoot the pellet gun the the backyard. I didn't have a printer except for the choice to print to PDF or Postscript. Yes, I can CLI print, but I didn't like that. That's not how any of this is supposed to work. So, it's on with the challenge to get it working to my satisfaction.

Please keep in mind, this how-to was only used to fix Lubuntu 14.10; it may or may not exactly help you on your version, but the overall flow and information should get you in the ballpark.

Here are the four Steps I used to get it working. For those experienced with Unix and Unix like systems, I'll briefly list the steps, with the expanded explanations below.

Step 1. Edit the /etc/cups/cupsd.conf file to insert a line “Printcap /etc/printcap”
Step 2. Reset the printing processes
Step 3. Reset the Printcap environment
Step 4. Test and verify, recreate the printer objects if necessary


Step 1. Edit the /etc/cups/cupsd.conf file with your favorite editor. Most like some sort of a gui, so this should work on most (all?) versions of Ubuntu or Lubuntu. See * See appendix a if you cannot save it due to a read-only status.
a. Open a terminal session by clicking
Panel (aka Start) → Accessories → LXTerminal
b. Type in
sudo /etc/cups/cups.conf
c. search for the word “Printcap” and see if it reads Printcap /etc/printcap. If not, or the line is not found, then:
d. Prepare a new line starting with a crosshatch, and give it a documenting label. Then immediately below that insert the wording
Printcap /etc/printcap
PS, case is important here. Here's an example
….
# Setting printcap environment to make compatible with qcad printing
Printcap /etc/printcap
….
Save off the file.

Step2. Reset the printing environment
a. Good luck. Perhaps it is my misunderstanding of Ubuntu and/or Ubuntu like systems, but I could not reset or shut down cupsd. I tried various ways all the way including an over-agressive pid kill resulting in crashing my O/S. I resigned to rebooting it; it crashed anyway. In retrospect, it might have not even been needed. You might try Step 3 instead of the reboot, you may find it works just fine.

Step3. Set the Printcap environment to use the new setting you just specified.
a. Start up QCAD and see if your printer(s) are visible. If they are, go to Step 4. If not, then:
b. Go back to your terminal session or open new one as in Step1, a.
c. Use this command
sudo /usr/sbin/cupsd -c /etc/cups/cupsd.conf
This command sets cups daemon to use the cupsd.conf file instead of the one in /var/run/cups/printcap which QCAD doesn't recognize.

Step 4. Testing and verifying the printers in QCAD
Run QCAD and you should see your printers in the drop down box when you choose Print. Make up rectangle or something simple and print it. If it works, you're done. If not, then open up the Printers program and just delete and re-create your printers. Click
Panel (aka Start) →System Tools → Printers
. Now test it out and it should work properly.

Step 5. One last step if needed. I have a laptop that was installed the same day. I followed my instructions to the letter and it still didnt work. Through research I found that the link to /etc/printcap was missing. This command will fix that, and it fixed my printer.
sudo ln -s /var/run/cups/printcap /etc/printcap
Appendix a. Editing the darned files.
I tried everything I could to stop the service that held open the cupsd.conf file, including going into the O/S in single user mode. Maybe it's me, maybe it's a bug in the bleeding edge of Lubuntu 14.10, it just wouldn't happen. Here's what I did to get around the openfile issue:
a. Open Lubuntu Software Center
b. Click on the Installed Software tab
c. In the search box, type in
cups
d. Click on cups common and remove it from the system. Now you are ready to go back to Step 1 and start all over again. After you finish Step 1 and before you go to Step 2, reinstall cups common to your O/S.
Last edited by decook2k on Mon Jan 19, 2015 6:36 pm, edited 1 time in total.

User avatar
andrew
Site Admin
Posts: 5552
Joined: Fri Mar 30, 2007 6:07 am

Re: Fix Lubuntu 14.10 printers with QCAD 3.7.5

Post by andrew » Mon Jan 19, 2015 3:45 pm

Thanks for your contribution. I've moved this topic to the 'Tips and Tutorials' section.

daibach142
Registered Member
Posts: 1
Joined: Fri Feb 22, 2013 12:14 am

Re: Fix Lubuntu 14.10 printers with QCAD 3.7.5

Post by daibach142 » Sun Jul 26, 2015 10:01 pm

In fact, the only thing you need to do is step 5 above, i.e.

Code: Select all

sudo ln -s /var/run/cups/printcap /etc/printcap

mghayes
Newbie Member
Posts: 3
Joined: Mon Aug 03, 2015 12:38 am

Re: Fix Lubuntu 14.10 printers with QCAD 3.7.5

Post by mghayes » Tue Aug 04, 2015 11:51 pm

I am running Zorin OS 10 which is based on Ubuntu 15.04, and I had the same problem. I also ran just the last line (sudo ln -s /var/run/cups/printcap /etc/printcap) in terminal and it fixed the problem.

Many thanks, Michael.

Post Reply

Return to “QCAD Tips and Tutorials”