How to share a printer with Windows? [Solved]

Problems and successes with specific brands/models of printers
Message
Author
highway_man
Posts: 21
Joined: Thu 07 Feb 2013, 03:22

How to share a printer with Windows? [Solved]

#1 Post by highway_man »

I am attempting to share a printer attached to my desktop. Desktop stats: Pentium III with 256M RAM and Puppy Precise 5.7.1 Retro.

The printer (Samsung ML-1740) was installed. Listed as shared. Printed a test page.
I installed Samba from PPM. Install the samba-tng-rcrsn-0.5-rc1.pet

Followed directons from here: http://www.murga-linux.com/puppy/viewtopic.php?t=59015
I tried to install the shared printer from a Windows 7 laptop

Code: Select all

http://192.168.2.11:631/printers/Samsung_ML-1740
but it could not be found. The laptop already has the printer installed for printing via USB.

Out of desperation, I even changed my /etc/samba/smb.conf file. Detailed here: http://murga-linux.com/puppy/viewtopic.php?t=22363

Most of the forum links discuss file sharing through SAMBA. I only want to share the printer.
I really don't know how to 'run SAMBA'. I have three SAMBA links in Network. All three appear to be related to file sharing. What is my next step?
Last edited by highway_man on Tue 13 Jan 2015, 00:36, edited 1 time in total.

highway_man
Posts: 21
Joined: Thu 07 Feb 2013, 03:22

Rename "How to run Samba" ??

#2 Post by highway_man »

OK, so when I type

Code: Select all

samba-start
in console, I get a long list of missing files. Ten like this:

Code: Select all

/usr/local/samba/sbin/nmbd: error while loading shared libraries: libsmb.so.0: cannot open shared object file: No such file or directory
Screen shot attached. Any ideas?
Attachments
capture27482.png
(11.93 KiB) Downloaded 430 times

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

#3 Post by rcrsn51 »

There are two ways to set up a shared printer in Puppy.

1. Using CUPS. This is the method you are using with the Windows line

Code: Select all

http://192.168.2.11:631/printers/Samsung_ML-1740
2. By setting up a Samba server. You appear to be mixing up the two methods. I don't know why your Samba-TNG setup failed. I checked the download and it worked. So I would scrap method #2 and go with #1.

Are you running a firewall on the Puppy machine? What about the Windows machine? The built-in Windows firewall will be OK, but a third-party package like Norton may block print sharing.

In the CUPS method, there are several steps to declaring a printer as shared. Have you done them all? The best way to tell is to set up another Puppy computer on your network. Run PeasyPort from the Network menu. Scan for the IP 192.168.2.11 and Port 631. Is it detected?

highway_man
Posts: 21
Joined: Thu 07 Feb 2013, 03:22

#4 Post by highway_man »

After turning off the firewall on the Puppy desktop, I was able to able to access the CUPS page through a web browser on a laptop running Puppy and Win7. Same with PeasyPort.

On the CUPS portal, in printers, the printer is listed as shared.

In Administration, the following is checked:

Code: Select all

-   Show printers shared by other systems
-   Share printers connected to this system
-         Allow printing from the Internet
-   Allow remote administration
-   Allow users to cancel any job (not just their own)
I was successfully installed and printed a test page from Puppy to Puppy. YEAH! ...Windows to Puppy, not yet.

********************************
**********UPDATE ***************
********************************

Here is what I did to print from Win7.

Source 1
http://www.linuxquestions.org/questions ... -a-853335/

Find the IP and hostname of the Puppy hosting the printer.

In Windows, run Notepad as administrator. Go to C/windows/system32/drivers/etc and open the 'hosts' file.
Add the IP and host name to the bottom of the host file and save it.

Code: Select all

# CUPS printer config
192.168.2.11 puppypc127
Source 2
http://www.gigamegablog.com/2012/09/03/ ... windows-8/

Follow the instruction. The pictures are clearer than anything I can write.
When I did 2 things differently, the printer worked with Windows.

I used the puppypc127 address for the shared printer name.

Code: Select all

http://puppypc127:631/printers/Samsung_ML-1740
Previously, I tried to add a printer using TCP/IP address.

Hope this help some others.

Now...is there a way to print from Windows to Puppy without turning off the firewall on the host Puppy?

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

#5 Post by rcrsn51 »

highway_man wrote:Now...is there a way to print from Windows to Puppy without turning off the firewall on the host Puppy?
Here are some things to try.

Run the Firewall Wizard and choose Custom Install. Under Open Ports, select Other. Add Port 631. Or under Trusted Networks, add your Windows machine.

OTOH, you are appear to be on a LAN protected from the outside world by a router. Why do you need to run a firewall on individual machines?

highway_man
Posts: 21
Joined: Thu 07 Feb 2013, 03:22

#6 Post by highway_man »

I was able to turn off my firewall. After X+ years of having your OS tell you to turn on your firewall...It is like vitamins. I may not need them, but I am glad to use them if I do need them.
select Other. Add Port 631
Can you clarify how to add Port 631

I know that it can be done manually by opening
/etc/rc.d/rc.firewall and adding:

Code: Select all

PERMIT="something"
But, I do not know what that "something" is. Google shows a bunch of port address examples, but I was not able to find an example for port 631. Here is what I did to add my computer to the firewall, but i would prefer to add the CUPS printer port (631) as I want two computers to have remote print access. Either one may reboot and change the port address in the process.
  • Setup
    > Setup Firewall
    >custom
    >other ports not listed

    >any
    >>No (share internet connection)
    >>'eth0' (my wired connection to wireless router)
    >>No (not using dial up)
    >>'192.168.2.4' (Windows computer net address)
    >> Yes (verify)
Any direction, redirection, code, links are appreciated.

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

#7 Post by rcrsn51 »

You have to scroll down the Ports list a little to see Other.

Or treat your entire LAN 192.168.2.0/24 as trusted.

highway_man
Posts: 21
Joined: Thu 07 Feb 2013, 03:22

#8 Post by highway_man »

Thanks !!

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

#9 Post by rcrsn51 »

Here is the screen I got to. Or you might have better luck using the Trusted Network method.
Attachments
firewall.png
(4.67 KiB) Downloaded 535 times

highway_man
Posts: 21
Joined: Thu 07 Feb 2013, 03:22

#10 Post by highway_man »

Looks like I need to update my firewall script
After 'Other', my options were 'any' or 'specify'

Code: Select all

Setup 
> Setup Firewall 
>custom 
>other ports not listed 

>any 
>specific
Would this work:

Code: Select all

Setup 
> Setup Firewall 
>custom 
>other ports not listed 

>any 
>>No (share internet connection) 
>>'eth0' (my wired connection to wireless router) 
>>No (not using dial up) 
>>'192.168.2.0/24' (Local network) 
>> Yes (verify)
That is what I thought would work after your last reply.
Attachments
FW03.png
Screen after 'Other port(s) not listed'
(6.38 KiB) Downloaded 538 times

highway_man
Posts: 21
Joined: Thu 07 Feb 2013, 03:22

Specify a local IP

#11 Post by highway_man »

After months of working well my Puppy printer threw me for a loop. Today, instead of the local IP of 192.168.2.11, it was 192.168.2.14. Now puppy seems to prefer the 14 over the 11. I have two windows pointing at the 11 address. It will probably change in another few months...

Anyway, this was remedied by typing the following in terminal.

Code: Select all

ifconfig eth0 192.168.2.11
Is there some way that I can have Puppy use the same local IP when it boots up? Either by editing a file (rc.firewall?) or running this command at startup?

Please do not suggest a static IP. I am not smart enough (yet) to know how to set up a static IP. I have tried in the past with a Logitech camera. Not pretty or fun. Still have to point to it after it is set up.

gcmartin

#12 Post by gcmartin »

Hello @Highway_Man.

Without taking you through steps for a single desktop which would differ which each and every different desktop you might use, I offer a single approach idea: Your router.

Most of todays users get their Internet service from their ISPs via a modem-router. Many of these have a setup in them which allows you to preassign an IP to ANY device on your LAN that you want to have a particular IP each time it powers onto your LAN (this, of course, assumes your router is the device which handles DHCP requests for LAN registration and service).

If the above paragraph is correct, that modem-router probably has the ability to assign your printer its IP (192.168.2.14), as well as assigning any other devices, like cameras/PCs/etc, their IPs so that you don't have to concern yourself with going to each and every unit on your LAN and figuring out how to do this on your own.

Further, your ISP would have a helpdesk staff to guide you to do this; or you could appeal to this forum for some guidance in using your router to do so.

Here to help

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

#13 Post by rcrsn51 »

@gcmartin: Highway_man has already stated that he does not want to get involved with static IP.

@Highway_man: Your router uses a system called DHCP that assigns IP addresses to your network devices, usually on a first-come-first-served basis. If your router resets due to an event like a power failure, your devices may get new addresses, depending on the order that they are detected.

The problem with your using "ifconfig eth0 192.168.2.11" is that this address may have already been assigned to another unit.

You can try rebooting your router and booting computers in the order that gets you back to 192.168.2.11.

Or you could revisit the Samba technique which identifies the printer to the network by its name instead of IP address.

gcmartin

#14 Post by gcmartin »

rcrsn51 wrote:@gcmartin: Highway_man has already stated that he does not want to get involved with static IP. ...
@Rcrsn51: You may have missed that he was referring to setting PCs thru those steps.

His router PROBABLY has DHCP services which allows the router to do this management. Thus, in one single place on his LAN, he can control assignments to any specific device in a fashion appropriate.

Thus, this meets his requested requirement; without his having to go to each and every device/PC individually on his LAN. And, this works no matter how many times his router or devices are restarted or in what order they are started. Further it is NOT dependent on SAMBA for insuring the device is where on his LAN he want it. In some router, this actually helps SAMBA thru the registration that occurs.

Here to help

highway_man
Posts: 21
Joined: Thu 07 Feb 2013, 03:22

#15 Post by highway_man »

Thank you both for your suggestions. I am 0 for 2 on attempting both.

@rcrsn51

At your topic: http://www.murga-linux.com/puppy/viewtopic.php?t=60204
when I type the code

Code: Select all

samba-start
Should something appear on the screen? The further discussion of pupserver and pupshare imply that some sort of script should appear in terminal. I get no response.

@gcmartin

I tried to access my router directly, but had forgotten the password to my router. After a full reset and setting up the router like before, it is not readily apparent that I can assign my puppy computer to a specific DHCP. A quick google search for my router (Belkin F5D8236-4) indicates that hacking may be required to reserve a specific DHCP address.

@anybody

To revisit my previous question. I can assign the range of dynamic addressed (IP pool) on this router. I could assign Puppy a specific IP outside of that range to avoid any address conflicts. Since it cannot be done by the router, can it be done automatically in Puppy?

For example:
Puppy 192.168.2.11
Others: 192.168.2.20 _to_ 192.168.2.119
Last edited by highway_man on Thu 08 Jan 2015, 02:29, edited 1 time in total.

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

#16 Post by rcrsn51 »

highway_man wrote:Should something appear on the screen?
No. But use the "ps" command to confirm that the Samba-TNG components are running.

There are some preliminary steps:

1. Reinstall your printer and give it a short one-word name, like SamsungNet. Some versions of Windows have trouble with long printer names.

2. Open the file /usr/local/samba/etc/smb.conf. Enable lines 10 and 11 by removing the semi-colons.

3. Restart the server with samba-stop and samba-start.

Then go here and read To set up a Windows Client. Use the port name

Code: Select all

\\pupserver\SamsungNet

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

#17 Post by rcrsn51 »

No reply? Is this issue resolved or abandoned?

highway_man
Posts: 21
Joined: Thu 07 Feb 2013, 03:22

#18 Post by highway_man »

Not abandoned. Just verifying that it works after different kinds of power cycles.

I followed your instructions and it worked well. Then, I cycled power and it didn't. I figured out that Samba needed to be started at start up. After further reading, I installed your samba-autostart-1.1.pet further down the link previously provided. It has worked ever since. After looking over the samba file sharing, printer sharing was quite a bit easier than expected. Focusing in on
set up a Windows Client
made all the difference.

Safe to say: RESOLVED

Thanks again for your help.

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

#19 Post by rcrsn51 »

Excellent. But be aware that you are now running a fileserver along with the print server. It is sharing your /mnt/home across the network. If you don't want this, delete the [pupshare] section from your smb.conf.

highway_man
Posts: 21
Joined: Thu 07 Feb 2013, 03:22

#20 Post by highway_man »

Double Bonus!

The computer with Puppy Linux is set up to shut down after 90 minutes of inactivity. It is primarily used as a print server and possible optional computer.

A print job was sent while the computer was not ready. Usually, these get stuck on the computer that sent the job. Today, the job was printed as soon as Puppy booted up.
Nice!

Also, this computer was previously the holder of files for transfer, sharing, etc. I redirected pupshare to point towards mnt/sdb1. This is the storage drive that holds the shared files.
I added a start up script to auto log on sdb1 from here and now I can access my stored files.

Post Reply