Jump to content
  • Sky
  • Blueberry
  • Slate
  • Blackcurrant
  • Watermelon
  • Strawberry
  • Orange
  • Banana
  • Apple
  • Emerald
  • Chocolate
  • Charcoal
Dustpuppy

Network print server

Recommended Posts

Hi all!
 
I've made a working print server for OS with installed network disk and openprinter.
 
How it works:
It will be started in /etc/rc.d as deamon and opens a TCP port (standard=9100 like in real life) for listening.
A client can use "nprint" to send a file to the server.
The server will format the file and stores it in a queue. With a timer event the server prints line by line for each file in the queue. Each paper will be labelt with the address of the sender and a page number is printed on bottom of page.
Every computer with a network card and a printer can run the server, as long as you give every server a uniqe name/address.
Server is configurable with config file in /etc and logs all events in /var/log. It check's if printer has enough paper, and ink to print. It pauses print jobs, if out of paper or ink.
 
How to install:
On the server (needs an openprinter)
Install Open OS
Install network disk
pastebin get Bx6YHy9V /etc/rc.d/printserver.lua
pastebin get qKX1QmvE /etc/printserver.cfg
Setup print server in /etc/rc.cfg like enabled={"printserver"}.
Configure server in file /etc/printserver.cfg
Reboot
 
On the client :
Install Open OS
Install network disk
pastebin get g1B90KxW /usr/bin/nprint.lua
pastebin get 9CDUY8vX /usr/lib/extralib.lua
Wait until server is running and then use nprint to print on server printer.
 
Known bugs:
Can't use nprint on the server to print on own printer (just use print like before).
 
What i will do next:
Client based queue managment.
Write some more network based server ;)
 
 
Thanks for reading all this shit. Hope i get some feedback. :rolleyes:

Link to post
Share on other sites

I have problem with sending printjobs. Every time I try to print, I'll get "connection timeout" error.

Connection between computers works fine, it tested it with ServerFS.

EDIT: I think my printserver is not starting properly, if even. When I checked log it ignored repeated printserver.lua restarts. Also, there isn't any reaction when printer is out of paper/print (tested by taking all these out). Also, there is no reaction to missing printer, until I try to start program manually, which throws error.

EDIT 2: Tested on 1.10.2 and problem still persists.

Edited by Toskin
Link to post
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

Loading...

×
×
  • Create New...

Important Information

By using this site, you agree to our Terms of Use and Privacy Policy.