I want lp to print to a default printer and can set this using lpoptions -d , but I can't find a way to set the default media size. Is there any way to do this with some lp... command or do I need to edit some config file?
11 Answer
Suppose DESTINATION is the name of a print queue (as shown, for example, in a print dialog). Obtain a list of printer specific options and their current settings with lpoptopns -p DESTINATION -l. It will contain a section for PageSize.
Let's say you want A4 as the default media size. Do lpoptopns -p DESTINATION -o PageSize=A4.
(Now read the lpoptions manual - man lpoptions).