LinuxQuestions.org
Download your favorite Linux distribution at LQ ISO.
Home Forums Tutorials Articles Register
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 07-25-2003, 08:51 PM   #1
lostboy
Member
 
Registered: Mar 2003
Location: Florida
Distribution: Slackware 9.1,10.1
Posts: 268

Rep: Reputation: 30
Talking How to keep CUPSfrom protecting etc/printcap ?


I'm screwing around with print drivers and recently installed CUPS. I got everything working fine, except I would like to go back to apsfilter and see if there are any noticable differences.
Just one problem :

# This file was automatically generated by cupsd(8) from the
# /etc/cups/printers.conf file. All changes to this file
# will be lost.

And sure enough, after I go through the apsfilter setup, all of the settings that apsfilter places in printcap will be deleted upon reboot.

How can I prevent this from happening ? I realize of course that I could just comment out the CUPS entry, and then make printcap read only after the apsfilter setup. However, I was hoping that there is a more propper way of accomplishing this.

JC

Last edited by lostboy; 07-25-2003 at 08:52 PM.
 
Old 07-25-2003, 09:39 PM   #2
lostboy
Member
 
Registered: Mar 2003
Location: Florida
Distribution: Slackware 9.1,10.1
Posts: 268

Original Poster
Rep: Reputation: 30
No, I can't just make 'printcap' read only. I set it read only for everyone, after apsfilter's SETUP script makes it's entries into 'printcap'. Bur it gets altered, or overwritten anyway (I'm not sure which is happening) upon reboot.

JC
 
Old 07-26-2003, 12:20 AM   #3
Corin
Member
 
Registered: Jul 2003
Location: Jette, Brussels Hoofstedelijk Gewest
Distribution: Debian sid, RedHat 9, Suse 8.2
Posts: 446

Rep: Reputation: 31
The key is the first line of the printcap file.

# This file was automatically generated by cupsd(8)

So the file is automatically generated when cupsd is run.

When you reboot, cupsd is started up from /etc/rc[2,3,4,5].d

When you are using apsfilter are you using another line printer daemon eg lpd, and presumably you do not need cupsd running?

So then, disable startup of cupsd at boot time.

What is your default runlevel?

egrep default /etc/inittab

If it say id:5 then

cd /etc/rc5.d
mkdir disabled
mv -v *cups disabled

and you should see a symbolic link probably S99cups
moved into the subdirectory disabled

Once you have done all your testing without using cupsd,
cd back tothe /etc/rc5.d directory, move the symbolic link from
the subdirectory back to its proper place

mv disabled/S99cups .
rmdir disabled

and cupsd will be be started each time run level 5 is entered
as previously.
 
Old 07-26-2003, 08:18 AM   #4
lostboy
Member
 
Registered: Mar 2003
Location: Florida
Distribution: Slackware 9.1,10.1
Posts: 268

Original Poster
Rep: Reputation: 30
Thanks alot for the post !
And that clears it up for me.

Maybe you can help with this one-

When I try to align the margins (usr/bin/alignmargins for my setup) , it has no affect no matter how I set the margins or offset.
I also notice that the KDE print manager does not affect it either if i set custom margins in there.

I get this behavior with both cupsd and apsfilter/lprng .

I have installed foomatic and I am studying the "USAGE" files. Hopefully foomatic will be of use to me.

BTW : printer = HP DeskJet 882C

JC
 
Old 07-26-2003, 10:20 PM   #5
Corin
Member
 
Registered: Jul 2003
Location: Jette, Brussels Hoofstedelijk Gewest
Distribution: Debian sid, RedHat 9, Suse 8.2
Posts: 446

Rep: Reputation: 31
I had not heard of alignmargins before but just doing a Google
search on "alignmargins" gave as the 2nd returned item
a link to the site http://www.linuxprinting.org/
which you should bookmark as it is a good place for information.

And the particular link was to

http://www.linuxprinting.org/cups-doc.html

where we find

6) Adjust the print margins.

Download the files file align.ps and alignmargins, then run alignmargins as root and follow the instructions:

cd /tmp
wget http://www.linuxprinting.org/download/printing/align.ps
wget http://www.linuxprinting.org/downloa...g/alignmargins
chmod 755 alignmargins
su
./alignmargins

This will add the Margins print option so you can turn on ("lpr -o Margins=Custom printfile", default setting) or off ("lpr -o Margins=Default printfile") your adjustments.


So in order to get your custom margins working it would appear
that you have to use lpr with the options above.

I suggest trying to change your print margins and printing with
lpr and the option above and seeing if that changes the margins
accordingly.

What you would then need to do is to set up a specific queue
for each of the custom margin alignments you wished to use.

I hope this works for you!
 
Old 06-17-2004, 12:15 PM   #6
linuxfond
Member
 
Registered: Jan 2003
Location: Belgium
Distribution: Mandrake 9.2
Posts: 475

Rep: Reputation: 30
HP DeskJet 9650 - MARGIN hell

Quote:
Download the files file align.ps and alignmargins, then run alignmargins as root and follow the instructions:
Today I browsed along and across the linuxprinting.org, I downloaded all I could. Nothing worked!
align margins doesn't affect the margins, at least, in my case.

The print quality is cool, it's just unusable because of the margins

Specs:
MDK 9.1; CUPS 1.1.19, HP DeskJet 9650 (Foomatic+hpijs); PostScript level 3.

PPD files for DeskJet 9600 downloaded from linuxprinting. I also tried to use my own CUPS-O-Matic PPDs with the same results.

On a landscape A3 print the picture is moved down and left.
On a portrait A3 print the picture is moved left and up.

Any ideas?
Linuxprinting.org forums look nice, but, I fear, there are too many people having the same or similar questions... I found no hints.

Oh, what a hell the margins are!

Last edited by linuxfond; 06-17-2004 at 12:16 PM.
 
  


Reply



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
Protecting data... Dee-ehn Linux - General 5 06-09-2005 04:41 PM
Protecting myself...lol yanik Fedora 14 12-17-2004 03:29 PM
just installed CUPS printer is OK.. but can't print Error: loop in printcap on lpr soylentgreen Linux - Newbie 4 09-23-2004 10:41 AM
PRINTCAP File Que David@330 Linux - Newbie 0 07-28-2004 03:21 AM
is slackware protecting me? shanenin Slackware 1 10-19-2003 09:28 AM

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

All times are GMT -5. The time now is 12:10 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