View previous topic :: View next topic |
Author |
Message |
wquiles n00b
Joined: 10 Jul 2004 Posts: 13
|
Posted: Sun Aug 15, 2004 9:51 pm Post subject: how to print to a network printer in my home lan? |
|
|
I have looked at the print guides but most information is for setting up a local printer that can be shared on a LAN. In my setup, I already have a PC in my home LAN running Windoze 2K and sharing a laser printer that I want to use in my Gentoo box.
PC with shared printer:
//doris-pc/Samsung
I am already using mount -t smbfs to mount/share a drive on that PC to a local mount/folder in my system so I know the network is perfect.
I have done this on RedHat years ago and recently on Xandros 2.0 but I can't seem to find in my Gentoo system "where" to make this happen
I am running KDE 3.2 and the 2.6.7-gentoo-r9 kernel with the following config file and flags:
Code: | bash-2.05b# cat make.conf
# These settings were set by the catalyst build script that automatically built this stage
# Please consult /etc/make.conf.example for a more detailed example
CFLAGS="-O3 -march=athlon-mp -pipe -fomit-frame-pointer"
CHOST="i686-pc-linux-gnu"
CXXFLAGS="${CFLAGS}"
MAKEOPTS="-j3"
GENTOO_MIRRORS="ftp:///ftp-stud.fht-esslingen.de/pub/Mirrors/gentoo/ http://mirrors.acm.cs.rpi.edu/gentoo/ http://gentoo.osuosl.org/ http://gentoo.mirrors.pair.com/"
USE="x86 3dnow -acpi alsa -apm arts cdr divx4linux dvd dvdr ftp -gnome -gtk mmx mozilla samba tiff usb xinerama"
bash-2.05b# |
Thanks in advance,
William |
|
Back to top |
|
|
donjuan l33t
Joined: 11 May 2004 Posts: 760 Location: At Uni
|
Posted: Mon Aug 16, 2004 12:48 am Post subject: How to "map" a Windows printer on your Gentoo box |
|
|
You probably used some GUIs written by the distro to do this in your other versions of Linux, but since Gentoo is Gentoo we don't have those . So I'll give you another solution. You can probably find other ways to do this, but this is how I do it.
Emerge foomatic and CUPS, and if you have an HP printer you probably also want hpijs.
Code: | emerge foomatic cups hpijs |
You might want to add foomatic and CUPS to your use flags in make.conf Code: | USE="foomaticdb cups" |
You'll need CUPS running for the next step and to be able to print:
Code: | # rc-update add cupsd default
# /etc/init.d/cupsd start |
Then go to a web browser on the Linux machine go to the url: http://localhost:631
Go to Manage Printers and select Add Printer
At some point you'll be asked for a username and password, I just always login as root.
At the next page you'll be asked for a name, location, and description. These are just descriptive, so if you screw up here you'll just confuse yourself, but the printer will still work .
Continue to the next page titled "Device for <printer>" and choose "Windows Printer via SAMBA" from the drop-down list.
Continue to the next page. Now this is where you need to be careful. This is how you direct CUPS to connect to the printer shared by the Windoze machine. Type in Code: | smb://<username>:<password>@<server>/<printer share name> |
The username and password are those you are using to connect to the Windoze machine, most commonly the username will be guest, and the password will be blank. The server is just what you had Windoze call the computer, and the printer share name is self-explanitory. For me it is Code: | smb://guest:@Athlon/HP LaserJet 2100 |
On the next page choose the model. I choose HP not HEWLETT-PACKARD so I get HP's Linux drivers, which I get from emerging hpijs. Then on the next page browse through that huge list of drivers and choose your printer, hopefully it's there or else you have to go onto the internet and find a place to get drivers or choose something close and hope it works. I haven't searched for drivers yet since all my printers are HPs.
Then after you're done with that, on the next page it will say "Printer <printer> has been added successfully." Click on the <printer> link, and then if you want it as default click on the "Set As Default" button. You'll probably want to print a test page also, just to make sure everything's OK .
EDIT: I don't think the "set as default" button will set that printer as the default for all users, so as user you can go to kprinter and set the new printer as default there, or on the command line type Code: | lpoptions -x <printer name> |
The printer name here is what you told CUPS to call the printer. |
|
Back to top |
|
|
tbg Tux's lil' helper
Joined: 05 Aug 2004 Posts: 90 Location: Winchester, MA USA
|
Posted: Tue Aug 17, 2004 8:38 pm Post subject: |
|
|
Thank you DonJuan, that was very helpful! |
|
Back to top |
|
|
wquiles n00b
Joined: 10 Jul 2004 Posts: 13
|
Posted: Sat Sep 04, 2004 3:01 pm Post subject: |
|
|
Outstanding - that worked GREAT for me as well. I am now printing just fine
Thanks so much ! |
|
Back to top |
|
|
coax Apprentice
Joined: 08 Sep 2003 Posts: 231 Location: Antwerp - Belgium
|
Posted: Sun Sep 05, 2004 9:07 am Post subject: |
|
|
Thank you! That did the trick allright _________________ - There is no such thing as having too many computers - |
|
Back to top |
|
|
Butts n00b
Joined: 08 Jul 2004 Posts: 40
|
Posted: Mon Sep 20, 2004 1:04 pm Post subject: |
|
|
Will this work for a network printer as well?
I have a wirelesss network with my SMC wireless router hosting the printer. Could I just give cups the ip address of the printer??
I will try this regardless, just wondering if you had any other insight.
Thanks. |
|
Back to top |
|
|
Jimeh n00b
Joined: 03 Sep 2004 Posts: 32 Location: England, UK
|
Posted: Wed Sep 22, 2004 7:53 pm Post subject: |
|
|
Thank you donjuan thats one excellant guide, I can now print to the HP deskjet attached to my Windows XP box!!!!!!! Superb |
|
Back to top |
|
|
Jimeh n00b
Joined: 03 Sep 2004 Posts: 32 Location: England, UK
|
Posted: Wed Sep 22, 2004 8:02 pm Post subject: |
|
|
donjuan wrote: |
EDIT: I don't think the "set as default" button will set that printer as the default for all users, so as user you can go to kprinter and set the new printer as default there, or on the command line type
Code: |
Code:
lpoptions -x <printer name>
|
|
Oh btw I think you made a typo. I believe you meant lpoptions -d <printer name> and not x. It's a very easy mistake to make considering how close the two keys are the keyboard.
Here is what man lpoptions has to say about the two arguments:
Code: |
-d dest[/instance]
Sets the default printer to dest. If instance is supplied then
that particular instance is used. This option overrides the system
default printer for the current user.
-x dest[/instance]
Removes the options for the named destination and instance, if
specified. If the named instance does not exist then this does
nothing.
|
|
|
Back to top |
|
|
|