Unix Technical Forum

Setting up a PCL printer (Samsung ML-2150)

This is a discussion on Setting up a PCL printer (Samsung ML-2150) within the Linux Operating System forums, part of the Unix Operating Systems category; --> Either I'm missing something fundamental, or setting up printers under Linux is still a black art. Although I've been ...


Go Back   Unix Technical Forum > Unix Operating Systems > Linux Operating System

FAQ Members List Calendar Search Today's Posts Mark Forums Read
  #1 (permalink)  
Old 01-17-2008, 09:21 PM
Charlie Gibbs
 
Posts: n/a
Default Setting up a PCL printer (Samsung ML-2150)

Either I'm missing something fundamental, or setting up printers
under Linux is still a black art. Although I've been running Linux
for several years, I've never had a printer connected to my box.
I'm beginning to find out why.

Recently I purchased a Samsung ML-2150 laser printer. I had checked
linuxprinting.org, which gives this printer the coveted three-penguin
rating. In fact, the manual (a large PDF file on the installation
CD-ROM) contains a section on setting up the printer on Linux systems,
and the CD also contains Linux drivers and utilities that install in
a very Windows-y fashion. The included program "linux-config" opens
a window which allows you to add or remove printers and display their
status. One of the menus in this program allows you to print a test
page or select a file to be printed. This works perfectly - I even
told it to print both a small C source file and a PostScript file,
and it figured out what to do with each.

But now comes the hard part. How do I make it work with lpr? (Or
should I be asking, how do I make lpr work at all?) I've gone through
the printing HOWTO, as well as perusing the linuxprinting.org site,
but I'm obviously still missing something. If I say "lpr <filename>",
nothing happens; lpq just says "no entries". The Samsung setup
program set /etc/printcap to the following (leading comments removed):

lp:\
:sh:\
:mx#0:\
:sd=/var/spool/lpd/lp:\
:if=/usr/local/linuxprinter/filters/spl2print:\
:af=-Plp:\
:lp=/dev/lp0:

I'm running Slack 7 (kernel 2.2.13) on a P133 laptop; the printer
is attached to the parallel port. This is a PCL printer - I tried
fiddling with Ghostscript, but although it would display Postscript
documents on the screen, I couldn't get it to send them to the printer.

Where do I go from here? Is there a "Linux printing for dummies"
reference somewhere, or something that goes into more detail about
/etc/printcap and its various filters? At least I can print files
with Samsung's linux-config command, but I'd sure like to be able to
just pipe things to lpr. (That'll clear the way for the next step:
to set it up as a network printer. Pray for me.)

Side note: The Samsung ML-2150 is looking like a very nice printer.
I had been checking out what's available at local stores, and looking
them up on linuxprinting.org, and I had decided to settle for an HP
LaserJet 1300. I realized that this was a bit of a compromise, for
the 1300 is like a lot of new HP printers: a fancy curved housing
with a small paper tray that stuck out the front, and no controls
aside from maybe one button and a couple of LEDs. But it sounded
as if it would do the job, under Linux as well as Windows.

I went down to Staples and asked about the LJ1300. The salesman
said, "No, you want this one instead," and showed me the Samsung.
It looked good: a plain cube a foot on a side, which enclosed a
500-sheet paper tray (which can hold legal size if you unfold the
back and let the end stick out slightly at the back). It has a
real control panel: a two-line LCD and enough buttons to navigate
easily through the built-in menus, make settings, and generally
control the printer. It has both parallel and USB ports; I've
hooked my wife's Win98 laptop to the USB port, and the printer
is happily accepting data from it as well as my Linux box on the
parallel port, with no reconfiguration required. As an unexpected
bonus, it can even print double-sided. And here's the real kicker:
I was prepared to pay $569 (Canadian) for the LJ1300; the ML-2150
is $499 minus a $50 in-store rebate and a $100 factory rebate, so
it should work out to $350 once I manage to get my money back from
Samsung. I _hate_ rebate schemes - IMHO they're a scam - but even
without them I'm paying less than I would have for the HP and getting
a lot more printer in return.

As impressive as it looked, it was one that I hadn't seen before,
thus had done no research on. But I had no trouble getting onto an
in-store machine with Internet access once I convinced the salesman
that the sale hinged on what linuxprinting.org had to say about the
ML-2150. Once I confirmed that this printer got the thumbs-up, I
closed the deal.

Side note 2: This is the second time in the last few months that
I've walked into a store with the intention to buy an HP product
and come out with a Samsung. The other was a low-end digital
camera, and again the salesman steered me to a product that was
both cheaper and better. It seems that Samsung is a company
whose star is rising.

--
/~\ cgibbs@kltpzyxm.invalid (Charlie Gibbs)
\ / I'm really at ac.dekanfrus if you read it the right way.
X Top-posted messages will probably be ignored. See RFC1855.
/ \ HTML will DEFINITELY be ignored. Join the ASCII ribbon campaign!

Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
  #2 (permalink)  
Old 01-17-2008, 09:21 PM
P.T. Breuer
 
Posts: n/a
Default Re: Setting up a PCL printer (Samsung ML-2150)

Charlie Gibbs <cgibbs@kltpzyxm.invalid> wrote:
> Either I'm missing something fundamental, or setting up printers
> under Linux is still a black art.


No - you just edit printcap (unless you use some new-fangled thing like
cups).


> But now comes the hard part. How do I make it work with lpr?


Stick a stanza in printcap.

> nothing happens; lpq just says "no entries". The Samsung setup
> program set /etc/printcap to the following (leading comments removed):
>
> lp:\
> :sh:\
> :mx#0:\
> :sd=/var/spool/lpd/lp:\
> :if=/usr/local/linuxprinter/filters/spl2print:\
> :af=-Plp:\
> :lp=/dev/lp0:


Why call it lp? That's the default. Anyway, the above looks fine.
But I've always used PS printers, so I can't comment on the
input filter you are using there. I presume it converts incoming
postscript to PCL. and the "af" bit is crazy, no? It should be the name
of the accounting file! "-Plp"??? Oh, I get it, it's an argument to the
input filter, so you run

spl2print -Plp

Well, test that out on some postscript, and see what comes out. It
should be PCL.

Mind you, the "if" is strictly speaking the accounting filter, so it's
not expected to transform the input, just count it! But it looks OK
in principle. You could try it as an output filter instead, I suppose.


> I'm running Slack 7 (kernel 2.2.13) on a P133 laptop; the printer
> is attached to the parallel port. This is a PCL printer - I tried
> fiddling with Ghostscript, but although it would display Postscript
> documents on the screen, I couldn't get it to send them to the printer.


Uh - it will write the PCL file if you ask it to. After that you can cat
it to the printer port of your desire.


> Where do I go from here? Is there a "Linux printing for dummies"


You've done fine. Now check it. You want to check that your printer port
can read PCL by catting a PCL file to it. You also want to check that
your mentioned files and spools exist. And so on ...

Are you sure you are using a printing system that uses printcap? Only
the lpr (bsd print daemon) line do.


Peter
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
  #3 (permalink)  
Old 01-18-2008, 09:38 AM
Christopher Estep
 
Posts: n/a
Default Re: Setting up a PCL printer (Samsung ML-2150)

Charlie Gibbs wrote:
> Either I'm missing something fundamental, or setting up printers
> under Linux is still a black art. Although I've been running Linux
> for several years, I've never had a printer connected to my box.
> I'm beginning to find out why.
>
> Recently I purchased a Samsung ML-2150 laser printer. I had checked
> linuxprinting.org, which gives this printer the coveted three-penguin
> rating. In fact, the manual (a large PDF file on the installation
> CD-ROM) contains a section on setting up the printer on Linux systems,
> and the CD also contains Linux drivers and utilities that install in
> a very Windows-y fashion. The included program "linux-config" opens
> a window which allows you to add or remove printers and display their
> status. One of the menus in this program allows you to print a test
> page or select a file to be printed. This works perfectly - I even
> told it to print both a small C source file and a PostScript file,
> and it figured out what to do with each.
>
> But now comes the hard part. How do I make it work with lpr? (Or
> should I be asking, how do I make lpr work at all?) I've gone through
> the printing HOWTO, as well as perusing the linuxprinting.org site,
> but I'm obviously still missing something. If I say "lpr <filename>",
> nothing happens; lpq just says "no entries". The Samsung setup
> program set /etc/printcap to the following (leading comments removed):
>
> lp:\
> :sh:\
> :mx#0:\
> :sd=/var/spool/lpd/lp:\
> :if=/usr/local/linuxprinter/filters/spl2print:\
> :af=-Plp:\
> :lp=/dev/lp0:
>
> I'm running Slack 7 (kernel 2.2.13) on a P133 laptop; the printer
> is attached to the parallel port. This is a PCL printer - I tried
> fiddling with Ghostscript, but although it would display Postscript
> documents on the screen, I couldn't get it to send them to the printer.
>
> Where do I go from here? Is there a "Linux printing for dummies"
> reference somewhere, or something that goes into more detail about
> /etc/printcap and its various filters? At least I can print files
> with Samsung's linux-config command, but I'd sure like to be able to
> just pipe things to lpr. (That'll clear the way for the next step:
> to set it up as a network printer. Pray for me.)
>
> Side note: The Samsung ML-2150 is looking like a very nice printer.
> I had been checking out what's available at local stores, and looking
> them up on linuxprinting.org, and I had decided to settle for an HP
> LaserJet 1300. I realized that this was a bit of a compromise, for
> the 1300 is like a lot of new HP printers: a fancy curved housing
> with a small paper tray that stuck out the front, and no controls
> aside from maybe one button and a couple of LEDs. But it sounded
> as if it would do the job, under Linux as well as Windows.
>
> I went down to Staples and asked about the LJ1300. The salesman
> said, "No, you want this one instead," and showed me the Samsung.
> It looked good: a plain cube a foot on a side, which enclosed a
> 500-sheet paper tray (which can hold legal size if you unfold the
> back and let the end stick out slightly at the back). It has a
> real control panel: a two-line LCD and enough buttons to navigate
> easily through the built-in menus, make settings, and generally
> control the printer. It has both parallel and USB ports; I've
> hooked my wife's Win98 laptop to the USB port, and the printer
> is happily accepting data from it as well as my Linux box on the
> parallel port, with no reconfiguration required. As an unexpected
> bonus, it can even print double-sided. And here's the real kicker:
> I was prepared to pay $569 (Canadian) for the LJ1300; the ML-2150
> is $499 minus a $50 in-store rebate and a $100 factory rebate, so
> it should work out to $350 once I manage to get my money back from
> Samsung. I _hate_ rebate schemes - IMHO they're a scam - but even
> without them I'm paying less than I would have for the HP and getting
> a lot more printer in return.
>
> As impressive as it looked, it was one that I hadn't seen before,
> thus had done no research on. But I had no trouble getting onto an
> in-store machine with Internet access once I convinced the salesman
> that the sale hinged on what linuxprinting.org had to say about the
> ML-2150. Once I confirmed that this printer got the thumbs-up, I
> closed the deal.
>
> Side note 2: This is the second time in the last few months that
> I've walked into a store with the intention to buy an HP product
> and come out with a Samsung. The other was a low-end digital
> camera, and again the salesman steered me to a product that was
> both cheaper and better. It seems that Samsung is a company
> whose star is rising.


I have found that setting up printers, *especially* in Linux, has
gotten, if anything, easier, not harder. Using lpr is pretty much
unnecessary these days; instead, CUPS is the preferred (in most cases,
the only) option. For one thing, unlike lpr, CUPS explicitly supports
USB-based printers (and while my HP DeskJet 940C supports both parallel
and USB-based printing connections, USB-based connections are a LOT
quicker), which makes printer detection and configuration as easy in
Linux (or modern flavors of UNIX, such as Solaris 9 and later, which
also support CUPS) as in those OSes from Redmond or Cupertino. For
another, unlike lpr, CUPS also supports networked printers (whether you
are talking shared printers or printers with their own IP addreesses,
such as the odd HP LaserJet 5N that is still in use today). Lastly,
unlike lpr, CUPS even lets you share your own printer (even
auto-enabling SMB on a mixed network for you).
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
  #4 (permalink)  
Old 01-18-2008, 09:38 AM
mst
 
Posts: n/a
Default Re: Setting up a PCL printer (Samsung ML-2150)

On Sat, 01 Oct 2005 10:51:24 -0400 Christopher Estep
<pghammer21@comcast.net> wrote:

> Charlie Gibbs wrote:
> > Either I'm missing something fundamental, or setting up printers
> > under Linux is still a black art. Although I've been running Linux
> > for several years, I've never had a printer connected to my box.


Dredging up a post from 2004 and replying to it??? WTF?

"Aug 12 2004"

--
remove MYSHOES to email
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
  #5 (permalink)  
Old 01-18-2008, 09:38 AM
Unruh
 
Posts: n/a
Default Re: Setting up a PCL printer (Samsung ML-2150)


Yee, gads you have a old system there. 2.2 kernel?

Anyway, Is lpd running?
ps -aux|grep lpd
What does lpc say
lpc
status

Does the directory
/var/spool/lpd/lp
exist?
Look in the log files in /var/log for hints.


Christopher Estep <pghammer21@comcast.net> writes:

>Charlie Gibbs wrote:
>> Either I'm missing something fundamental, or setting up printers
>> under Linux is still a black art. Although I've been running Linux
>> for several years, I've never had a printer connected to my box.
>> I'm beginning to find out why.
>>
>> Recently I purchased a Samsung ML-2150 laser printer. I had checked
>> linuxprinting.org, which gives this printer the coveted three-penguin
>> rating. In fact, the manual (a large PDF file on the installation
>> CD-ROM) contains a section on setting up the printer on Linux systems,
>> and the CD also contains Linux drivers and utilities that install in
>> a very Windows-y fashion. The included program "linux-config" opens
>> a window which allows you to add or remove printers and display their
>> status. One of the menus in this program allows you to print a test
>> page or select a file to be printed. This works perfectly - I even
>> told it to print both a small C source file and a PostScript file,
>> and it figured out what to do with each.
>>
>> But now comes the hard part. How do I make it work with lpr? (Or
>> should I be asking, how do I make lpr work at all?) I've gone through
>> the printing HOWTO, as well as perusing the linuxprinting.org site,
>> but I'm obviously still missing something. If I say "lpr <filename>",
>> nothing happens; lpq just says "no entries". The Samsung setup
>> program set /etc/printcap to the following (leading comments removed):
>>
>> lp:\
>> :sh:\
>> :mx#0:\
>> :sd=/var/spool/lpd/lp:\
>> :if=/usr/local/linuxprinter/filters/spl2print:\
>> :af=-Plp:\
>> :lp=/dev/lp0:
>>
>> I'm running Slack 7 (kernel 2.2.13) on a P133 laptop; the printer
>> is attached to the parallel port. This is a PCL printer - I tried
>> fiddling with Ghostscript, but although it would display Postscript
>> documents on the screen, I couldn't get it to send them to the printer.
>>
>> Where do I go from here? Is there a "Linux printing for dummies"
>> reference somewhere, or something that goes into more detail about
>> /etc/printcap and its various filters? At least I can print files
>> with Samsung's linux-config command, but I'd sure like to be able to
>> just pipe things to lpr. (That'll clear the way for the next step:
>> to set it up as a network printer. Pray for me.)
>>
>> Side note: The Samsung ML-2150 is looking like a very nice printer.
>> I had been checking out what's available at local stores, and looking
>> them up on linuxprinting.org, and I had decided to settle for an HP
>> LaserJet 1300. I realized that this was a bit of a compromise, for
>> the 1300 is like a lot of new HP printers: a fancy curved housing
>> with a small paper tray that stuck out the front, and no controls
>> aside from maybe one button and a couple of LEDs. But it sounded
>> as if it would do the job, under Linux as well as Windows.
>>
>> I went down to Staples and asked about the LJ1300. The salesman
>> said, "No, you want this one instead," and showed me the Samsung.
>> It looked good: a plain cube a foot on a side, which enclosed a
>> 500-sheet paper tray (which can hold legal size if you unfold the
>> back and let the end stick out slightly at the back). It has a
>> real control panel: a two-line LCD and enough buttons to navigate
>> easily through the built-in menus, make settings, and generally
>> control the printer. It has both parallel and USB ports; I've
>> hooked my wife's Win98 laptop to the USB port, and the printer
>> is happily accepting data from it as well as my Linux box on the
>> parallel port, with no reconfiguration required. As an unexpected
>> bonus, it can even print double-sided. And here's the real kicker:
>> I was prepared to pay $569 (Canadian) for the LJ1300; the ML-2150
>> is $499 minus a $50 in-store rebate and a $100 factory rebate, so
>> it should work out to $350 once I manage to get my money back from
>> Samsung. I _hate_ rebate schemes - IMHO they're a scam - but even
>> without them I'm paying less than I would have for the HP and getting
>> a lot more printer in return.
>>
>> As impressive as it looked, it was one that I hadn't seen before,
>> thus had done no research on. But I had no trouble getting onto an
>> in-store machine with Internet access once I convinced the salesman
>> that the sale hinged on what linuxprinting.org had to say about the
>> ML-2150. Once I confirmed that this printer got the thumbs-up, I
>> closed the deal.
>>
>> Side note 2: This is the second time in the last few months that
>> I've walked into a store with the intention to buy an HP product
>> and come out with a Samsung. The other was a low-end digital
>> camera, and again the salesman steered me to a product that was
>> both cheaper and better. It seems that Samsung is a company
>> whose star is rising.


>I have found that setting up printers, *especially* in Linux, has
>gotten, if anything, easier, not harder. Using lpr is pretty much
>unnecessary these days; instead, CUPS is the preferred (in most cases,
>the only) option. For one thing, unlike lpr, CUPS explicitly supports
>USB-based printers (and while my HP DeskJet 940C supports both parallel
>and USB-based printing connections, USB-based connections are a LOT
>quicker), which makes printer detection and configuration as easy in
>Linux (or modern flavors of UNIX, such as Solaris 9 and later, which
>also support CUPS) as in those OSes from Redmond or Cupertino. For
>another, unlike lpr, CUPS also supports networked printers (whether you
>are talking shared printers or printers with their own IP addreesses,
>such as the odd HP LaserJet 5N that is still in use today). Lastly,
>unlike lpr, CUPS even lets you share your own printer (even
>auto-enabling SMB on a mixed network for you).

Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
  #6 (permalink)  
Old 01-18-2008, 09:38 AM
Enrique Perez-Terron
 
Posts: n/a
Default Re: Setting up a PCL printer (Samsung ML-2150)

On Sat, 01 Oct 2005 16:51:24 +0200, Christopher Estep <pghammer21@comcast.net> wrote:

> Charlie Gibbs wrote:

[...]
>> Recently I purchased a Samsung ML-2150 laser printer. I had checked
>> linuxprinting.org, which gives this printer the coveted three-penguin
>> rating. In fact, the manual (a large PDF file on the installation

[...]
>> But now comes the hard part. How do I make it work with lpr? (Or
>> should I be asking, how do I make lpr work at all?) I've gone through
>> the printing HOWTO, as well as perusing the linuxprinting.org site,
>> but I'm obviously still missing something. If I say "lpr <filename>",
>> nothing happens; lpq just says "no entries". The Samsung setup
>> program set /etc/printcap to the following (leading comments removed):
>>
>> lp:\
>> :sh:\
>> :mx#0:\
>> :sd=/var/spool/lpd/lp:\
>> :if=/usr/local/linuxprinter/filters/spl2print:\
>> :af=-Plp:\
>> :lp=/dev/lp0:
>>
>> I'm running Slack 7 (kernel 2.2.13) on a P133 laptop; the printer
>> is attached to the parallel port. This is a PCL printer - I tried


I don't know if Slackware uses CUPS. (I would bet on "yes".)
If it does, then keep in mind that Cups includes an lpr command that
interfaces with Cups. Cups even maintains a file /etc/printcap in order
to tell those programs that look for this file, what printers there
are.

I am not so conviced that the Samsung setup does the right thing w.r.t
Cups. However, I would expect that if the printer has not been
set up properly with Cups, the lpr command should say something, like
"no printers" or "unknown printer". A bit surprised that nothing
happens.

I don't remember off the top of my hat what it takes to define the
printer in Cups, how to tell Cups to use the filter "spl2print",
but if you just check if you have Cups installed, I can almost
certainly dig up anything you need to get the printer working.

While writing something comes to mind... You probably need a
PPD file describing the printer. With newer distributions comes
a database of such ppds, and the Cups printer setup looks in that
database. If not, or if the printer is too new for your installed
database, you can download the proper ppd from linuxprinting.org.

Some distributions have buggy interfaces to the Cups printer setup.
If that is your case, use the native Cups interface.

1. Check that Cups is running. The command

netstat -atn | grep 631

should return a line (some whitespace removed):

tcp 0 0 127.0.0.1:631 0.0.0.0:* LISTEN

The port 631 should appear in your /etc/services as "ipp".

If it is not running (but is installed), start it:

/etc/init.d/cups status # To make sure
/etc/init.d/cups start

and ensure it will start on next reboot:

chkconfig --add cups

(Not knowing Slackware, you may have to look in /etc/rc.d/init.d
instead)

2. Point your browser to http://localhost:631/

When asked for a user and password, root works.
The rest should be easy.

Since you tried lpr and nothing happened, I may be off the mark.
Perhaps you need to investigate why nothing happens. Check in
/var/log/cups/error_log. Lines prefixed 'E' are errors.

Another thing comes to mind... Perhaps all you are missing is
to send a SIGHUP to the cups daemon. killall -HUP cupsd.


-Enrique
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
  #7 (permalink)  
Old 01-18-2008, 09:39 AM
Charlie Gibbs
 
Posts: n/a
Default Re: Setting up a PCL printer (Samsung ML-2150)

In article <433ea856_1@x-privat.org>, mstg@linuxMYSHOESmail.org (mst)
writes:

> On Sat, 01 Oct 2005 10:51:24 -0400 Christopher Estep
> <pghammer21@comcast.net> wrote:
>
>> Charlie Gibbs wrote:
>>
>>> Either I'm missing something fundamental, or setting up printers
>>> under Linux is still a black art. Although I've been running Linux
>>> for several years, I've never had a printer connected to my box.

>
> Dredging up a post from 2004 and replying to it??? WTF?
>
> "Aug 12 2004"


Yes, I got quite a case of deja vu when I saw that. It was a
long time ago when I posted it. Anyway, Samsung were kind enough
to include a Linux driver on the CD that came with the printer.
It's long enough ago that I forget the details, but right now
when I say "lpr <filename>", a window pops open on my X desktop,
I click OK, and the file prints. It'd be a bit nicer if it just
printed without asking me anything, but I use the printer little
enough that it's no big deal.

The printer has both parallel and USB interfaces. I use the
parallel interface from my Linux box, while my wife uses the
USB interface to her Win98 laptop. Either of us can print
without doing any manual switching. I consider myself very
lucky that the salesman steered me to this printer - I was
about to hold my nose and go for an HP 1300.

--
/~\ cgibbs@kltpzyxm.invalid (Charlie Gibbs)
\ / I'm really at ac.dekanfrus if you read it the right way.
X Top-posted messages will probably be ignored. See RFC1855.
/ \ HTML will DEFINITELY be ignored. Join the ASCII ribbon campaign!

Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
Reply


Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On
Forum Jump


All times are GMT. The time now is 04:26 AM.


Powered by vBulletin® Version 3.6.5
Copyright ©2000 - 2008, Jelsoft Enterprises Ltd.
SEO by vBSEO 3.2.0
www.UnixAdminTalk.com