maemo.org - Talk

maemo.org - Talk (https://talk.maemo.org/index.php)
-   Applications (https://talk.maemo.org/forumdisplay.php?f=41)
-   -   Printing with N900 (https://talk.maemo.org/showthread.php?t=56932)

theonelaw 2011-01-17 11:23

Re: Printing with N900
 
3 Attachment(s)
Quote:

Originally Posted by freemangordon (Post 922180)
strange, i have installed cups and cups-client and have lpadmin on my phone. btw there is hidden dependency to bash, you need it installed otherwise configuration script of one of cups dependencies fails. and you need to start lpadmin as root. sorry, seems caanot help any further

Bash ? I am preparing to give this all a try,
from what you observe it would be better to install bash first then the
cups packages ?

I just finished installing the power46 and am ready to give cups a go.

Updated:=====================

<I had reflashed, installed powerk46, mc and a few other tools>

I installed bash for good measure,
I eventually installed the cups
(apt-get install cups)
and then, distracted, moved on to some other things

eventually came back to the cups issue and went to
http://localhost:631/

and was astonished to find both a Cups pdf printer (home machine)
and my hp wifi printer (automagically) installed and ready.
I did not even need to install them - they just came up that way,
which in all the times I have fooled around with Cups
I have never seen that happen !

Of course I printed a test page

Now to find a way to trick some app (FileBox maybe ?)
into printing (blind ?)...

Update 2:

After apt-get install cups-client
I checked both evince and the adobe reader,
neither had the printing bits in the packages.
Checked the Gnumeric package as well...
Still looking for a way to print...

hung up on apt-get install cups-pdf due to papersize,
but this is not a showstopper

theonelaw 2011-01-18 19:23

Re: Printing with N900
 
1 Attachment(s)
Ok Done:
everything mentioned in the previous posts needs to be done

It works like This, from scratch, as root, in terminal:

I installed bash but from all the broken bits it did not seem to help. YMMV

Code:

apt-get install cups
apt-get install cups-client

get the pam stuff posted previously here:
http://talk.maemo.org/attachment.php...3&d=1285973625

Code:

dpkg --install libpam0g_1.0.1-maemo1_armel.deb
dpkg --configure -a

download this for the cups-pdf printer:
http://repository.maemo.org/pool/mae...1.21_armel.deb

Code:

dpkg --install libpaper/libpaper-utils_1.1.21_armel.deb
apt-get install cups-pdf

In /etc/cups/cupsd.conf enter this:

Code:

<Location /admin>
  AuthType BasicDigest
  AuthClass Group
  AuthGroupName cupsadm
  Encryption Required
  Order allow,deny
  Allow @LOCAL
</Location>

make the missing symlink:
Code:

ln -s /usr/lib/cups/backend-available/* /usr/lib/cups/backend/
now restart the server to digest all the kludgework:
Code:

/etc/init.d/cups restart
get yourself a password
Code:

lppasswd -g lpadmin -a root
in browser navigate to: http://localhost:631/
Anything you do there will require user root and password you entered
Code:

lppasswd -a user
will give you a user account to play with.

Certainly there will be a lot more to do beyond this,
but at this point you can do things like:

As a user in terminal - no need the root account anymore

Take a pdf already designed for the proper paper size
and convert it to postscript:

Code:

pdf2ps some.pdf some.ps
then aim the postscript file at the printer

Code:

lp some.ps
(for default printer)
or
Code:

lp -P printer_as_named_in_cups some.ps
(for a specific printer)

As of here the only printing is commandline printing postscript files,
but that can be anything you can cram into a pdf file so it is a lot.

Leafpad will not recognize the printer - it is broken inside leafpad.
forget FreOffice - its got nothing to print with, already checked
Maybe there is another application ported over from source
with legacy printing stubs that could be used, still looking for that.

what we need now is to clean all this up into a single batch install,

then we can start putting simple printing handles in all the applications.

Cheers

jstokes 2011-01-18 19:31

Re: Printing with N900
 
Quote:

Originally Posted by theonelaw (Post 922194)
I checked both evince and the adobe reader,
neither had the printing bits in the packages.

I don't have CUPS so I don't know for sure, but have you tried Ctrl-P in Evince?

freemangordon 2011-01-18 19:37

Re: Printing with N900
 
and by issuing lp <filename> you should be able to print any supported type of document. btw who is cups maintainer maybe one should ask him to fix the broken bits.

theonelaw 2011-01-18 19:45

Re: Printing with N900
 
Quote:

Originally Posted by jstokes (Post 923246)
I don't have CUPS so I don't know for sure, but have you tried Ctrl-P in Evince?

Opens the same broken printer dialogue we see in leafpad
which may indicate a place we could fix it device-wide maybe?:o

theonelaw 2011-01-18 19:53

Re: Printing with N900
 
Quote:

Originally Posted by freemangordon (Post 923249)
and by issuing lp <filename> you should be able to print any supported type of document. btw who is cups maintainer maybe one should ask him to fix the broken bits.

Think it is Mase who gas been away almost a month

He had a diary comment is all I can find outside the thread.

If he has drifted off (as many have) then it may need someone else's care.

Other than text and pdf what do you think could be printed this way?

I was thinking it might not be too difficult to make a simple widget
to pull in pdf's and batch-file print them. maybe....:confused:

jstokes 2011-01-18 19:54

Re: Printing with N900
 
Quote:

Originally Posted by theonelaw (Post 923252)
which may indicate a place we could fix it device-wide maybe?:o

In GTK+ itself, I think the file gtk/gtkprintunixdialog.c is the file that would be needed. Unfortunately my GTK+ skills are not that hot and I don't have a Linux install (so I can use the SDK) anymore

theonelaw 2011-01-18 20:09

Re: Printing with N900
 
Quote:

Originally Posted by jstokes (Post 923259)
In GTK+ itself, I think the file gtk/gtkprintunixdialog.c is the file that would be needed. Unfortunately my GTK+ skills are not that hot and I don't have a Linux install (so I can use the SDK) anymore

Looks sexy - I will have a run at this one. thanks! :D:D:D

woody14619 2011-01-18 20:21

Re: Printing with N900
 
FYI: Fenec/Firefox for N900 has printing support. :) I think Opera does as well.

theonelaw 2011-01-19 20:30

Re: Printing with N900
 
Quote:

Originally Posted by woody14619 (Post 923279)
FYI: Fenec/Firefox for N900 has printing support. :) I think Opera does as well.

Opera does not.
Still the same old Opera it ever was - menu made with crayons
and no dangerous functions like print or save or anything
that any reasonable person might want in a browser.

Thanks for suggesting though - it was worth checking anyway

Will check fennec next
but I think I am definitely on to implementing a widget/app
for printing with the gtk + 2 dialogue (I hope!)


All times are GMT. The time now is 12:16.

vBulletin® Version 3.8.8