gusl: (Default)
[personal profile] gusl
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?

(no subject)

Date: 2010-06-12 07:56 pm (UTC)
From: [identity profile] oedipamaas49.livejournal.com
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.

(no subject)

Date: 2010-06-12 09:49 pm (UTC)
From: [identity profile] bhudson.livejournal.com
Use the right way; it's not that hard once you've set it up once.

(no subject)

Date: 2010-06-13 12:56 am (UTC)
From: [identity profile] gustavolacerda.livejournal.com
I can't install sshpass because apt-get tries to configure tex-common, leading to the original error, which is why I can't run pdflatex locally in the first place :-(

(no subject)

Date: 2010-06-14 03:14 pm (UTC)
From: [identity profile] en-ki.livejournal.com
Why is everybody talking about storing passwords instead of just using RSA keys? (Or, since this is a university, Kerberos?)

(no subject)

Date: 2010-06-13 02:59 am (UTC)
From: [identity profile] robbat2.livejournal.com
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 Date: 2010-06-13 03:01 am (UTC)

(no subject)

Date: 2010-06-13 03:17 am (UTC)
From: [identity profile] gustavolacerda.livejournal.com
that is awesome! Thanks.

I have to say, I find the syntax kinda funky.

Let's see if I understand:
* <temp.tex copies the local temp.tex to the input buffer
* cat >temp.tex writes the input buffer to the remote temp.tex
* cat temp.pdf writes to the output buffer
* >temp.pdf uses the output buffer to create a local temp.pdf

Did I get this right?


(And yeah it's really annoying to have to write "& gt;", etc.)

(no subject)

Date: 2010-06-13 07:20 am (UTC)
From: [identity profile] robbat2.livejournal.com
Yup, that's correct.

(no subject)

Date: 2010-06-15 12:19 am (UTC)
From: [identity profile] gustavolacerda.livejournal.com
One more question: how can I see the pdflatex output, in case there are errors?

(no subject)

Date: 2010-06-13 05:16 am (UTC)
From: [identity profile] tedesson.livejournal.com
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.

(no subject)

Date: 2010-06-13 08:08 am (UTC)
From: [identity profile] gustavolacerda.livejournal.com
I moved these two files to ~.

apt-get still has the same problem, whether it's purging texlive or installing sshpass:

Setting up tex-common (2.06) ...
Error: The new file /usr/share/tex-common/05TeXMF.cnf does not exist!
dpkg: error processing tex-common (--configure):
subprocess installed post-installation script returned error exit status 1



I don't see why it tries to set up tex-common when what I'm asking it to do is totally unrelated.

(no subject)

Date: 2010-06-13 02:00 pm (UTC)
From: [identity profile] tedesson.livejournal.com
Yes, the problem you're having is an apt-get problem, not a tex problem.

I suggest contacting someone who knows how to tidy up apt-get.

February 2020

S M T W T F S
      1
2345678
9101112131415
16171819202122
23242526272829

Most Popular Tags

Style Credit

Expand Cut Tags

No cut tags