[OS X TeX] Preview setting

Robert Bruner robert.bruner at wayne.edu
Thu Aug 25 15:28:20 CEST 2022


Herb et al,

Sorry about top-posting:  my mailer prefers that and I don't have confidence that arguing with it will produce readable results.   Minimal working example below (labelled HERE) if you want to skip the back story.

First, thanks for "ls -lt@".   Its brevity is more helpful to me than "xattr -l".

Here's a new example.   I distribute some C code that displays the results of the things it calculates by writing TeX files.   I process them using TeXShop and include the resulting pdf as well as the TeX code, for convenience of the users.   Yesterday, I stripped away all xattrs, rationalized permissions (644/755 for everything), removed aux, log, synctex, etc files, and removed the compiled C code, to prepare a clean distribution.   Tarred that, then did an untar and install to test it out.

Today I discovered that in the process, some pdfs had received  quarantine xattrs!  

Here is a minimal working example:  -------------  HERE -----------------

~/Cohom/ext.1.9.5/A2/C2[153]: ls -lt@ *pdf
-rw-r--r--@ 1 rrb  staff  660134 Aug 18 17:52 Ext_A2-C2-F2-0-240.pdf
	com.apple.quarantine	    22 
-rw-r--r--  1 rrb  staff  464911 Oct 18  2015 ExtA2C2.pdf

~/Cohom/ext.1.9.5/A2/C2[154]: xattr -c Ext*pdf

~/Cohom/ext.1.9.5/A2/C2[155]: ls -lt@ *pdf
-rw-r--r--  1 rrb  staff  660134 Aug 18 17:52 Ext_A2-C2-F2-0-240.pdf
-rw-r--r--  1 rrb  staff  464911 Oct 18  2015 ExtA2C2.pdf

~/Cohom/ext.1.9.5/A2/C2[156]: tar cvf ~/Cohom/test.tar Ext*pdf
a ExtA2C2.pdf
a Ext_A2-C2-F2-0-240.pdf

~/Cohom/ext.1.9.5/A2/C2[157]: cd ~/Cohom
~/Cohom[158]: mkdir attr-test
~/Cohom[159]: cd attr-test/
~/Cohom/attr-test[160]: tar xvf ../test.tar
x ExtA2C2.pdf
x Ext_A2-C2-F2-0-240.pdf

~/Cohom/attr-test[161]: ls -lt@
total 2208
-rw-r--r--  1 rrb  staff  660134 Aug 18 17:52 Ext_A2-C2-F2-0-240.pdf
-rw-r--r--  1 rrb  staff  464911 Oct 18  2015 ExtA2C2.pdf
~/Cohom/attr-test[162]: open Ext_A2-C2-F2-0-240.pdf 

~/Cohom/attr-test[163]: ls -lt@
total 2208
-rw-r--r--@ 1 rrb  staff  660134 Aug 18 17:52 Ext_A2-C2-F2-0-240.pdf
	com.apple.lastuseddate#PS	    16 
	com.apple.quarantine	    22 
-rw-r--r--  1 rrb  staff  464911 Oct 18  2015 ExtA2C2.pdf

In [153] we see the quarantine.
In [154] I remove it.
In [155] we see that it is gone
In [156]-[160] we tar it, make a test directory and untar it.
In [161] we see no xattrs in the files extracted from the tar file.
In [162] we 'open' a pdf (this invokes Preview).
In [163] the quarantine xattr has been added again.
If I open the other pdf file, it too acquires a quarantine.

I have now isolated who (preview), where (everywhere!) and when (upon 'opening'),
but  what,why?    And better, how to defeat this?   It gets tiresome having to use "xattr -c" 
every time I want to open a pdf file that I have already viewed once.

I recently did an update Apple had been asking me to do for some time.  The problem appeared right after that.   Obviously I ought to jump to the latest distribution and debug this there if it persists.   I had wanted to finish getting this distribution done first, and that's nearly done.

Thanks for any insight you can provide,
Bob Bruner

________________________________________
From: MacOSX-TeX <macosx-tex-bounces at email.esm.psu.edu> on behalf of Herbert Schulz via MacOSX-TeX <macosx-tex at email.esm.psu.edu>
Sent: Wednesday, August 24, 2022 6:17 PM
To: TeX on Mac OS X Mailing List
Cc: Herbert Schulz
Subject: Re: [OS X TeX] Preview setting

[EXTERNAL]

> On Aug 24, 2022, at 3:05 PM, Robert Bruner <robert.bruner at wayne.edu> wrote:
>
> Colleagues,
>
> Feel free to ignore this, since it may be a purely Mac issue, not TeX at all, but it interferes with my use of TeX because it interferes with reading the pdf files TeX produces for me.
>
> Say I produce a tex file whose origins are obscured by using
>
> cat E368.tex > testit.tex
>
> so that no hidden data about the file E368.tex can be tacked onto my test file.   Then I see
>
> ~/papers/rrb/[38]: cat E368.tex >testit.tex
> ~/papers/rrb/[39]: ls -lt testit*
> -rw-r--r--  1 rrb  staff   17227 Aug 24 15:51 testit.tex
>
> After TeXing it using TeXShop,
>
> ~/papers/rrb/[40]: open testit.tex
> ~/papers/rrb/[41]: ls -lt testit.*
> -rw-r--r--  1 rrb  staff   30353 Aug 24 15:51 testit.log
> -rw-r--r--  1 rrb  staff   68033 Aug 24 15:51 testit.synctex.gz
> -rw-r--r--  1 rrb  staff  169380 Aug 24 15:51 testit.pdf
> -rw-r--r--  1 rrb  staff    1517 Aug 24 15:51 testit.aux
> -rw-r--r--@ 1 rrb  staff   17227 Aug 24 15:51 testit.tex
>
> it has an xattr, but testit.pdf does not.   But then, invoking Preview on the pdf file gives it one too:
>
>
> ~/papers/rrb/[42]: open testit.pdf
> ~/papers/rrb/[43]: ls -lt testit*
> -rw-r--r--  1 rrb  staff   30353 Aug 24 15:51 testit.log
> -rw-r--r--  1 rrb  staff   68033 Aug 24 15:51 testit.synctex.gz
> -rw-r--r--@ 1 rrb  staff  169380 Aug 24 15:51 testit.pdf
> -rw-r--r--  1 rrb  staff    1517 Aug 24 15:51 testit.aux
> -rw-r--r--@ 1 rrb  staff   17227 Aug 24 15:51 testit.tex
>
> Now, these xattrs aren't harmful;   they may even help by opening the file to the same spot I was looking at last time (just a guess), or some such.
> They're not like the awful xattr's tacked onto pdf files I download from friends' emails, which cause Preview to tell me I am not allowed to open them, even though their permissions are 644 (-rw-r--r--) because of some quarantine which presumably comes from either MS Outlook or Firefox.   Those I deal with by "xattr -c *".
>
> Still, any insight is welcomed.  I am running Catalina, 10.15.7 (yes, I plan to update as soon as I get done with the paper I am working on).
>
> Regards,
> Bob Bruner
> Wayne State Dept of Math
>
> PS:   Yes, I still drive a stick shift, but since my next car will be electric, that too will end.

Howdy,

What does `ls -lt@` give? That will tell you what the xattr(s) are.

Good Luck,

Herb Schulz
herbs2 at mac.com


----------- Please Consult the Following Before Posting -----------
TeX FAQ: https://www.tug.org/mactex/faq/index.html
List Reminders and Etiquette: https://sites.esm.psu.edu/~gray/TeX/
List Archives: http://dir.gmane.org/gmane.comp.tex.macosx
                https://email.esm.psu.edu/pipermail/macosx-tex/
TeX on Mac OS X Website: https://www.tug.org/mactex/index.html
List Info: https://email.esm.psu.edu/mailman/listinfo/macosx-tex
----------- Please Consult the Following Before Posting -----------
TeX FAQ: https://www.tug.org/mactex/faq/index.html
List Reminders and Etiquette: https://sites.esm.psu.edu/~gray/TeX/
List Archives: http://dir.gmane.org/gmane.comp.tex.macosx
                https://email.esm.psu.edu/pipermail/macosx-tex/
TeX on Mac OS X Website: https://www.tug.org/mactex/index.html
List Info: https://email.esm.psu.edu/mailman/listinfo/macosx-tex


More information about the macostex-archives mailing list.