How to change Printer's Default Settings via CLI?

How to change Printer's Default Settings via CLI?

Postby LaCiccia » Jul 23rd, '13, 12:47

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.
Attachments
PrinterDefaults.png
CUPS web interface
PrinterDefaults.png (154.92 KiB) Viewed 2585 times
PrinterCommonOptions.png
PrinterCommonOptions.png (86.05 KiB) Viewed 2585 times
LaCiccia
 
Posts: 43
Joined: Mar 31st, '13, 22:37
Location: Italy


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

Postby LaCiccia » Jul 24th, '13, 17:16

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 ~]$
LaCiccia
 
Posts: 43
Joined: Mar 31st, '13, 22:37
Location: Italy

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

Postby doktor5000 » Jul 24th, '13, 20:46

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.
Cauldron is not for the faint of heart!
Caution: Hot, bubbling magic inside. May explode or cook your kittens!
----
Disclaimer: Beware of allergic reactions in answer to unconstructive complaint-type posts
User avatar
doktor5000
 
Posts: 18042
Joined: Jun 4th, '11, 10:10
Location: Leipzig, Germany


Return to Printers and Scanners

Who is online

Users browsing this forum: No registered users and 1 guest

cron