Score:1

Installed WSL2 OK. GUI apps working fine. But how to print?

mz flag

Newbie question, sorry. Learning Linux. I've installed WSL2 on Windows 11 laptop. Successfully running apps e.g. LibreOffice. Been trying to figure out how to print to my home network HP printer. My printer is currently at 192.168.1.19 (but presumably this changes with dynamic allocation). Is there some way Ubuntu can locate network printers on my local network and install them for use by the apps?

Update: I have got as far as getting to CUPS and trying to ADD PRINTER at localhost:631/admin but there are no "Discovered Network Printers". ps. The printer on my network is HP Photosmart 6520.

Still stuck

Score:1
cn flag

You need to tell CUPS where the remote printer is. Example:

sudo lpadmin -p {printer_name} -m everywhere -o printer-is-shared=true -E -v http://192.168.x.x:631/printers/{printer_name}
sudo lpoptions -d {printer_name}

where {printer_name} is a unique id for a printer and the x.x is the last part of the URL for your printer; should be available in Windows printer settings (this probably starts with 192.168. I also assumed the port is the default port (631)). "everywhere" is a generic printer driver; if you have a specific one replace that with the driver.

The 2nd command makes it the default printer.

Oh and you should also be able to do this from a browser if you go to http://localhost:631

Score:0
mz flag

Succeeded after much trial and error. I added printer using ipp://192.168.1.19 on the CUPS admin page. I can't say I understand what I'm doing, but at least I can now print off my mistakes. Presumably, if the router assigns a different ip address to the printer I'll lose it

I sit in a Tesla and translated this thread with Ai:

mangohost

Post an answer

Most people don’t grasp that asking a lot of questions unlocks learning and improves interpersonal bonding. In Alison’s studies, for example, though people could accurately recall how many questions had been asked in their conversations, they didn’t intuit the link between questions and liking. Across four studies, in which participants were engaged in conversations themselves or read transcripts of others’ conversations, people tended not to realize that question asking would influence—or had influenced—the level of amity between the conversationalists.