WelcomeWelcome | FAQFAQ | DownloadsDownloads | WikiWiki

Author Topic: [Solved] Unable to start the CUPS web interface  (Read 470 times)

Offline t18

  • Jr. Member
  • **
  • Posts: 81
[Solved] Unable to start the CUPS web interface
« 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
« Last Edit: April 09, 2025, 01:12:41 PM by Rich »

Offline Juanito

  • Administrator
  • Hero Member
  • *****
  • Posts: 15079
Re: Unable to start the CUPS web interface
« Reply #1 on: April 07, 2025, 05:56:50 AM »
Have you followed the steps in the cups info file?

Offline t18

  • Jr. Member
  • **
  • Posts: 81
Re: Unable to start the CUPS web interface
« Reply #2 on: April 07, 2025, 07:24:57 AM »
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  :)

Offline t18

  • Jr. Member
  • **
  • Posts: 81
Re: Unable to start the CUPS web interface
« Reply #3 on: April 08, 2025, 03:28:02 PM »
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?

Offline Rich

  • Administrator
  • Hero Member
  • *****
  • Posts: 12023
Re: Unable to start the CUPS web interface
« Reply #4 on: April 08, 2025, 04:21:57 PM »
Hi t18
It sounds like the root password is not set and not backed up.

Set the root password:
Code: [Select]
tc@box:~$ sudo passwd
root:12345

Start the cups daemon:
Code: [Select]
tc@box:~$ sudo /usr/local/etc/init.d/cups start
Setup to backup your settings:
Code: [Select]
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:
Code: [Select]
http://localhost:631/admin
If there are problems, see if any errors were logged:
Code: [Select]
less /var/log/cups/error_log

Offline t18

  • Jr. Member
  • **
  • Posts: 81
Re: Unable to start the CUPS web interface
« Reply #5 on: April 09, 2025, 02:21:36 AM »
Hi Rich,

no way. Not using norestore, no error_log written.

Please see the attached image.

Offline Rich

  • Administrator
  • Hero Member
  • *****
  • Posts: 12023
Re: Unable to start the CUPS web interface
« Reply #6 on: April 09, 2025, 09:19:47 AM »
Hi t18
... Please see the attached image.
You image shows you entered:
Code: [Select]
http://localhost:631instead of:
Code: [Select]
http://localhost:631/admin

Offline t18

  • Jr. Member
  • **
  • Posts: 81
Re: Unable to start the CUPS web interface
« Reply #7 on: April 09, 2025, 10:43:11 AM »
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.  :)

Offline Rich

  • Administrator
  • Hero Member
  • *****
  • Posts: 12023
Re: [Solved] Unable to start the CUPS web interface
« Reply #8 on: April 09, 2025, 01:18:27 PM »
Hi t18
... And "http://localhost:631" is what is still stated on the info file ...
The x86 cups.tcz.info files have been corrected.

Quote
... Thank you so much.  :)
You are welcome.

Offline t18

  • Jr. Member
  • **
  • Posts: 81
Re: [Solved] Unable to start the CUPS web interface
« Reply #9 on: April 14, 2025, 03:27:02 AM »
Back to CUPS.

So, I can see the CUPS pages on Firefox but neither on Dillo nor on NetSurf:

Code: [Select]
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:

Code: [Select]
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


Offline t18

  • Jr. Member
  • **
  • Posts: 81
Re: [Solved] Unable to start the CUPS web interface
« Reply #10 on: April 14, 2025, 04:12:09 AM »
Added logs.

Offline Juanito

  • Administrator
  • Hero Member
  • *****
  • Posts: 15079
Re: [Solved] Unable to start the CUPS web interface
« Reply #11 on: April 14, 2025, 06:29:20 AM »
Does the directory /usr/local/etc/cups/ppd exist?

Offline t18

  • Jr. Member
  • **
  • Posts: 81
Re: [Solved] Unable to start the CUPS web interface
« Reply #12 on: April 14, 2025, 06:44:50 AM »
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.

Offline Rich

  • Administrator
  • Hero Member
  • *****
  • Posts: 12023
Re: [Solved] Unable to start the CUPS web interface
« Reply #13 on: April 14, 2025, 12:10:13 PM »
Hi t18
I found these lines from error_log interesting:
Code: [Select]
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:
Code: [Select]
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:
Code: [Select]
/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:
Code: [Select]
ipp://localhost:631/printers/Samsung_ML-1210