To add a printer in openSUSE that is being shared by a CUPS print server, you can use the following steps:
1. **Ensure CUPS Client is Installed:**
Make sure your openSUSE system has the CUPS client tools installed. You can install them using the following command:
```bash
sudo zypper install cups-client
```
2. **Discover Available Printers:**
Use the `lpinfo` command to discover available printers on your CUPS print server. Replace `cups-server-hostname` with the hostname or IP address of your CUPS server:
```bash
lpinfo -v -h cups-server-hostname:631
```
This command should list the printers shared by the CUPS server.
3. **Add a Printer:**
Use the `lpadmin` command to add a printer. Replace `printer-name` with the name of the printer you want to add and `printer-uri` with the URI obtained from the `lpinfo` command:
```bash
sudo lpadmin -p printer-name -E -v printer-uri
```
For example:
```bash
sudo lpadmin -p MyPrinter -E -v socket://cups-server-hostname:631/printers/PrinterName
```
4. **Set Default Options:**
You can use the `lpoptions` command to set default options for your printer. For example, to set the default paper size to A4:
```bash
lpoptions -d printer-name -o media=A4
```
5. **Print a Test Page:**
To verify that the printer is set up correctly, you can print a test page using the `lp` command:
```bash
lp -d printer-name /usr/share/cups/data/testprint
```
6. **Configure Print Queues (Optional):**
If you have multiple print queues on the CUPS server, you can configure them using the `lpadmin` command. For example, to set a specific print queue as the default:
```bash
sudo lpadmin -d printer-name
```
7. **List Configured Printers:**
You can list all the configured printers using the `lpstat` command:
```bash
lpstat -p
```
This should allow you to add a printer in openSUSE that is shared by a CUPS print server. Make sure to replace `printer-name` and `printer-uri` with the actual printer name and URI from your CUPS server.