Dustpuppy 16 Posted June 6, 2016 Share Posted June 6, 2016 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 OSInstall network diskpastebin get Bx6YHy9V /etc/rc.d/printserver.luapastebin get qKX1QmvE /etc/printserver.cfgSetup print server in /etc/rc.cfg like enabled={"printserver"}.Configure server in file /etc/printserver.cfgReboot On the client :Install Open OSInstall network diskpastebin get g1B90KxW /usr/bin/nprint.luapastebin get 9CDUY8vX /usr/lib/extralib.luaWait 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. Quote Link to post Share on other sites
Saddamo 3 Posted June 10, 2016 Share Posted June 10, 2016 I want to print server money I would like something similar: Motion sensor will detect a player in server bank, then the printer will print a page with Minecraft time, Minecraft day and it will spit out the page into the chest. Quote Link to post Share on other sites
BrisingrAerowing 12 Posted December 1, 2016 Share Posted December 1, 2016 This is quite cool. I used it as an example for how to implement services for my Proximity Door Daemon program. It would have taken much longer otherwise. Quote Link to post Share on other sites
Toskin 0 Posted September 7, 2017 Share Posted September 7, 2017 (edited) 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 September 12, 2017 by Toskin Quote Link to post Share on other sites