Rename printer from command line in ubuntu.


Rename printer name from backend without GUI.

1. rename the printer name into /etc/cups/printers.conf
for E.g.

OldName="Canon_LBP-2900_CAPT"
NewName="Canon_LBP2900"

Stop cups service first
service cups stop  > /dev/null 2>&1

Replace the old name with new printer name
sed -i 's/'$OldName'/'$NewName'/g' /etc/cups/printers.conf

Restart cups service
service cups restart  > /dev/null 2>&1


2. Also need to rename the ppd of the old printer which is located at /etc/cups/ppd

rename the old printer ppd name 

mv /etc/cups/ppd/"$OldName".ppd  /etc/cups/ppd/"$NewName".ppd

Restart cups service

service cups restart


Comments

  1. For a resolution to Epson laser printer error code E-01, it is advisable to check the power connections after that the user should the cartridge loading area after that the user should get the system started in the safe mode, for further information or help the user should get connected with the certified experts at Epson laser printer support. Lines are open for help and support all the time.
    Epson Printer Contact UK

    ReplyDelete

Post a Comment

Popular posts from this blog

Error while connecting RDP "an authentication error has occurred the token supplied to the function is invalid".

Windows shared network printer issue in ubuntu 18.04