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)

demolition 2011-04-28 10:37

Re: Printing with N900
 
Hooray! I have access. I tested it by going to Administration and clicking on the button to edit the config file (top left). I did not actually edit it but to save the config file, one has to enter the password - and at last ** It worked **. Hooray!!

rotoflex 2011-04-28 10:47

Re: Printing with N900
 
What did you enter for "Username"?
user? root? lpadmin?

The "lppasswd -g lpadmin -a printer" just prompts for & sets a password, not a username.

demolition 2011-04-28 13:39

Re: Printing with N900
 
With it still being in testing, I think a few instructions need to be available for tech-nervous, tech-unaware or linux-learners because it's not a wholly obviuos process and it would be great to get everyone printing, regardless of their tech/linux knowledge. It would be good to get something in the wiki asap, which I'm happy to do bu would like some proofing.

Also, because I had trouble accessing :631 so I did a dpkg --purge then reinstalled the whole lot, which I now realise was needless. However, the steps are fresh in my mind so here's my merger of notes from everyone and my experience...

Installing Maemo CUPS

Pre Note:
(1) rootsh must be installed because there are some very simple tasks to be done in the terminal (X Terminal) that must be performed as 'root' (administrator).
(2) Leafpad must be installed to view and possibly edit a text file.
(3) These instructions are only to install CUPS on the N900. They are not for installing/associating printers with the device.

Installation
This method uses Faster Application Manager (FAM) because it circumvents the need to use apt-get thus making the process more fool-proof.
There is No Line-Break in individual terminal commands - that's word-wrap making it look like there is. However, at the end of each terminal command, enter should be pressed to action that command.
  1. Open FAM and click on "Manage repositories".
  2. Ensure the following repositories are activated: (Extras), Extras-Testing and Nokia Applications. A green dot appears next to active catalogues.
    - If these are not installed, details of how to are in the wki.
    - If the SDK repository is installed and active, installation is not possible because of depenency conflicts (i.e. the app manager might try to install the SDK dependencies, instead of the correct ones in Nokia Applications).
  3. Click on "Install applications" and select the packages called
    1. cups,
    2. cups-bsd,
    3. cups-client,
    - these all have version number 1.3.8-maemo12.

    NB. Error warnings may be generated saying that
    - "mp-fremantle-generic-pr", or a similarly name package, is going to be removed. This is of no concern but look through the fora to confirm.
    - "fakedebconf" is being replaced by "debconf". Again, nothing to worry about because the initial one is just a placeholder.
    Procede with the installation.
  4. Reboot device.
  5. Open X Terminal and type root.
  6. Next, type lppasswd -g lpadmin -a root and make up a password to use with the printer. It must contain at least one capital letter and one number (or it will be rejected).
    NB. This command generates a password that 'root' can use to access the printer. i.e. root is now the CUPS username.
  7. Next, type leafpad /etc/cups/cupsd.conf This opens cupsd.conf in leafpad, as "root" (file cannot be altered otherwise).
  8. Search for the line that starts DefaultAuthType The next term should be BasicDigest If it's not, edit cupsd.conf, save it, close leafpad and return to the terminal.
  9. Now, type killall cupsd
  10. Lastly, type cupsd and close the terminal.
  11. Open the browser (microB) and go to uri http://localhost:631 - this is CUPS's page.
  12. From the CUPS page you can add printers. To test the password, click on Administration at the top then click on the button to Edit Configuration File (under server).
  13. Do not actually edit the configuartion but press save.
  14. You will be prompted for a username and password. This is the same pair as step 6 above i.e. username is root and password is <whatever you chose>.
If the save is permitted: Great. If not, either the password's wrong or a step got missed out. If you're completely confused by it all, just ask for help, I did!

These instructions are to install CUPS, not a printer: that's the next step. However, I can confirm that CUPS can "see" both a wifi printer on my home network and one connected to my N900 by USB/h-e-n.
Please comment/edit to perfect these instructions.

From a dev point of view, might it be possible to have a 'master' package that installs the three sub packages, as well as a forth that can run a script from the application menu? The role of the script would be to automate steps 6 - 10 inclusive, which could, potentially, be called from an icon in the application menu.

@rotoflex - I realise that these instructions are quite similar to your apt-get ones so I hope you don't think I nicked anything! Trouble was, I couldn't comment on them directly because the guide seemed to be in quotes already. Does #6 answer your question? Also, what about stopping and restarting cupsd?

colin.stephane 2011-04-28 15:44

Re: Printing with N900
 
Quote:

Originally Posted by mase (Post 969842)
I will try to package foomatic-filters.

Hi Mase,

1st of all thanks for all the great work you already made.

I'm stuck like malandante error at post, I mean the error about foomatic-rip ...

So, my question is, do you always working on packaging the 'foomatic-filters' package ?

On my side I have successfully managed to build an optified package, but installing it, failed with error :
Code:

-bash-2.05b# dpkg -i foomatic-filters_3.0.2-20080211-3.2_all.deb
Selecting previously deselected package foomatic-filters.
(Reading database ... 37820 files and directories currently installed.)
Unpacking foomatic-filters (from foomatic-filters_3.0.2-20080211-3.2_all.deb) ...
Setting up foomatic-filters (3.0.2-20080211-3.2) ...
debconf: unable to initialize frontend: Dialog
debconf: (No usable dialog-like program is installed, so the dialog based frontend cannot be used. at /usr/share/perl5/Debconf/FrontEnd/Dialog.pm line 75.)
debconf: falling back to frontend: Readline
/var/lib/dpkg/info/foomatic-filters.postinst: line 51: $tempfile: ambiguous redirect
dpkg: error processing foomatic-filters (--install):
 subprocess post-installation script returned error exit status 1
Errors were encountered while processing:
 foomatic-filters
-bash-2.05b#

Any idea ?

You can download my package here : foomatic-filters_3.0.2-20080211-3.2_all.deb


A++

demolition 2011-04-28 15:57

Re: Printing with N900
 
Thought I was doing something wrong.

This is exactly where I'm up to - found a wifi printer, which my network seems to accept and thought it was all going so well ... then, yes got this foomatic thing.

Does printing via BT or USB also have this problem?


Edit:
I see from posts 200 onwards, it might be something to do with the ppd file. I will have a look for a linux ppd for my printer.
Can RAW be selected?
Pretty much I have gone through the steps a couple of posts above then gone Administration > Find Printer ... and CUPS found it. When I tried to print a test page it showed the foomatic error.

This must be possible because some, like 'theonelaw', seem to be printing fine. Is it printer specific or have I missed a step or two out?

@colin.stephane - thanks for trying to give the foomatic a re-jig.

Edit 2:
The problem exists with my USB printer too. CUPS can "see" the printer but still getting foomatic problem. Again, with generic ppd file, though I don't think that's the trouble anymore.

colin.stephane 2011-04-28 20:37

Re: Printing with N900
 
Quote:

Originally Posted by demolition (Post 996873)
Thought I was doing something wrong.

This is exactly where I'm up to - found a wifi printer, which my network seems to accept and thought it was all going so well ... then, yes got this foomatic thing.

Does printing via BT or USB also have this problem?


Edit:
I see from posts 200 onwards, it might be something to do with the ppd file. I will have a look for a linux ppd for my printer.
Can RAW be selected?
Pretty much I have gone through the steps a couple of posts above then gone Administration > Find Printer ... and CUPS found it. When I tried to print a test page it showed the foomatic error.

This must be possible because some, like 'theonelaw', seem to be printing fine. Is it printer specific or have I missed a step or two out?

@colin.stephane - thanks for trying to give the foomatic a re-jig.

Edit 2:
The problem exists with my USB printer too. CUPS can "see" the printer but still getting foomatic problem. Again, with generic ppd file, though I don't think that's the trouble anymore.

Ok, I must admit I'm not able to fix the 'foomatic-filters' package, and even I'm able to install it manually, the printer I have configured claim the command 'foomatic-rip' is not accessible ...

Searching to fix the problem, I have analyzed the ppd file and find inside it the 'foomatic-rip' invocation.

Then I remembered I have find the ppd on the Linux OpenPrinting site.

After that it's obvious the ppd was modified by the Linux OpenPrinting organisation because if I extract ppd from the windows driver, then this one don't require the 'foomatic-rip' command.

Try to manage the problem like me, and report if it work ...

A++

woody14619 2011-04-28 21:28

Re: Printing with N900
 
Quote:

Originally Posted by rotoflex (Post 996712)
What did you enter for "Username"?
user? root? lpadmin?

The "lppasswd -g lpadmin -a printer" just prompts for & sets a password, not a username.

Uhmm.... -a means "add user". The username is the paramiter, in this case, since the line says "-a printer", the username would be printer. :)

colin.stephane 2011-04-28 22:13

Re: Printing with N900
 
Quote:

Originally Posted by mase (Post 947171)
Got it!
I repackaged gtk+2.0 with printing support. I've incremented the package version
to avoid the update to the original version. You don't have to install the dev and
doc packages on the device.
http://rapidshare.com/files/448095611/gtk_2.0.tar.gz

Here is leafpad with printing support. You have to press ctrl+p to open the
printing dialog. There is no menu option to enter it.
http://rapidshare.com/files/44809682...emo2_armel.deb

Hi mase,

Can you provide the modification you made to compile gtk with cups support please.

I try to compile it on my side since the link to 'rapidshare' you provided doesn't work anymore due to inactivity d/l.

A++

demolition 2011-04-29 20:46

Re: Printing with N900
 
Quote:

Originally Posted by woody14619 (Post 997051)
Uhmm.... -a means "add user". The username is the paramiter, in this case, since the line says "-a printer", the username would be printer. :)

Was I too kryptic or was my explanation not correct? (#6 in instructions).

Quote:

Originally Posted by colin.stephane (Post 997064)
Hi mase,

Can you provide the modification you made to compile gtk with cups support please.

I try to compile it on my side since the link to 'rapidshare' you provided doesn't work anymore due to inactivity d/l.

A++

Did you manage to solve the foomatic-filter problem? I had a look at the foomatic website and downloaded the non-free and standard db tar.gz files. However, my battery ran out when unzipping the large file so I have some corruption in my download folder! Is reflashing the only way to resolve
ls: Input/output error

Do I need more than the correct ppd files for my printer(s)? What's in that deb file you posted? From what I can see a foomatic filter is just a ppd - am I wrong?

colin.stephane 2011-04-29 21:33

Re: Printing with N900
 
Ignore the deb file I have tried to generate (it doesn't work like explained in my post).

Extract a 'ppd' file from windows drivers of your printer ...

A++


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

vBulletin® Version 3.8.8