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)

narcisgarcia 2010-07-11 17:39

Re: Printing with N900
 
Quote:

lppasswd -g lpadmin -a <username>
Which username is needed to provide? In my system there are only "user" and "root", but with this command seems to create a new one because asks for a new password.

mase 2010-07-11 17:57

Re: Printing with N900
 
Try "user".

narcisgarcia 2010-07-12 08:54

Re: Printing with N900
 
Will this action create a new password for "user" ?
Will the system ask for a password on login since this point?

mase 2010-07-12 09:02

Re: Printing with N900
 
No, only a PW for the cups-systrem.

narcisgarcia 2010-07-12 09:43

Re: Printing with N900
 
Ok, works to manage settings in CUPS web interface (http://localhost:631/).

My problem now is that, when adding a new printer, in the second wizard page (Connection type, in spanish "Tipo de conexión"), there is a dropdown control without any option to select, and cannot follow with the button "Next".

Thanks

woody14619 2010-07-12 16:25

Re: Printing with N900
 
I had the same issue narcisgarcia. I wound up looking in the folder /usr/lib/cups/backend and found it empty. I also found a backend-available directory, with all the types listed, which seemed odd. So I linked things from backend-available into backend and the web GUI started working properly after that.

I figured it was because my setup was less than optimal, since I was hackishly installing things by hand with dpkg before it was all working with a simple apt-get cups :) But maybe that needs to be put into the setup script for cups, to make those links?

narcisgarcia 2010-07-13 07:21

Available backends
 
Ok, the following command worked for me, and I've now completed a printer configuration and printed successfully a test page:
Code:

ln -s /usr/lib/cups/backend-available/* /usr/lib/cups/backend/

mase 2010-07-13 15:27

Re: Printing with N900
 
I did not have to make a symlink. I could not produce this issue.

woody14619 2010-07-13 20:32

Re: Printing with N900
 
@Mase, I'm betting it's because you had pre-versions on your device. From a clean install (which I did on a friend's N900) the backend-available folder is empty, making the web page show no suitable protocols for printer URLs. After linking the files as noted above, all the protocols showed up in the web interface.

@narcisgarcia: Thanks for posting the simple one-liner to fix this issue. I mentioned it above, but having it spelled out is always good (esp for people later installing and having this issue. :) )

mase 2010-07-14 04:44

Re: Printing with N900
 
I took the sources of Debian Lenny, fixed a few dependencies and packaged them.
Which package provides the symlink?

woody14619 2010-07-14 20:12

Re: Printing with N900
 
I'm not sure which provide the links in Lenny, but I know none of them do it on the N900. :) I'd bet it's part of the setup script for one or more of the packages, probably the package(s) that provides the connectivity. (eg. if there's a cups-smb-backend.deb, it probably provides the link for smb). It could also be part of the dbconf package, which I think is a placeholder package for the N900, since it revolved around configuring an actual Debian system, which is not quite how Maemo is laid out.

All said though, running the link statement above does cause the dropdown in the web interface to populate, where a clean package install doesn't. The fact that that's all it takes to get this working is amazing. (Well, that and all the work you and BruceL have put into porting it!)

Thanks again to everyone who's worked on it for getting cups up and running! Only a few things use it right now, but I see this being as integral to the N900 in the future as fMMS has become for the phone side, if not more so. As more app developers learn that cups exists and add the minimal support needed to print via cups, the N900 is going to really start replacing my laptop. ;)

mase 2010-07-15 04:42

Re: Printing with N900
 
Ok, I will have a look at this.
The backend folder is there, but it is empty.
So before making the symlink, you will have to remove
the empty folder.
I am trying to find out, how it is created.

mase 2010-07-16 07:02

Re: Printing with N900
 
Another thing:
You have to type
lppasswd -a <username>
and the pw twice to add a user to the cups-digest.

mase 2010-07-16 07:13

Re: Printing with N900
 
I found this in the postinst-script:
Code:

        # Set up backends
        db_get cupsys/backend && SELECTED=$RET
        list=`echo $SELECTED | sed -e 's/, /,/g'`
        save_IFS=$IFS
        IFS=,
        (cd /usr/lib/cups/backend && rm -f http ipp lpd parallel scsi serial socket usb snmp dnssd)
        for module in $list; do
          ln /usr/lib/cups/backend-available/$module /usr/lib/cups/backend/$module
          if [ "$module" = "ipp" ]; then
            ln /usr/lib/cups/backend/ipp /usr/lib/cups/backend/http
          fi
        done
        IFS=$save_IFS

        # activate new backends on upgrades
        db_fset cupsys/backend changed false
       
        if dpkg --compare-versions "$2" lt-nl "1.3.4-2"; then
            for module in snmp scsi serial dnssd; do
                [ -e /usr/lib/cups/backend/$module ] || \
                ln /usr/lib/cups/backend-available/$module /usr/lib/cups/backend/$module
            done
        fi

Seems that this fails. But I get no configure error, but the backend folder stays
empty. For me the symlink is an ugly workaround.

rotoflex 2010-07-19 12:26

Re: Printing with N900
 
It is difficult for me to judge the present status of this project, as the thread's structure is developmental not illustrative or functional.

Is it successful in its current state?

narcisgarcia 2010-07-19 15:37

Part of a how-to
 
Here comes the right steps I think that drive me to the success:

1. Install packages:
Code:

apt-get install cups cups-client
2. Fix interface backends with:
Code:

if [ "$(ls /usr/lib/cups/backend/)" = "" ] ; then ln -s /usr/lib/cups/backend-available/* /usr/lib/cups/backend/ ; fi
2. Create cups' admin permission with:
Code:

lppasswd -g lpadmin -a root
3. Add printers with the web interface (works with iceweasel):
Code:

http://localhost:631/
With this I had enough for printing to a network postscript printer.

Now the main problem I see is the lack of printing support in the well integrated applications (specific Maemo applications).

mase 2010-07-19 16:59

Re: Printing with N900
 
The main problem is the right self configuring
of the package. The backend folder should
be set up automatically.

rotoflex 2010-07-20 14:41

Re: Printing with N900
 
I had a problem in http://localhost:631 of being asked at the end of Add a Printer for a user name and password for a network printer which requires no password.

I am not sure if the printer was asking for the password, or the setup program. I tried root and the root password, and some others, with no acceptance. The printer was not added.

I notice that if you use the Firefox browser on the N900, select a location, then click "print this map", it will give you a screen to select a printer (no good for me, since I don't have one added yet).

narcisgarcia 2010-07-20 15:47

Re: Printing with N900
 
rotoflex, have you tried to add the printer with the cups web interface from another computer? (ex. Ubuntu PC)

mase 2010-07-20 16:02

Re: Printing with N900
 
@rotoflex
Did you try the lppasswd command?
If this does not help, try the entries in cupsd.conf I've posted here.

rotoflex 2010-07-22 16:37

Re: Printing with N900
 
Thank you mase and narcisgarcia. The solution was to edit cupsd.conf as mase had stated earlier:

Quote:

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

<Location /admin>
AuthType BasicDigest
AuthClass Group
AuthGroupName cupsadm
Encryption Required
Order allow,deny
Allow @LOCAL
</Location>
After that, adding the printer was successful.

I was then able to print a test page to a network printer from the cups http:\\localhost:631\ interface.

Unfortunately, when attempting to print from Firefox, the list of available printers put up by Firefox still comes up with no printers in it, even after setting the single printer as the default.

You can access this printing screen in Firefox by pulling up a map in Mapquest and clicking "Print this Map" on the page.

This may be a Firefox issue of not accessing available printers via CUPS.

narcisgarcia 2010-07-24 16:47

Re: Printing with N900
 
I needed to manage CUPS with Iceweasel from Easy Debian, because with the default web browser couldn't press some links in CUPS web interface.

And with the same Iceweasel browser I can print because has full menus.

mase 2010-07-24 17:10

Re: Printing with N900
 
The package is still useless, while the backend folder keeps
empy.
Any solution? No packaging pros here?

sb10ck 2010-08-05 05:41

Re: Printing with N900
 
I have followed all steps described above (edit cups.conf and lppasswd). when i try to add a printer over localhost:631 and i enter root and Password, it always says, Username or PW are wrong. what can be wrong?

I try to add a bluetooth-printer. the printer appears in the list and i have copy the ppd-file from my ubuntu desk system.

Thanks for help

EDIT: Now it works (after a reboot). I can add the BT-Printer. But the testpage ist not printed. It says, a filter was failled. I think, only copy the ppd-file is not enough. My Canon-MP630is not in the list. The Generic printer Driver dont work too.

sblock.tel

BertvanDorp 2010-08-24 15:02

Re: Printing with N900
 
Wow, you guys came a long way. Thanks!

I'm in the middle of exams right now, but I am willing to put together some page describing the steps neccessary.

Then, I think it's time to develop a sharing pluging to be able to print in programs not supporting printing right now. Any ideas on this?

mase 2010-08-24 19:28

Re: Printing with N900
 
Nearly all programs do not support printing. Porting the latest version of
gtklp would help much. But the dependencies for it are hard to solve.
The one I have lready packaged does not provide a file-open dialog.
Only gtkpl <file> from the commandline is possible. The screen size
does not fit, too.
And i think, getting Nokia to support cups in their imageviewer and pdfviewer
is nearly impossible. I think, abiword could be rebuilt with cups support.

ghostcube 2010-09-24 09:54

Re: Printing with N900
 
hi folks
i followed all here
cups is running but i need to acees localhost:631/admin to get the backend

and i cant choose any printers although i ln -s the backend?

can anyone help here?

mase 2010-09-24 15:35

Re: Printing with N900
 
Yes, at the moment you must symlink the backend.

ghostcube 2010-09-25 12:12

Re: Printing with N900
 
hmm i did symlink and i edited cupsd.conf and i set lpadmin password.

but i cant add any browser the device list keeps empty.

any ideas?

maybe anyone could pastebin his cupsd.conf?

greetz

ghostcube 2010-09-25 13:40

Re: Printing with N900
 
i solved it.
i had to link the single files. the linked ones in backend have been empty with the command here shown.

and i have changed some parts in cupsd.conf
cause after installation i didnt have one.

greetz

WillianWives 2010-09-26 05:59

Re: Printing with N900
 
Any easier way to implement this? I'm interested!

longcat 2010-09-26 07:04

Re: Printing with N900
 
Are you talking about print option in conversations, or elsewhere around ? :)

WillianWives 2010-09-26 17:19

Re: Printing with N900
 
Im thinking about printing .doc files over my network printer...

rotoflex 2010-09-27 07:58

Re: Printing with N900
 
It looks like Apple is working toward wireless printing from their iphone, ipad, etc. now:

http://www.geek.com/articles/mobile/...y-hp-20100915/

ghostcube 2010-09-27 09:23

Re: Printing with N900
 
hi,
no chance to get anything printed here.
cups format aplication/postscript not supported
everytime i try to print i get this answer ...

anyone an idea?

greetz

toxaris 2010-09-27 10:38

Re: Printing with N900
 
Hmm, I get error on liboauth0, seams I cant install cups correctly due to version mismatch on liboauth0.
Anyone else got that problem?
Facebook stuff have it as dependence.

I get this:
Setting up liboauth0 (0.8.8-2) ...
Optifying usr/share/doc/liboauth0 -> /opt/maemo/usr/share/doc/liboauth0
mv: cannot rename '/usr/share/doc/liboauth0': No such file or directory
dpkg: error processing liboauth0 (--configure):
subprocess post-installation script returned error exit status 1
Errors were encountered while processing:
liboauth0
E: Sub-process /usr/bin/dpkg returned an error code (1)

ghostcube 2010-09-27 22:48

Re: Printing with N900
 
create the file that is missing!
get root
then vi /usr/share/doc/liboauth0
save it and try again

ghostcube 2010-09-28 13:26

Re: Printing with N900
 
anyone a idea for my problem descriped above?

greetz

woody14619 2010-10-01 22:56

Re: Printing with N900
 
1 Attachment(s)
@ghostcube and @mase:

I think I figured out both issues at once. The cups script DOES have a linking command in it, but it never runs. Reason being, the libpam0g library has an incorrect header in its postinst script. And since libpam0g doesn't install, neither does the cups script.

If you look at the postinst script to libpam0g, it calls out for #!/bin/bash which doesn't exist on a default N900. That call has to be changed to /bin/sh (which works fine).

This is why it was working for some people and not others. Some people have installed a working version of bash on their system, so it silently worked for them. Those without it, apt-get installed them, but failed on the config (which is silent in app manager).

The good news is, you can fix it pretty easily. Attached is a re-pack of the libpam0g library with the proper fix (bash ->sh). Use dpkg to install it as shown below and it should overwrite the existing one, then configure properly. The second command gets dpkg to configure anything else that needs configuring still (like cups).
Code:

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


mase 2010-10-02 02:33

Re: Printing with N900
 
Maybe you should upload the repackaged libpam to the repos.


All times are GMT. The time now is 04:57.

vBulletin® Version 3.8.8