当我使用命令时
$ sudo lpoptions -d Deskjet-F300-series
它不会更改默认打印机。
$ lpstat -a
Deskjet-F300-series accepting requests since Sun 10 Apr 2011 11:02:12 AM CEST
Deskjet-F4200-series accepting requests since Mon 04 Apr 2011 03:39:17 PM CEST
Deskjet_F4200 accepting requests since Mon 04 Apr 2011 03:39:17 PM CEST
HP_Deskjet_F4200_series accepting requests since Mon 04 Apr 2011 03:39:17 PM CEST
$ lpstat -d
system default destination: HP_Deskjet_F4200_series
$ lpstat -p
printer Deskjet-F300-series is idle. enabled since Sun 10 Apr 2011 11:02:12 AM CEST
Printer is now online.
printer Deskjet-F4200-series disabled since Mon 04 Apr 2011 03:39:17 PM CEST -
Unplugged or turned off
printer Deskjet_F4200 disabled since Mon 04 Apr 2011 03:39:17 PM CEST -
Unplugged or turned off
printer HP_Deskjet_F4200_series disabled since Mon 04 Apr 2011 03:39:17 PM CEST -
Unplugged or turned off
你知道错在哪里吗?
答案1
sudo lpoptions -d
设置系统范围的默认打印机(通过编辑/etc/cups/lpoptions
)。您还可能有一个每用户默认打印机,它会覆盖系统级设置。每个用户的默认值存储在~/.cups/lpoptions
;你可以用 来改变它lpoptions -d
。