gusl: (Default)
gusl ([personal profile] gusl) wrote2010-06-12 12:19 pm

my pdflatex setup

Since I can't seem to purge my machine from tex things (even "apt-get purge" gets into trouble because of missing files), I'm using a script to run pdflatex remotely:

scp temp.tex gusl@stat.ubc.ca:thesis
ssh gusl@stat.ubc.ca 'cd thesis; pdflatex temp.tex'
scp gusl@stat.ubc.ca:thesis/temp.pdf .


It's kinda ridiculous... for one, I need to type my password 3 times every time. Is there a way to be automatically authenticated, or have the password sent automatically?

[identity profile] oedipamaas49.livejournal.com 2010-06-12 07:56 pm (UTC)(link)
Yeah, the ssh/scp on ubuntu don't make it easy to store passwords.

The "correct" (secure, but a bit of a faff) way of doing it is described at http://www.debian-administration.org/articles/152

There's also an 'sshpass' utility that will let you supply ssh (and I think also scp) with the password from a script:
$sudo apt-get install sshpass
$sshpass -p yourpassword ssh gusl@stat.ubc.ca 'cd thesis; pdflatex temp.tex'

This comes with dire security warnings -- which IMO aren't all that bad if you're the only person using your computer

Ubuntu's own password manager doesn't seem to integrate well with command-line scp, I'm afraid.

[identity profile] robbat2.livejournal.com 2010-06-13 02:59 am (UTC)(link)
Do it a little differently.

ssh gusl@stat.ubc.ca 'cd thesis && cat >temp.tex && pdflatex temp.tex && cat temp.pdf && rm -f temp.{tex,pdf}' <temp.tex >temp.pdf

(Sorry about the edits, it was eating some chars.
Edited 2010-06-13 03:01 (UTC)

[identity profile] tedesson.livejournal.com 2010-06-13 05:16 am (UTC)(link)
http://www.linuxquestions.org/questions/debian-26/apt-get-is-stuck-161446/page2.html
sometimes, strange apt problems can be solved by rm'ing /var/cache/apt/pkgcache.bin and /var/cache/apt/srcpkgcache.bin, followed by doing an apt-get update.

The rest of the thead has some good suggestions, including asking the debian packagers for support.