[SOLVED]LMDE Sharing a printer (home network)

Connection sharing, Firewall, Samba..etc
Forum rules
Before you post please read this

[SOLVED]LMDE Sharing a printer (home network)

Postby toomuchcoffee on Wed Apr 25, 2012 8:26 pm

Alright...

I have a desktop and a laptop both running W7 and LMDE (dual boot).
The printer is connected to the desktop with usb. How can I share the printer with my laptop?
From what I could dig up so far I need to setup samba and cups to achieve this, problem is I don't really know where to begin..

Could anyone point me in the right direction? Thanks in advance :) .
Last edited by toomuchcoffee on Thu Apr 26, 2012 8:33 pm, edited 1 time in total.
Code: Select all
The program 'suck' is currently not installed.  To run 'suck' please ask your administrator to install the package 'suck'
toomuchcoffee
Level 1
Level 1
 
Posts: 41
Joined: Wed Apr 18, 2012 8:24 am

Linux Mint is funded by ads and donations.
 

Re: LMDE Sharing a printer (home network)

Postby toomuchcoffee on Thu Apr 26, 2012 10:52 am

I'll keep talking to myself and see where that gets me... and I'll go editing this post along the way.
For starters I tried using the 2 comps running LMDE.

I've found this old topic >> viewtopic.php?f=42&t=28397

Changing settings in CUPS interface (localhost:631) gives me an error FORBIDDEN..
Found how to fix this here

try adding your user account to the 'lpadmin' group.

see /etc/cups/cupsd_conf . the SystemGroup is usually 'lpadmin'.

lpadmin s/b in /etc/group .

to add a user named joe to lpadmin, from command line:

adduser joe lpadmin .
Code: Select all
The program 'suck' is currently not installed.  To run 'suck' please ask your administrator to install the package 'suck'
toomuchcoffee
Level 1
Level 1
 
Posts: 41
Joined: Wed Apr 18, 2012 8:24 am

Re: LMDE Sharing a printer (home network)

Postby altair4 on Thu Apr 26, 2012 12:59 pm

In Debian Mint ( at least the XFCE version ) Samba is pretty much broken by default so you should have done this first:
Code: Select all
sudo apt-get install libsmbclient
sudo apt-get install smbclient
sudo apt-get install python-smbc

Then edit smb.conf as root:
Code: Select all
gksu gedit /etc/samba/smb.conf

Add the following line to the [global] section:
Code: Select all
map to guest = Bad user

Then look for the [printers] share and change the "guest ok" line from no to yes:
[printers]
comment = All Printers
browseable = No
path = /var/spool/samba
printable = yes
guest ok = yes
read only = yes
create mask = 0700

Then restart samba:
Code: Select all
    sudo service samba restart


On the CUPS end:

** Make sure you can print locally to the printer.
** Then run:
Code: Select all
system-config-printer

And do all this stuff:
Server > Settings > Check "Publish Shared Printers connected to this system"
Right Click the attached printer > Properties > Policies > Check Enabled, Accepting Jobs, and Shared
Please add a [SOLVED] at the end of your original subject header if your question has been answered and solved.
altair4
Level 16
Level 16
 
Posts: 6151
Joined: Tue Feb 03, 2009 10:27 am

Re: LMDE Sharing a printer (home network)

Postby ddalley on Thu Apr 26, 2012 1:43 pm

altair4 wrote:In Debian Mint ( at least the XFCE version ) Samba is pretty much broken by default so you should have done this first:
Code: Select all
sudo apt-get install libsmbclient
sudo apt-get install smbclient
sudo apt-get install python-smbc


Our neverending SAMBA journey continues.

The libsmbclient is installed here, however the other two files are not.

altair4 wrote:Then edit smb.conf as root:
Code: Select all
gksu gedit /etc/samba/smb.conf

Add the following line to the [global] section:
Code: Select all
map to guest = Bad user


I also edited this file to unremark the name resolving line and reorder it, as usual with host last, to actually set up the networking printer driver.

For some reason the icon won't let me rename it, though.

altair4 wrote:Then look for the [printers] share and change the "guest ok" line from no to yes:
[printers]
comment = All Printers
browseable = No
path = /var/spool/samba
printable = yes
guest ok = yes
read only = yes
create mask = 0700


Would you remind me again what this does, please?
ddalley
Level 4
Level 4
 
Posts: 283
Joined: Sun Mar 15, 2009 4:25 am
Location: Toronto, Canada

Re: LMDE Sharing a printer (home network)

Postby altair4 on Thu Apr 26, 2012 2:15 pm

If you're talking about the [printers] share, it's set up to require credentials from the client before printing is allowed. Setting "guests ok" to yes allows anyone to print to that printer.

BTW, the [printers] share really isn't a share like a folder share in Samba. It creates a sharable printer for every printer that CUPS passes to it. That's why the [printers] share itself is not browseable.
Please add a [SOLVED] at the end of your original subject header if your question has been answered and solved.
altair4
Level 16
Level 16
 
Posts: 6151
Joined: Tue Feb 03, 2009 10:27 am

Re: LMDE Sharing a printer (home network)

Postby ddalley on Thu Apr 26, 2012 2:21 pm

Um, so that means it is for sharing through the computer to which the printer is attached?

My printer is on a NAS box's USB port, so it isn't attached to a PC directly and I've never had to make a guest edit before for it to work.
ddalley
Level 4
Level 4
 
Posts: 283
Joined: Sun Mar 15, 2009 4:25 am
Location: Toronto, Canada

Re: LMDE Sharing a printer (home network)

Postby toomuchcoffee on Thu Apr 26, 2012 3:11 pm

altair4 wrote:In Debian Mint ( at least the XFCE version ) Samba is pretty much broken by default so you should have done this first:
Code: Select all
sudo apt-get install libsmbclient
sudo apt-get install smbclient
sudo apt-get install python-smbc

Then edit smb.conf as root:
Code: Select all
gksu gedit /etc/samba/smb.conf

Add the following line to the [global] section:
Code: Select all
map to guest = Bad user

Then look for the [printers] share and change the "guest ok" line from no to yes:
[printers]
comment = All Printers
browseable = No
path = /var/spool/samba
printable = yes
guest ok = yes
read only = yes
create mask = 0700

Then restart samba:
Code: Select all
    sudo service samba restart


On the CUPS end:

** Make sure you can print locally to the printer.
** Then run:
Code: Select all
system-config-printer

And do all this stuff:
Server > Settings > Check "Publish Shared Printers connected to this system"
Right Click the attached printer > Properties > Policies > Check Enabled, Accepting Jobs, and Shared


Had done all that up to running
Code: Select all
system-config-printer

It launches but I got this on the terminal:
Code: Select all
coffee@coffee ~ $ system-config-printer
ERROR:dbus.proxies:Introspect error on :1.86:/: dbus.exceptions.DBusException: org.freedesktop.DBus.Error.AccessDenied: Rejected send message, 1 matched rules; type="method_call", sender=":1.85" (uid=1000 pid=3810 comm="/usr/bin/python /usr/bin/system-config-printer ") interface="org.freedesktop.DBus.Introspectable" member="Introspect" error name="(unset)" requested_reply="0" destination=":1.86" (uid=0 pid=3815 comm="/usr/lib/cups-pk-helper/cups-pk-helper-mechanism ")

And the window seems to freeze after some time..

Right clicking the printer gives me an error:
Code: Select all
Option 'printer-resolution' has value '(unknown IPP tag)' and cannot be edited.
but everything is setup the way you instructed :? .


The printer is connected to the box through USB, box is connected to router, laptop is on wireless... when I try to print from the laptop I get a "printer is not responding"..

I already switched from coffee to beer by now :o .

edit:
I ran your how/to on sharing folders between both machines yesterday and it worked perfectly..
Code: Select all
The program 'suck' is currently not installed.  To run 'suck' please ask your administrator to install the package 'suck'
toomuchcoffee
Level 1
Level 1
 
Posts: 41
Joined: Wed Apr 18, 2012 8:24 am

Re: LMDE Sharing a printer (home network)

Postby altair4 on Thu Apr 26, 2012 3:24 pm

coffee@coffee ~ $ system-config-printer
ERROR:dbus.proxies:Introspect error on :1.86:/: dbus.exceptions.DBusException: org.freedesktop.DBus.Error.AccessDenied: Rejected send message, 1 matched rules; type="method_call", sender=":1.85" (uid=1000 pid=3810 comm="/usr/bin/python /usr/bin/system-config-printer ") interface="org.freedesktop.DBus.Introspectable" member="Introspect" error name="(unset)" requested_reply="0" destination=":1.86" (uid=0 pid=3815 comm="/usr/lib/cups-pk-helper/cups-pk-helper-mechanism ")

Cheese and crackers ! I have no idea what that's all about. I try to stay away from Debian based Mint for reasons like this. Was this an update to an earlier LMDE or was this a new install of the latest respin? I try to do some searches on that message but it looks like multiple failures to me.
Please add a [SOLVED] at the end of your original subject header if your question has been answered and solved.
altair4
Level 16
Level 16
 
Posts: 6151
Joined: Tue Feb 03, 2009 10:27 am

Re: LMDE Sharing a printer (home network)

Postby altair4 on Thu Apr 26, 2012 3:36 pm

I did a search on the second error message:
Option 'printer-resolution' has value '(unknown IPP tag)' and cannot be edited.

And it sent me back to this forum: viewtopic.php?f=198&t=99361
It appears to be a known bug.
Please add a [SOLVED] at the end of your original subject header if your question has been answered and solved.
altair4
Level 16
Level 16
 
Posts: 6151
Joined: Tue Feb 03, 2009 10:27 am

Re: LMDE Sharing a printer (home network)

Postby toomuchcoffee on Thu Apr 26, 2012 4:07 pm

Its a fresh UP4 final install... the laptop is the RC but everything is updated, the error probably has something to do with the UI... but like I said all the options are ticked, everything matches.
Code: Select all
The program 'suck' is currently not installed.  To run 'suck' please ask your administrator to install the package 'suck'
toomuchcoffee
Level 1
Level 1
 
Posts: 41
Joined: Wed Apr 18, 2012 8:24 am

Re: [SOLVED]LMDE Sharing a printer (home network)

Postby toomuchcoffee on Thu Apr 26, 2012 8:39 pm

Three letters, the first is a u, the second a f... can you guess the third one? :oops:
Oh man I went through folders and conf's and.. grrr.

Thank you very much for your help altair :D .

Actually I'm not even sure if it was the firewall....
Code: Select all
The program 'suck' is currently not installed.  To run 'suck' please ask your administrator to install the package 'suck'
toomuchcoffee
Level 1
Level 1
 
Posts: 41
Joined: Wed Apr 18, 2012 8:24 am

Linux Mint is funded by ads and donations.
 

Return to Other networking topics

Who is online

Users browsing this forum: No registered users and 3 guests