![]() |
nPrint - simple printing solution for N8X0'rs!
- an inquisitive soul recently posited a question
regarding printing for the IT... there are a few solutions, including a video showing someone printing via CUPS directly off the IT, printing via PB's KDE port, and (i thought) one approach possibly using FTP... - but my simple solution uses a software package readily available for the IT... dunno why i didn't think about this earlier... it's nothing special, really... the catch is that you need a *nix box already configured for printing and an available user account on the box (i use a notebook running Ubuntu)... - the incantation uses a shell command line pipe and ssh, with lpr on the receiving end... i tested .txt, .gif, .pdf, .jpg and all worked well (CUPS configuration)... #!/bin/sh # nPrint - print file from command line using remote host/acct # cat $1 | ssh $2 '( lpr )' - for example: nPrint foo.jpeg willie@192.168.1.101 or nPrint foo.txt varnell@foobar.net - note you can 'hardwire' the user/host if you like by substituting the $2 with username and IP/hostname... if you have not set up ssh key exchange, you'll be prompted for the remote user's password... (or you can just create a 'print' user on the remote system) - now if someone would come up with a gui file chooser, we'd have printing of files off the IT's desktop menu! :-) - hope this helps someone print from the IT... p.s. and i'm very sorry 770 users; this will work for you too... i'm abashed at how i callously forgot our vanguard IT owners... |
Re: nPrint - simple printing solution for N8X0'rs!
you are a genius.
Ah, and the guy printing from the tablet on youtube - it's me. |
Re: nPrint - simple printing solution for N8X0'rs!
Hehe, that's how I used to print from my N800 before I made the lprng package (which is just a few kilobytes anyway). :)
|
Re: nPrint - simple printing solution for N8X0'rs!
Quote:
(i really don't want to screw around with the file system on my IT, though) |
Re: nPrint - simple printing solution for N8X0'rs!
Searched but couldn't find... do you know where I can find this printing package? I would be printing to either a shared printer or a networked printer. TIA
|
Re: nPrint - simple printing solution for N8X0'rs!
Quote:
- the lprng build shouldn't be too hard - but it's the distribution of the package files across the file system, addition of the daemon to the memory pool, and the configuration that i don't want to conduct on my IT... (not that i'm not capable, mind you, but still messy if not officially supported)... - so for now i'll just use ssh and lpr on a remote system... simple and easy... - i will be looking into a small Python app to do file choosing... this will make things a bit more convenient with the stylus... |
Re: nPrint - simple printing solution for N8X0'rs!
Quote:
http://www.internettablettalk.com/fo...ad.php?t=10891 The link to the download is http://www.box.net/shared/zaj5id7dau The installed size is a bit larger than I remembered (the really small one was rdate), it's about 3.4MB. NB: Only tested on OS2007. |
Re: nPrint - simple printing solution for N8X0'rs!
Quote:
|
Re: nPrint - simple printing solution for N8X0'rs!
- i know it's bad form to post a reply to one's own post, but as an update on this feeble-minded printing solution:
i added an ash 'read' statement to the original script, and hardwired in a user- and hostname: #!/bin/sh # printit.sh - simple print for 770, n8x0 echo "File to print:" read file cat $file | ssh a_user@remote_box '( lpr )' exit 0 - the desktop entry: [Desktop Entry] Encoding=UTF-8 Version=0.1 Type=Application Name=printit Exec=/home/user/apps/printer.sh Icon=qgn_list_gene_default_app - and an osso-xterm one-liner (which gets around a convoluted '-e' osso-xterm option command line) named printer.sh and stored under /home/user/apps: #!/bin/sh /usr/bin/osso-xterm -e /home/user/apps/printit.sh - selecting the printit menu item opens an osso-xterm window which prompts for a filename (type full pathname to the file, such /home/user/MyDocs/foo.pdf or /media/mmc1/mypics/foo.gif), and then waits for an ssh password prompt on the remote box (OS X, *BSD, or Linux) hosting the *nix print server and lpr command... - i guess one could put in an 'ls' command for a specific directory before prompting for the filename as a reminder - perhaps: ls /home/user/print_folder/ - anyhow, now i have printing off the task menu! - hope this helps someone! |
Re: nPrint - simple printing solution for N8X0'rs!
I really like this lightweight approach, since I'm running standard maemo os2008 (not debian, not booting off mmc). I set up cups on my little nslu2 NAS (backup server mainly, "unslung").
Is there some kind of standardized file selection gui we could easily build off of? It would also be cool to add capability for a few more print options. These would be simple to add to your xterm-based script, though. Mostly file selection is a pain. Maybe calling from an existing file browser would be easiest. BTW, here's a bookmarklet to convert the current web page to pdf for printing with lpr (still takes an extra couple of clicks to save the pdf): javascript:void(location.href='http://www.htm2pdf.co.uk/?url='+escape(location.href)) |
All times are GMT. The time now is 23:14. |
vBulletin® Version 3.8.8