a2ps exits with 'unknown medium libpaper' error when file /etc/papersize is missing

Bug #149551 reported by James Troup
12
This bug affects 1 person
Affects Status Importance Assigned to Milestone
a2ps (Ubuntu)
Confirmed
Undecided
Unassigned

Bug Description

Binary package hint: a2ps

$ a2ps halp.txt
a2ps: unknown medium `libpaper'

This is a brand new gutsy install. Was working fine in feisty.

Revision history for this message
Jean-Baptiste Lallement (jibel) wrote :

This error occurs when the file /etc/papersize is missing.

Just run the following command to correct this error.
sudo echo "letter" > /etc/papersize

man papersize for a detailed help about papersize.

But indeed there is a bug because a2ps should fallback to a default value if /etc/papersize doesn't exists.

Since this bug has enough information provided for a developer to begin work, I'm going to mark it as confirmed and let them handle it from here. Thanks for taking the time to make Ubuntu better!

Changed in a2ps:
status: New → Confirmed
Revision history for this message
pablomme (pablomme) wrote :

This bug is still present in natty.

The workaround works, but I should point out that the command in the previous post will not work because redirection is performed by the user's shell, it cannot be intercepted by "sudo". Instead one should do:
echo letter | sudo tee -a /etc/papersize

Revision history for this message
Ross Reedstrom (reedstrm) wrote :

This hit me as well on quantal.
BTW, rather than doing the 'tee' dance, you can just use bash:
sudo bash -c 'echo letter >/etc/papersize'

To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.