maemo.org - Talk

maemo.org - Talk (https://talk.maemo.org/index.php)
-   General (https://talk.maemo.org/forumdisplay.php?f=7)
-   -   HOWTO - Printing From the Internet tablet to Network Printers (https://talk.maemo.org/showthread.php?t=10057)

penguinbait 2007-09-27 15:33

HOWTO - Printing From the Internet tablet to Network Printers
 
I have compiled cups and supporting software to be able to print from the IT, here is what you get!!

cups 1.2.12
espgs 8.15.4
openldap 2.3.38
openssl 0.98e
openslp 1.2.1
jpeg 6b
libpng 1.2.20
tiff 3.8.2
zlib 1.2.3
samba 3.0.25c
(kerberos support was not installed, cups 1.2 does not support it)


100MB uncompressed, with the majority of the data in /usr/local

Cups itself is installed in /usr

INSTALLATION INSTRUCTIONS

1) DISABLE DOCPURGE
docpurge is located in /usr/sbin (/usr/sbin/docpurge) I am not really familiar with docpurge, but I do know it will delete any files located it /usr/share/doc/ and this is where cups resides. Fix by running the following:

mv /usr/sbin/docpurge /usr/sbin/docpurge-disabled

If anyone else knows how to exclude the /usr/share/doc dir from docpurge, please let me know.


2) Download Tarball 30MB
http://penguinbait.com/CUPS12.tar.bz2

or
Special Thanks to debernardis
http://www.debernardis.it/n800/CUPS12.tar.bz2

3) Open xterm or ssh session
sudo gainroot, or ssh as root
cd /
tar jxvf /path/to/CUPS12.tar.bz2

4) Update libraries

If /etc/ld.so.conf contains /usr/local/lib the run (cat /etc/ld.so.conf)

ldconfig

If /etc/ld.so.conf does not contain /usr/local/lib then run

echo "/usr/local/lib" >> /etc/ld.so.conf
ldconfig



5) Start Cups
/etc/init.d/cups start
cups will start on boot, as long as /usr/local is available during boot.

6) Open Web Browser
http://localhost:631

INFORMATION
When you make changes in cups, it wll prompt you for a USER and PASSWORD. This is the root account on the n800, (or 770 untested) (default password is rootme)

I have been able to print the cups test pages, and if you set the default printer, you can print from command line also by piping to lpr.

For example:
cat /etc/hosts | lpr

PS this has no headers, so if you want to compile apps with cups support and you need the headers, PM me, and I will send you the full tarball.


I look forward to some success stories!!! Please PM me if you have mirrors!

frasej 2007-09-27 16:57

Re: HOWTO - Printing From the Internet tablet to Network Printers
 
You should add this to the wiki.

debernardis 2007-09-27 17:18

Re: HOWTO - Printing From the Internet tablet to Network Printers
 
you better add
Code:

export LD_LIBRARY_PATH=/usr/local/lib:$LD_LIBRARY_PATH
before ldconfig.

dan67sf 2007-09-27 18:36

Re: HOWTO - Printing From the Internet tablet to Network Printers
 
WAY COOL! I can hardly wait to get home and try this out. I do a lot of things from xterm/command line and this will come in very handy. Again Very Good job and Thanks.

penguinbait 2007-09-27 19:02

Re: HOWTO - Printing From the Internet tablet to Network Printers
 
Quote:

Originally Posted by debernardis (Post 78064)
you better add
Code:

export LD_LIBRARY_PATH=/usr/local/lib:$LD_LIBRARY_PATH
before ldconfig.

This is a good point, and has been fixed in original post

Thanks

penguinbait 2007-09-27 20:45

Re: HOWTO - Printing From the Internet tablet to Network Printers
 
Did anyone print anything yet?

penguinbait 2007-09-27 20:55

Re: HOWTO - Printing From the Internet tablet to Network Printers
 
For those running XFCE, there is a program in the menu showing as

Image Viewer (gqview)

I just used this to print a 600dpi color picture, that came with n800, Giant_panda_China.jpg

This was printed to a Ricoh cl2000 printer, print queue was RAW, no driver installed.


This rules!!!

Aisu 2007-09-28 00:42

Re: HOWTO - Printing From the Internet tablet to Network Printers
 
Amazing stuff PB!

Announcement has been posted at http://geekpenguin.blogspot.com/2007...0-is-here.html

Will have to test soon, probably will try with KDE ;)

debernardis 2007-09-28 08:18

Re: HOWTO - Printing From the Internet tablet to Network Printers
 
Prints OK from my n800 to my samsung scx-4100 printer, connected to an ubuntu feisty box, through home wlan.

Video: http://www.youtube.com/watch?v=XfrCP_O5BQM

johnf 2007-09-28 08:57

Re: HOWTO - Printing From the Internet tablet to Network Printers
 
The tar option j is unknown on 770 version 3.2006.49-2.

Any ideas ? Thanks.

debernardis 2007-09-28 09:11

Re: HOWTO - Printing From the Internet tablet to Network Printers
 
Quote:

Originally Posted by johnf (Post 78182)
The tar option j is unknown on 770 version 3.2006.49-2.

Any ideas ? Thanks.

Get gnu tar as described in http://maemo.org/community/wiki/howt...from_mmc_card/

Copying the relevant info from that page (remember you have to be root):

Code:

The following command will generate dire warnings and prompts, requiring you to type YES. However, -d tells apt-get to only download the package and not install it, so it's safe to ignore those warnings and type YES..

# apt-get -d install tar
# cd /var/cache/apt/archives/
# mkdir /tar-temp/
# dpkg -x tar*.deb /tar-temp/

So the command to unpack the cups archive will be
Code:

/tar-temp/bin/tar jxvf /path/to/CUPS12.tar.bz2

penguinbait 2007-09-28 13:32

Re: HOWTO - Printing From the Internet tablet to Network Printers
 
Nice video, I like the beard :)

Was that abiword?

Have you tried XFCE, you can print pictures from gqview, (Image Viewer), very nice!!

Again great video, PRINTING IS A REALITY, now we just need more apps supporting this.

Mara 2007-09-28 19:05

Re: HOWTO - Printing From the Internet tablet to Network Printers
 
Quote:

Originally Posted by penguinbait (Post 78222)
now we just need more apps supporting this.

The most logical/critical one I can think is the web browser... The second important ones are PDF-viewer and Image viewer.

penguinbait 2007-09-29 05:15

Re: HOWTO - Printing From the Internet tablet to Network Printers
 
Anyone using XFCE and wanting to print pdf files


http://penguinbait.com/epdfview.gz

this is a single executable to replace the file in /usr/local/bin

this will add the printing option in epdfview


gunzip epdfview.gz
rm /usr/local/bin/epdfview
mv epdfview /usr/local/bin

hczim 2007-10-01 12:49

Re: HOWTO - Printing From the Internet tablet to Network Printers
 
Quote:

Originally Posted by penguinbait (Post 78033)
If anyone else knows how to exclude the /usr/share/doc dir from docpurge, please let me know.

Even more selective - stick with docpurge's current behavior except for CUPS directories:

Open /usr/sbin/docpurge with your favorite text editor (vi, nano, ...). Find the part near its end which reads:
Code:

# Real hackers don't read docs.
rm -rf /usr/share/doc/* /usr/share/man/* /usr/share/info/*

and replace it by:

Code:

# Real hackers don't read docs.  But let CUPS survive them:
for dir in /usr/share/doc/* /usr/share/man/* /usr/share/info/*; do
        case "$dir" in
                /usr/share/doc/*cups*) ;;
                *) rm -rf "$dir";;
        esac
done


penguinbait 2007-10-01 18:49

Re: HOWTO - Printing From the Internet tablet to Network Printers
 
Quote:

Originally Posted by hczim (Post 78785)
Even more selective - stick with docpurge's current behavior except for CUPS directories:

Open /usr/sbin/docpurge with your favorite text editor (vi, nano, ...). Find the part near its end which reads:
Code:

# Real hackers don't read docs.
rm -rf /usr/share/doc/* /usr/share/man/* /usr/share/info/*

and replace it by:

Code:

# Real hackers don't read docs.  But let CUPS survive them:
for dir in /usr/share/doc/* /usr/share/man/* /usr/share/info/*; do
        case "$dir" in
                /usr/share/doc/*cups*) ;;
                *) rm -rf "$dir";;
        esac
done


great job, I just assumed it was a binary....

debernardis 2007-10-01 20:47

Re: HOWTO - Printing From the Internet tablet to Network Printers
 
I've done a deb file of the .tar.gz - it's experimental in the sense it's the first deb I've ever done and might screw up your tablet and your mind :-)
However seems to work for me.
http://www.debernardis.it/n800/cups12_armel.deb
After you install it you have to setup ld.so.conf and issue ldconfig and start the cups daemon as described in the first post of this thread... maybe I should code that inside the deb, but I'm mostly lazy

zerojay 2007-10-01 20:48

Re: HOWTO - Printing From the Internet tablet to Network Printers
 
I'm not sure if this is something new or not, but I noticed bluez-cups listed in red pill mode... a bluetooth printer driver for CUPS.

penguinbait 2007-10-02 18:33

Re: HOWTO - Printing From the Internet tablet to Network Printers
 
Quote:

Originally Posted by debernardis (Post 78940)
I've done a deb file of the .tar.gz - it's experimental in the sense it's the first deb I've ever done and might screw up your tablet and your mind :-)
However seems to work for me.
http://www.debernardis.it/n800/cups12_armel.deb
After you install it you have to setup ld.so.conf and issue ldconfig and start the cups daemon as described in the first post of this thread... maybe I should code that inside the deb, but I'm mostly lazy



I too am lazy, nice job on the deb!!!!

klohmann 2007-10-03 00:20

Re: HOWTO - Printing From the Internet tablet to Network Printers
 
Hey Guys and Gals:

I just loaded this (no big deal, but I did first try the .deb and it didn't work), so I went back to the original instructions. No errors, and fired up my old trusty version of Abiword 2.2.7 (2.4.6 basically doesn't run on the 800, and also doesn't support printing, I believe) and voila!

This is truly great work! Thanks everybody, for another step forward!!!

K.

K.

K.

debernardis 2007-10-03 04:48

Re: HOWTO - Printing From the Internet tablet to Network Printers
 
I'm sorry the .deb didn't work Since it did for me, please somebody test that so that I can understand where's the problem... I really want to learn making those things. Ah, and I forgot to tell that I installed it as root with dpkg -i filename.deb and not with the application manager.

klohmann 2007-10-03 12:58

Re: HOWTO - Printing From the Internet tablet to Network Printers
 
Debernardis:

That might make the difference -- I used the application manager and got an "incompatable package" error. Sorry that I didn't say that in the earlier post.

Thanks, K.

TA-t3 2007-10-03 13:56

Re: HOWTO - Printing From the Internet tablet to Network Printers
 
Quote:

Originally Posted by klohmann (Post 79471)
Debernardis:

That might make the difference -- I used the application manager and got an "incompatable package" error. Sorry that I didn't say that in the earlier post.

Debernardis:
I believe the above problem is because the Application Manager only wants to install packages in the 'user' section. You could try to change (in the control file)
Code:

Section: system
to
Code:

Section: user/extra
or something like that (the types I see installed already are, in addition to 'extra', Application Daemon Fonts Support accessories communication connectivity email games graphics home-applet library libs mail multimedia other support tools utils web)

torx 2007-10-08 12:22

Re: HOWTO - Printing From the Internet tablet to Network Printers
 
this all seems too complicated. i have yet even tried to do printing from my desktop to my printer, which is connect to a win box.

So yea, while this is really cool, i'll need some time to look through this. Besides, 100 mb seems pretty huge just for printing.

penguinbait 2007-10-08 20:07

Re: HOWTO - Printing From the Internet tablet to Network Printers
 
Quote:

Originally Posted by torx (Post 80524)
this all seems too complicated. i have yet even tried to do printing from my desktop to my printer, which is connect to a win box.

So yea, while this is really cool, i'll need some time to look through this. Besides, 100 mb seems pretty huge just for printing.


I understand it is large for an IT, but it is just the normal software used for printing on linux. It does include samba which could be removed if not printing to a printer connected to a windows system. But I figured, I want to print to windows systems, so I included it.

The instructions are straight forward and printing is working great, pictures, text, pdfs (at least from XFCE) If you are wanting to print, first think about why you want it and what you will use to print from?

killdog5000 2007-10-08 20:52

Re: HOWTO - Printing From the Internet tablet to Network Printers
 
Hey. UPS says my N800 is coming tomorrow. Can we get a list going of apps that support printing? Where can i find the last working version of abiword?

BruceL 2007-10-09 08:10

Re: HOWTO - Printing From the Internet tablet to Network Printers
 
Quote:

Originally Posted by penguinbait (Post 80620)
I understand it is large for an IT, but it is just the normal software used for printing on linux. It does include samba which could be removed if not printing to a printer connected to a windows system. But I figured, I want to print to windows systems, so I included it.

The instructions are straight forward and printing is working great, pictures, text, pdfs (at least from XFCE) If you are wanting to print, first think about why you want it and what you will use to print from?

Penguinbait, When you built CUPS, did you choose which drivers to leave out?
I want a Brother MFC driver. Is it as simple as building it? The driver on the Brother site was for i386. I experimented with the RAW and other drivers, but no luck.

Bruce

BruceL 2007-10-09 08:23

Re: HOWTO - Printing From the Internet tablet to Network Printers
 
Printing PDFs from the command line (without xfce) works really well. Advanced features such as multiple pages per sheet work flawlessly.

This was definately worth the effort of booting from my 4gb internal SD card to get enough room to make it work.

Bruce

penguinbait 2007-10-10 18:06

Re: HOWTO - Printing From the Internet tablet to Network Printers
 
I am working on updating KDE with a working version of CUPS.

Its working good so far, I was able to print pdf's, web pages from Konq. Also the screen shot utility also allows printing directly, as do many other programs. Should be soon, but dont expect many other improvments, only printing support working....

Its been a while since I used KDE on IT, wow, its really cool if I do say so myself.


And I dooooo

Mara 2007-10-10 18:24

Re: HOWTO - Printing From the Internet tablet to Network Printers
 
Quote:

Originally Posted by penguinbait (Post 80620)
It does include samba which could be removed if not printing to a printer connected to a windows system. But I figured, I want to print to windows systems, so I included it.

Since it has already Samba... how much work would it need to add support for Windows shared files/directories in N800? (And wise versa? Can Windows see files on N800?)

penguinbait 2007-10-10 18:54

Re: HOWTO - Printing From the Internet tablet to Network Printers
 
Quote:

Originally Posted by Mara (Post 81138)
Since it has already Samba... how much work would it need to add support for Windows shared files/directories in N800? (And wise versa? Can Windows see files on N800?)


Well currently it does contain samba, and there is a smb.conf file in /usr/local/samba/lib

Just updated that, and then start smbd and nmbd and you should be able to connect to n800 via samba. You might want to grab a startup script from somewhere and start it on boot, the startup scripts are not included...

In order to do the reverse you need an application that supports browsing the network, although command line tools are there.

In KDE using the browser you can browse the network for fileshares, its actually quite nice to use. I downoaded my KDE tarball ripped out samba/cups/gs and then replaced them using my cups tarball and its working great, new kde tarball will follow soon

Mara 2007-10-13 23:52

Re: HOWTO - Printing From the Internet tablet to Network Printers
 
Quote:

Originally Posted by penguinbait (Post 81160)
Well currently it does contain samba, and there is a smb.conf file in /usr/local/samba/lib

Penguinbait: Do not spent too much time on this Windows shared files access... Why? Blame on Chinook... :D

debernardis 2007-10-21 10:41

Re: HOWTO - Printing From the Internet tablet to Network Printers
 
Quote:

Originally Posted by debernardis (Post 78940)
I've done a deb file of the .tar.gz [...]
After you install it you have to setup ld.so.conf and issue ldconfig and start the cups daemon as described in the first post of this thread...

I've fixed the debfile in http://www.debernardis.it/n800/cups12_armel.deb - now can be installed from the application manager.

Golab 2007-10-21 21:17

Re: HOWTO - Printing From the Internet tablet to Network Printers
 
hello im getting error when im trying to start it

/home/user # /etc/init.d/cups start

/usr/sbin/cupsd: error while loading shared libraries: libslp.so.1: cannot open shared object file: No such file or directory

cups: unable to start scheduler.

im using N800 and os on mmc2 so i boot frome mmc2

penguinbait 2007-10-21 21:18

Re: HOWTO - Printing From the Internet tablet to Network Printers
 
Quote:

Originally Posted by Golab (Post 85306)
hello im getting error when im trying to start it

/home/user # /etc/init.d/cups start

/usr/sbin/cupsd: error while loading shared libraries: libslp.so.1: cannot open shared object file: No such file or directory

cups: unable to start scheduler.

im using N800 and os on mmc2 so i boot frome mmc2

run ldconfig

make sure /usr/local/lib is listed in /etc/ld.so.conf If it is not, add it and run ldconfig

Golab 2007-10-21 21:30

Re: HOWTO - Printing From the Internet tablet to Network Printers
 
it works now, :) Danke

penguinbait 2007-10-21 22:57

Re: HOWTO - Printing From the Internet tablet to Network Printers
 
Quote:

Originally Posted by Golab (Post 85318)
it works now, :) Danke


your welcome :)

penguinbait 2007-10-24 20:14

Re: HOWTO - Printing From the Internet tablet to Network Printers
 
Quote:

Originally Posted by debernardis (Post 85105)
I've fixed the debfile in http://www.debernardis.it/n800/cups12_armel.deb - now can be installed from the application manager.

Is it possible to have it run ldconfig after deb install?

TA-t3 2007-10-25 10:08

Re: HOWTO - Printing From the Internet tablet to Network Printers
 
Quote:

Originally Posted by penguinbait (Post 86635)
Is it possible to have it run ldconfig after deb install?

Add a 'postinst' script to the package. It can typically check/change permissions and directories, run ldconfig, and, for this system, it should presumably also start the printer daemon. The one below is what I use for the 'lprng' package, presumably it should be something similar for 'cups', but with the additional ldconfig.

The lprng postinst script (Maemo version):
Code:

#!/bin/sh

set -e
case "$1" in
    install|upgrade)
    ;;

    configure)
        # Create directories for pid file
        if test ! -d /var/run/lprng; then
            mkdir /var/run/lprng
        fi
        chown root.lp /var/run/lprng
        chmod 0775 /var/run/lprng
        for fname in `ls /var/spool/lpd 2>/dev/null`; do
            if [ -d $fname ] ; then
                chown -R lp:lp /var/spool/lpd/$fname
                chmod 0700 /var/spool/lpd/$fname
            fi
        done
        chown daemon.lp /var/spool/lpd
        chmod 0700 /var/spool/lpd
        for fname in lpr lprm lpq; do
            chown root.lp /usr/bin/$fname
            chmod u+s /usr/bin/$fname
            chmod g+s /usr/bin/$fname
        done
        if [ ! -e /etc/printcap ] ; then
            cp /etc/lprng/printcap.example /etc/printcap
        fi
        ;;
    abort-upgrade)
        ;;
    *)
        echo "postinst called with unknown argument \`$1'" >&2
        exit 0
        ;;
esac

# Have to manually start lprng as a failed startup is not a failed install
if [ -x "/etc/init.d/lprng" ]; then
        update-rc.d lprng defaults >/dev/null
        if [ -x "`which invoke-rc.d 2>/dev/null`" ]; then
            invoke-rc.d lprng start || true
        else
            /etc/init.d/lprng start || true
        fi
fi


Golab 2007-12-03 00:43

Re: HOWTO - Printing From the Internet tablet to Network Printers
 
to this work on OS2008?


All times are GMT. The time now is 14:47.

vBulletin® Version 3.8.8