Tiny Core Linux

Tiny Core Extensions => TCE Q&A Forum => Topic started by: Neo on October 11, 2010, 09:07:42 PM

Title: Can't access CUPS
Post by: Neo on October 11, 2010, 09:07:42 PM
Hi All,
I want to install my printer however I cannot access CUPS via the browser.
When I try to access CUPS via http://localhost:631 I get an error saying:

Quote
Can't Connect:  Firefox can't establish a connection to the server at localhost:631.

Yes I did read the CUPS.TCZ file and have been following the instructions therein.
But now I am stuck since I cannot access the browser interface.

And yes I did search the forum looking for a solution but did not find one, if I missed it please forward me a link.

Any help would be greatly appreciated.

EDIT:  I tired connecting to http://localhost:631 while using another Linux distro and it works just fine, however when I rebooted and tried it from TC, no joy, I keep getting the same error message.

Does anyone know why I am unable to connect to this site from TC?
Title: Re: Can't access CUPS
Post by: Neo on October 12, 2010, 12:18:29 AM
Okay I managed to access localhost:631.

Now my printer, a Samsung SCX4521F, is not found and when I try to add a printer it asks me for a "Connection":

Add Printer
Connection:    
   Examples:

    http://hostname:631/ipp/
    http://hostname:631/ipp/port1

    ipp://hostname/ipp/
    ipp://hostname/ipp/port1

    lpd://hostname/queue

    socket://hostname
    socket://hostname:9100

See "Network Printers" for the correct URI to use with your printer."

Sorry but I am at a loss here, what the heck should I put in here for my printer (which is connected via a USB port)?
   
Title: Re: Can't access CUPS
Post by: Juanito on October 12, 2010, 09:39:05 AM
Assuming your printer is connected directly to your machine (i.e. it is not connected somewhere on your home network), you can type:
Code: [Select]
/usr/local/lib/cups/backend/usb
..and it should come with something. Part of that output is the uri to be entered at the browser interface prompt - could you cut & paste it into this thread?
Title: Re: Can't access CUPS
Post by: Neo on October 14, 2010, 10:09:19 PM
Assuming your printer is connected directly to your machine (i.e. it is not connected somewhere on your home network), you can type:
Code: [Select]
/usr/local/lib/cups/backend/usb
..and it should come with something. Part of that output is the uri to be entered at the browser interface prompt - could you cut & paste it into this thread?

Here is the output:

Quote
root@box:~# /usr/local/lib/cups/backend/usb
/usr/local/lib/cups/backend/usb: error while loading shared libraries: libusb-0.1.so.4: cannot open shared object file: No such file or directory

So I downloaded and installed libusb (two files) and tried again:

Quote
root@box:~# /usr/local/lib/cups/backend/usb
DEBUG: list_devices
DEBUG: usb_find_busses=5
DEBUG: usb_find_devices=9


Title: Re: Can't access CUPS
Post by: Juanito on October 15, 2010, 01:44:08 AM
I seem to recall the usblp module might cause problems with cups, could you try this and see what happens:
Code: [Select]
$ sudo rmmod usblp
$ /usr/local/lib/cups/backend/usb
Title: Re: Can't access CUPS
Post by: Neo on October 15, 2010, 02:40:41 AM
I seem to recall the usblp module might cause problems with cups, could you try this and see what happens:
Code: [Select]
$ sudo rmmod usblp
$ /usr/local/lib/cups/backend/usb

Thanks Juanito, I tried that but got this error instead:

Quote
tc@box:~$ sudo rmmod usblp
rmmod: can't unload 'usblp': unknown symbol in module, or unknown parameter
Title: Re: Can't access CUPS
Post by: Juanito on October 15, 2010, 04:11:54 AM
Strange - you could try using the boot code "blacklist=usblp" and see if that helps
Title: Re: Can't access CUPS
Post by: Neo on October 15, 2010, 08:09:31 PM
Strange - you could try using the boot code "blacklist=usblp" and see if that helps

It didn't.

I noticed that a new version of TC was released today.
I don't supposed starting fresh with that version would help would it?
Is there an easy way to upgrade from 3.1 to 3.2?

Title: Re: Can't access CUPS
Post by: gerald_clark on October 15, 2010, 08:17:29 PM
Copy the tinycore.gz.
Title: Re: Can't access CUPS
Post by: Neo on October 15, 2010, 09:53:20 PM
Copy the tinycore.gz.


Thank you Gerald, I did that and it appears to be working just fine.

You wouldn't happen to have any suggestions as to how to get my printer working do you?

I think I may have hit the proverbial brick wall with this issue.
Title: Re: Can't access CUPS
Post by: aus9 on October 15, 2010, 10:08:47 PM
hi

try the driver ML-4500

from http://www.linuxquestions.org/questions/fedora-35/fedora-7-samsung-printer-installation-working-588757/

Title: Re: Can't access CUPS
Post by: Neo on October 15, 2010, 10:36:43 PM
hi

try the driver ML-4500

from http://www.linuxquestions.org/questions/fedora-35/fedora-7-samsung-printer-installation-working-588757/



Thanks AUS9, but unfortunately I can't even get that far.
Localhost:631 asks me for a path for the printer but I have no idea what to enter.

Some additional information which hopefully will be helpful:

I right clicked on the desktop and selected "Services".
DCHP was selected but nothing else, not even CUPS.
I enabled CUPS, and tried to repeat the steps in the CUPS.TCZ file but no joy.
I tried rebooting but CUPs was disabled again in the Services.

I actually have a PPD file which I am told is the correct file for my printer, but have no way of using it.

What the heck is the path that CUPS on localhost:631 is asking for???
It fails to find my printer.

I am stumped.
Title: Re: Can't access CUPS
Post by: gerald_clark on October 15, 2010, 10:48:56 PM
If you don't understand CUPS, you might want to spend some time at cups.org.
USB printers will probably use parallel:/dev/YourUSBdeviceHere
Title: Re: Can't access CUPS
Post by: Neo on October 16, 2010, 01:19:33 AM
If you don't understand CUPS, you might want to spend some time at cups.org.
USB printers will probably use parallel:/dev/YourUSBdeviceHere

I have poked around on their website and did not find anything which helped.

In localhost:631 when I select add a printer I am met with:

Quote
Add Printer
Local Printers:    SCSI Printer
CUPS-PDF (Virtual PDF Printer)
Serial Port #1
Discovered Network Printers:    
Other Network Printers:    LPD/LPR Host or Printer
Windows Printer via SAMBA
Internet Printing Protocol (http)
AppSocket/HP JetDirect
Internet Printing Protocol (ipp)
   
Now I select AppSocket/HP JetDirect and am confronted with:
Quote
Add Printer
Connection:    
   Examples:

    http://hostname:631/ipp/
    http://hostname:631/ipp/port1

    ipp://hostname/ipp/
    ipp://hostname/ipp/port1

    lpd://hostname/queue

    socket://hostname
    socket://hostname:9100

See "Network Printers" for the correct URI to use with your printer.

I didn't find anything which helped on their website.
It's possible that I missed it, but unlikely.

I tried your suggestion too but without any luck.
   
Title: Re: Can't access CUPS
Post by: aus9 on October 16, 2010, 01:32:56 AM
not sure if you are using real cups or cups1311 but for both....cups is a deamon or service and needs to be running

1) what version of cups are you running

cups1311 does not need root powers to use localhost stuff but cups (real) does....I assume you know that?

start it manually or have it run from bootlocal script.

I have a wiki for cups1311 and a manual command would be

Code: [Select]
sudo /etc/init.d/cups start
try changing start to status to see if its running

2) since I have not bothered to read your printer.details...pls confirm is it a usb only device or can you use a different connection?

b) if its usb only....highly recommend to install lsusb as prev mentioned.

then turn on printer and run

Code: [Select]
sudo lsusb
and post the results

Title: Re: Can't access CUPS
Post by: Neo on October 16, 2010, 01:48:09 AM
not sure if you are using real cups or cups1311 but for both....cups is a deamon or service and needs to be running

1) what version of cups are you running

cups1311 does not need root powers to use localhost stuff but cups (real) does....I assume you know that?

start it manually or have it run from bootlocal script.

I have a wiki for cups1311 and a manual command would be

Code: [Select]
sudo /etc/init.d/cups start
try changing start to status to see if its running

2) since I have not bothered to read your printer.details...pls confirm is it a usb only device or can you use a different connection?

b) if its usb only....highly recommend to install lsusb as prev mentioned.

then turn on printer and run

Code: [Select]
sudo lsusb
and post the results



Hi AUS9, thank you for your kind help.

I actually have both CUPS installed.

I followed your instructions and below is the output (I've only included the output for the printer).
Please note that I couldn't find lsusb to install but it worked anyway.

Quote
tc@box:~$ sudo /etc/init.d/cups start
cups: started scheduler.
tc@box:~$ sudo /etc/init.d/cups status
cups: scheduler is running.
tc@box:~$ sudo lsusb

Bus 002 Device 002: ID 04e8:3419 Samsung Electronics Co., Ltd Composite Device
tc@box:~$

By the way these are the instructions that I tried:

http://wiki.tinycorelinux.com/cups1311

It does not detect any printer and it does ask me for a password and I try to manually add one.


Title: Re: Can't access CUPS
Post by: aus9 on October 16, 2010, 04:18:30 AM
hi

eek

pls don't run both at once....if you can humour me, use apps audit and ensure only cups1311 is onboot (or ondemand) OR the other cups but not both pls

a) it does work with linux as per
http://forums.opensuse.org/archives/sls-archives/archives-suse-linux/archives-hardware-support/372157-samsung-scx-4521f-excellent-support-suse-10-a.html

2) My bad.... lsusb ...I meant
http://distro.ibiblio.org/pub/linux/distributions/tinycorelinux/3.x/tcz/usb-utils.tcz.list

but thanks for the output

3) while you try out cups1311 pls also start dbus

so its

start dbus (yes I know gurus claim you should not need it but I get less errors this way) YMMV
start cups
turn on printer
open browser and go to cups page = http://localhost:631

then try to add printer again as per wiki

4) Now I assume that you installed gutenprint if you followed the wiki....but a casual read of samsung stuff suggests you might need to install

http://distro.ibiblio.org/pub/linux/distributions/tinycorelinux/3.x/tcz/foomatic-rip.tcz.info

instead

I don't think it hurts to install both gutenprint and foomatic but you have not shown your ppd so here is one that might be of use?

Please note the mention of foomatic in the ppd

http://paste.debian.net/?show=96699;lines=0


Title: Re: Can't access CUPS
Post by: Juanito on October 16, 2010, 09:17:14 AM
What the heck is the path that CUPS on localhost:631 is asking for???

"/usr/local/lib/cups/backend/usb" will tell you what you need to enter - as I understand it, you will not be able to use your printer until this works.

I use a usb printer, but since it is an hp officejet, I have to use the hplip backend rather than the usb backend, i.e.
Code: [Select]
$ /usr/local/lib/cups/backend/hp
direct hp:/usb/OfficeJet_G85?serial=SGG13E0C49VL "HP OfficeJet G85" "HP OfficeJet G85 USB SGG13E0C49VL HPLIP" "MFG:Hewlett-Packa;MDL:OfficeJet G85;CLS:PRINTER;DES:OfficeJet G85;SN:SGG13E0C49VL;"

..so I enter "hp:/usb/OfficeJet_G85?serial=SGG13E0C49VL" as the uri (except that the browser interface finds this automatically).

..you should get something along the lines of (for the usb backend not the hp backend) "usb://samsung/printer_name_blah_blah"
Title: Re: Can't access CUPS
Post by: aus9 on October 16, 2010, 08:59:34 PM
Juanito

since I have an usb device let me report some things

1) I remove my printer and click on admin ....find new printers

I get the attached image....which correctly detects the name of my printer, ignoring the ppd file that I will use later


2) Only after this device is installed can I successfully run the commands

Code: [Select]
lpstat -p

/usr/local/lib/cups/backend/usb


3) But if Neo  can go to admin...and click on view logs and view error log and post the ouput?

if too large for this site try

http://paste.debian.net/


Title: Re: Can't access CUPS
Post by: Neo on October 20, 2010, 10:40:47 PM
Juanito

since I have an usb device let me report some things

1) I remove my printer and click on admin ....find new printers

I get the attached image....which correctly detects the name of my printer, ignoring the ppd file that I will use later


2) Only after this device is installed can I successfully run the commands

Code: [Select]
lpstat -p

/usr/local/lib/cups/backend/usb


3) But if Neo  can go to admin...and click on view logs and view error log and post the ouput?

if too large for this site try

http://paste.debian.net/




I deselected CUPS and left only CUPS 1311.
I am still asked for a password.

I tried using /dev/usb/lp0 for the location.

My printer is not listed, but I did try using a PPD file directly (not 100% sure if it is the correct file and even tried using one of the printers listed).

Here is the output of the error log:

E [20/Oct/2010:22:30:57 +0000] Unable to open listen socket for address ::1:631 - Address family not supported by protocol.
E [20/Oct/2010:22:31:08 +0000] [CGI] smbclient not found!
E [20/Oct/2010:22:31:08 +0000] [CGI] rpcclient not found!
E [20/Oct/2010:22:31:29 +0000] [CGI] smbclient not found!
E [20/Oct/2010:22:31:29 +0000] [CGI] rpcclient not found!
E [20/Oct/2010:22:31:49 +0000] [CGI] smbclient not found!
E [20/Oct/2010:22:31:49 +0000] [CGI] rpcclient not found!
E [20/Oct/2010:22:33:11 +0000] [CGI] smbclient not found!
E [20/Oct/2010:22:33:11 +0000] [CGI] rpcclient not found!
E [20/Oct/2010:22:33:14 +0000] [CGI] smbclient not found!
E [20/Oct/2010:22:33:14 +0000] [CGI] rpcclient not found!
E [20/Oct/2010:22:33:16 +0000] [CGI] smbclient not found!
E [20/Oct/2010:22:33:16 +0000] [CGI] rpcclient not found!
E [20/Oct/2010:22:34:27 +0000] Returning IPP client-error-not-possible for CUPS-Add-Modify-Printer (ipp://localhost/printers/Samsung) from localhost
E [20/Oct/2010:22:35:55 +0000] [CGI] smbclient not found!
E [20/Oct/2010:22:35:55 +0000] [CGI] rpcclient not found!
E [20/Oct/2010:22:36:13 +0000] [CGI] smbclient not found!
E [20/Oct/2010:22:36:13 +0000] [CGI] rpcclient not found!
E [20/Oct/2010:22:36:22 +0000] [CGI] smbclient not found!
E [20/Oct/2010:22:36:22 +0000] [CGI] rpcclient not found!
E [20/Oct/2010:22:36:30 +0000] [CGI] smbclient not found!
E [20/Oct/2010:22:36:30 +0000] [CGI] rpcclient not found!
E [20/Oct/2010:22:36:54 +0000] [CGI] smbclient not found!
E [20/Oct/2010:22:36:54 +0000] [CGI] rpcclient not found!
E [20/Oct/2010:22:37:53 +0000] Returning IPP client-error-not-possible for CUPS-Add-Modify-Printer (ipp://localhost/printers/Samsung) from localhost
E [20/Oct/2010:22:37:57 +0000] [CGI] smbclient not found!
E [20/Oct/2010:22:37:57 +0000] [CGI] rpcclient not found!

Title: Re: Can't access CUPS
Post by: Juanito on October 20, 2010, 11:30:36 PM
I deselected CUPS and left only CUPS 1311.

What do you mean by "deselected" - if you had both cups extensions (cups + cups1311) loaded, you would need to ensure that one of them is not "onboot", reboot and then check only one of them is loaded.

Quote
I am still asked for a password

As mentioned - entering "sudo passwd" in a terminal window will allow you to set the root password.

Quote
I tried using /dev/usb/lp0 for the location.

This will not work - it needs to be analogous to "usb://samsung/printer_name_blah_blah"

Quote
E [20/Oct/2010:22:31:08 +0000] [CGI] smbclient not found!
E [20/Oct/2010:22:31:08 +0000] [CGI] rpcclient not found!

I would guess this is a result of having the cups and cups1311 extensions loaded along with libcups..
Title: Re: Can't access CUPS
Post by: Neo on October 21, 2010, 12:14:50 AM
I deselected CUPS and left only CUPS 1311.

What do you mean by "deselected" - if you had both cups extensions (cups + cups1311) loaded, you would need to ensure that one of them is not "onboot", reboot and then check only one of them is loaded.

Quote
I am still asked for a password

As mentioned - entering "sudo passwd" in a terminal window will allow you to set the root password.

Quote
I tried using /dev/usb/lp0 for the location.

This will not work - it needs to be analogous to "usb://samsung/printer_name_blah_blah"

Quote
E [20/Oct/2010:22:31:08 +0000] [CGI] smbclient not found!
E [20/Oct/2010:22:31:08 +0000] [CGI] rpcclient not found!

I would guess this is a result of having the cups and cups1311 extensions loaded along with libcups..

Yes, I made sure that only CUPS 1311 is selected in the onboot menu.
CUPS still appears on the left hand side in the Apps Control (sorry I am not in TC right now and forget the correct name of the program where you manage the applications) program, but in in the On Boot side (it isn't in the On Demand side either).

If I need to remove/uninstall CUPS, could you please tell me how to do so.
I am used to using Synaptic or APT and find that TC is very different.
Title: Re: Can't access CUPS
Post by: Juanito on October 21, 2010, 01:15:23 AM
Perhaps the surest way to check what's loaded is to look for the folders:

/tmp/tcloop/cups
/tmp/tcloop/cups1311

This is where the extensions are loaded - if only the /tmp/tcloop/cups1311 folder is present, then only this one is loaded.

If you only see cups1311 in the onboot section of appsaudit, this should be OK. If you see both cups and cups1311 in /tmp/tcloop, then you need to reboot to get rid of the cups extension and cups1311 will be reloaded "onboot"
Title: Re: Can't access CUPS
Post by: aus9 on October 21, 2010, 06:23:18 AM
hi Neo

Juanito  is the expert here but....can I make it obvious that if you are asked for a root  password.....you have not set up cups1311 correctly.

The whole purpose of me using cups1311 was to avoid setting up a root password to then use with (non-cups1311 or normal cups)

If you prefer normal cups do this pls

Code: [Select]
sudo su
passwd
(enter a new password for root)
(you are likely to enter it twice

then add etc/passwd to your filetool.lst

I will try to get around to a normal cups  wiki  but I plan on updating for alsaconf which now works for me in a different wiki.


2) its the file mentioned in the right hand pane that we care about

so RH list is either cups or cups133 but not both ok?
Title: Re: Can't access CUPS
Post by: gerald_clark on October 21, 2010, 10:21:32 AM
You will also need to add etc/shadow to .filetool.lst , as that is where the password is actually stored.
Title: Re: Can't access CUPS
Post by: aus9 on October 22, 2010, 04:43:52 AM
gerald_clark

thanks for fixing up my bad error.

Title: Re: Can't access CUPS
Post by: aus9 on October 22, 2010, 10:42:02 PM
hi Neo

1)I have changed the wiki slightly so other newbies aren't caught out

cups1311 does not depend on foomatic or gutenprint

2) The ppd file I mentioned and whatever your ppd file is.....will likely need either foomatic-rip or gutenprint so you need to add that package to your onboot or ondemand list
....so that the right hand pane of your cpanel...apps audit.....onboot (or ondemand) shows

cups1311
foomatic-rip
gutenprint

3) Since you have not posted the contents of your ppd I am not sure which package it needs

please re-consider posting it.....in case it asks for a package that TC does not even have?

4) There a number of ways of checking that cups1311 is running

one way is in the wiki or as mentioned by Juanito

please confirm you have it running before attempting to open to the cups page