Tiny Core Linux
Tiny Core Extensions => TCE Q&A Forum => Topic started by: Madcamper on October 27, 2009, 07:46:03 PM
-
Hello,
I have installed the cups.tczl, i start the daemon, but when i goto http://localhost:631 it doesnt work.
If someone could get back to me on a solution or something that'd be great!
Thanks
-
What doesn't work?
Have you created a root password for starters? That is of course necessary to do any admin with cups.
-
I have installed the cups.tczl, i start the daemon
Which cups extension are you using? With cups, the daemon should start when you load the extension, with cups1311 you need to start it manually.
-
What doesn't work?
Have you created a root password for starters? That is of course necessary to do any admin with cups.
As in root password you mean root password for the system? or a seperate root password for cups? if for cups then no. I had installed cups1311.tczl before cups.tczl
http://distro.ibiblio.org/pub/linux/distributions/tinycorelinux/2.x/tcz/cups.tczl
That is the cups I have installed.
And when i goto http://localhost:631 it doesnt bring up any administrator page of adding printers or anything.
I have attached a Espon nx100 printer through USB to the server.
-
Due to a bug when using usb printers with the usb backend, the "cups" extension might not work.
It would probably be better to use the "cups1311" extension with usb printers - this version of the extension does not need the root password to be set..
-
ok, but even when i had cups1311 installed, when i went to http://localhost:631 it didnt load anything except page can not be displayed.
I even opend the 631 port on my router just to see if it made a difference
-
The browser interface is not required to add a printer, you can use an obscure command like:
$ sudo lpadmin -p OfficeJetG85 -E -v ipp://192.168.1.100/printers/OfficeJetG85
..which adds a network shared printer
..but of course it's much better when the browser interface works.
It sounds like there's a problem with the first few lines of cupsd.conf - could you paste the first few lines to have a look at? What browser are you using?
-
ya the Cups file looks like:
#Log General information in error_log - change "warn" to "debug"
#for troubleshooting...
LogLevel warn
#Administrator user group...
SystemGroup root
# Only listen for connections from the local machine.
Listen localhost:631
Listen /var/run/cups/cups.sock
along with some other stuff about browsing and restrict access to the server, admin pages
Also this printer is connected to the server itself, so doing the lpadmin command, will it do any good in setting up that printer that is directly connected? or is it just for adding another network printer to the TC system?
-
# Only listen for connections from the local machine.
Listen localhost:631
Listen /var/run/cups/cups.sock
looks correct - I would expect the browser interface to work with this...
You could try setting the log level to "debug", restarting cups and checking /var/log/cups/error_log for clues.
Also this printer is connected to the server itself, so doing the lpadmin command, will it do any good in setting up that printer that is directly connected? or is it just for adding another network printer to the TC system?
I just gave an example I had handy - the lpadmin command can also be used to add a local printer. In place of "ipp://192.168.1.100/printers/OfficeJetG85", you would have something starting with "usb://...", the following might give a clue as to what exactly: $ sudo /usr/local/lib/cups/backend/usb
..and the man page for lpadmin could also help
-
ok i just looked up some help online as well.
i made a cupsd1.conf and specified cups to load with that config file, and in the contained file I put.
# Default authentication type, when authentication is required…
DefaultAuthType Basic
DefaultEncryption IfRequested
# Only listen for connections from the local machine.
Listen localhost:631
Listen 192.168.1.101
Listen /var/run/cups/cups.sock
# Show shared printers on the local network.
Browsing On
BrowseOrder allow,deny
BrowseAllow @LOCAL
# Restrict access to the server…
<Location/>
Order allow,deny
Allow localhost
Allow 192.168.1.100
</Location>
# Restrict access to configuration files…
<Location /admin/conf>
AuthType Basic
Require user @SYSTEM
Order allow,deny
Allow localhost
Allow 192.168.1.100
</Location>
This time when i goto http://192.168.1.101:631
it recognizes theres a page there or something, but it says 403 Forbidden
also with teh /usr/local/lib/cups/backend/usb command, i get the output of
DEBUG: list_devices
DEBUG: usb_find_busses=5
DEBUG: usb_find_devices=6
but not sure exactly where to go from there
-
This should allow to connect both a local printer and to a printer shared by a remote server.
LogLevel info
Port 631
Listen localhost:631
Listen /var/run/cups/cups.sock
### Which print servers to use
BrowseAddress @LOCAL
BrowseOrder deny,allow
BrowseDeny from All
BrowseAllow from @LOCAL
BrowseAllow from 192.168.1.*
<Location />
AuthType None
Order Deny,Allow
Deny From All
Allow From @LOCAL
</Location>
<Location /jobs>
AuthType None
Order Deny,Allow
Deny From All
Allow From @LOCAL
</Location>
<Location /printers>
AuthType None
Order Deny,Allow
Deny From All
Allow From @LOCAL
</Location>
<Location /admin>
AuthType None
Order Deny,Allow
Deny From All
Allow From @LOCAL
</Location>
-
Awesome, that allowed me to get into the page. I'll let you know how the setup goes!
Thanks!
Am having trouble, when I go to add the printer, i think it finds it but when it comes to enter the description of the printer, and name, and clicking the Share Network Printer checkbox. It keeps me on an infinite loop after clicking the add printer button. It keeps asking me to enter the printer description
-
Did you set and use the root password (sudo passwd)?
-
ya, it asked for username and password at one point, so i entered "root" for username and the password was the root password
-
I [28/Oct/2009:01:41:56 +0000] Started "/usr/local/lib/cups/cgi-bin/admin.cgi" (pid=7711)
I [28/Oct/2009:01:41:56 +0000] Started "/usr/local/lib/cups/daemon/cups-deviced" (pid=7712)
I [28/Oct/2009:01:41:59 +0000] Started "/usr/local/lib/cups/cgi-bin/admin.cgi" (pid=7722)
I [28/Oct/2009:01:42:03 +0000] Started "/usr/local/lib/cups/cgi-bin/admin.cgi" (pid=7723)
I [28/Oct/2009:01:42:10 +0000] Started "/usr/local/lib/cups/cgi-bin/admin.cgi" (pid=7724)
I [28/Oct/2009:01:42:11 +0000] Started "/usr/local/lib/cups/cgi-bin/printers.cgi" (pid=7725)
I [28/Oct/2009:01:42:13 +0000] Started "/usr/local/lib/cups/cgi-bin/help.cgi" (pid=7726)
I [28/Oct/2009:01:42:17 +0000] Started "/usr/local/lib/cups/cgi-bin/admin.cgi" (pid=7727)
E [28/Oct/2009:01:42:17 +0000] [CGI] smbclient not found!
E [28/Oct/2009:01:42:17 +0000] [CGI] rpcclient not found!
after trying to add printer, this is what the error log says from http://192.168.1.101:631/admin/log/error_log
I also did a lsusb
and it listed the devices and the epson is listed as:
Bus 003 Device 002: ID 04b8 Seiko Epson Corp.
I'm sure it's of some help to know that, but dont know how to implement if need be.
-
ya, it asked for username and password at one point, so i entered "root" for username and the password was the root password
I've seen cups get locked up like that before when more than one instance is running.
You could try stopping the cups daemon (/etc/init.d/cups stop) and then using "ps aux | grep cups" to make sure no other instances are running.
If all else fails, you could re-boot and start again...
-
Tried it again but no success. I had to tce-load -i cups.tczl again in order to edit the conf file
but when i go to add the printer through the web browser it still has that loop
also when i do sudo /etc/init.d/cups start
with just 1311 installed it doesnt work. I had to manually download the tczl file and install with tce-load -i cups1311.tczl
once i enter that command it says the scheduler has started but it still wont let me get to the web address.
could that cause a problem by manually downloading?
-
You could try in this order (if not already done):
1. load cups1311 and deps
2. stop cups daemon if it is running
3. edit cupsd.conf (shouldn't be required with either cups/cups1311)
4. start cups daemon
5. start browser interface
6. add printer
-
Look at last post, don't know if you saw it in time for the new post? :/
-
Awsome!!! it worked!!! now to try and print from my windows machine.
would the printer address just be http://address:port ?
-
Unsupported format 'application/postscript'! when i try to print a test page
what does this mean?
FIX:
Ok got it to work, i had to reinstall gs.tczl as it was removed
-
Do you mean the test page from your linux machine or from your windows machine?
On linux, I think this depends on whether you used a cups driver or a ppd driver for your printer.
Some ppd will need foomatic-rip and its deps to be loaded
-
im printing from my windows machine to the printer connected to my linux machine, but when i did print test page it didnt print anything out
-
Did you see http://forum.tinycorelinux.net/index.php?topic=3559.0 (http://forum.tinycorelinux.net/index.php?topic=3559.0) ?
-
when i try to change the basic server settings it comes back with Internal Server Error
-
@Madcamper:
Which version of CUPS are you running? Use the command: cups-config --version
I am pretty sure that cups1311.tczl will work for you once you get the cups daemon started, as described in the info file. Either:
1. Run: sudo /etc/init.d/cups start or
2. Add the line to your /opt/bootlocal.sh file
If you currently have CUPS 1.4x in play, you will need to uninstall it before going back to CUPS 1.3.11. Otherwise, the two versions will fight each other.
Where did you get the driver for your NX100?
-
perthie:
I am running 1.3 version of cups it does work and starts up. But as for printing it doesnt actually print the page.
And as for the NX100 driver, I havn't installed the driver, I am looking for the ppd file as to i think that is why it is not printing.
It does recognize it as a NX100 Epson printer plugged into the usb port though. If you find or have any solution to the nx100 driver please let me know.
As far as being able to access outside of my local network, i can not do yet.
I try editing the basic server settings on the main paig of the cups web browser but it returns a "internal server error" message. Any help with that would be great too
-
Install the gutenprint.tczl extension. It has a driver for your NX100.
Also, the cupsd.conf file that comes with cups1311.tczl will work fine. You should not need to modify it.
Are you sure that you don't have both versions of CUPS running at the same time?
-
ok i installed the gutenprint, but cant test it yet. I can't access the web address outside of the local network. ( i am at school rigth now)
-
ok i installed the gutenprint, but cant test it yet. I can't access the web address outside of the local network. ( i am at school rigth now)
Into what machine did you install Gutenprint? It needs to be installed on the machine running the CUPS daemon. Once you have your NX100 set up as a local printer, we can address the networking issue.
Could you explain what "the server" is?
-
the "server" is a headless computer i have TC running on. I manage it from my PC laptop via webmin, ssh(cygwin)
Is there any file i can edit that will allow me to connect to the http://ipaddress:631/ address from outside the local network?
All of the printing associated work is being done remotely, the printer is connected through USB to the server, and i want to be able to print from my PC inside and outside of the local network
-
This is beyond my area of expertise, but there are two settings in Administration > Server that look useful: "Share Published Printers" and "Allow Printing from Internet". I would assume that you have to set them by connecting directly to the server (not through ssh). They will require a root login.
Read Step #1 from here. (http://forum.tinycorelinux.net/index.php?topic=3559.0)
-
when i use the default cupsd.conf it lets me goto the http://myipaddress:631/
but it wont let me get to http://myipaddress:631/admin
any suggestions? I'd assume it has something to do with the <Location> options in the conf
-
Ok i have the printer working via the web browser, i printed a test page. EXCELLENT!
Now i have the problem with the Basic Server Settings giving me a "internal server error" after clicking change settings.
Any tips?
-
Are you trying to do this through ssh?
I did the following with my own CUPS 1.3.11 and the default cupsd.conf.
1. Ran sudo passwd to set a root pasword.
2. Ran localhost:631 to open the CUPS web interface.
3. Checked off "Share publish printers" and "Allow printing from Internet"
4. Clicked on Changed Settings
There were no errors. However, I have no way of testing whether the printers are accessible from beyond the local network.
-
in the error log it shows
E [28/Oct/2009:19:48:25 +0000] Unable to open config file "/etc/cups/cupsd.conf.N" - Read-only file system
I [28/Oct/2009:19:48:54 +0000] Started "/usr/local/lib/cups/cgi-bin/printers.cgi" (pid=15891)
I [28/Oct/2009:19:48:55 +0000] Started "/usr/local/lib/cups/cgi-bin/classes.cgi" (pid=15892)
I [28/Oct/2009:19:48:57 +0000] Started "/usr/local/lib/cups/cgi-bin/admin.cgi" (pid=15893)
after clicking change settings for the basic server settings
-
On Page 1, you mention changing CUPS somehow to use a different cupsd.conf. Is that still the case?
BTW, when I made the changes above, the entry in cupsd.conf changed from "Allow @Local" to "Allow all". That would suggest that CUPS is ready to accept remote print jobs.
Are you still trying to do this through ssh?
The error message above suggests that CUPS does not have write permission on the folder /etc/init.d/cups , even though you logged into CUPS as root.
-
I have set this all up through SSH yes. as for the "Allow @Local" "Allow all" is that everything that says allow @local should be changed to allow all?
i am still using cupsd1.conf settings, but it is renamed to cupsd.conf now.
With a little help, I cp'd the original cupsd.conf out and mv the cupsd1.conf in with the name of cupsd.conf
I also changed all the @Local to Allow ALL
for example:
<Location />
AuthType None
Order Deny,Allow
Deny From All
Allow From ALL
</Location>
but im guessing the "Deny From All" is contradicting the "allow from" so can i just comment out the deny?
-
Or you could use the default cupsd.conf (because that's the one that appears to work.)
-
it didnt work for me from the beginning, which is why Juanito gave me a working config setup.
When I was using the default cupsd.conf i couldnt even get to http://localhost:631
it would just say the page cannot be displayed.
Now I have successfuly added the printer and drivers and what not, just cant open it up to the internet.
-
OK. I think I understand the difference. The default cupsd.conf assumes that you are logging directly into the local machine. Because you are logging in through ssh, CUPS sees that as a remote connection and denies access.
Juanito's modification adds the line "Port 631" which allows remote access.
This exercise may have been a lot simpler if you had put a head on the server and configured it locally.
-
ya, i probably should have done that, >< oh well, I have it working for the most part, just trying to figure out what the outside link would be so I can add it to the "add a printer" in windows.
I've tried http://myipaddress:631
didnt work
http://myipaddress/
didnt work
http://myipaddress:631/printers/Epson
didnt work
any tips?
-
Can you ping the server?
-
ya, 1ms TTL=64
-
From a web browser, can you get to http://myipaddress:631 ?
If not, then CUPS must not be configured correctly yet.
You know what my next suggestion is going to be. ;)
-
Yes, probably to put a head on the server >.>
I set the configuration file back to default via the cups web browser, so it is at default, i enabled the basic server settings perfectly fine, but it is still persisting in giving me "400 Bad Request" when i goto http://myipaddress:631/
-
http://pastebin.com/m44c186ea
the config file
-
someone mentioned to me about going here http://www.owlfish.com/thoughts/winipp-cups-2003-07-20.html
because in order for Windows to communicate with the CUPs stuff on linux, you have to do a couple of things.
I did the "If you don't wish to create a raw printer queue then you can instead make the following changes to your CUPS mime.types and mime.convs configuration files. Both of these files contain a commented out option starting with "#application/octet-stream". Enable these options by removing the "#", and then restart CUPS."
part, but still not getting anywhere on adding it to "Add a printer"
-
The line you may need is
BrowseAddress aaa.bbb.ccc.ddd:631
CUPS will then advertise its presence to that remote machine or group of machines.
-
ok so i have a cronjob on my server to shutdown every morning at 2am, and start back up at 8am. this morning i woke up and i couldnt even connect to the server. i hooked a monitor up to it, keyboard, and mouse, and it seems as if allll my files are gone. It happend after messing with cups, it was fine before I even put CUPs on it. There's also no cups.tczl to be found
-
I'm not sure how using cups could delete all of your files?
..and isn't it cups1311.tczl you're using?
-
I can't comment on your server crash, but I bet I know what caused this:
E [28/Oct/2009:19:48:25 +0000] Unable to open config file "/etc/cups/cupsd.conf.N" - Read-only file system
If you install CUPS by mounting instead of loading into RAM, then the cupsd.conf file will be permanently read-only. So there is no way you can update it to make your printer shareable.
At one point, you were able to delete and replace the default cupsd.conf because deleting the symlink is permitted.
-
If you install CUPS by mounting instead of loading into RAM, then the cupsd.conf file will be permanently read-only. So there is no way you can update it to make your printer shareable.
It's probably true to say that the expected mode of operation is to mount an extension. This means that if a file is to be writeable, a start-up script ought to be used to copy the file to /etc, /usr/local/etc so that the file can be modified.