Subject: Re: [netatalk-admins] File locking and Word

From: [email-masked] (Bob Smith, Hammett & Edison, Inc.)
Date: Mon, 25 Jan 1999 13:15:18 -0800

On Tue, Jan 19, 1999, 22:49:43 Roger Grant wrote:

>Some of the clients use Word 5.1 with System 7.6.1, and if they edit a
>locked file (locked on the Finder) and save it, there is no warning that
>file is locked and the locked file is overwritten by the newly edited
>version...

I've encountered this same problem with Word 5.1.  Even though the file is
locked in the Finder, there is nothing to actually prevent the app from
writing to it, because afpd does not check the Finder bits before allowing a
write.  The only thing that works is to change the permissions on the files
from the Unix side so that afpd can't write to the files.  There has been some
past discussion about patching afpd so that it automatically maps the Finder
lock bit to the write permission bits on a file, but I don't know if anyone
has actually done that.

>While examining the logs I noticed that any file openned by Excel
>generated a "byte lock: trash.xls" but not Word documents.

This doesn't have anything to do with the Finder lock, this is low-level byte
locking to prevent multiple writes to the same file while it is open.

Bob Smith
Hammett & Edison, Inc.
[email-masked]

---

From: PayPC System Mail Subscriber <[email-masked]>
Date: Mon, 15 Feb 1999 17:01:51 +1000

Hrm.... I don't know if anyone else notices this "problem"....

But with:

MacOS 8.5.1, the OT 2.0.1 with it, and ASIP 3.8.1.... the latest pre-asun 
2.1.2 on Intel Linux (with module Appletalk properly running)...

Even when I "clear out" my Recent Server shortcuts, and make EXPLICIT TCP 
connections using the "Server Address..." button.... sooner or later, before 
long, my Recent Server shortcuts end up using AppleTalk instead of AFP/TCP 
for the connection.  I can always tell because it's SLOWER than TCP.

I do not wish to eliminate the Appletalk [can I?] portion of the services, 
since there are a coupld of old machines on my net that cannot (or will not 
for reliability's sake) run Open Transport, hence, AFP/TCP isn't an option 
for them.

I do not know if this is relevant, but... I let netatalk advertise the 
machine's name on A-talk as well as TCP. (The Appleshare entity is called 
"myhost", and the TCP/IP address is also "myhost").  Is this the reason, or 
does it not matter?

I am otherwise 100% pleased with netatalk, and this is really just an 
annoyance more than anything.  I am figuring I'm configuring something 
incorrectly.

My config line is as follows:

- -rand2num -noguest -setpassword

Should I make "two servers" one that's DDP only, and one that's TCP only, 
each with different names?  My only problem with this, is that an alias made 
to objects will definitely break depending on which client did the 
alias-making. [In some areas of my server, I control its organisation and 
layout, and despite the infamous DirID problems [I don't use the experimental 
code currently, though I will setup a test server soon] aliases generally 
work ok for us.

=Robert=

---

From: Stew Benedict <[email-masked]>
Date: Mon, 15 Feb 1999 05:59:37 -0500 (EST)

Just recently got netatalk working to tie my iMac to an existing network
of Linux/Windoze machines.  Nice work!  I've now got a folder on the Linux
box, and can print to my Nec Silentwriter 95 on a HP Jetdirect on the
network.  A couple of questions:

Is there, or are there any plans to make an equivalent to the "smbtar"
program that the Samba suite uses to back up the client machine to tape
from the server?

Are there any plans to implement the "if" stanza in papd?  This would
allow one to use printers with no specific Apple driver (like my HP693C)
by routing the jobs through Ghostscript.  Also I have my printers' power
controlled by an X10 module, which is triggered on by a hacked lpr script.
Papd bypasses lpr, so I modified my script that shuts the printers back
down if there are no jobs queued, to watch for jobs in the queue from the
iMac and turn the printers on.  This works, but I had to increase the
frequency to every 5 minutes to get the jobs printed up in a timely
manner.  A useable "if" line could take care of this too.

Thanks for the fine work!
Stew Benedict

---

From: Albert Max Lai <[email-masked]>
Date: Mon, 15 Feb 1999 07:05:35 -0500 (EST)

> controlled by an X10 module, which is triggered on by a hacked lpr script.

You can get papd to print to just about anything.
All you have to do is something like this:
HP693C:\
	:pr|lprscript:op=printman:\
	:etc....

This will work on pretty much any command that can take it's postscript
intput through stdin. This also allows one to do a lot of tricks with the
postscript. Anyways, if you can print to it through lpr, then you can
probably print to it using papd. If you have further questions feel free
to ask.

--
Albert Lai <[email-masked]>           1018D East Campus
Residential Computer Consultant           411 W. 116th St.
Columbia University                       New York, NY 10027
http://www.columbia.edu/~aml61            (212)853-4854

---

From: Stew Benedict <[email-masked]>
Date: Mon, 1 Mar 1999 19:45:43 -0500 (EST)

Sorry I deleted the original message.  The person was talking about a
couple of problems printing.

1) Not being able to print more than 1 file at a time:  This is definitely
not a unix-side problem.  The only time I've ever had a problem printing
multiple files is if I happen to consume all the space in the "/"
directory.  I haven't really tried this from the Mac side, I was happy to
be able to print at all :^).

2) Downloading fonts: This is where your .ppd or print drivers should come
in.  Most well-behaved applications will work with the OS and the print
driver and pass whatever information is need for the particular printer,
based on it's capabilities.  If the font is not resident in the printer,
then it should be passed as part of the job.  Using tools such as
font downloaders, can reduce the size of subsequent jobs being sent.  I'm
interested in this too, as I'm writing an app in Tcl/Tk that does music
notation, with a custom font.  Tcl/Tk has no print capability yet, but I
can save my canvas as an EPS file.  Then you need to use ghostscript or
something similar to pass it on to the printer.  If the printer is
postscript, I should be able to pass the font info along with the EPS and
bypass ghostscript.  I've got several postscript books, and they talk
about downloading fonts, I just haven't worked out the details yet.
Ghostscript works fine, but it introduces quite a bit of overhead on the
Mac, greatly increasing the file size from about 20K to 500K and crashes
occasionally.  I'm also using ghostscript on the Linux server to act as a
filter to let the Mac print to my HP 693C.  On the mac side, I tell it
it's a LaserWriter Color 12, and let ghostscript under Linux generate the
PCL using the pipe command in papd.conf.  This is working out well so far.
Why don't you send me one of your problem EPS files and I can take a look
at what information is contained in it?  I'm pretty comfortable with
postscript.

Stew Benedict