Hello,
top posting since the problem was solved, and writing the reply at the
bottom wouldn't make the mail easy to follow. Please forgive me :)
To summarise: I couldn't print using apsfilter since its file
identification technique using file(1) wasn't able to identify the
content being sent to it, apart from ASCII, thus no printouts only
error messages.
After running 'find / -name file -print' it appeared that there was
another file(1) present in /usr/local/bin, as part of sysutils/tct
port version 1.12. This is solved with the latest version of
sysutils/tct where the file(1) command is renamed to file-tct(1).
The latest version of apsfilter will work fine from now on, printing
all the file types as advertised. However this problem might prop up
again in other operating systems where its available. It might be a
good idea to have a function which will prompt a user to choose which
file(1) command to use in apsfilter, after it searches the $PATH for
all available file(1) commands.
Andreas, thanks again.
Alex
On Mon, May 31, 2004 at 07:46:22PM +0200, Andreas Klemm
wrote:> On Mon, May 31, 2004 at 05:38:10PM +0100, Aleksandar Simic wrote:
> >
> > Hello Andreas,
> >
> > thanks for responding, I was just giving up hope.
>
> Hi ... well no need to I think.
>
> But you have to analyze what happens.
>
> > On Mon, May 31, 2004 at 04:16:11PM +0200, Andreas Klemm wrote:
> > > > + HEADER=/tmp/apsfilter36346/header1
> > > > + dd bs=1k count=16
> > > > ++ file /tmp/apsfilter36346/header1
> > > > file: couldn't find any magic files!
> > > > + FILE_TYPE> > >
> > > Your file command doesn't seem to find its database (the
magic file) ...
> > > -r--r--r-- 1 root wheel 285300 16 Nov 2003
/usr/share/misc/magic
> > >
> > > Does your magic command work on the commandline ?
> > >
> > > root# file /etc/passwd
> > > /etc/passwd: ASCII text
> > >
> > > root# file /usr/share/misc/magic
> > > /usr/share/misc/magic: magic text file for file(1) cmd
> >
> > It works just like your examples above:
> >
> > [alex@~] cd /etc/
> > [alex@/etc] file /etc/passwd
> > /etc/passwd: ASCII text
> > [alex@/etc] file /usr/share/misc/magic
> > /usr/share/misc/magic: magic text file for file(1) cmd
>
> Hmm the strange thing is, that the file command doesnt
> seem to work when running under lpd ....
>
> > > > + FILE_TYPE> Therefore filetype variable is empty.
>
> you could try to modify apsfilter in a way,
> that it exits quite early
>
> set -x
> file /etc/passwd
> exit 1
>
> Then see what the logfile says
> printcap:
> :lf=/var/spool/lpd/lp/log:\
>
>
> > [alex@/usr/share/misc] l magic
> > -r--r--r-- 1 root wheel 285300 May 28 15:41 magic
> >
> >
> > see ------------------------------^^^^^^^^^^^^^
> >
> >
> > > How did you install FreeBSD ? Minimum installation ?
> >
> > This problem has been occuring to me since FreeBSD 4.8 which I
> > installed from the official ISOs. At the moment I'm at FreeBSD
> > 4.10. And I've tried everything, installing ghostscript from
sources,
> > installing it from packages, deinstalling and reinstalling. Then I
> > tried installing different versions of ghostscript found in ports:
> > ghostscript-afpl and ghostscript-gnu.
> >
> > No luck.
>
> strange.
>
> > Then I'v tried the same with apsfilter. And still the problem
> > persisted.
> >
> >
> > > Or are some distribution files missing ?
> >
> > Distribution of what, the dependencies of apsfilter port ? Or of the
> > FreeBSD release ?
>
> I meant distribution of FreeBSD.
> Might have been the case you ftp'd it from fp server
> and did an installation from a DOS filesystem ...
>
> Might have been the case, that some files were missing or such
>
> Only an assumption, since I thought the magicfile is missing
> on your Unix.
>
> > Since the install of FreeBSD 4.8 I've done numerous upgrades of
the
> > system from the source. Just the other day I've upgraded from
> > 4.10-PRERELEASE to 4.10-STABLE.
> >
> > I've also kept my ports tree and packages in sync so this problem
> > would have been solved if it was just the packages or the system
> > sources.
> >
> > > A make world under /usr/src might help you.
> >
> > See the paragraph above.
> >
> > > Use cvsup to get the sources if you didn't install these.
> >
> > I did, see the paragraph above.
>
> hmm ok ....
>
>
> > If you want I can give you ssh access and root privilages to try to
> > solve this. We can arrange a time that will suit you, when I will be
> > present so that we can talk via write(1) or IRC/jabber os some other
> > way, just so that I can tell you if the printouts are comming and how
> > they look.
>
> Maybe in two weeks if I have a long weekend.
>
> But Id appreciate you troubleshoot it yourself.
>
> > Just a suggestion.
> >
> > And thanks again for replying, I've used apsfilter from FreeBSD
3.x
> > time and always found it easy to setup and use. That it isn't
working
> > now is completely baffling to me.
>
> Try changing the apsfilter script the way I told you
> and lpay a little with the file command ...
>
> It doesn't seem to run under lpd ...
>
> Or lpd uses another one ?
>
> Maybe another one installed ?
>
> I really dunno ... only some thoughts.
>
> And maybe ask on freebsd-stable if there are some
> apsfilter users ....
>
> Im running 5.2.1 and dont have an 4.x reference platform anymore.
>
> Andreas ///
>
> --
> Andreas Klemm
> Apsfilter Homepage http://www.apsfilter.org
> Support over mailing-lists (only!) http://www.apsfilter.org/support
> Mailing-list archive http://www.apsfilter.org/Lists-Archives