Tiny Core Linux
Tiny Core Base => CorePlus => Topic started by: t18 on April 07, 2025, 04:24:09 AM
-
Hello,
I'm still using TC 15.0.
It seems it's not enough to start cups to show the web interface on the browser.
Any guidelines or tutorial to follow? Or settings to do?
Many thanks
-
Have you followed the steps in the cups info file?
-
Have you followed the steps in the cups info file?
That's a thing that often escapes me, because I use to download the necessary packages before and then work offline (among a thousand thoughts).
And it seems the info file doesn't get downloaded with its packages.
So, I'll check it as soon as I can do that. Thank you :)
-
So, I've definitely lost anything: I've started the cups daemon, the root password was previously set but it's never requested, and when I put the localhost:631 address on the browser I just get "Not Found".
Where I'm mistaken?
-
Hi t18
It sounds like the root password is not set and not backed up.
Set the root password:
tc@box:~$ sudo passwd
root:12345
Start the cups daemon:
tc@box:~$ sudo /usr/local/etc/init.d/cups start
Setup to backup your settings:
tc@box:~$ echo usr/local/etc/cups/printers.conf >> /opt/.filetool.lst
tc@box:~$ echo usr/local/etc/cups/cupsd.conf >> /opt/.filetool.lst
tc@box:~$ echo etc/shadow >> /opt/.filetool.lst
# Add this next one when/if you have a .ppd file:
tc@box:~$ echo usr/local/etc/cups/ppd/**YOUR_PPD_FILE** >> /opt/.filetool.lst
tc@box:~$ filetool.sh -b
Make sure you are not using the norestore boot code.
Now try to connect to:
http://localhost:631/admin
If there are problems, see if any errors were logged:
less /var/log/cups/error_log
-
Hi Rich,
no way. Not using norestore, no error_log written.
Please see the attached image.
-
Hi t18
... Please see the attached image.
You image shows you entered:
http://localhost:631
instead of:
http://localhost:631/admin
-
That's what escaped me: "/admin"
And "http://localhost:631" is what is still stated on the info file and what I use to set on Slackware as well, so I've put it automatically.
Thank you so much. :)
-
Hi t18
... And "http://localhost:631" is what is still stated on the info file ...
The x86 cups.tcz.info files have been corrected.
... Thank you so much. :)
You are welcome.
-
Back to CUPS.
So, I can see the CUPS pages on Firefox but neither on Dillo nor on NetSurf:
tc@box:~$ dillo
paths: Cannot open file '/home/tc/.dillo/keysrc': No such file or directory
paths: Using /usr/local/etc/dillo/keysrc
paths: Cannot open file '/home/tc/.dillo/domainrc': No such file or directory
paths: Using /usr/local/etc/dillo/domainrc
Domain: Default accept.
dillo_dns_init: Here we go! (threaded)
TLS library: OpenSSL 3.2.0 23 Nov 2023
Cookies: rule 'ALLOW_SESSION' for domain 'thedarkpools.com' is not recognised.
Cookies: rule 'ALLOW_SESSION' for domain 'mobyticktrading.com' is not recognised.
Disabling cookies.
paths: Cannot open file '/home/tc/.dillo/hsts_preload': No such file or directory
paths: Using /usr/local/etc/dillo/hsts_preload
** WARNING **: preferred sans-serif font "DejaVu Sans" not found.
** WARNING **: preferred serif font "DejaVu Serif" not found.
** WARNING **: preferred monospace font "DejaVu Sans Mono" not found.
** WARNING **: preferred cursive font "DejaVu Sans" not found.
** WARNING **: preferred fantasy font "DejaVu Sans" not found.
Nav_open_url: new url='about:splash'
Nav_open_url: new url='localhost:631/admin'
Dpi_get_server_port: can't read server port from dpid.
Nav_open_url: new url='http://localhost:631/admin'
Dns_server [0]: localhost is 127.0.0.1
Connecting to 127.0.0.1:631
NumPendingStyleSheets=1
HTTP warning: Message with a body lacked Content-Type header.
Nav_open_url: new url='http://localhost:631/admin'
Connecting to 127.0.0.1:631
a_Nav_expect_done: reload!
HTTP warning: Message with a body lacked Content-Type header.
Nav_open_url: new url='http://localhost:631/admin/'
Connecting to 127.0.0.1:631
HTTP warning: Message with a body lacked Content-Type header.
Dillo: normal exit!
Since there is not any recent version of Firefox for older CPUs, I decided to set the printer via command line, either loading the ppd file from the home dir and copying it manually to the cups ppd dir:
root@box:/home/tc# lpadmin -p Samsung_ML-1210 -E -m /home/tc/Generic-GDI_Printer-gdi.ppd -v usb://Samsung/ML-1210
lpadmin: Printer drivers are deprecated and will stop working in a future version of CUPS.
lpadmin: Unable to copy PPD file.
root@box:/home/tc# lpadmin -p Samsung_ML-1210 -E -m /usr/local/etc/cups/ppd/Generic-GDI_Printer-gdi.ppd -v usb://Samsung/ML-1210
lpadmin: Printer drivers are deprecated and will stop working in a future version of CUPS.
lpadmin: Unable to copy PPD file.
root@box:/home/tc# lpadmin -p Samsung_ML-1210 -E -m Generic-GDI_Printer-gdi.ppd -v usb://Samsung/ML-1210
lpadmin: Printer drivers are deprecated and will stop working in a future version of CUPS.
lpadmin: Unable to copy PPD file.
What did I lose?
Many thanks
-
Added logs.
-
Does the directory /usr/local/etc/cups/ppd exist?
-
Does the directory /usr/local/etc/cups/ppd exist?
Yes, since I've copied my ppd file into it.
What doesn't exist is the /usr/local/share/cups/model/ (please see error_log) in which it seems to look for the ppd file.
So I've made it manually and copied my file into that. No error returned, but it doesn't work yet.
-
Hi t18
I found these lines from error_log interesting:
E [14/Apr/2025:08:22:28 +0000] [CGI] Unable to scan \"@LOCAL\"!
E [14/Apr/2025:08:23:18 +0000] [cups-driverd] Unable to open \"/usr/local/share/cups/model/mnt/sda2/Generic-GDI_Printer-gdi.ppd\" - No such file or directory
E [14/Apr/2025:08:23:18 +0000] [Client 5] Returning HTTP Forbidden for CUPS-Add-Modify-Printer (ipp://localhost:631/printers/Samsung_ML-1210) from localhost
E [14/Apr/2025:08:24:27 +0000] [cups-driverd] Unable to open \"/usr/local/share/cups/model/home/tc/Generic-GDI_Printer-gdi.ppd\" - No such file or directory
Line 1 seems to suggest difficulty accessing localhost.
I noticed this note in libcups.tcz.info:
Comments: common unix printing system libraries
----------
howto print from a cups client to cups server
create a file of the form:
$ cat /usr/local/etc/cups/client.conf
ServerName 192.168.1.200
replace 192.168.1.200 with the ip address of your cups server
and modify hosts as follows:
$ cat /etc/hosts
127.0.0.1 cups_client localhost localhost.local
192.168.1.200 cups_server cups_server.local
replace cups_client and cups_server with the hostnames from your client/server
Lines 2 and 4 contain paths that look a little odd:
/usr/local/share/cups/model/mnt/sda2/Generic-GDI_Printer-gdi.ppd
^^^^^^^^___ odd part
/usr/local/share/cups/model/home/tc/Generic-GDI_Printer-gdi.ppd
^^^^^^^___ odd part
Line 3 suggests a permission error, possibly related to
line 1, or maybe the /printers/ directory itself:
ipp://localhost:631/printers/Samsung_ML-1210
-
Ok, I'm using a local printer connected to the USB port, so I thought it's not necessary to configure the network.
I have now enabled the debug loglevel and issued th following commands:
sudo /usr/local/etc/init.d/cups start
sudo mkdir /usr/local/share/cups/model/
sudo cp /home/tc/Generic-GDI_Printer-gdi.ppd /usr/local/share/cups/model/
sudo lpinfo -v
sudo lpadmin -p Samsung_ML-1210 -E -v usb://Samsung/ML-1210 -m Generic-GDI_Printer-gdi.ppd
sudo cupsaccept Samsung_ML-1210
sudo cupsenable Samsung_ML-1210
sudo lpstat -p Samsung_ML-1210 -l
sudo lpoptions -d Samsung_ML-1210
sudo lpstat -d
This is the access_log file:
localhost - - [16/Apr/2025:21:07:35 +0000] "POST / HTTP/1.1" 200 1641 CUPS-Get-Devices -
localhost - - [16/Apr/2025:21:07:50 +0000] "POST / HTTP/1.1" 200 27781 CUPS-Get-PPD -
localhost - - [16/Apr/2025:21:07:50 +0000] "POST /admin/ HTTP/1.1" 401 27845 CUPS-Add-Modify-Printer successful-ok
localhost - root [16/Apr/2025:21:07:50 +0000] "POST /admin/ HTTP/1.1" 200 27845 CUPS-Add-Modify-Printer successful-ok
localhost - - [16/Apr/2025:21:07:58 +0000] "POST /admin/ HTTP/1.1" 401 157 CUPS-Accept-Jobs successful-ok
localhost - root [16/Apr/2025:21:07:58 +0000] "POST /admin/ HTTP/1.1" 200 157 CUPS-Accept-Jobs successful-ok
localhost - - [16/Apr/2025:21:08:04 +0000] "POST /admin/ HTTP/1.1" 401 157 Resume-Printer successful-ok
localhost - root [16/Apr/2025:21:08:04 +0000] "POST /admin/ HTTP/1.1" 200 157 Resume-Printer successful-ok
localhost - - [16/Apr/2025:21:09:13 +0000] "POST /printers/Samsung_ML-1210 HTTP/1.1" 200 336 Create-Job successful-ok
localhost - - [16/Apr/2025:21:09:13 +0000] "POST /printers/Samsung_ML-1210 HTTP/1.1" 200 1341 Send-Document successful-ok
Printing a file via: lp myfile.txt doesn't work (Filter failed).
Attached is the error_log file.
I haven't found any explanation about the "(cups-brf) stopped with status 13" error.
Any hints?
Many thanks
-
Cups using ghostscript, you have to install that.
[16/Apr/2025:21:09:14 +0000] [Job 1] sh: gs: not found
And printing as a regular user I think you have to be in the group lp.
-
Did you try setting the error log level to debug?
-
Hi t18
... I haven't found any explanation about the "(cups-brf) stopped with status 13" error. ...
It's a virtual Braille printer.
-
Cups using ghostscript, you have to install that.
[16/Apr/2025:21:09:14 +0000] [Job 1] sh: gs: not found
And printing as a regular user I think you have to be in the group lp.
Installed, but now lpinfo -v doesn't list the USB entry anymore.
-
So, after a cold boot everything is working.
Yesterday I had previously enabled the USB tethering to download ghostscript and then I killed the USB0 process.
That might have messed it up.
Thank you all :)