Login | Register For Free | Help
Search for: (Advanced)

Mailing List Archive: Maemo: Users

Printing?

 

 

Maemo users RSS feed   Index | Next | Previous | View Threaded


atmasphere at atmasphere

Jan 28, 2007, 7:17 AM

Post #1 of 13 (528 views)
Permalink
Printing?

Can it be done?

It would be great to print from my N800 to a network accessible
printer... Anyone figure a hack for this?



--
Jonathan Greene
m 917.560.3000
AIM / iChat - atmasphere
gtalk / jabber - jonathangreene [at] gmail
Gizmo - JonathanGreene
blog - http://www.atmasphere.net/wp
_______________________________________________
maemo-users mailing list
maemo-users [at] maemo
https://maemo.org/mailman/listinfo/maemo-users


humberto at hpcf

Jan 28, 2007, 7:56 AM

Post #2 of 13 (522 views)
Permalink
Re: Printing? [In reply to]

Jonathan Greene wrote:

> It would be great to print from my N800 to a network accessible
> printer... Anyone figure a hack for this?

There are remote only lpr tools, like http://truffula.com/rlpr/. Maybe
these can run on maemo?


--
Humberto Ortiz-Zuazaga
Programmer-Archaeologist
University of Puerto Rico
http://www.hpcf.upr.edu/~humberto/
Attachments: signature.asc (0.24 KB)


dchallet at onetel

Jan 28, 2007, 11:38 AM

Post #3 of 13 (520 views)
Permalink
Re: Printing? [In reply to]

On Sunday 28 January 2007 16:56, Humberto Ortiz-Zuazaga wrote:
> Jonathan Greene wrote:
> > It would be great to print from my N800 to a network accessible
> > printer... Anyone figure a hack for this?
>
> There are remote only lpr tools, like http://truffula.com/rlpr/. Maybe
> these can run on maemo?

this is what I use in an other context:

#!/usr/bin/perl
my($file)=$ARGV[0];
system("scp $file user\@host:");
system("ssh user\@host lpr $file");
sleep 100;
system("ssh user\@host rm -f $file");
exit;
_______________________________________________
maemo-users mailing list
maemo-users [at] maemo
https://maemo.org/mailman/listinfo/maemo-users


james at linuxrebel

Jan 28, 2007, 12:51 PM

Post #4 of 13 (515 views)
Permalink
Re: Printing? [In reply to]

On Sunday 28 January 2007 07:56, Humberto Ortiz-Zuazaga wrote:
> Jonathan Greene wrote:
> > It would be great to print from my N800 to a network accessible
> > printer... Anyone figure a hack for this?
>
> There are remote only lpr tools, like http://truffula.com/rlpr/. Maybe
> these can run on maemo?


To my overly limited understanding the problem lies mostly in the shear size
and volume of printer filter(drivers) available. On a desktop cups is
nothing compared to the libraries needed to talk to the printers themselves.
I see that as the major problem. Maybe I'm wrong.

James
_______________________________________________
maemo-users mailing list
maemo-users [at] maemo
https://maemo.org/mailman/listinfo/maemo-users


james at linuxrebel

Jan 28, 2007, 12:56 PM

Post #5 of 13 (516 views)
Permalink
Re: Printing? [In reply to]

On Sunday 28 January 2007 11:38, Damien Challet wrote:
> On Sunday 28 January 2007 16:56, Humberto Ortiz-Zuazaga wrote:
> > Jonathan Greene wrote:
> > > It would be great to print from my N800 to a network accessible
> > > printer... Anyone figure a hack for this?
> >
> > There are remote only lpr tools, like http://truffula.com/rlpr/. Maybe
> > these can run on maemo?
>
> this is what I use in an other context:
>
> #!/usr/bin/perl
> my($file)=$ARGV[0];
> system("scp $file user\@host:");
> system("ssh user\@host lpr $file");
> sleep 100;
> system("ssh user\@host rm -f $file");
> exit;

Damien,

If I'm understanding this correctly, you are saying (in perl) take this
file and move it to that host and print it using it's defaults. Or am I
wrong. (If I'm right, slick idea!)

James
_______________________________________________
maemo-users mailing list
maemo-users [at] maemo
https://maemo.org/mailman/listinfo/maemo-users


dchallet at onetel

Jan 28, 2007, 1:43 PM

Post #6 of 13 (513 views)
Permalink
Re: Printing? [In reply to]

On Sunday 28 January 2007 21:56, James Sparenberg wrote:
> On Sunday 28 January 2007 11:38, Damien Challet wrote:
> > On Sunday 28 January 2007 16:56, Humberto Ortiz-Zuazaga wrote:
> > > Jonathan Greene wrote:
> > > > It would be great to print from my N800 to a network accessible
> > > > printer... Anyone figure a hack for this?
> > >
> > > There are remote only lpr tools, like http://truffula.com/rlpr/. Maybe
> > > these can run on maemo?
> >
> > this is what I use in an other context:
> >
> > #!/usr/bin/perl
> > my($file)=$ARGV[0];
> > system("scp $file user\@host:");
> > system("ssh user\@host lpr $file");
> > sleep 100;
> > system("ssh user\@host rm -f $file");
> > exit;
>
> Damien,
>
> If I'm understanding this correctly, you are saying (in perl) take this
> file and move it to that host and print it using it's defaults. Or am I
> wrong. (If I'm right, slick idea!)

Yes, that is correct, assuming also that key authentification is set up.

One should of course convert it into a shell script.

_______________________________________________
maemo-users mailing list
maemo-users [at] maemo
https://maemo.org/mailman/listinfo/maemo-users


atmasphere at atmasphere

Jan 28, 2007, 1:49 PM

Post #7 of 13 (520 views)
Permalink
Re: Printing? [In reply to]

On 1/28/07, Damien Challet <dchallet [at] onetel> wrote:
> On Sunday 28 January 2007 21:56, James Sparenberg wrote:
> > On Sunday 28 January 2007 11:38, Damien Challet wrote:
> > > On Sunday 28 January 2007 16:56, Humberto Ortiz-Zuazaga wrote:
> > > > Jonathan Greene wrote:
> > > > > It would be great to print from my N800 to a network accessible
> > > > > printer... Anyone figure a hack for this?
> > > >
> > > > There are remote only lpr tools, like http://truffula.com/rlpr/. Maybe
> > > > these can run on maemo?
> > >
> > > this is what I use in an other context:
> > >
> > > #!/usr/bin/perl
> > > my($file)=$ARGV[0];
> > > system("scp $file user\@host:");
> > > system("ssh user\@host lpr $file");
> > > sleep 100;
> > > system("ssh user\@host rm -f $file");
> > > exit;
> >
> > Damien,
> >
> > If I'm understanding this correctly, you are saying (in perl) take this
> > file and move it to that host and print it using it's defaults. Or am I
> > wrong. (If I'm right, slick idea!)
>
> Yes, that is correct, assuming also that key authentification is set up.
>
> One should of course convert it into a shell script.
>

That would be pretty amazing and if in OSX, I set up an automator
action to watch a particular folder and print new things... it would
totally work!

How would I make it a shell script? And how would you do it from
something like Opera for example? There is no file to move around...


--
Jonathan Greene
m 917.560.3000
AIM / iChat - atmasphere
gtalk / jabber - jonathangreene [at] gmail
Gizmo - JonathanGreene
blog - http://www.atmasphere.net/wp
_______________________________________________
maemo-users mailing list
maemo-users [at] maemo
https://maemo.org/mailman/listinfo/maemo-users


michaelnt at gmail

Jan 28, 2007, 3:17 PM

Post #8 of 13 (516 views)
Permalink
Re: Printing? [In reply to]

On 28/01/07, Jonathan Greene <atmasphere [at] atmasphere> wrote:

> That would be pretty amazing and if in OSX, I set up an automator
> action to watch a particular folder and print new things... it would
> totally work!
>
> How would I make it a shell script? And how would you do it from
> something like Opera for example? There is no file to move around...

the lp command above requires a postscript file whuch you can't
create. i'd like to see 'save to pdf'
_______________________________________________
maemo-users mailing list
maemo-users [at] maemo
https://maemo.org/mailman/listinfo/maemo-users


james at linuxrebel

Jan 28, 2007, 6:21 PM

Post #9 of 13 (511 views)
Permalink
Re: Printing? [In reply to]

On Sunday 28 January 2007 01:49:39 pm Jonathan Greene wrote:
> On 1/28/07, Damien Challet <dchallet [at] onetel> wrote:
> > On Sunday 28 January 2007 21:56, James Sparenberg wrote:
> > > On Sunday 28 January 2007 11:38, Damien Challet wrote:
> > > > On Sunday 28 January 2007 16:56, Humberto Ortiz-Zuazaga wrote:
> > > > > Jonathan Greene wrote:
> > > > > > It would be great to print from my N800 to a network accessible
> > > > > > printer... Anyone figure a hack for this?
> > > > >
> > > > > There are remote only lpr tools, like http://truffula.com/rlpr/.
> > > > > Maybe these can run on maemo?
> > > >
> > > > this is what I use in an other context:
> > > >
> > > > #!/usr/bin/perl
> > > > my($file)=$ARGV[0];
> > > > system("scp $file user\@host:");
> > > > system("ssh user\@host lpr $file");
> > > > sleep 100;
> > > > system("ssh user\@host rm -f $file");
> > > > exit;
> > >
> > > Damien,
> > >
> > > If I'm understanding this correctly, you are saying (in perl) take
> > > this file and move it to that host and print it using it's defaults.
> > > Or am I wrong. (If I'm right, slick idea!)
> >
> > Yes, that is correct, assuming also that key authentification is set up.
> >
> > One should of course convert it into a shell script.
>
> That would be pretty amazing and if in OSX, I set up an automator
> action to watch a particular folder and print new things... it would
> totally work!

No need since when you run this script it does the print command from the get
go and IIRC lpr works with OSX as well.
>
> How would I make it a shell script? And how would you do it from
> something like Opera for example? There is no file to move around...

You don't do it from opera per se but you create the program and then (if this
was a desktop) you tell opera that the print command is this script. Hmmm

James



_______________________________________________
maemo-users mailing list
maemo-users [at] maemo
https://maemo.org/mailman/listinfo/maemo-users


james at linuxrebel

Jan 28, 2007, 6:43 PM

Post #10 of 13 (516 views)
Permalink
Re: Printing? [In reply to]

On Sunday 28 January 2007 01:49:39 pm Jonathan Greene wrote:
> On 1/28/07, Damien Challet <dchallet [at] onetel> wrote:
> > On Sunday 28 January 2007 21:56, James Sparenberg wrote:
> > > On Sunday 28 January 2007 11:38, Damien Challet wrote:
> > > > On Sunday 28 January 2007 16:56, Humberto Ortiz-Zuazaga wrote:
> > > > > Jonathan Greene wrote:
> > > > > > It would be great to print from my N800 to a network accessible
> > > > > > printer... Anyone figure a hack for this?
> > > > >
> > > > > There are remote only lpr tools, like http://truffula.com/rlpr/.
> > > > > Maybe these can run on maemo?
> > > >
> > > > this is what I use in an other context:
> > > >
> > > > #!/usr/bin/perl
> > > > my($file)=$ARGV[0];
> > > > system("scp $file user\@host:");
> > > > system("ssh user\@host lpr $file");
> > > > sleep 100;
> > > > system("ssh user\@host rm -f $file");
> > > > exit;
> > >
> > > Damien,
> > >
> > > If I'm understanding this correctly, you are saying (in perl) take
> > > this file and move it to that host and print it using it's defaults.
> > > Or am I wrong. (If I'm right, slick idea!)
> >
> > Yes, that is correct, assuming also that key authentification is set up.
> >
> > One should of course convert it into a shell script.
>
> That would be pretty amazing and if in OSX, I set up an automator
> action to watch a particular folder and print new things... it would
> totally work!
>
> How would I make it a shell script? And how would you do it from
> something like Opera for example? There is no file to move around...

I believe the bash conversion would be.

#!/usr/bin/bash

file=$1
user=[put your user here]
host=[put fqdn or up of printer host here]

scp $file $user@$host:/tmp
ssh $user@$host `lpr /tmp/$file`
sleep 100
ssh $user@$host `rm $file`
echo "complete"

Though I'm not in a place to verify it yet. (No printer here.)

James

_______________________________________________
maemo-users mailing list
maemo-users [at] maemo
https://maemo.org/mailman/listinfo/maemo-users


jwender at gmail

Jan 28, 2007, 10:43 PM

Post #11 of 13 (510 views)
Permalink
Printing? [In reply to]

A little enhancement, but untested. And maybe it would be better to
use /bin/sh, because on normal devices no bash is installed.

#!/bin/sh

user=[put your user here]
host=[put fqdn or up of printer host here]

if [ $# -ge 1 ];then
file=$1
cat $file | ssh $user@$host 'lpr /tmp/$file'
else
cat | ssh $user@$host 'lpr /tmp/$file'
fi
echo "complete"

Cheerio, Jan
_______________________________________________
maemo-users mailing list
maemo-users [at] maemo
https://maemo.org/mailman/listinfo/maemo-users


james at linuxrebel

Jan 28, 2007, 11:56 PM

Post #12 of 13 (500 views)
Permalink
Re: Printing? [In reply to]

On Sunday 28 January 2007 10:43:30 pm Jan Wender wrote:
> A little enhancement, but untested. And maybe it would be better to
> use /bin/sh, because on normal devices no bash is installed.
>
> #!/bin/sh
>
> user=[put your user here]
> host=[put fqdn or up of printer host here]
>
> if [ $# -ge 1 ];then
> file=$1
> cat $file | ssh $user@$host 'lpr /tmp/$file'
> else
> cat | ssh $user@$host 'lpr /tmp/$file'
> fi
> echo "complete"


Just curious, why the cat?

>
> Cheerio, Jan
> _______________________________________________
> maemo-users mailing list
> maemo-users [at] maemo
> https://maemo.org/mailman/listinfo/maemo-users


_______________________________________________
maemo-users mailing list
maemo-users [at] maemo
https://maemo.org/mailman/listinfo/maemo-users


jwender at gmail

Feb 1, 2007, 11:24 AM

Post #13 of 13 (498 views)
Permalink
Re: Printing? [In reply to]

Hi,

On 1/29/07, James Sparenberg <james [at] linuxrebel> wrote:
> Just curious, why the cat?

Just to avoid hassles with IO redirection.

Cheerio, Jan
_______________________________________________
maemo-users mailing list
maemo-users [at] maemo
https://maemo.org/mailman/listinfo/maemo-users

Maemo users RSS feed   Index | Next | Previous | View Threaded
 
 


Interested in having your list archived? Contact Gossamer Threads
 
  Web Applications & Managed Hosting Powered by Gossamer Threads Inc.