LinuxQuestions.org
Visit Jeremy's Blog.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - General
User Name
Password
Linux - General This Linux forum is for general Linux questions and discussion.
If it is Linux Related and doesn't seem to fit in any other forum then this is the place.

Notices


Reply
  Search this Thread
Old 01-23-2016, 01:49 AM   #1
rng
Senior Member
 
Registered: Aug 2011
Posts: 1,198

Rep: Reputation: 47
cups installed but http://localhost:631 not starting


Title should be "cups installed BUT http://localhost:631 not starting" (I cannot edit it now).

I have in a Slackware XFCE installation cups package installed but when I try to access it through firefox with url http://localhost:631, it is not showing up. I have setup a HP-laserjet 1020 printer with command "# hp-setup -i" on this computer without any errors but it is not showing up in print dialog box of text editors. How can I troubleshoot and solve this problem? Thanks for your help.

Last edited by onebuck; 03-08-2016 at 04:02 PM. Reason: correct subject title
 
Old 01-23-2016, 02:56 AM   #2
huffdad
Member
 
Registered: Jan 2006
Location: Missouri
Distribution: Slackware & LFS
Posts: 31

Rep: Reputation: 6
try removing the http:// part. simply
Code:
localhost:631
That's what it is on my bookmark

*edit*
or add / to the end so it's http://localhost:631/
I dunno. Sorry if that doesn't work. My brain isn't working much for troubleshooting right now.

Last edited by huffdad; 01-23-2016 at 02:59 AM.
 
Old 01-23-2016, 10:09 AM   #3
Habitual
LQ Veteran
 
Registered: Jan 2011
Location: Abingdon, VA
Distribution: Catalina
Posts: 9,374
Blog Entries: 37

Rep: Reputation: Disabled
terminal >
Code:
pidof cupsd
output anything?

If not, start it and try http://localhost:631/ again.
 
Old 01-24-2016, 02:36 AM   #4
mdooligan
Member
 
Registered: Feb 2009
Location: Vancouver BC
Distribution: Mandrake10/ArchHackery/Gentoo
Posts: 179

Rep: Reputation: 22
Argh! CUPS! The bane of all good things.

If you dig around your printer config stuff, you'll find a binary executable that converts postscript into whatever language your printer speaks. Mine is called rastertosamsungspl. You may be lucky and have the source code for yours.

All you need to do is convert your doc to PDF or postscript (ghostscript), run it through that filter, and then cat the resulting file into /dev/lp0. Some printers will even print straight up postscript.

It will print as well as CUPS could ever do. Without the BS. You can send it to a remote printer with ssh. So forget CUPS and the horse it rode in on.

Footnote: printing nice looking documents can become very complicated very fast if you want very specific fonts and certain other elements. That's what ghostscript does. So if you want to get all pro with printing on Linux, get to know ghostscript. It's a bit odd, but it can do magic. I could post some shell script snippets if you're interested in going CUPS-free.
 
Old 01-24-2016, 03:31 AM   #5
rng
Senior Member
 
Registered: Aug 2011
Posts: 1,198

Original Poster
Rep: Reputation: 47
Quote:
"pidof cupsd" output anything?
I am presently away from that computer. Will post ASAP.
Quote:
I could post some shell script snippets if you're interested in going CUPS-free.
Thanks for methods of printing without cups. Will be very interested to see the shell scipts.

Last edited by rng; 01-24-2016 at 03:33 AM.
 
Old 01-25-2016, 07:12 AM   #6
rng
Senior Member
 
Registered: Aug 2011
Posts: 1,198

Original Poster
Rep: Reputation: 47
@Habitual : Thanks for the solution. The command 'pidof cupsd' did not produce any output. I started it by command 'cupsd' and then I could load the page http://localhost:631

How do I set cupsd to start with every bootup? Should I put command 'cupsd' or 'cups start' in rc.local file?
 
1 members found this post helpful.
Old 01-25-2016, 09:13 AM   #7
Habitual
LQ Veteran
 
Registered: Jan 2011
Location: Abingdon, VA
Distribution: Catalina
Posts: 9,374
Blog Entries: 37

Rep: Reputation: Disabled
Well, since you didn't tell us what OS you're on, or I didn't read this thread long enough,
There is chkconfig and lately rc-up* <some_crap_I_cant_remember>
I'd try this on most OSs...

Code:
/usr/bin/service cupds start
in /etc/rc.local

Have fun!

Monday-Afternoon Quarterback edit:
Quote:
Originally Posted by rng View Post
I have in a Slackware XFCE installation cups package installed but when I try to access it through firefox with url http://localhost:631, it is not showing up.
My Slack.fu is a bit rusty.

Last edited by Habitual; 01-25-2016 at 02:47 PM.
 
Old 01-25-2016, 10:55 AM   #8
Ztcoracat
LQ Guru
 
Registered: Dec 2011
Distribution: Slackware, MX 18
Posts: 9,484
Blog Entries: 15

Rep: Reputation: 1176Reputation: 1176Reputation: 1176Reputation: 1176Reputation: 1176Reputation: 1176Reputation: 1176Reputation: 1176Reputation: 1176
I haven't been able to reach the http://localhost:631 CUPS website for the last 2 weeks.

Sea Monkey would return:
Code:
The connection was refused when attempting to contact localhost:631
Though the site seems valid, the browser was unable to establish a connection
Running cupsd worked for me as well on my Slackware box.
My printer now works!-
---*--- ---*--- ---*--- ---*--- ---*---

@rng:
What distribution are you running?
 
Old 01-25-2016, 06:55 PM   #9
mdooligan
Member
 
Registered: Feb 2009
Location: Vancouver BC
Distribution: Mandrake10/ArchHackery/Gentoo
Posts: 179

Rep: Reputation: 22
Printing without CUPS is very easy once you know a few things.

Step 1: Find the PPD file that belongs to your printer and put it somewhere useful, like /etc/cups/ppd. Then export it:
Code:
export PPD="/etc/cups/ppd/ML1660.PPD"
This is crucial, becuause the filter program expects this magic environment variable to be set.

Step 2: find your filter program and put it somewhere useful. The actual name of this file will vary depending on your printer make & model, but they all do the same basic thing: convert postscript to some compiled binary format.
Code:
CONV="/etc/cups/filters/rastertosamsungspl"
Step 3: find your printer:
Code:
DEV=
DEVS="/dev/usb/lp0 /dev/usb/lp1"
for dev in $DEVS; do
    if [ -e "$dev" ]; then
        DEV="$dev"
    fi
done
Step 4: Convert your document to postscript. Most docs can be exported in OpenOffice/Firefox/etc to PDF. Then you just need pdftops. Other filetypes can be a bit more challenging and you'll need to play around a bit to get your PNG or JPG to look good at the correct size. "convert" from Imagemagick is your friend here.
Code:
convert -page letter "$SFILE" "$PSFILE"
usually works pretty good.

Straight ascii text is easy, a2ps or enscript do a lovely job.

Step 5: Assemble your mystical command to convert postscript to whatever proprietary language your printer speaks.
Code:
GS_OPTS="GS_FONTPATH=/usr/local/share/ghostscript/8.01/Resource/Font/ GS_LIB=/usr/local/share/ghostscript/8.01/"
You may not need that one if you have a nice clean factory set up. Adjust to suit your installation.
Code:
    splfile="${psfile/%ps/spl}"
    job=1
    user="miven"
    title="'$file'"
    copies=1
    opt="-"
    #CMD="$CONV 1 1 1 1 1 $psfile > $splfile"
    CMD="$GS_OPTS $CONV $job $user $title $copies $opt $psfile > $splfile"
    echo "$CMD"
    eval $CMD
Y'see, all filter programs have this unspoken industry agreement to supply 5 (and only 5) arguments, plus the exported PPD variable.
Any of these are not met, it will fail silently and you will never know why. I learned by hex editing the source code of the filter program.
These 5 args go into the SPL header so that the print server can ID the file and reroute it or whatever in large print installations.
I'm pretty it's just you and your cheapo USB printer, so the values of the args make no difference whatsoever, as long as they are present.
So if you got that command to work, you should now have a brand new SPL file ready to
Code:
cat $splfile > $DEV
and it will print in full glory. With SSH you can scp the file over to the print server, ssh in, and then print it. All can be done with 1 small bash script. CUPS just hides the details from you.
 
Old 01-26-2016, 03:42 AM   #10
rng
Senior Member
 
Registered: Aug 2011
Posts: 1,198

Original Poster
Rep: Reputation: 47
Thanks for some very interesting scripts. Will try them and post here the feedback.
 
Old 03-07-2016, 08:47 PM   #11
Zandak411
Member
 
Registered: Jun 2015
Location: USA
Distribution: Linux Mint(The best and most beautiful)
Posts: 59

Rep: Reputation: Disabled
I'm trying to Install a Canon Pixma ip1700 on Linux Mint Cinnamon 17.3, Cups installed flawlessly. The only Linux drivers I could find were for the Canon ip2700. Under printers it shows the ip1700 as the default printer. click on print and the puter goes through the motions and shows that the print has taken place but no printout from printer.
 
Old 03-07-2016, 09:10 PM   #12
Ztcoracat
LQ Guru
 
Registered: Dec 2011
Distribution: Slackware, MX 18
Posts: 9,484
Blog Entries: 15

Rep: Reputation: 1176Reputation: 1176Reputation: 1176Reputation: 1176Reputation: 1176Reputation: 1176Reputation: 1176Reputation: 1176Reputation: 1176
Quote:
Originally Posted by Zandak411 View Post
I'm trying to Install a Canon Pixma ip1700 on Linux Mint Cinnamon 17.3, Cups installed flawlessly. The only Linux drivers I could find were for the Canon ip2700. Under printers it shows the ip1700 as the default printer. click on print and the puter goes through the motions and shows that the print has taken place but no printout from printer.
Sounds like you really need a driver for Mint.
-::--::-
Try these links-
https://wiki.ubuntu.com/HardwareSupp...sPrintersCanon
https://help.ubuntu.com/community/Ha...nonPixmaIP1700

Last edited by Ztcoracat; 03-07-2016 at 09:11 PM.
 
Old 03-07-2016, 10:01 PM   #13
Zandak411
Member
 
Registered: Jun 2015
Location: USA
Distribution: Linux Mint(The best and most beautiful)
Posts: 59

Rep: Reputation: Disabled
Quote:
Originally Posted by Ztcoracat View Post
Sounds like you really need a driver for Mint.
-::--::-
Try these links-
https://wiki.ubuntu.com/HardwareSupp...sPrintersCanon
https://help.ubuntu.com/community/Ha...nonPixmaIP1700
Thanks, the problem has been solved. I went to this link: https://help.ubuntu.com/community/Ha...nonPixmaIP1700
 
Old 03-08-2016, 03:08 PM   #14
Ztcoracat
LQ Guru
 
Registered: Dec 2011
Distribution: Slackware, MX 18
Posts: 9,484
Blog Entries: 15

Rep: Reputation: 1176Reputation: 1176Reputation: 1176Reputation: 1176Reputation: 1176Reputation: 1176Reputation: 1176Reputation: 1176Reputation: 1176
Quote:
Originally Posted by Zandak411 View Post
Thanks, the problem has been solved. I went to this link: https://help.ubuntu.com/community/Ha...nonPixmaIP1700
You're Welcome-

-:::- -:::- -:::- -:::- -:::-

rng:
Did any of those scripts work for you?
 
Old 03-09-2016, 09:06 AM   #15
Zandak411
Member
 
Registered: Jun 2015
Location: USA
Distribution: Linux Mint(The best and most beautiful)
Posts: 59

Rep: Reputation: Disabled
Quote:
Originally Posted by Ztcoracat View Post
You're Welcome-

-:::- -:::- -:::- -:::- -:::-

rng:
Did any of those scripts work for you?
This one worked :sudo dpkg -i cnijfilter-common_3.30-1.deb

This one gave me this did not:
sudo dpkg -i cnijfilter-ip1900series_3.00-1_i386.deb

I got this for a result:

Error: Dependency is not satisfiable. libtiff4 Printer shows that it is connected but it only prints to file.............does not print to local host.,

Think I will just buy a new HP Pinter as they are so cheap now.
 
  


Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
Can't Access Cups Admin @ Http://localhost:631 Perps SUSE / openSUSE 8 12-26-2018 02:36 AM
CUPS. http://localhost:631/ not found Bester Linux - Server 2 03-25-2009 03:15 AM
CUPS http://localhost:631/ LUB997 Linux - Software 1 09-26-2005 07:52 PM
How to connect to http://localhost:631 to install CUPS ch.keller Linux - Hardware 3 06-07-2005 09:25 PM
can't access http://localhost:631 (for cups printing) TheOneAndOnlySM Slackware 4 10-14-2003 08:01 PM

LinuxQuestions.org > Forums > Linux Forums > Linux - General

All times are GMT -5. The time now is 05:24 PM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration