I am using cupsSetDefaultDest funtion to set the default destination of the printer. This works only when there is no default printer already set on the machine. Once it is set, the code doesnt work when trying to set new printer as default destination.