Active Topics

 



Notices


Reply
Thread Tools
Posts: 3,841 | Thanked: 1,079 times | Joined on Nov 2006
#1
Hi all,

I have repackaged the Debian LPRNG (BSD LPR, NG is Next Generation IIRC) for OS2007 (startup scripts adjusted, documentation stripped off, installation/de-installation scripts modified, and some other stuff).
(To find the lprng package: Link at bottom of posting)

So, what is this?
  • This is the Berkeley print system. It's compatible with the Common Unix Print System (CUPS), but much smaller (about 3.4MB installed)
  • This version is LPRNG. I may still at some stage pack up LPR, which is even smaller (one tenth of the size, i.e. a few hundred kilobytes), but the old LPR package has bugs which I'm still working on. Anyway, LPRNG is fully compatible and familiar to all users of BSD LPR/LPD. No glaring bugs found so far on the tablet version.
  • Note that, as opposed to the CUPS system, this system doesn't automatically scan your network for printers. You have to maintain a local /etc/printcap text file. If this scares you then CUPS could be better for you.
  • Why would you want this? Well, let's see:
  1. Does your network printer already support the types of files you want to print, e.g. postscript, pdf, maybe pictures?
  2. Or maybe your printer is connected to a computer where you already have the full mounty CUPS system installed? Then there's no need to duplicate that on your tablet.
  3. Are you comfortable with editing /etc/printcap to tell your tablet how to find your network printer(s)?
  4. Do you have concerns about the amount of space the print system requires on your tablet?
  • If "yes" to most of the above, then the lprng package may be for you. It's a simple install, just one debian package with no external dependencies.
  • If "no" to most of the above, and in particular if you really need full local filter support in order to print any type of file (because your network printer doesn't support this already), then you should instead look at the CUPS system provided by Penguinbait. (Not that the same type of filters couldn't be installed along with lprng, but I include none in this package.)
So, how to set it up?
  • Install the lprng package. For now I've put it at box.net (ideally these kind of things should end up in extras eventullay I suppose, so maybe I'll be setting it up at the garage. In any case I intend to continue maintaining this). Size: 1.5MB When installed: 3.4MB
  • The package comes pre-installed with a simple /etc/printcap file that will print to a remote printer named 'lp' (familiar to Unix LPR/LPD users..), on a host named 'remotehost'. To make it work with your network-accessible remote printer you must either edit /etc/printcap with the correct 'rm' and 'rp' values, or, if your printer is called 'lp' then just do what I did: I added an alias 'remotehost' in /etc/hosts on my Tablet, like so:
    192.168.2.10 mypc remotehost
  • If you edit /etc/hosts like I did in the simple example above then it's just print and go: lpr my-file.pdf
  • If you edit /etc/printcap then you have to either restart the print system, which can be done with /etc/init.d/lprng restart, or with the 'lpc' command: lpc restart all

Lastly, here is the example /etc/printcap the lprng package for OS2007 comes with:
Code:
# /etc/printcap: printer capability database. See printcap(5).
# You can use the filter entries df, tf, cf, gf etc. for
# your own filters. See the printcap(5) manual page for further 
# details.
lp|Remote printer entry:\
        :lp=:\
        :rm=remotehost:\
        :rp=lp:\
        :sd=/var/spool/lpd:\
        :lf=/var/log/lpd-errs:\
        :mx#0:
In the above file you can of course add any number of printers if you have access to several.

Please let me know of any problems. I have used it for only a few hours after I finished my adjust/repackage cycle, and it works for me. Install/de-install seems to work ok too, but I may have overlooked something yet of course.

Oh, and because LPR, LPRNG (this package) and CUPS all use the same commands (e.g. /usr/bin/lpr) then this package conflicts with the others and can't be installed at the same time.

Here is the link to the current package. If you open the following link you should find lprng_3.8.28dfsg.1-1.1_armel.deb there:

http://www.box.net/shared/zaj5id7dau

TA-T3
__________________
N800/OS2007|N900/Maemo5
-- Metalayer-crawler delenda est.
-- Current state: Fed up with everything MeeGo.

Last edited by TA-t3; 2007-10-26 at 09:37.
 

The Following User Says Thank You to TA-t3 For This Useful Post:
penguinbait's Avatar
Posts: 3,096 | Thanked: 1,525 times | Joined on Jan 2006 @ Michigan, USA
#2
Can I print to samba shared printers with this? Nice and small, I did not even know this was out here. I guess its only been two days. Cool stuff, you working on a mini KDE also?

hehe

Nice work

Last edited by penguinbait; 2007-10-25 at 22:49.
 
Posts: 3,841 | Thanked: 1,079 times | Joined on Nov 2006
#3
No mini KDE I'm afraid
I'm not familiar with samba shared printers, but I'll ask my sysadmin - he deals with printers, and cups as well as lpr(ng).

Edit: Talked to the sysadmin. As far as I can understand it, lpr/lprng can print to samba shared printers that have been set up to also support the lpr/lpd protocol - in other words, when they look like Unix printers too. From what I understand this is needed for CUPS to access them too, although a CUPS server controlling a printer can also export that printer as a samba shared printer, for the convenience of Windows machines.
The biggest difference between the CUPS system and the LPR/LPD system is that CUPS daemons keep talking among themselves on additional communication ports, in addition to being able to just print to lpr/lpd-enabled printers. I've found that systems running just lpr/lpd (or lprng) can print to any printers managed by either their local CUPS systems, or BSD LPD, or directly networked printers (which tend to support the lpr/lpd protocol first, but some of them also supports the newer additional IPP protocol which CUPS also uses.)
It's probably better to check the authorative sources, so I looked at wikipedia and quote this part:

Compatibility
CUPS provides both the System V and Berkeley printing commands so the traditional commands for printing can be used for CUPS. CUPS listens on port 515, which is the traditional LPD port (it treats this as a 'backend'). When CUPS is installed the lp System V printing system command and the lpr Berkeley printing system commands are installed as compatible programs. This allows a standard interface to CUPS and allows maximum compatibility with existing applications that rely on these printing systems.

(the 'Berkeley printing commands' mentioned above refers to the lpr/lpd, or BSD LPR systems I've been talking about earlier.)
For my own needs, I would install CUPS on a computer where a printer is physically connected, and use either a subset CUPS on a client machine (if the CUPS system on the computer with the printer has all the filters you won't actually need any on the client), or just BSD LPR or LPRNG. So that's why I put together the lprng package, it does just what's needed for me.
__________________
N800/OS2007|N900/Maemo5
-- Metalayer-crawler delenda est.
-- Current state: Fed up with everything MeeGo.

Last edited by TA-t3; 2007-10-27 at 15:09.
 
Posts: 3,841 | Thanked: 1,079 times | Joined on Nov 2006
#4
P.s. there are a few graphical interfaces around for monitoring a print queue, if there's any interest I can look at porting them too. For those running the KDE suite there's probably one integrated already though, but some other tool could maybe be useful for Hildon.
__________________
N800/OS2007|N900/Maemo5
-- Metalayer-crawler delenda est.
-- Current state: Fed up with everything MeeGo.
 
Posts: 11 | Thanked: 0 times | Joined on Mar 2009
#5
Sorry to resurrect an old thread, but I'm having a bit of trouble getting printing on my 770 to work with my networked printer (an HP LaserJet 4P, connected via an Edimax PS-1206).

I think the problem is with my printcap entry, but since I've never used printcap, I'm not sure.

lp|Remote printer entry:\
:lp=laser@192.168.0.7\
:rm=laser@192.168.0.7\
:rp=lp\
:sd=/var/spool/lpd:\
:lf=/var/log/lpd-errs:\
:mx#0:
Any ideas?
 
Posts: 3,841 | Thanked: 1,079 times | Joined on Nov 2006
#6
Try something like this:

Code:
lp|Remote printer entry:\
   :lp=:\
   :rm=printserver:\
   :rp=lp:\
   :sd=/var/spool/lpd:\
   :lf=/var/log/lpd-errs:\
   :mx#0:
and then you add
Code:
192.168.0.7  printserver
to /etc/hosts.
__________________
N800/OS2007|N900/Maemo5
-- Metalayer-crawler delenda est.
-- Current state: Fed up with everything MeeGo.
 

The Following User Says Thank You to TA-t3 For This Useful Post:
Posts: 11 | Thanked: 0 times | Joined on Mar 2009
#7
Well, it mostly worked.

Test text file is like this:
This is a test.
This is a test for printing.
This is a test for printing from the 770.
What came out of the printer was:
This is a test.
----blank----This is a test for printing.
----------------blank----------------This is a test for printing fro
So it's a start at least. Any ideas on what's going wrong?
 
qole's Avatar
Moderator | Posts: 7,109 | Thanked: 8,820 times | Joined on Oct 2007 @ Vancouver, BC, Canada
#8
That looks like you've got an LF (ASCII 10) without a CR (ASCII 13) in there. Don't know how to fix it, though.
__________________
qole.org --- twitter --- Easy Debian wiki page
Please don't send me a private message, post to the appropriate thread.
Thank you all for your donations!
 
Posts: 11 | Thanked: 0 times | Joined on Mar 2009
#9
Sadly, I don't know either.
 
Posts: 3,841 | Thanked: 1,079 times | Joined on Nov 2006
#10
It all depends on what your networked printer supports. Some can take text directly, some don't. And if they do, they make want cr/lf the way it seems here. Some printers can take postscript and sometimes also pdf, and sometimes postscript is all they can take.

How is your printer accessed? Is it directly networked? Or is it connected to a networked computer instead? In the latter case you will want to install Cups on that system, and all the filters it needs to swallow all kind of file types you care to send from your 770.
__________________
N800/OS2007|N900/Maemo5
-- Metalayer-crawler delenda est.
-- Current state: Fed up with everything MeeGo.
 
Reply


 
Forum Jump


All times are GMT. The time now is 00:03.