Linux Programmer | RHCE | RHCSA

Search This Blog

Friday 30 March 2018

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


2 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
  2. You will no longer need to transfer files every now and then because multiple computers are already connected; you will no longer have to tap in to specific computer either. renting impresoras valencia

    ReplyDelete

SSH not working with password after upgrade ubuntu 22.04

Issue: In recent upgrade of ubuntu 22.04 we are not able to login server with SSH password. but when we try to login with key then it allow...