Reply
Thread Tools
linux_author's Avatar
Posts: 282 | Thanked: 69 times | Joined on Dec 2007 @ Penniless Park, Fla.
#1
- 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...

Last edited by linux_author; 2008-02-04 at 21:05.
 

The Following 13 Users Say Thank You to linux_author For This Useful Post:
debernardis's Avatar
Posts: 2,142 | Thanked: 2,054 times | Joined on Dec 2006 @ Sicily
#2
you are a genius.

Ah, and the guy printing from the tablet on youtube - it's me.

Last edited by debernardis; 2008-02-04 at 19:40.
 
Posts: 3,841 | Thanked: 1,079 times | Joined on Nov 2006
#3
Hehe, that's how I used to print from my N800 before I made the lprng package (which is just a few kilobytes anyway).
__________________
N800/OS2007|N900/Maemo5
-- Metalayer-crawler delenda est.
-- Current state: Fed up with everything MeeGo.
 
linux_author's Avatar
Posts: 282 | Thanked: 69 times | Joined on Dec 2007 @ Penniless Park, Fla.
#4
Originally Posted by TA-t3 View Post
Hehe, that's how I used to print from my N800 before I made the lprng package (which is just a few kilobytes anyway).
- i figured someone had an earlier, simple solution... btw, if you remember, which release of lprng did you use and about how big was the install package on the n800?

(i really don't want to screw around with the file system on my IT, though)
 
superstar's Avatar
Posts: 202 | Thanked: 28 times | Joined on Jan 2008
#5
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
 
linux_author's Avatar
Posts: 282 | Thanked: 69 times | Joined on Dec 2007 @ Penniless Park, Fla.
#6
Originally Posted by superstar View Post
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
- lprng? the poster has stated here on ITT that he didn't join up at garage.maemo.org and had hosted the files on some sharing network (but i haven't seen any links)...

- 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...
 
Posts: 3,841 | Thanked: 1,079 times | Joined on Nov 2006
#7
Originally Posted by linux_author View Post
- i figured someone had an earlier, simple solution... btw, if you remember, which release of lprng did you use and about how big was the install package on the n800?

(i really don't want to screw around with the file system on my IT, though)
My announcement was in this thread
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.
__________________
N800/OS2007|N900/Maemo5
-- Metalayer-crawler delenda est.
-- Current state: Fed up with everything MeeGo.
 
linux_author's Avatar
Posts: 282 | Thanked: 69 times | Joined on Dec 2007 @ Penniless Park, Fla.
#8
Originally Posted by TA-t3 View Post
My announcement was in this thread
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.
- tks for posting the link! the rdate util will also be helpful...
 
linux_author's Avatar
Posts: 282 | Thanked: 69 times | Joined on Dec 2007 @ Penniless Park, Fla.
#9
- 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!
 

The Following 2 Users Say Thank You to linux_author For This Useful Post:
GraphicsGuy's Avatar
Posts: 16 | Thanked: 2 times | Joined on Jan 2008 @ California, USA
#10
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))
 
Reply

Thread Tools

 
Forum Jump


All times are GMT. The time now is 21:19.