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)

mase 2011-04-26 07:54

Re: Printing with N900
 
When the packages are working for you, please vote to
get it into stable. One more vote is needed.

rotoflex 2011-04-27 16:25

Re: Printing with N900
 
Quote:


CUPS Installation Instructions
  1. Enable Extras-testing and Extras-devel in Application Manager.
  2. Open XTerminal
  3. Enter "sudo gainroot"
  4. Enter "apt-get install debconf". This will install debconf, & remove fakedebconf.
  5. The following errors will be displayed:
    unable to initialize frontend: Dialog
    (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.)
    falling back to frontend: Readline
    unable to initialize frontend: Readline
    (Can't locate Term/ReadLine.pm in @INC (@INC contains: /etc/perl /usr/local/lib/perl/5.8.3 /usr/lib/perl/5.8 /usr/share/perl/5.8 /usr/local/lib/site_perl .) at /usr/share/perl5/Debconf/FrontEnd/Readlin.pm line 7.)
  6. close XTerminal
  7. In Application Manager, download "cups", "cups-client", & "cups-bsd"
  8. Close Application Manager, then switch off phone
  9. Turn phone on
  10. Connect to network
  11. Open internet browser, go to http://localhost:631
  12. The "Common UNIX Printing System 1.3.8" control page should load

Quote:


Adding a network printer
  1. Open internet browser, go to http://localhost:631
  2. Go to Administration -> Find New Printers
  3. See if your network printers are listed

I get stuck here. When I try to add a listed printer, it asks "Make: or Provide a PPD File:", I choose "Raw" make. Then N900 asks for authentication: user name and password.
The following all return "Invalid user name or password":
Username: (blank) Password: (blank)
Username: user Password: (blank)
Username: root Password: (root password)

demolition 2011-04-27 18:22

Re: Printing with N900
 
@rotoflex - I'm at the same stage and just need to jump through the final few hoops. Have a trawl through the posts above, where some people suggested what to do abot the password problem. Also, have a look at post 31; though I haven't yet so not sure whether to incluide the leading asterisks on each line. Where did you get those instructions? I find using FAM makes life a lot easier than faffing with apt-get. I will report back when I get output from my printer (I can get CUPS to see my USB printer). In the meanwhile, good luck with getting access!

woody14619 2011-04-27 18:40

Re: Printing with N900
 
Quote:

Originally Posted by rotoflex (Post 996308)
Then N900 asks for authentication: user name and password.

I would augment the above instructions as follows (where is this from?):

Quote:

6. enter "apt-get install cups cups-client cups-bsd"
7. enter "lppasswd -g lpadmin -a printer" supply a password
8. edit /etc/cups/cupsd.conf, change the DefaultAuthType to BasicDigest
9. enter "/etc/init.d/cups start"
10. Open internet browser, go to http://localhost:631
11. The "Common UNIX Printing System 1.3.8" control page should load
Then when asked for authentication, use printer, and the new password you made up in step 7.

Since you already did the above steps, you need to just do steps 7 through 9, and in step 9, replace "start" with "restart".

rotoflex 2011-04-27 19:45

Re: Printing with N900
 
I didn't get it from anywhere, I'm just noting the steps as I go along. Here is the revision:

Quote:


CUPS Installation Instructions
  1. Enable Extras-testing and Extras-devel in Application Manager.
  2. Open XTerminal
  3. Enter "sudo gainroot"
  4. Enter "apt-get install debconf". This will install debconf, & remove fakedebconf.
  5. The following errors will be displayed:
    unable to initialize frontend: Dialog
    (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.)
    falling back to frontend: Readline
    unable to initialize frontend: Readline
    (Can't locate Term/ReadLine.pm in @INC (@INC contains: /etc/perl /usr/local/lib/perl/5.8.3 /usr/lib/perl/5.8 /usr/share/perl/5.8 /usr/local/lib/site_perl .) at /usr/share/perl5/Debconf/FrontEnd/Readlin.pm line 7.)
  6. enter "apt-get install cups cups-client cups-bsd"
  7. xterminal will show the cups packages being installed. Wait until installation is finished.
  8. enter "lppasswd -g lpadmin -a printer"
  9. you will be asked to enter the password you want for printer administation.
  10. enter "leafpad /etc/cups/cupsd.conf"
  11. the leafpad editor will open /etc/cups/cupsd.conf for editing
  12. change the line "DefaultAuthType Basic" to "DefaultAuthType BasicDigest"
  13. click the menu bar at top, & click "Save"
  14. close the leafpad editor
  15. close XTerminal, switch off phone, then turn the phone on again
  16. Connect to network
  17. Open internet browser, go to http://localhost:631
  18. The "Common UNIX Printing System 1.3.8" control page should load

Quote:


Adding a network printer
  1. Open internet browser, go to http://localhost:631
  2. Go to Administration -> Find New Printers
  3. See if your network printers are listed


woody14619 2011-04-27 20:23

Re: Printing with N900
 
Ok... But really, there's no need to reboot the phone. My step 9 from above start the cups daemon, which is all you're accomplishing with the reboot (step 15) in yours. Both work, but one takes a lot longer and unnecessarily causes down time.

The bigger question is, did it work for you? :)

rotoflex 2011-04-27 20:33

Re: Printing with N900
 
I am still getting 403 Forbidden when I try to modify a printer.
(I had added two Samba printers on an earlier install, they are still listed in the N900, but not working from the N900 now.)

Also, printer administration via localhost:631 does not ask me for a password, & I seem to recall that it did in an earlier cups install that I had working well enough to add network printers at work.

I will work with it some more.

mase 2011-04-27 20:35

Re: Printing with N900
 
My network printer (cups server broadcast) was listed. There was
no need to add a printer manually or to login.

mase 2011-04-27 20:39

Re: Printing with N900
 
I think, for samba printers you need a ppd file.

rotoflex 2011-04-27 21:29

Re: Printing with N900
 
Quote:

Originally Posted by mase (Post 996421)
I think, for samba printers you need a ppd file.

Since it's a postscript printer, do I just download & extract the generic postscript ppd you posted at
http://talk.maemo.org/showpost.php?p...&postcount=206

If so, in what subdirectory should I put it?

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++

wumpwoast 2011-04-30 21:55

Re: Printing with N900
 
I'm amazed how well CUPS works these days. As soon as the packages were installed on my N900, I connected to wireless and found my server (CUPS 1.4.4, Debian squeeze) without even the slightest trouble. It just worked, without any configuration on my part outside of demolition's instructions!

lpr makes a great printer for text files and pdfs, which print exactly as I would have intended. Images are a little trickier though. I found that opening images (from either File Browser or Modest) and resizing them makes them print well enough on a single page. For US letter-size paper, setting a 2400x3000 to 40% of its original size (960x1200) will use most of the page capacity.

Ideally CUPS lpr would offer to scale images down to fit on a single page, but that is an upstream feature request. Many thanks to mase and everyone who cared enough to make N900 printing work!

demolition 2011-04-30 22:24

Re: Printing with N900
 
@wumpwoast - great to hear you're printing from your N900 and you found my install guide useful. I have a couple of questions...
- have you printed from Maemo or Easy Debian?
- what type of printer have you used wifi/network, usb or BT
- did you need to sort out the ppd file separately, or is that what you're in awe about (no need to do anything)?

mase 2011-05-01 07:50

Re: Printing with N900
 
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++

I did no modifications. Just rebuilt it with libcups2-dev installed.

colin.stephane 2011-05-01 09:57

Re: Printing with N900
 
Quote:

Originally Posted by mase (Post 998148)
I did no modifications. Just rebuilt it with libcups2-dev installed.

Thanks, I have right now the gtk compiled with cups printing support.

However, I have recompiled also evince, <ctrl>-<p> inside evince give me a printing menu, but inside this menu in the selection box for a printer, there is no printer avalaible (I have successfully defined & tested 2 printers at http://localhost:631).

What I have missed ?

Edit : Recompiled also Leafpad, exactly same problem, printing dialog open with an empty box to select printers ...

A++

mase 2011-05-01 10:29

Re: Printing with N900
 
With eviance there is no chance to print images, also with the desktop
version on my Debian. For leafpad and abiword you have to edit the
rules file to enable printing support. It is disabled there. Also in leafpad
you have to enter the printing dialog with ctrl+p. There is no menu entry.

colin.stephane 2011-05-01 11:00

Re: Printing with N900
 
Quote:

Originally Posted by mase (Post 998204)
With evince there is no chance to print images, also with the desktop
version on my Debian. For leafpad and abiword you have to edit the
rules file to enable printing support. It is disabled there. Also in leafpad
you have to enter the printing dialog with ctrl+p. There is no menu entry.

Well, I have omited to say I have edited the rules already, before recompiling, but also in my message, I say I have the printing dialog coming when I press <ctrl>-<p>, but there is no printer selectable in this dialog :

http://bigbob.fun.free.fr/No printer...ing dialog.png

Hope it help to understand my problem ...

A++

mase 2011-05-01 12:07

Re: Printing with N900
 
First you have to rebuild and install gtk+ with installed libcups2-dev.
Only the packages libgtk... are needed. Also install it in the sdk. Then
edit the rules of leafpad and / or abiword. Rebuild them with enabled
printing support. That's what I did. Now I can select my printer in the
printing dialog. If you don't build leafpad or abiword against the new
gtk libs, printing will not work.

colin.stephane 2011-05-01 14:58

Re: Printing with N900
 
Quote:

Originally Posted by mase (Post 998251)
First you have to rebuild and install gtk+ with installed libcups2-dev.
Only the packages libgtk... are needed. Also install it in the sdk. Then
edit the rules of leafpad and / or abiword. Rebuild them with enabled
printing support. That's what I did. Now I can select my printer in the
printing dialog. If you don't build leafpad or abiword against the new
gtk libs, printing will not work.

Damn, I don't see where I made a mistake, so here it is how I manage the things on my side :

Under scratchbox :

- I verify if cups devel files are installed.

Code:

[sbox-FREMANTLE_ARMEL: ~/tmp/Building/libgtk2.0-0] > dpkg -l libcups2-dev
Desired=Unknown/Install/Remove/Purge/Hold
| Status=Not/Installed/Config-files/Unpacked/Failed-config/Half-installed
|/ Err?=(none)/Hold/Reinst-required/X=both-problems (Status,Err: uppercase=bad)
||/ Name                              Version                          Description
+++-=================================-=================================-==================================================================================
ii  libcups2-dev                      1.3.8-maemo12                    Common UNIX Printing System(tm) - development files
[sbox-FREMANTLE_ARMEL: ~/tmp/Building/libgtk2.0-0] >

- Look good, so now it's time to get source of gtk libs push up the version & recompile.

Code:

[sbox-FREMANTLE_ARMEL: ~/tmp/Building/libgtk2.0-0] > fakeroot apt-get source libgtk2.0-0
Reading package lists... Done
Building dependency tree... Done
Need to get 17.0MB of source archives.
Get:1 http://repository.maemo.org fremantle/sdk/free gtk+2.0 2:2.14.7-1maemo33+0m5 (dsc) [949B]
Get:2 http://repository.maemo.org fremantle/sdk/free gtk+2.0 2:2.14.7-1maemo33+0m5 (tar) [17.0MB]
Fetched 17.0MB in 16s (1000kB/s)                                                                                                                           
dpkg-source: warning: extracting unsigned source package (./gtk+2.0_2.14.7-1maemo33+0m5.dsc)
dpkg-source: extracting gtk+2.0 in gtk+2.0-2.14.7
dpkg-source: unpacking gtk+2.0_2.14.7-1maemo33+0m5.tar.gz
[sbox-FREMANTLE_ARMEL: ~/tmp/Building/libgtk2.0-0] > cd gtk+2.0-2.14.7/
[sbox-FREMANTLE_ARMEL: ~/tmp/Building/libgtk2.0-0/gtk+2.0-2.14.7] > DEBEMAIL="COLIN Stephane <bigbob.fun@gmail.com>" dch -v 2:2.14.7-1maemo34+0m5 Add printing support ...
[sbox-FREMANTLE_ARMEL: ~/tmp/Building/libgtk2.0-0/gtk+2.0-2.14.7] > PYTHON=python2.5 dpkg-buildpackage -rfakeroot
dpkg-buildpackage: source package is gtk+2.0
dpkg-buildpackage: source version is 2:2.14.7-1maemo34+0m5
dpkg-buildpackage: source changed by COLIN Stephane <bigbob.fun@gmail.com>
dpkg-buildpackage: host architecture armel
dpkg-buildpackage: source version without epoch 2.14.7-1maemo34+0m5
: Using Scratchbox tools to satisfy builddeps
 fakeroot debian/rules clean
dh_testdir
sed -e 's/@SONAME@/0/g' -e 's/@VERSION@/2.14.7/g' debian/control.in > debian/control
.....
.....
checking for cups-config... /usr/bin/cups-config
checking cups/cups.h usability... yes
checking cups/cups.h presence... yes
checking for cups/cups.h... yes

.....
.....
dpkg-deb: building package `libgtk2.0-0' in `../libgtk2.0-0_2.14.7-1maemo34+0m5_armel.deb'.
dpkg-deb: building package `libgtk2.0-bin' in `../libgtk2.0-bin_2.14.7-1maemo34+0m5_armel.deb'.
dpkg-deb: building package `libgtk2.0-dev' in `../libgtk2.0-dev_2.14.7-1maemo34+0m5_armel.deb'.
dpkg-deb: building package `libgtk2.0-0-dbg' in `../libgtk2.0-0-dbg_2.14.7-1maemo34+0m5_armel.deb'.
dpkg-deb: building package `gtk2.0-examples' in `../gtk2.0-examples_2.14.7-1maemo34+0m5_armel.deb'.
dpkg-deb: building package `libgail18' in `../libgail18_2.14.7-1maemo34+0m5_armel.deb'.
dpkg-deb: building package `libgail-common' in `../libgail-common_2.14.7-1maemo34+0m5_armel.deb'.
dpkg-deb: building package `libgail-dev' in `../libgail-dev_2.14.7-1maemo34+0m5_armel.deb'.
dpkg-deb: building package `libgail18-dbg' in `../libgail18-dbg_2.14.7-1maemo34+0m5_armel.deb'.
 signfile gtk+2.0_2.14.7-1maemo34+0m5.dsc
gpg: skipped "COLIN Stephane <bigbob.fun@gmail.com>": secret key not available
gpg: [stdin]: clearsign failed: secret key not available

 dpkg-genchanges
dpkg-genchanges: including full source code in upload
dpkg-buildpackage: full upload; Debian-native package (full source is included)
(WARNING: Failed to sign .dsc and .changes file)
[sbox-FREMANTLE_ARMEL: ~/tmp/Building/libgtk2.0-0/gtk+2.0-2.14.7] >

- I then upgrade my libs under scratchbox to the new one.

Code:

[sbox-FREMANTLE_ARMEL: ~/tmp/Building/libgtk2.0-0/gtk+2.0-2.14.7] > cd ..
[sbox-FREMANTLE_ARMEL: ~/tmp/Building/libgtk2.0-0] > fakeroot dpkg -i libgtk2.0-0_2.14.7-1maemo34+0m5_armel.deb libgtk2.0-bin_2.14.7-1maemo34+0m5_armel.deb libgtk2.0-common_2.14.7-1maemo34+0m5_all.deb libgtk2.0-dev_2.14.7-1maemo34+0m5_armel.deb
(Reading database ... 69034 files and directories currently installed.)
Preparing to replace libgtk2.0-0 2:2.14.7-1maemo33+0m5 (using libgtk2.0-0_2.14.7-1maemo34+0m5_armel.deb) ...
Unpacking replacement libgtk2.0-0 ...
Preparing to replace libgtk2.0-bin 2:2.14.7-1maemo33+0m5 (using libgtk2.0-bin_2.14.7-1maemo34+0m5_armel.deb) ...
Unpacking replacement libgtk2.0-bin ...
Preparing to replace libgtk2.0-common 2:2.14.7-1maemo33+0m5 (using libgtk2.0-common_2.14.7-1maemo34+0m5_all.deb) ...
Unpacking replacement libgtk2.0-common ...
Preparing to replace libgtk2.0-dev 2:2.14.7-1maemo33+0m5 (using libgtk2.0-dev_2.14.7-1maemo34+0m5_armel.deb) ...
Unpacking replacement libgtk2.0-dev ...
Setting up libgtk2.0-common (2.14.7-1maemo34+0m5) ...
Setting up libgtk2.0-0 (2.14.7-1maemo34+0m5) ...
Generating /usr/share/themes/alpha/gtk-2.0/gtkrc.cache
Generating /usr/share/themes/devel/gtk-2.0/gtkrc.cache
Generating /usr/share/themes/Raleigh/gtk-2.0/gtkrc.cache
Generating /usr/share/themes/default/gtk-2.0/gtkrc.cache
Generating /usr/share/themes/Emacs/gtk-2.0-key/gtkrc.cache
Generating /usr/share/themes/Default/gtk-2.0-key/gtkrc.cache
Generating /usr/share/themes/devel/gtk-2.0/gtkrc.input_method.cache

Done!

Setting up libgtk2.0-bin (2.14.7-1maemo34+0m5) ...
You don't have immodules directory for version 2.4.0.
Use default version instead.
Updating the IM modules list for GTK+-2.14.0...find: /usr/lib/gtk-2.0/2.14.0/immodules: No such file or directory
done.
You don't have gdk-pixbuf loaders directory for version 2.14.0.
Use default version instead.
Updating the gdk-pixbuf loaders list for GTK+-2.14.0...done.

Setting up libgtk2.0-dev (2.14.7-1maemo34+0m5) ...
[sbox-FREMANTLE_ARMEL: ~/tmp/Building/libgtk2.0-0] >

- Right now I can get Leafpad source, push up the version & recompile it with printing support.

Code:

[sbox-FREMANTLE_ARMEL: ~/tmp/Building/leafpad] > fakeroot apt-get source leafpad
Reading package lists... Done
Building dependency tree... Done
Need to get 564kB of source archives.
Get:1 http://repository.maemo.org fremantle/free leafpad 0.8.17le-0maemo1 (dsc) [769B]
Get:2 http://repository.maemo.org fremantle/free leafpad 0.8.17le-0maemo1 (tar) [563kB]
Fetched 564kB in 0s (695kB/s) 
gpg: Signature made Fri Nov 13 22:08:46 2009 CET using DSA key ID B11FFF2F
gpg: Can't check signature: public key not found
dpkg-source: extracting leafpad in leafpad-0.8.17le
dpkg-source: unpacking leafpad_0.8.17le-0maemo1.tar.gz
[sbox-FREMANTLE_ARMEL: ~/tmp/Building/leafpad] > cd leafpad-0.8.17le/
[sbox-FREMANTLE_ARMEL: ~/tmp/Building/leafpad/leafpad-0.8.17le] > DEBEMAIL="COLIN Stephane <colin.stephane@ovi.com>" dch -v 0.8.17le-0maemo2 Add printing support ...

HERE, before the next step, I edit debian/rules and remove the parameter '--disable-print' !!!

[sbox-FREMANTLE_ARMEL: ~/tmp/Building/leafpad/leafpad-0.8.17le] > PYTHON=python2.5 dpkg-buildpackage -rfakeroot
dpkg-buildpackage: source package is leafpad
dpkg-buildpackage: source version is 0.8.17le-0maemo2
dpkg-buildpackage: source changed by COLIN Stephane <colin.stephane@ovi.com>
dpkg-buildpackage: host architecture armel
dpkg-buildpackage: source version without epoch 0.8.17le-0maemo2
: Using Scratchbox tools to satisfy builddeps
.....
.....
dpkg-deb: building package `leafpad' in `../leafpad_0.8.17le-0maemo2_armel.deb'.
dpkg-deb: ignoring 4 warnings about the control file(s)
 signfile leafpad_0.8.17le-0maemo2.dsc
gpg: skipped "COLIN Stephane <colin.stephane@ovi.com>": secret key not available
gpg: [stdin]: clearsign failed: secret key not available

 dpkg-genchanges
dpkg-genchanges: warning: unknown information field `Xb-Maemo-Icon-26' in input data in package's section of control info file
dpkg-genchanges: warning: unknown information field `Xb-Maemo-Display-Name' in input data in package's section of control info file
dpkg-genchanges: including full source code in upload
dpkg-buildpackage: full upload; Debian-native package (full source is included)
(WARNING: Failed to sign .dsc and .changes file)
[sbox-FREMANTLE_ARMEL: ~/tmp/Building/leafpad/leafpad-0.8.17le] >

- I optify the packages.

Code:

[sbox-FREMANTLE_ARMEL: ~/tmp/Building/leafpad/leafpad-0.8.17le] > cd ..
[sbox-FREMANTLE_ARMEL: ~/tmp/Building/leafpad] > for file in $(ls *.deb) ; do maemo-optify-deb "$file"; done
leafpad: optified 44 entries, saving about 377 kB.
warning, `leafpad_0.8.17le-0maemo2_armel/DEBIAN/control' contains user-defined field `Bugtracker'
warning, `leafpad_0.8.17le-0maemo2_armel/DEBIAN/control' contains user-defined field `Maemo-Display-Name'
warning, `leafpad_0.8.17le-0maemo2_armel/DEBIAN/control' contains user-defined field `Maemo-Icon-26'
warning, `leafpad_0.8.17le-0maemo2_armel/DEBIAN/control' contains user-defined field `Xsbc-Original-Maintainer'
dpkg-deb: building package `leafpad' in `leafpad_0.8.17le-0maemo2_armel.deb'.
dpkg-deb: ignoring 4 warnings about the control file(s)

- Well right now I send all the packages to my device.

Under my device :

- I install the required ones.

Code:

-bash-2.05b# dpkg -i libgtk2.0-0_2.14.7-1maemo34+0m5_armel.deb libgtk2.0-bin_2.14.7-1maemo34+0m5_armel.deb libgtk2.0-common_2.14.7-1maemo34+0m5_all.deb
(Reading database ... 38036 files and directories currently installed.)
Preparing to replace libgtk2.0-0 2:2.14.7-1maemo33+0m5 (using libgtk2.0-0_2.14.7-1maemo34+0m5_armel.deb) ...
Unpacking replacement libgtk2.0-0 ...
Preparing to replace libgtk2.0-bin 2:2.14.7-1maemo33+0m5 (using libgtk2.0-bin_2.14.7-1maemo34+0m5_armel.deb) ...
Unpacking replacement libgtk2.0-bin ...
Preparing to replace libgtk2.0-common 2:2.14.7-1maemo33+0m5 (using libgtk2.0-common_2.14.7-1maemo34+0m5_all.deb) ...
Unpacking replacement libgtk2.0-common ...
Setting up libgtk2.0-bin (2:2.14.7-1maemo34+0m5) ...
You don't have immodules directory for version 2.4.0.
Use default version instead.
Updating the IM modules list for GTK+-2.14.0...find: /usr/lib/gtk-2.0/2.14.0/immodules: No such file or directory
done.
You don't have gdk-pixbuf loaders directory for version 2.14.0.
Use default version instead.
Updating the gdk-pixbuf loaders list for GTK+-2.14.0...done.
Setting up libgtk2.0-common (2:2.14.7-1maemo34+0m5) ...
Setting up libgtk2.0-0 (2:2.14.7-1maemo34+0m5) ...
Generating /usr/share/themes/beta/gtk-2.0/gtkrc.cache
Generating /usr/share/themes/alpha/gtk-2.0/gtkrc.cache
Generating /usr/share/themes/bigbob/gtk-2.0/gtkrc.cache
Generating /usr/share/themes/Raleigh/gtk-2.0/gtkrc.cache
Generating /usr/share/themes/default/gtk-2.0/gtkrc.cache
Generating /usr/share/themes/Emacs/gtk-2.0-key/gtkrc.cache
Generating /usr/share/themes/Default/gtk-2.0-key/gtkrc.cache

Done!
-bash-2.05b# dpkg -i leafpad_0.8.17le-0maemo2_armel.deb
(Reading database ... 38036 files and directories currently installed.)
Preparing to replace leafpad 0.8.17le-0maemo2 (using leafpad_0.8.17le-0maemo2_armel.deb) ...
Unpacking replacement leafpad ...
Setting up leafpad (0.8.17le-0maemo2) ...
-bash-2.05b#

- Time to reboot.

After the reboot I launch Leafpad, hit <ctrl>-<p>, and the printing dialog come without any printer available :

http://bigbob.fun.free.fr/No printer...ing dialog.png

I must admit, I don't really understand where I made a mistake :(...

A++

mase 2011-05-01 15:07

Re: Printing with N900
 
That is all I did. Does lpr work? Try gtklp..

colin.stephane 2011-05-01 16:41

Re: Printing with N900
 
Quote:

Originally Posted by mase (Post 998307)
That is all I did. Does lpr work? Try gtklp..

I have installed gtklp, and launched gtklp myfile.pdf

Here, I can see my 2 printers, and select the right one, and print my pdf file ...

That doesn't explain why I can't see the 2 printers in the gtk2 print dialog :confused: ...

A++

mase 2011-05-01 17:16

Re: Printing with N900
 
I will upload my packages again...

colin.stephane 2011-05-01 17:46

Re: Printing with N900
 
Quote:

Originally Posted by mase (Post 998377)
I will upload my packages again...

Except the installation of cups devel package, have you passed special parameters to your compilation of libgtk ???

A++

mase 2011-05-01 20:45

Re: Printing with N900
 
No special parameters. Only dpkg-buildpackage with libcups2-dev installed.

colin.stephane 2011-05-01 21:04

Re: Printing with N900
 
Quote:

Originally Posted by mase (Post 998493)
No special parameters. Only dpkg-buildpackage with libcups2-dev installed.

Really strange, correct me if I'm false, but my new version of libgtk seem to be OK since I can use gtklp ...

A++

mase 2011-05-02 12:42

Re: Printing with N900
 
gtklp works without the modified gtk packages, so it doesn't
indicate correct gtk packages.

mase 2011-05-02 14:28

Re: Printing with N900
 
Here they are:
http://www.megaupload.com/?d=Q2GXR3S6

demolition 2011-05-04 23:52

Re: Printing with N900
 
Both my parallel and n/w printers are HP. I have downloaded HPLIP and all the Foomatic stuff to my pc.

HPLIP contains pre-prepared ppd files but the filter must be created by compiling various classes (cpp & header files). I think the eventual output is in fact a GUI interface but not totally sure.

For Foomatic, everything is in xml files. A couple of c files need to be compiled to create to ppd files from the relevant xml file.

The printer installs fine when using the HPLIP but I cannot print because CUPS is looking for hpcups, as listed in the ppd file from HPLIP.

Do I need to compile on the device? I don't mind doing so. It's just not that user friendly. Suppose because there is only one device (N900), each driver could go into a repo once someone had created it for their printer? Any suggestions of which compiler in the sdk repo?

Which way should I go about this - HPLIP or Foomatic?

wumpwoast 2011-05-05 00:08

Re: Printing with N900
 
Quote:

Originally Posted by demolition (Post 998022)
@wumpwoast - great to hear you're printing from your N900 and you found my install guide useful. I have a couple of questions...
- have you printed from Maemo or Easy Debian?
- what type of printer have you used wifi/network, usb or BT
- did you need to sort out the ppd file separately, or is that what you're in awe about (no need to do anything)?

- I'm not an Easy Debian user.
- I have a CUPS server on my network gateway with a USB Epson Photo R800 printer.
- No .ppd installs were necessary.

I haven't confirmed with pcap, but it appears CUPS' web interface likes to 301-redirect you to whatever host on the network is advertising the printer you wish to use. Which was unexpectedly, surprisingly sensible and easy.

woody14619 2011-05-05 21:30

Re: Printing with N900
 
If they're HP, unless they're plotters, they probably can do generic postscript. Just us the generic postscript PPD and you should be fine. I chose the generic PS in the setup and print just fine to an HP2200 and HP8500 with no issue (in color and b&w, with duplexer). You only need Foomatic if you're converting to something off, like PCL for a plotter, or printing to an Epson or such that doesn't know generic postscript.

colin.stephane 2011-05-05 21:44

Re: Printing with N900
 
Quote:

Originally Posted by mase (Post 998867)

Link temporary unavailable :(

A++


All times are GMT. The time now is 08:11.

vBulletin® Version 3.8.8