Lua printer questionForum: Printers Topic: Lua printer question started by: Uta Posted by Uta on Mar. 26 2008,20:38
I have installed DSL 4.2.5 on my HD, I have wifi working, sound working and printing working. My question concerns "Lua". I placed it's icon on my desktop (it's linked to /usr/local/bin/printing.lua) when I drop a text file on it nothing happens. As I said before printing is working from app menus (Ted,Firefox, etc...). My printer is a network printer that was configured via Apsfilter (gimp 4.x) and works great.Any ideas? Thanks! Posted by roberts on Mar. 26 2008,21:07
Likely that I used the Apsfilter default printer name of "lp" and yours is not./usr/local/bin/printing.lua is a script that I use everyday. If you can print from the command line then you can drag-n-drop text or postscript files to print. I always print to file from each application. Then when I am ready to actually print, I drag the .txt or .ps onto the printing desktop icon. I suggest to look at the script and look at the second to last line.
Change the os.execute to your specific needs. Posted by Uta on Mar. 26 2008,22:08
Thanks for your quick reply. I edited in my printer's name and it works great. Thank You! Posted by ^thehatsrule^ on Mar. 27 2008,00:00
I wonder if checking for the PRINTER env var would be useful? (and use something like os.getenv I suppose)
Posted by roberts on Mar. 27 2008,00:36
Is it only the printer name that differs for a:1. Unix network printer? 2. A USB printer? 3. A samba printer? I write script using mainly defaults (parallell and lp) especially when I do not own or cannot setup all supported situations. Perhaps those who use apsfilter in each supported protocol/printer style can post or verify that only a printer name is variable. It is of course then easy to implement an environment variable. However by default setup of apsfilter no such environment variable is created. |