Tiny Core Linux

Tiny Core Extensions => TCE Talk => Topic started by: manit123 on November 15, 2014, 02:33:07 AM

Title: printing from tiny core
Post by: manit123 on November 15, 2014, 02:33:07 AM
hi , we have hp laserjet p4515 printer on our network .
I am trying to follow http colon slash slash [removed due to policy violation] slash os slash tutorials slash tiny-core slash printer.html
Can you suggest any tutorial with more details & no need to use debian OS for extracting driver ?
Title: Re: printing from tiny core
Post by: Juanito on November 15, 2014, 04:22:34 AM
As per the hplip site, this is one of their supported printers, so things should work with the cups and hplip extensions.
Title: Re: printing from tiny core
Post by: manit123 on November 15, 2014, 04:35:13 AM
ok , will try & report back .
Title: Re: printing from tiny core
Post by: manit123 on November 18, 2014, 03:28:24 AM
i have installed cups & hplip-2.7
control panel > services show cups running
Now , how can I add printer ?
Title: Re: printing from tiny core
Post by: Juanito on November 18, 2014, 04:10:00 AM
if you're using hplip-2.7, I presume you're using tc-4.x?

my testing was done with tc-5.x, so hopefully you'll see the same results...

follow the instructions in the cups info file to open a cups browser window, use the add printer dialogue and you should see your printer displayed. Accept the proposed driver and everything should "just work" (this is what happened to me, albeit with corepure64 5.x).
Title: Re: printing from tiny core
Post by: coreplayer2 on November 18, 2014, 10:17:25 AM
Modern printers like new HP laserjet's have their own email web service, so I simply send an email of the document to the server email address, seamlessly via HP cloud service and voila! document prints perfectly..
 :P
Title: Re: printing from tiny core
Post by: beerstein on November 18, 2014, 11:32:21 AM
Hi: I use TurboPrint on my Mint and Ubutu PCs. The drivers cost about $29.95 for a home user  license. I bought the .deb files.
Here is my question: Is it possible to extract or modify these .deb driver files to use with TinyCore?
If yes - how?
Title: Re: printing from tiny core
Post by: Juanito on November 18, 2014, 09:55:47 PM
The first step would be to extract the files from the deb and list them, then you can figure out if they can be used with tinycore or not:

Code: [Select]
$ ar p *deb data.tar.gz | tar zx
Title: Re: printing from tiny core
Post by: manit123 on November 26, 2014, 09:03:42 PM
Here is what I did .
installed cups.tcz & hplip-2.7.tcz
Code: [Select]
tc@box:~$ df | grep -i cup
/dev/loop37             244.0K    244.0K         0 100% /tmp/tcloop/libcups
/dev/loop83              92.0K     92.0K         0 100% /tmp/tcloop/libcups-filters
/dev/loop84             392.0K    392.0K         0 100% /tmp/tcloop/cups-filters
/dev/loop87               7.0M      7.0M         0 100% /tmp/tcloop/cups
tc@box:~$ df | grep -i hpl
/dev/loop99               6.2M      6.2M         0 100% /tmp/tcloop/hplip-2.7
created root password as instructed in info of cups.tcz
Code: [Select]
tc@box:~$ sudo passwd
Changing password for root
New password:
Retype password:
Password for root changed by root
then
tc@box:~$ sudo /usr/local/etc/init.d/cups start
stopped /usr/local/bin/dbus-daemon (pid 20237)
Now , when I open http://localhost:631/admin in firefox , I get
can't establish connection to server at localhost:631
Title: Re: printing from tiny core
Post by: manit123 on November 26, 2014, 09:13:39 PM
after reading
Code: [Select]
$ cat /tmp/tcloop/cups/usr/local/etc/init.d/cups
#!/bin/sh

start() {
        if ps | awk '{print $3}' | grep -e "dbus-daemon" >/dev/null; then
                /usr/local/etc/init.d/dbus restart
                start-stop-daemon --start --exec /usr/local/sbin/cupsd 2>/dev/null
                sleep 2
        else
                /usr/local/etc/init.d/dbus start
                start-stop-daemon --start --exec /usr/local/sbin/cupsd 2>/dev/null
                sleep 2
        fi
}

stop() {
        start-stop-daemon --stop --exec /usr/local/sbin/cupsd 2>/dev/null
        sleep 2
}

status() {
        if ps | awk "{print $3}" | grep -e "cupsd" >/dev/null; then
                echo "cups is running."
                exit 0
        else
                echo "cups is not running."
                exit 1
        fi     
}

case $1 in
        start) start
                ;;
        stop) stop
                ;;
        status) status
                ;;
        restart) stop; start
                ;;
        *) echo -e "\n$0 [start|stop|restart|status]\n"


digging further into cups daemon start script shows
Code: [Select]
tc@box:~$ ps | grep -i db
32270 tc       /usr/local/bin/dbus-daemon --system
32562 tc       grep -i db
tc@box:~$ sudo  /usr/local/etc/init.d/dbus restart
stopped /usr/local/bin/dbus-daemon (pid 32270)
tc@box:~$ ps | grep -i db
32568 tc       /usr/local/bin/dbus-daemon --system
32573 tc       grep -i db
tc@box:~$ sudo start-stop-daemon --start --exec /usr/local/sbin/cupsd
cupsd: Child exited with status 127

Title: Re: printing from tiny core
Post by: curaga on November 27, 2014, 02:19:21 AM
127 means it can't find something, ie maybe perl, maybe bash, maybe a binary.
Title: Re: printing from tiny core
Post by: Juanito on November 27, 2014, 02:55:49 AM
It could possibly be that you try "http://localhost:631/admin" rather than "http://localhost:631", which pops up a root logon box when you attempt an admin task.

Otherwise try "ldd /usr/local/sbin/cupsd" to see if you have a missing dep.
Title: Re: printing from tiny core
Post by: Juanito on November 27, 2014, 03:34:15 AM
I just tried a fresh download of hplip on tc-5.x (tc-4.x does not boot on my hardware).

After setting a root password, starting the cups daemon from the cpanel/services gui and using opera to go to localhost:631, clicking on add printer popped up a dialogue box for the root password and then automagically found my network attached printer as per the screenshot attached.

@Curaga - fifth does not pop up a root password dialogue box, but instead gives the error "Unauthorized

Enter your username and password or the root username and password to access this page. If you are using Kerberos authentication, make sure you have a valid Kerberos ticket."

Even though fifth does apparently upload a screenshot, it gives the error message "http://forum.tinycorelinux.net/index.php?action=post2;start=11;board=14: error 65, Send failed since rewinding of the data stream failed"
Title: Re: printing from tiny core
Post by: curaga on November 27, 2014, 07:51:21 AM
Both known issues with Webkit's curl backend.
Title: Re: printing from tiny core
Post by: curaga on November 27, 2014, 12:32:36 PM
Implemented ;)
Title: Re: printing from tiny core
Post by: Juanito on November 28, 2014, 06:16:49 AM
fifth reposted to repo - cups "add printer" now pops up box for username and then a box for the password  :)