Notices


Reply
Thread Tools
Posts: 110 | Thanked: 127 times | Joined on May 2010
#261
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!

Last edited by wumpwoast; 2011-04-30 at 21:57.
 

The Following User Says Thank You to wumpwoast For This Useful Post:
Posts: 560 | Thanked: 422 times | Joined on Mar 2011
#262
@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)?

Last edited by demolition; 2011-04-30 at 22:26.
 
mase's Avatar
Posts: 355 | Thanked: 205 times | Joined on Jun 2010 @ Germany
#263
Originally Posted by colin.stephane View Post
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.
__________________
May the force be with us!
 
Posts: 458 | Thanked: 783 times | Joined on Jan 2010 @ France
#264
Originally Posted by mase View Post
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++

Last edited by colin.stephane; 2011-05-01 at 10:19.
 
mase's Avatar
Posts: 355 | Thanked: 205 times | Joined on Jun 2010 @ Germany
#265
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.
__________________
May the force be with us!
 
Posts: 458 | Thanked: 783 times | Joined on Jan 2010 @ France
#266
Originally Posted by mase View Post
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 :



Hope it help to understand my problem ...

A++
 
mase's Avatar
Posts: 355 | Thanked: 205 times | Joined on Jun 2010 @ Germany
#267
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.
__________________
May the force be with us!
 
Posts: 458 | Thanked: 783 times | Joined on Jan 2010 @ France
#268
Originally Posted by mase View Post
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 :



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

A++
 
mase's Avatar
Posts: 355 | Thanked: 205 times | Joined on Jun 2010 @ Germany
#269
That is all I did. Does lpr work? Try gtklp..
__________________
May the force be with us!
 
Posts: 458 | Thanked: 783 times | Joined on Jan 2010 @ France
#270
Originally Posted by mase View Post
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 ...

A++
 
Reply


 
Forum Jump


All times are GMT. The time now is 20:21.