Jump to content

Printer Driver/Config Beside Cups


anonxyz
 Share

Recommended Posts

Hi

I use Mandriva 2006 text mode and I had installed all CUPS, foomatic, hplip, printerdrake packages, but printerdrake said: "unable to install cups".

I can configure the printer, but when I click "send test page", nothing happens.

 

I can print a text file using the command:

cat file.txt > /dev/lp0

 

My printer is HP deskjet 840C.

 

1. Is there any other alternatives beside cups, foomatic or printerdrake?

2. Is there any step-by-step diagnostic / debugging of printerdrake / cups?

 

Thank you.

Link to comment
Share on other sites

It should work fine with cups and the hplip backend.

If it says "unable to install cups" then either you haven't configured your urpmi repos, or the system is seriously borked.

What happens if you run any browser and type in

http://localhost:631

 

Oh, by the way: How do you manage to "click" in text mode?

Edited by scarecrow
Link to comment
Share on other sites

I use ordinary mouse with "gpm" daemon.

 

I can access cups using the following command:

 

lynx http://localhost:631

 

Unfortunately after clicking on "printing test page" / press enter, nothing happen.

 

I try with X-Windows, but after "sending test page" to printer nothing happen, only question: "Is the test page OK?" (Yes/No).

 

Is there any step by step debugging of various program / process inside/called by cups?

I want to see all the process /error in sending testpage.ps to printer port?

 

> URPMI problem.

 

How to set up urpmi/fix this problem?

 

I found an alternative for single user (LPR script) for PS and PDF.

For text file you can send directly to "/dev/lp0" using "cat" command.

 

http://www.linuxfromscratch.org/hints/down...s/files/pfs.txt

 

For printing graphic, change gif/jpeg/png/bmp to ps (Postscript) using GIMP.

Link to comment
Share on other sites

Thank you for the reply.

 

I had cleaned all foomatic, cups, ghostscript, hplip, hpijs and other printer related RPM. I had installed from the latest source code: cups, foomatic, ghostscript.

 

Cups with --enable-debug, but there is no cups.log or cups_log.

 

There are 3 files on /var/log/cups: access_log, error_log and page_log.

 

Page_log containing information about 1 test page.

The last 5 lines from access_log:

 

"POST / HTTP/1.1" 200 413 CUPS-Get-Classes successful-ok

"POST / HTTP/1.1" 200 77 CUPS-Get-Default successful-ok

"POST / HTTP/1.1" 200 411 CUPS-Get-Printers successful-ok

"POST / HTTP/1.1" 200 154 Get-Jobs successful-ok

"POST / HTTP/1.1" 200 179 CUPS-Get-Printers successful-ok

 

From error_log:

 

Listening to 127.0.0.1:631 (IPv4)

Listening to /var/run/cups/cups.sock (Domain)

Loaded configuration file "/etc/cups/cupsd.conf"

Using default TempDir of /var/spool/cups/tmp...

Cleaning out old temporary files in "/var/spool/cups/tmp"...

Configured for up to 100 clients.

Allowing up to 100 client connections per host.

Using policy "default" as the default!

Full reload is required.

Loaded MIME database from '/etc/cups': 35 types, 37 filters...

Loading job cache file "/var/cache/cups/job.cache"...

Full reload complete.

Listening to 127.0.0.1:631 on fd 3...

Listening to /var/run/cups/cups.sock on fd 4...

Unable to set ACLs on root certificate "/var/run/cups/certs/0" - Operation not supported

Listening to 127.0.0.1:631 on fd 2...

Listening to /var/run/cups/cups.sock on fd 4...

Listening to 127.0.0.1:631 (IPv4)

Listening to /var/run/cups/cups.sock (Domain)

Loaded configuration file "/etc/cups/cupsd.conf"

Using default TempDir of /var/spool/cups/tmp...

Cleaning out old temporary files in "/var/spool/cups/tmp"...

Configured for up to 100 clients.

Allowing up to 100 client connections per host.

Using policy "default" as the default!

Full reload is required.

Saving job cache file "/var/cache/cups/job.cache"...

Loaded MIME database from '/etc/cups': 35 types, 37 filters...

Loading job cache file "/var/cache/cups/job.cache"...

Full reload complete.

Listening to 127.0.0.1:631 on fd 2...

Listening to /var/run/cups/cups.sock on fd 4...

Adding start banner page "none" to job 10.

Adding end banner page "none" to job 10.

Job 10 queued on "HPDeskjet1" by "root".

Started backend /usr/lib/cups/backend/parallel (PID 15584) for job 10.

Link to comment
Share on other sites

You can use Foomatic-RIP for single user printer management without any spool.

 

http://www.linux-foundation.org/en/OpenPri...erDocumentation

 

Many Linux experts gave up on cups problems and bugs:

 

http://www.catb.org/~esr/writings/cups-horror.html

 

http://hex.hates-software.com/2004/04/16/31dc4c50.html

 

There is a "libusb" related bugs on certain version of cups.

 

After 2 weeks battle, the cups works:

 

1. Use Cups, Ghostscript, foomatic, hplip (for HP printers) source code from Mandriva 2007.1 in SRPMS sub-directory. Re-compile using "rpmbuild --rebuild --nodeps".

If the rpmbuild failed, change directory to "/usr/src/RPM/BUILD/cups*", run make and make install.

Run "gsc -h" command and make sure the printer driver for your printer is included in the output.

 

2. Make sure the required ghostscript fonts are available for foomatic, before rebuilding it.

Search for all type1 and ttf font, copy to "/usr/X11R6......fonts/Type1" and "/usr/X11R6/........fonts/TTF".

Run type1inst and ttfontmap.

Copy the fontmap to "/usr/share/ghostscript/........./Fontmap.GS".

 

http://pegasus.rutgers.edu/~el...t_h...HOWTO/x338.html

 

Make sure GS_LIB environment variable point to the directory. Set the environment variable on /root/.bashrc or ".bashrc" file your root directory.

 

GS_LIB=/usr/X11R6/lib/X11/fonts/TTF

GS_LIB=/usr/X11R6/lib/X11/fonts/Type1:$GS_LIB

export GS_LIB

 

Exit/log out from root account and login again.

To test environment variable:

 

set | grep -i "gs\_lib"

 

3. Modify "/etc/cups/cupsd.conf" to get the error. New values:

LogLevel debug

Listen 127.0.0.1:631

 

Below each "order <deny, allow>" lines and

below each "order <allow, deny>" lines, you must insert the following line:

allow 127.0.0.1

 

On my "/etc/cups/cupsd.conf" there are 7 "order..........." lines

 

You can check the debug / error messages at "/var/log/cups/error_log".

You can reset the log by using the following command:

"rm -rfv /var/log/cups/*".

 

After this command restart cups daemon:

"service cups stop"

"service cups start"

 

4. I face the following printing problem: "unsupported format "text/plain" and "application/postscript". The solution:

 

Modify /etc/cups/mime.convs: remove the comment sign (the character '#')

 

application/vnd.cups-postscript application/vnd.cups-raster 100 pstoraster

application/octet-stream application/vnd.cups-raw 0 -

 

https://bugs.launchpad.net/cupsys/+bug/36532

 

5. Create user and group: lp, lpadmin (using adduser command).

 

6. Change access mode of "/dev/lp0"

chmod a+w /dev/lp0

 

7. If you got "cannot set ACLs command not supported" problem on "/var/log/cups/error_log", you must install ACL packages.

 

http://acl.bestbits.at/download.html

 

Make sure you had compiled kernel with ACL option on "file system" kernel options (from "/usr/src/linux-...../.config")

 

CONFIG_EXT2_FS_POSIX_ACL=y

CONFIG_FS_POSIX_ACL=y

CONFIG_GENERIC_ACL=y

CONFIG_TMPFS_POSIX_ACL=y

CONFIG_NFS_V3_ACL=y

CONFIG_NFSD_V2_ACL=y

CONFIG_NFSD_V3_ACL=y

CONFIG_NFS_ACL_SUPPORT=y

 

If you use "module" option, perhaps you can use "=m" instead of "=y".

 

Modify "/etc/fstab". Add ",acl" after "defaults" on "/etc/fstab" entry. Example for root partition (/) on "/dev/hda1":

 

/dev/hda1 / ext2 defaults,acl 1 1

 

Rebot after modifying and saving "/etc/fstab".

 

How to test acl:

 

touch /test

setfacl -m u:root:rwx /test

 

8. If you face "quota limit" problem, delete the printer on CUPS menu, reboot and re-install new printer driver from scratch.

Edited by anonxyz
Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

Loading...
 Share

×
×
  • Create New...