How to Access a Windows Shared Printer from Puppy 4

How to do things, solutions, recipes, tutorials
Message
Author
User avatar
rcrsn51
Posts: 13096
Joined: Tue 05 Sep 2006, 13:50
Location: Stratford, Ontario

How to Access a Windows Shared Printer from Puppy 4

#1 Post by rcrsn51 »

Puppy 4 has the CUPS printing system built-in. However there is a small bug that must be fixed before it can access a Windows shared printer.

This exercise assumes that you have found a suitable PPD file for your Windows printer and installed it in /usr/share/cups/model. Read here for more information.

Before starting, go to your Windows computer and locate its machine name and the name of the shared printer. The printer name is the one-word identifier assigned by Windows. Look for it under the Sharing tab of the printer's properties.

Important! CUPS cannot deal with a printer name if it contains spaces. You have two choices. Rename the printer in the Windows Sharing dialog. Or replace the spaces with the code %20 when you enter the name in CUPS.

You can also use the Windows computer's IP address instead of its machine name.

You may need to modify your PC's firewall to allow network printing. Some users who are using a security package like Norton have a firewall running without knowing it. Forum member als123 reported this:
In the Norton's Personal Firewall: Trust Control, Active Tab. (This should be your home network) Select it and click on Properties Select "Allow All network activity on this network"
Now launch Puppy and verify that you have the file /opt/samba/bin/smbspool

Then go to the folder /usr/lib/cups/backend

Inside this folder you need to make a symlink to the above smbspool file and name it "smb". In later versions of 4.x, this symlink may already be present. If not, open a console and type:

Code: Select all

ln -s /opt/samba/bin/smbspool  /usr/lib/cups/backend/smb
(The "ln" command is spelled with a lower-case ell.)

Check again in /usr/lib/cups/backend and verify that the symlink has been created.

[Edit] Several users of 4.2.x have reported that although the symlink exists, it does not work properly. The solution is to manually delete and recreate it.

Code: Select all

rm /usr/lib/cups/backend/smb
ln -s /opt/samba/bin/smbspool /usr/lib/cups/backend/smb 
Restart CUPS with the following command:

Code: Select all

/etc/init.d/cups restart
Run the CUPS Printer Wizard from the Setup menu. You can also go directly to the CUPS web interface at http://localhost:631/, but read this first.

Go to Admin Tasks and start adding a new printer.

At the bottom of the Device list you can now select "Windows Printer via Samba". (If this entry is not present, then your "smb" symlink is corrupted. Use the above steps to recreate it.)

Enter the device URI as

smb://PCNAME/PRINTERNAME

Select your printer manufacturer and model.

Go to Manage Printers and print a test page.

You may have problems if the Windows host denies access to the Puppy client. In that case, you should try a URI that provides authentication. For example,

smb://WORKGROUP/PCNAME/PRINTERNAME
or
smb://USERNAME:PASSWORD@WORKGROUP/PCNAME/PRINTERNAME
or
smb://Administrator@windows_IP_address/printer_share_name

Also, member gerry has reported this:
If you are getting the CIFS problem, then (in 4.1.2) I have to open Pnethood and mount the printer with "Use CIFS" box ticked.
Here is another troubleshooting technique. Go to a console and type

Code: Select all

smbclient -NL PCNAME
This should list the name of the shared printer on the PC.

If you need to set up printing from a Windows machine to a Puppy printer, read here.
Last edited by rcrsn51 on Sun 05 Jul 2009, 21:23, edited 41 times in total.

User avatar
HairyWill
Posts: 2928
Joined: Fri 26 May 2006, 23:29
Location: Southampton, UK

#2 Post by HairyWill »

Even if the shared printer is not linux compatible it is possible to get it to work using the instructions here:
http://puppylinux.org/wiki/how-tos/gene ... ronwindows
Will
contribute: [url=http://www.puppylinux.org]community website[/url], [url=http://tinyurl.com/6c3nm6]screenshots[/url], [url=http://tinyurl.com/6j2gbz]puplets[/url], [url=http://tinyurl.com/57gykn]wiki[/url], [url=http://tinyurl.com/5dgr83]rss[/url]

tata888
Posts: 16
Joined: Wed 11 Jun 2008, 02:06

#3 Post by tata888 »

This exercise assumes that you have found a suitable PPD file for your Windows printer and installed it in /usr/share/cups/model.
I don't get it by suitable PPD

How do I get this?
and how do I install this ?

Puppy Linux is my only hope as the other linux can't work in my aged computer ( P3 600 128 6G)

Thanx before

User avatar
rcrsn51
Posts: 13096
Joined: Tue 05 Sep 2006, 13:50
Location: Stratford, Ontario

#4 Post by rcrsn51 »

To find a PPD file for your printer, go here.

Look up your BJC-1000 printer in the database.

The results can be confusing, but the best recommendation for a driver looks like the BJC600. Scroll down the page to its entry and click on "Directly Download PPD".

Copy this file to /usr/share/cups/model and continue with the instructions.

However, before attempting the network setup, it would be a good idea to connect the BJC-1000 directly to your Puppy machine and get it working as a local printer. This will give you some practice working with CUPS.

tata888
Posts: 16
Joined: Wed 11 Jun 2008, 02:06

#5 Post by tata888 »

Hi rcrsn5,

Thanks to your advice now I know what PPD is, but the problem starts here.

I managed to download the PPD for BJC 265 in the form of BJC 250 then I ensured that I had this smbspool.
The next instruction was to copy the ppd file in//share/cups/model.
Then I create a symlink by using the command given and I managed to add printer, but when I tried to print the test page I couldn't even print it in my local printer.

What did I do wrong?

User avatar
rcrsn51
Posts: 13096
Joined: Tue 05 Sep 2006, 13:50
Location: Stratford, Ontario

#6 Post by rcrsn51 »

Turn the printer OFF and send another test page. Then check under Jobs. Is the print job queued up?

Turn the printer ON. Check again under Jobs. Did the job get sent? If so, it sounds like you have the wrong printer driver.

tata888
Posts: 16
Joined: Wed 11 Jun 2008, 02:06

#7 Post by tata888 »

Sorry to trouble you again.

I'm not sure if I did right or wrong. I'll just tell all the steps in detail.

1) I install the smbspool and copy paste it into the
/usr/bin/smbspool
2) download and install CUPS
http://dotpups.de/dotpups/Printing/cups ... -v0.3.pup∞
3) Then I went to your link to get the ppd for bjc 250 as it was the closest to bjc 265sp
4) I folloewed the next instructions which was to install it in /usr/share/cups/model.

5) /opt/samba/bin/smbspool ( is this the same with my smbspool?)

Then go to the folder /usr/lib/cups/backend

Inside this folder you need to make a symlink to the smbspool file and name it "smb". Open a console and type:

ln -s /opt/samba/bin/smbspool smb ( I did this)

Restart CUPS with the following command (or reboot Puppy):

/etc/init.d/cups restart

Open the CUPS web interface at http://localhost:631/

Go to Admin Tasks and start adding a new printer. ( Yup I did this, too)

but when I try to print test page I see this :

Canon Canon BJC-250 - CUPS+Gutenprint v5.0.0
Description:
Location:
Printer State: idle, accepting jobs.
Device URI: parallel:/dev/lp0

Then I tried to print test page ......then sometimes it works but sometimes it doesn't now. why is it unstable ?

Is it because I use the different CUPS instead of just mere ppd file?

User avatar
rcrsn51
Posts: 13096
Joined: Tue 05 Sep 2006, 13:50
Location: Stratford, Ontario

#8 Post by rcrsn51 »

What version of Puppy are you using? The latest version 4 already has CUPS installed, so there was no need to download anything other than the PPD file for your particular printer.

gerry
Posts: 986
Joined: Thu 26 Jul 2007, 21:49
Location: England

#9 Post by gerry »

Works perfectly, even for my set-up with the Canon proprietary driver. It's important to know how to configure your firewall on the Windows machine to give Puppy access. If you get a message saying "Unable to connect to CIFS host, ....", then that's probably the problem.

Gerry

User avatar
exProphecy
Posts: 335
Joined: Mon 05 Nov 2007, 16:50
Location: Bay Area, California

#10 Post by exProphecy »

I'm getting this error:

"Tree connect failed (NT_STATUS_ACCESS_DENIED)"

What does it mean?
Puppy 4.3.1 + Sansa Express MP3 Player + 10GB USB Flash Drive = My triple threat OS. :wink:
I consider myself a Turritopsis Nutricula.
[url]http://www.wellminded.com/puppy/pupsearch.html[/url]
[url]http://www.esnips.com/web/exprophecypets[/url]

gerry
Posts: 986
Joined: Thu 26 Jul 2007, 21:49
Location: England

#11 Post by gerry »

After not needing to print to the Windows printer for a couple of weeks, I suddenly find that it doesn'nt work any more. Before I get down to finding why, here are some observations that I've noted when it WAS working:

When I set it up, at the "re-start CUPS or re-boot" stage, I re-booted.

Firewall: I use a third party security suite, that takes care of virus/malware/firewall, so I keep the windows firewall OFF. So be aware that if you've configured your third party firewall ok, and the Windows firewall is still active, Puppy may not be able to get through.

Your Windows machine: I use XP.

You need to be logged in. On my machine:

EDIT: further experience shows this is WRONG- you don't need to be logged in.

EDIT: several lines deleted here:



Now to find out why it's stopped working........

Gerry
Last edited by gerry on Sun 16 Nov 2008, 17:09, edited 1 time in total.

gerry
Posts: 986
Joined: Thu 26 Jul 2007, 21:49
Location: England

#12 Post by gerry »

@tata888- the device URI is wrong. At the stage where you have the device list on screen, at the bottom you should see the "Windows Printer via SAMBA" option, and you then put in smb://...........

Gerry

User avatar
mpierrat25
Posts: 113
Joined: Thu 23 Aug 2007, 20:56
Location: France (25)

#13 Post by mpierrat25 »

@gerry,

Thanks for your reply.

No my XP account is not password protected. Account is 'Propriétaire' should I mention account name in the URI ?

Could a wrong driver give the same message about CIFS ?

This is because I discovered that I'm not be able to print with this driver directly to the usb printer.

So I get a debian package for MFC210C , but I do not known how to install it in Puppy env. Could you help

regards,
mp

User avatar
rcrsn51
Posts: 13096
Joined: Tue 05 Sep 2006, 13:50
Location: Stratford, Ontario

#14 Post by rcrsn51 »

Here are some other URI's you can try:

smb://WORKGROUP/PCNAME/PRINTERNAME

smb://guest@WORKGROUP/PCNAME/PRINTERNAME

smb://user:password@WORKGROUP/PCNAME/PRINTERNAME

gerry
Posts: 986
Joined: Thu 26 Jul 2007, 21:49
Location: England

#15 Post by gerry »

@mpierrat25

Menu > XArchive archiver

includes a facility for unpacking a .deb package. I've never tried it.........

Gerry

User avatar
mpierrat25
Posts: 113
Joined: Thu 23 Aug 2007, 20:56
Location: France (25)

#16 Post by mpierrat25 »

@guerry

unziping is OK however I suppose, I have to execute the file cupswrapperMFC210C-1.0.2

if I try that I got a bad interpreter error
if I try sh cups.... I got an exit(0)

in fact the script is supposed to use /bin/csh

what can we do?

mpierrat25

gerry
Posts: 986
Joined: Thu 26 Jul 2007, 21:49
Location: England

#17 Post by gerry »

Sorry- you are beyond anything that I know about. I'll probably get expelled from the forum for this- but it might be easier with a Debian based distro, so that installing your driver just comes naturally.

Gerry

User avatar
mpierrat25
Posts: 113
Joined: Thu 23 Aug 2007, 20:56
Location: France (25)

#18 Post by mpierrat25 »

@gerry,

Do not mind, the script problem is now fixed. I needed unrpm and csh to
install properly. see :


http://www.murga-linux.com/puppy/viewtopic.php?t=31949


Now that I'm sure the cups print correctly, I will work on smb.

To be follows

gerry
Posts: 986
Joined: Thu 26 Jul 2007, 21:49
Location: England

#19 Post by gerry »

Just in case anyone with Puppy 3.01 feels like trying it- don't. Easy problem: smbspool is in /usr/bin/, not /opt/samba/bin.

Insuperable problem (for my expertise) is that cups keeps asking for authentication, and never gets as far as printing anything. This is the version of cups that needs a password to do anything- someone on another thread asked why BK changed back to an older cups for 4.0- maybe this is why??

Gerry

User avatar
Béèm
Posts: 11763
Joined: Wed 22 Nov 2006, 00:47
Location: Brussels IBM Thinkpad R40, 256MB, 20GB, WiFi ipw2100. Frugal Lin'N'Win

#20 Post by Béèm »

Pretty complicated as procedure. Didn't imagine this.
But a question tho.
My XP printer is defined as shared.
When I look for shares with pnethood for shares on my XP machine, it finds the printer as print$. I can mount that printer. And a directory is made containing exe's end dll's in subdirectories.

Can the printer be addressed through this way?

If not, and seeing this thread, it looks to me it's simpler to unplug the printer from the desktop (MD8818) and plug it into the laptop (USB connection) and define the printer in CUPS. Well in my case maybe.
(P.S. wanted to upload a picture, but got a msg max filesize is reached. Have to sort that out first)
Time savers:
Find packages in a snap and install using Puppy Package Manager (Menu).
[url=http://puppylinux.org/wikka/HomePage]Consult Wikka[/url]
Use peppyy's [url=http://wellminded.com/puppy/pupsearch.html]puppysearch[/url]

Post Reply