What is the address of the printer? [SOLVED]

Quick to answer questions about finding your way around Linux Mint as a new user.
Forum rules
There are no such things as "stupid" questions. However if you think your question is a bit stupid, then this is the right place for you to post it. Stick to easy to-the-point questions that you feel people can answer fast. For long and complicated questions use the other forums in the support section.
Before you post read how to get help. Topics in this forum are automatically closed 6 months after creation.
Locked
Bladeforger

What is the address of the printer? [SOLVED]

Post by Bladeforger »

Hello, all.

I have one printer installed. When I go look at in the printing properties, I get "usb://Brother/HL-5240%20series"

When I try in a Windows virtual machine to use the "net use" command

Code: Select all

net use lpt1: \\keith-desktop\usb:\\Brother\HL-5240%20series mememe  /user:keithxp
then I get this error:
"The network resource type is not correct."

This command works for the file share works fine.

Code: Select all

net use \\keith-desktop\Documents mememe /user:keithxp
On Ubuntu, the following worked great:

Code: Select all

net use lpt1: \\keith-desktop\HL-5240-series mememe /user:keithxp
So, Mint put a space where Ubuntu had a dash--hence the "%20".

I've tried /dev/lp0 and any number of variations of addresses. None work. It is probably something simple.

I've already set up the Samba share and the users and the password "mememe". It works for the shared file directory; therefore, the password is okay.

Any help is appreciated!!!

Keith
Last edited by LockBot on Wed Dec 28, 2022 7:16 am, edited 1 time in total.
Reason: Topic automatically closed 6 months after creation. New replies are no longer allowed.
Bladeforger

Re: What is the address of the printer? [SOLVED]

Post by Bladeforger »

I solved the problem, but first the question I had asked, (which wasn't really the problem).

Thanks to Scott Granneman and his great book, Linux Phrasebook, here's how to find the printer(s):

Code: Select all

lpstat -p
lpstat -d 
lpstat -s
More available in the man pages.

Now, on to making the linux printer work with the XP VM... I've only done this twice and both times muddled my way through. Once the Samba shares are all set up, preferably with the Samba Server Configuration graphical tool, which works splendidly and beats trying to do it all from Bash, then the next part comes inside the virtual machine itself.

The "net use" statement is a Windows statement, issued from inside the Windows environment. Therefore, it only makes sense that it would be using what Windows thinks are your printers. Aha! The way to determine the resource names there is to use

Code: Select all

net view
. Thus, the actual script (batch file) that I need to run each time I open the VM is:

Code: Select all

:: sets network document folder to be accessible, uses "mememe" creative passwd

net use \\keith-desktop\Documents mememe /user:keithxp

:: sets lpt1 to printer in resource list (use "net view" to see)

net use lpt1: \\keith-desktop\HL-5240-series mememe /user:keithxp

:: print new.txt /d:lpt1

:: Comment out above line after a few days of use! 
If the lpt1 is a persistent assignment, which happens sometimes, or if it was knackered, I now have another batch file:

Code: Select all

:: get rid of the old setting

net use lpt1: /delete /y

:: reset the rascal

net use lpt1: \\keith-desktop\HL-5240-series mememe /user:keithxp
Hope this helps save someone else some hours of frustration. Having muddled through the process once over a year ago and once recently, it'll be a snap next time I have to do it... hopefully not before Spring 2013. LTS versions, I love ya.

Keith
Locked

Return to “Beginner Questions”