Page 1 of 1

How to change Printer's Default Settings via CLI?

PostPosted: Jul 23rd, '13, 12:47
by LaCiccia
Hi everyone,
I have an Epson all-in-one printer, set to to work in the home wireless network so that 3 PCs (2 laptops, 1 desktop computer) can share it for their own purposes.

How can I set Mageia to change its default settings so that it prints documents as duplex (2-sided printing)? I tried changing the feature in the Printing application but it reverts to "One-sided": Mageia Menu > Applications > Tools > System Tools > Printing > type in root password > select printer > Printer's Properties > select Job Options from the side menu > Common Options > Sides: choose between "One-sided", "Two-sided (long edge)", "Two-sided (short edge)".
Even the web interface of CUPS shows that the default setting is "One-sided" printing and I don't know how to change it. I'm guessing I might have to resort to Kterminal.
I'm attaching 2 pictures, please have a look at them and let me know what I can do to fix this problem.
Thank you for your time.

Re: How to change Printer's Default Settings via CLI?

PostPosted: Jul 23rd, '13, 13:26
by David_Batson

Re: How to change Printer's Default Settings via CLI?

PostPosted: Jul 24th, '13, 17:16
by LaCiccia
Hi,
Thanks for the suggestions, David_Batson. Apparently, Mageia can't see the duplex option of my printer. Can you guide me to set it, please?
Here's what I did in the Terminal with the 2 commands, lpoptions -l and lpadmin:
Code: Select all
[aliquis@localhost ~]$ su --
Password:
[root@localhost aliquis]# pwd
/home/aliquis
[root@localhost aliquis]# lpoptions -l
PageSize/Paper Size: 4X6FULL T4X6FULL 2L T2L 4X7 T4X7 *A4 TA4
Quality/Quality: PMPHOTO_NORMAL PLATINA_NORMAL GLOSSYPHOTO_NORMAL GLOSSYCAST_NORMAL *PLAIN_NORMAL PLAIN_HIGH PMMATT_NORMAL
Ink/Ink: COLOR *MONO
[root@localhost aliquis]# ^C
[root@localhost aliquis]# lpadmin -l
lpadmin: Unknown option "l".
[root@localhost aliquis]# lpadmin -o Duplex=Two-sided(long-edge)
bash: syntax error near unexpected token `('
[root@localhost aliquis]# lpadmin -o Duplex=TWOSIDED_LONGEDGE
lpadmin: Unable to set the printer options:
         You must specify a printer name first.
[root@localhost aliquis]# exit
exit
[aliquis@localhost ~]$

Re: How to change Printer's Default Settings via CLI?

PostPosted: Jul 24th, '13, 20:46
by doktor5000
LaCiccia wrote:[root@localhost aliquis]# lpadmin -o Duplex=Two-sided(long-edge)
bash: syntax error near unexpected token `('
[root@localhost aliquis]# lpadmin -o Duplex=TWOSIDED_LONGEDGE
lpadmin: Unable to set the printer options:
You must specify a printer name first.



The first error is because you used an ( in a command, that has special meaning for the shell.
The second time you get a normal error message, as you didn't tell it what printer to change.
What you want is probably something like this:


Code: Select all
lpoptions -p printername -o option1=value -o option2=value


But http://tig.csail.mit.edu/wiki/TIG/CUPSP ... on_Options states that duplex is the default AFAIU.