Basic/Survey/Bulk laptops

This commit is contained in:
2022-11-26 01:08:07 +00:00
parent b4353d2c0b
commit 98546eb0a3
11 changed files with 396 additions and 312 deletions

View File

@@ -6,9 +6,9 @@
<link rel="stylesheet" type="text/css" href="../../css/main2.css" />
</head>
<body>
<h2 id="tophead">CUCC Expedition Handbook - Computers</h2>
<h2 id="tophead">CUCC Expedition Handbook - Windows Bulk Updates</h2>
<h1>Setting up a Windows expo laptop</h1>
<h1>A Windows Bulk Update laptop</h1>
<p>First read the generic instructions for all the software installations you will need:
<br>
@@ -17,8 +17,6 @@
<a href="surveylaptop.html">Setting up a machine for Expo survey processing</a>
</p>
<p>It used to be quite simple: software equivalents existed for Windows for everything we needed. Since Spring 2018, we unfortunately have to use ssh keys. This has simply added an extra step for most things, but has made one thing (rsync) really quite hard to get working.
<p>What makes this all much more tiresome is that Microsoft are introducing some cool new ways of interacting with Linux systems but these are new and need some effort to get configured correctly. See the end of this page for more details.
<ul>
<li><a href="#well">Things that already work well with a Windows laptop</a><br />
- Editing the handbook webpages, typing up SVX files and transcribing the logbook, <br />
@@ -32,9 +30,75 @@
- well not "hard" exactly, but complicated with lot of steps that are easy to get wrong and with poor feedback as to whether you have done each step correctly.
<li><a href="#bold">The easier way to do it</a><br />
- using WSL: Windows System for Linux
<li><a href="surveylaptop.html#win">Possibly an even easier way to do it</a><br />
<li>See our own expo page about <a href="../computing/wsllaptop.html">setting up a WSL Expo Laptop</a>
<li><a href="bulkupdatelaptop.html#win">Possibly an even easier way to do it</a><br />
- using OpenSSH for Windows</ul>
<h3>Software</h3>
<ul>
<li><a href="../putty/putty.html">PuTTY</a>.You need this to generate and to use ssh keys on Windows. Otherwise none of git, scp, ftp or rsync will work. It includes command line tools ssh, scp
(pscp) and sFTP (psftp). The <a href="https://www.chiark.greenend.org.uk/~sgtatham/putty/latest.html">PuTTY</a> installation includes puttygen and pagent which you also need. Version 0.77 was released on 2022-05-27.
<li><a href="https://docs.microsoft.com/en-us/windows-server/administration/openssh/openssh_overview">OpenSSH for Windows</a> is new since 2018. It is a
set of command line tools which are an alternative to PuTTY. It also includes scp and sftp. It integrates well with Github for Windows and enables you to
use rsync over ssh. NB use this Microsoft documented install method which puts the executables in <var>windows\system32\openssh\</var>.
[This is so new that none of the other troggle documentation refers to it: all those other pages need to be rewritten to use this
instead of or as an alternative to PuTty/Pageant.]
<li><a href="https://desktop.github.com/">GitHub Desktop for Windows</a> - yes this works with the expo server git even though we don't use GitHub itself.
<li><a href="https://code.visualstudio.com/">VS Code</a> is a free (but not FOSS) editor with in-built git capability and plug-ins ("Git History",
"GitLens")which render git branches graphically. Also available for Linux.
<li><a href="https://gitforwindows.org/">Git for Windows</a> - not as simple to use as it looks
<li><a href="https://www.gitkraken.com/">GitKraken</a> - Very pretty GUI interface to git, also Linux version.
Times-out for our server unless you buy it but free for university people.
<li><a href="https://winscp.net/eng/download.php">WinScp</a> can be used as an alternative to Filezilla if you like (like Filezilla, it uses PuTTY ssh keys)
<li><a href="https://www.java.com/en/">java</a> - needed for GPSprune and CaveConverter. Has to be installed separately on a Windows machine.
<li><a href="https://notepad-plus-plus.org/">Notepad++</a> or any other syntax-highlighting code editor for HTML and python. We have a syntax-highlighter
to colourize .svx files, download it: <a href="/site_media/survex.xml">survex.xml</a> (no dark-mode yet though).
</ul>
<h4>Visual Studio Code editor</h4>
<p>If you use VS Code here are some relevant extras.
Not really for beginners but here are <a href="https://docs.microsoft.com/en-gb/learn/modules/python-install-vscode/">instructions for
configuring it for python</a>.
On Windows you run VS Code as a Windows app but it communicates directly ("remotely") with the WSL Linux environment.
<p>You will definitely want the
<a href="https://marketplace.visualstudio.com/items?itemName=donjayamanne.githistory">"Git History" extension</a>
and probably the "GitLens" extension too.
<p>It is entirely feasible (and on a slow machine, recommended) to use VS Code only for git management, and using a faster Windows-native editor,
such as Notepad++, for actually editing code and text.
<h2><a name="configuration">Configuration</a></h2>
<p><a href="/expofiles/documents/Idiots guide to accessing expo git.pdf">Idiots guide to setting up git for expo</a>
- PDF - Brendan's guide. Uses PuTTy and GitKraken on WIndows.
<p>You need to <a href="keyexchange.html">register a key with the expo server</a> to get upload (i.e. read/write) access. Do this first, Without it none of git, scp, ftp or rsync will work.
You can do this entirely on your own if you have access to the <i>expo laptop</i> to upload and install the public key generated by your laptop.</p>
<p>On a Windows machine you will need to configure pageant (the putty authentication agent)
to <a href="https://blog.shvetsov.com/2010/03/making-pageant-automatically-load-keys.html">run at startup to load your key</a>. Note that you are loading your <em>private</em> key, the .ppk file, into pageant and that this key never leaves your laptop.</p>
<p>Full illustrated instructions:<img src="https://wiki.filezilla-project.org/favicon.ico" width=64 hspace="20" align="right"></p>
<ul>
<li><a href="../putty/putty.html">Installing PuTTy on Windows</a>.</li>
<li><a href="fzconfig.html">Installing Filezilla</a>.</li>
</ul>
<p>The above gets the command-line PuTTY tools (ssd, sftp, pscp) running, but doesn't get rsync working. You might like to try <a href="https://stackoverflow.com/questions/23517023/rsync-from-windows-to-linux-using-puttys-pagent-authentication">this</a> (untested).</p>
<p>When using Windows please, please be <a href="http://expo.survex.com/handbook/survey/getin.htm#filenames">excessively careful when naming files and survex names</a> and be <a href="qstart-rsync.html">exceptionally careful when using rsync</a>.
<h3 id="well">Things that already work well</h3>
<p>Anything where the file upload and download is done via the verson control client software works really well.
@@ -139,7 +203,7 @@ $
</tt>
</pre>
The generated key is in the current directory and you need to move them to ~/.ssh/ as is standard on Linux (which is not at all the same place that PuTTy uses to keep keys on Windows).
<p>Now you have to complete the <a href="keyexchange.html">key-pair setup</a> with the new key "id_ras_wsl.pub". But you don't need anyone else's help this time as you can use PuTTy to ssh into the server and copy your key to the right place yourself.
<p>Now you have to complete the <a href="keyexchange.html">key-pair setup</a> with the new key "id_ras_wsl.pub". But you don't need anyone else's help this time as you can use PuTTy to ssh into the server and copy your key to the right place yourself: it is a <a href="keyexchange.html#secondmachine">"Second Machine"</a>.
<p>
Now finally you can use all the usual command line tools at yor wsl command line to communicate with the server with ssh, scp, rsync, such as:
<pre>
@@ -214,8 +278,9 @@ it shares with WSL2).
</ul>
<h3>Installing and Configuring the rest of the software you need on Windows</h3>
<p>Now return to <a href="surveylaptop.html">the survey laptop</a> page to configure all the rest of the software you need.
<hr />
Go back to: <a href="basiclaptop.html">Basic laptop</a><br />
Go back to: <a href="surveylaptop.html">Survey laptop</a><br />
<hr /></body>
</html>