On 06/06/2011 12:22 PM, Kotya Karapetyan wrote:
If you want all files on the encrypted volume, then set the path for the
temporary directory to somewhere on that volume.
I don't want this behaviour *always*. If I edit some other lyx-file,
not this secret one, then the TrueCrypt volume may even not be
mounted.
Is there in LyX some parameter like the 'lyx-file location', so that
the temporary folder could be specified with this parameter?
Not so far as I know. This is a pretty unusual situation, and LyX is
definitely not set up to use different temporary directories for
different files in the same session.
I was not speaking of multiple temporary directories within one
section. But I think I see your point. My approach is from LaTeX — all
temp files are in the same directory as the main tex-file.
You might try setting up a second
user directory, and launching Lyx with:
lyx -userdir /home/you/.lyxcrypt/
when you need to do so.
I've tried what you suggest:
lyx -userdir /media/truecrypt1/tmp,
where /media/truecrypt1/ is where the truecrypt volume is mounted. On
start up, LyX correctly ask me if a new directory /tmp needs to be
created, put there lots of files but the PDF file during the preview
is still built here: /tmp/lyx_tmpdir.M22932/ (the number always
changes).
The userdir is where preferences are saved. That's different from where
temporary files are saved.
So basically, the temp folder is not put into a userdir. Can I control
the location of the temp folder during startup?
As far as I know, you cannot specify the location of the temp folder on
the command line. However, Richard has broken it down into two different
issues that allow you to do what you want.
Issue 1) How do I specify the temp folder?
Answer: You set it in the preferences, and make sure you click Save.
Issue 2) How can I have different sets of preferences and switch between
them?
Answer: You can have more than one user directory (where your
preferences are saved). This basically allows you to have different
profiles. You can specify which profile you want to use on the command line:
lyx -userdir ~/my_default_profile
lyx -userdir ~/my_secret_profile
When you don't specify a userdir, lyx uses ~/.lyx by default.
--
Julien