Jamie McClelland: Administering CUPS from the command line
I usually try to avoid administering printers whenever possible. As a result I end of flailing around the CUPS web interface before I figure out how to re-enable a printer. And, when I get a call to help debug a printer, I can't easily tell people what to do.
When I try to do what I need via the command line, I end up spending at least 10 or 15 minutes re-reading man pages before I piece together the steps.
Here's my attempt to document the steps so I don't have to re-read man pages.
Setup
In these examples, the printer name in question is:
stability and it is a network printer, with local DNS that properly resolves the hostname stability to an IP address.
The cups commands in these examples can be run as a non-root user if that user is in the lpadmin group.
Type:
groups
To see if lpadmin is listed. If not:
sudo adduser <your-user-name> lpadmin
Then, to gain access to the new group without logging out and logging in again:
newgrp lpadmin
Network access
First, try to ping the printer:
ping stability
If this fails, restart the printer and/or check network cables. No point in doing anything else until it responds to pings.
Can't submit new jobs to the printer
Next, if the problem is that the printer is greyed out when you try to print a document or your application tells you that the printer is rejecting jobs, confirm this status with:
lpstat -a stability
It will either output:
stability accepting requests since Mon 20 May 2013 10:28:57 AM EDT
Or
stability not accepting requests since Mon 20 May 2013 10:28:57 AM EDT -
Rejecting Jobs
If it is rejecting jobs, try:
/usr/sbin/cupsaccept stability
Accepts new jobs, but just doesn't print
On the other hand, if the printer is accepting jobs, but the jobs are not printing, find out if the printer is enabled with:
lpstat -p stability
You should get either:
printer stability is idle. enabled since Mon 20 May 2013 10:28:57 AM EDT
Or:
printer stability disabled since Mon 20 May 2013 10:35:10 AM EDT -
Paused
If it is disabled, you should first see what queued jobs there are:
lpq
If you have a list of duplicate pending jobs, be sure to delete the duplicates to avoid having your print job come out multiple times.
To delete a queued job, type the following (n should be the number in the Job column of the lpq output):
cancel <n>
After you have deleted duplicate jobs, try "enabling" it:
/usr/sbin/cupsenable stability
Then, re-rerun the lpq command and see if it's now "ready." At this point, the jobs should start printing.
Review of concepts
For review... a few important concepts:
- cupsaccept/cupsreject: controls whether a printer will accept or reject new jobs. It doesn't matter whether the printer is enabled or disabled.
- cupsenable/cupsdisable: controls whether a printer will print existing jobs. It doesn't matter whether the print is accepting or rejecting new jobs.
Occasionally, someone asks me whether we should encourage use of the --ask-cert-level option when certifying OpenPGP keys with gpg. I see no good reason to use this option, and i think we should discourage people from trying to use it. I don't think there is a satisfactory answer to the question "how will specifying the level of identity certification concretely benefit anyone involved?", and i don't see why we should want one. gpg gets it absolutely right by not asking users this question by default. People should not be enabling this option. Some background: gpg's --ask-cert-level option allows the user who is making an OpenPGP identity certification to indicate just how sure they are of the identity they are certifying. The user's choice is then mapped into four levels of OpenPGP certification of a User ID and Public-Key packet, which i'll refer to by
You may not know this, but I am a huge PowerDNS fan. This may be because it is so simple to use, supports different databases as backends or maybe just because I do not like BIND, pick one.
I also happen to live in Germany where ISPs usually do not give static IP-addresses to private customers. Unless you pay extra or limit yourself to a bunch of providers that do good service but rely on old (DSL) technology, limiting you to some 16MBit/s down and 1MBit/s up. Luckily my ISP does not force the IP-address change, but it does happen from time to time (once in a couple of month usually). To access the machine(s) at home while on a non-IPv6-capable connection, I have been using my old (old, old, old) DynDNS.com account and pointing a CNAME from under die-welt.net to it.
Some time ago, DynDNS.com started supporting AAAA records in their zones and I was happy: no need to type hostname.ipv6.kerker.die-welt.net to connect via v6 just let the application decide. Well, yes, almost. It s just DynDNS.com resets the AAAA record when you update the A record with ddclient and there is currently no IPv6 support in any of the DynDNS.com clients for Linux. So I end up with no AAAA record and am not as happy as I should be.
Last Friday I got a mail from DynDNS:
Or rather, hello Planet!
Here s a somewhat traditional introductory post.
I m Nicolas Dandrimont, I m French, I m sysadmin in a
besides working on the preparation of the
Today, I played at TC Cantincrode in Mortsel, Belgium, in the first
round. This is the first year I'm playing tennis competitively, so I
was expecting to lose by a pretty wide margin. Now while I didn't win,
the margin wasn't as wide as I'd expected; 6/4 - 6/3 isn't too bad for
the non-ranked beginner that I am. For comparison: I lost my previous
match with 6/2 - 6/0, and I was not unhappy about that.
Part of this was due to my opponent (by his own admission) not
playing his best; but still, I'm quite happy about my result here.
My next match probably won't be as good. Oh well.
I use RSS feeds to keep up with academic journals. Because of

PyBit is a distributed build system able to build packages in response to VCS commits or other triggers, across multiple architectures, multiple clients and multiple build environments with automated uploads to a nominated repository.
Most UNIX users have heard of the
Thanks to
The
One of the most exciting places to view the Matterhorn is from the nearby observatory at
The scenic train to Zermatt is included in any of the Swiss rail passes, but the train up to Gornergrat is a private railway and a special ticket must be purchased. Discounts are sometimes offered at rail stations in Swiss cities or