literate-dotfiles/docs/windows.html

233 lines
8.7 KiB
HTML
Raw Permalink Normal View History

2021-01-01 20:12:34 +01:00
<?xml version="1.0" encoding="utf-8"?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN"
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" lang="en" xml:lang="en">
<head>
2022-05-09 10:05:23 +02:00
<!-- 2022-05-09 lun. 10:04 -->
2021-01-01 20:12:34 +01:00
<meta http-equiv="Content-Type" content="text/html;charset=utf-8" />
<title>Windows Config and Install</title>
<meta name="author" content="Dehaeze Thomas" />
2021-10-25 14:37:10 +02:00
<meta name="generator" content="Org Mode" />
2021-01-01 20:12:34 +01:00
<link rel="stylesheet" type="text/css" href="./dist/style.css"/>
<script type="text/javascript" src="./dist/script.js"></script>
</head>
<body>
<div id="org-div-home-and-up">
<a accesskey="h" href="./index.html"> UP </a>
|
<a accesskey="H" href="./index.html"> HOME </a>
2021-10-25 14:37:10 +02:00
</div><div id="content" class="content">
2021-01-01 20:12:34 +01:00
<h1 class="title">Windows Config and Install</h1>
2021-10-25 14:37:10 +02:00
<div id="table-of-contents" role="doc-toc">
2021-01-01 20:12:34 +01:00
<h2>Table of Contents</h2>
2021-10-25 14:37:10 +02:00
<div id="text-table-of-contents" role="doc-toc">
2021-01-01 20:12:34 +01:00
<ul>
2022-05-09 10:05:23 +02:00
<li><a href="#org02faf6f">Create a bootable USB Key</a></li>
<li><a href="#org6cc7861">Install Windows10 PRO</a></li>
<li><a href="#org43015e0">Install Software using Chocolatey</a></li>
<li><a href="#orgae07583">Debloat windows10</a></li>
<li><a href="#orga44d550">SSHFS</a>
2021-01-03 22:52:53 +01:00
<ul>
2022-05-09 10:05:23 +02:00
<li><a href="#org815076e">SSH Setup</a></li>
<li><a href="#orge4d5ab7">SSHFS</a></li>
2021-01-03 22:52:53 +01:00
</ul>
</li>
2022-05-09 10:05:23 +02:00
<li><a href="#org0dadda3">Software Setup</a>
2021-01-01 20:12:34 +01:00
<ul>
2022-05-09 10:05:23 +02:00
<li><a href="#org0277c2c">Syncthing</a></li>
<li><a href="#org37cf1aa">Cura</a></li>
2021-01-01 20:12:34 +01:00
</ul>
</li>
</ul>
</div>
</div>
2022-05-09 10:05:23 +02:00
<div id="outline-container-org02faf6f" class="outline-2">
<h2 id="org02faf6f">Create a bootable USB Key</h2>
<div class="outline-text-2" id="text-org02faf6f">
2021-01-01 20:12:34 +01:00
<ul class="org-ul">
<li>Download Windows10 ISO <a href="https://www.microsoft.com/en-us/software-download/windows10ISO">https://www.microsoft.com/en-us/software-download/windows10ISO</a></li>
<li>Create bootable USB key using the woeusb utility (<a href="https://computingforgeeks.com/create-windows-10-bootable-usb-on-linux/">https://computingforgeeks.com/create-windows-10-bootable-usb-on-linux/</a>)</li>
</ul>
<div class="org-src-container">
2021-01-08 01:43:48 +01:00
<pre class="src src-bash">yay -S woeusb
2021-01-01 20:12:34 +01:00
</pre>
</div>
<div class="org-src-container">
2021-01-08 01:43:48 +01:00
<pre class="src src-bash"><span class="org-type">sudo</span> woeusb --device file.iso /dev/sdb --target-filesystem ntfs
2021-01-01 20:12:34 +01:00
</pre>
</div>
</div>
</div>
2022-05-09 10:05:23 +02:00
<div id="outline-container-org6cc7861" class="outline-2">
<h2 id="org6cc7861">Install Windows10 PRO</h2>
2021-01-01 20:12:34 +01:00
</div>
2022-05-09 10:05:23 +02:00
<div id="outline-container-org43015e0" class="outline-2">
<h2 id="org43015e0">Install Software using Chocolatey</h2>
<div class="outline-text-2" id="text-org43015e0">
2021-01-01 20:12:34 +01:00
<p>
First install Chocolatey using a PowerShell as administrator:
</p>
<div class="org-src-container">
2021-01-08 01:43:48 +01:00
<pre class="src src-bash">Set-ExecutionPolicy Bypass -Scope Process -Force; <span class="org-rainbow-delimiters-depth-1">[</span>System.Net.ServicePointManager<span class="org-rainbow-delimiters-depth-1">]</span>::SecurityProtocol = <span class="org-rainbow-delimiters-depth-1">[</span>System.Net.ServicePointManager<span class="org-rainbow-delimiters-depth-1">]</span>::SecurityProtocol -bor <span class="org-highlight-numbers-number">3072</span>; iex <span class="org-rainbow-delimiters-depth-1">(</span><span class="org-rainbow-delimiters-depth-2">(</span>New-Object System.Net.WebClient<span class="org-rainbow-delimiters-depth-2">)</span>.DownloadString<span class="org-rainbow-delimiters-depth-2">(</span><span class="org-string">'https://chocolatey.org/install.ps1'</span><span class="org-rainbow-delimiters-depth-2">)</span><span class="org-rainbow-delimiters-depth-1">)</span>
2021-01-01 20:12:34 +01:00
</pre>
</div>
<p>
Then, install all required software using one command:
</p>
<div class="org-src-container">
2022-05-09 10:05:23 +02:00
<pre class="src src-bash">choco install -y firefox 7zip.install vlc git.install malwarebytes sumatrapdf.install steam anydesk discord f.lux cmder cura ccleaner neovim imageglass
2021-01-01 20:12:34 +01:00
</pre>
</div>
</div>
</div>
2022-05-09 10:05:23 +02:00
<div id="outline-container-orgae07583" class="outline-2">
<h2 id="orgae07583">Debloat windows10</h2>
<div class="outline-text-2" id="text-orgae07583">
2021-01-01 20:12:34 +01:00
<p>
<a href="https://github.com/Sycnex/Windows10Debloater">https://github.com/Sycnex/Windows10Debloater</a>
</p>
<p>
Run a PowerShell with administrative rights and run:
</p>
<div class="org-src-container">
2021-01-08 01:43:48 +01:00
<pre class="src src-bash"><span class="org-function-name">iex</span> <span class="org-rainbow-delimiters-depth-1">(</span><span class="org-rainbow-delimiters-depth-2">(</span>New-Object System.Net.WebClient<span class="org-rainbow-delimiters-depth-2">)</span>.DownloadString<span class="org-rainbow-delimiters-depth-2">(</span><span class="org-string">'https://git.io/debloat'</span><span class="org-rainbow-delimiters-depth-2">)</span><span class="org-rainbow-delimiters-depth-1">)</span>
2021-01-03 22:52:53 +01:00
</pre>
</div>
</div>
</div>
2022-05-09 10:05:23 +02:00
<div id="outline-container-orga44d550" class="outline-2">
<h2 id="orga44d550">SSHFS</h2>
<div class="outline-text-2" id="text-orga44d550">
2021-01-03 22:52:53 +01:00
</div>
2022-05-09 10:05:23 +02:00
<div id="outline-container-org815076e" class="outline-3">
<h3 id="org815076e">SSH Setup</h3>
<div class="outline-text-3" id="text-org815076e">
2021-01-03 22:52:53 +01:00
<p>
Install OpenSSH from <code>chocolatey</code> as the one packed with Windows is quite old (<a href="https://blog.frankfu.com.au/2019/03/21/moving-from-windows-1809s-openssh-to-openssh-portable/">link</a>):
</p>
<div class="org-src-container">
2021-01-08 01:43:48 +01:00
<pre class="src src-bash">choco install openssh --package-parameters=<span class="org-string">"/SSHAgentFeature"</span>
2021-01-03 22:52:53 +01:00
</pre>
</div>
<p>
Then generate the keys:
</p>
<div class="org-src-container">
2021-01-08 01:43:48 +01:00
<pre class="src src-bash">ssh-keygen
2021-01-03 22:52:53 +01:00
</pre>
</div>
<p>
Start the SSH-Agent to automatically unlock the keys:
</p>
<div class="org-src-container">
2021-01-08 01:43:48 +01:00
<pre class="src src-bash"><span class="org-comment-delimiter"># </span><span class="org-comment">Start the service</span>
Start-Service ssh-agent
2021-01-03 22:52:53 +01:00
2021-01-08 01:43:48 +01:00
<span class="org-comment-delimiter"># </span><span class="org-comment">This should return a status of Running</span>
Get-Service ssh-agent
2021-01-03 22:52:53 +01:00
2021-01-08 01:43:48 +01:00
<span class="org-comment-delimiter"># </span><span class="org-comment">Now load your key files into ssh-agent</span>
ssh-add
2021-01-03 22:52:53 +01:00
</pre>
</div>
<p>
Copy the public key with:
</p>
<div class="org-src-container">
2021-01-08 01:43:48 +01:00
<pre class="src src-bash">Get-Content -Path $<span class="org-variable-name">HOME</span><span class="org-string">\.</span>ssh\id_rsa.pub | Set-Clipboard
2021-01-01 20:12:34 +01:00
</pre>
</div>
2021-01-03 22:52:53 +01:00
<p>
And add it to <code>~/.ssh/authorized_keys</code> on the server side.
</p>
<p>
Finally, it should be possible to ssh to the server.
</p>
</div>
</div>
2022-05-09 10:05:23 +02:00
<div id="outline-container-orge4d5ab7" class="outline-3">
<h3 id="orge4d5ab7">SSHFS</h3>
<div class="outline-text-3" id="text-orge4d5ab7">
2021-01-03 22:52:53 +01:00
<p>
Install <a href="https://github.com/billziss-gh/sshfs-win">sshfs-win</a>.
</p>
<p>
Run the <code>Registry Editor</code>, and find <code>Computer\HKEY_LOCAL_MACHINE\SOFTWARE\WOW6432Node\WinFsp\Services\sshfs.kr</code>, then edit <code>CommandLine</code>:
</p>
<div class="org-src-container">
2021-01-08 01:43:48 +01:00
<pre class="src src-conf"><span class="org-variable-name">svc %1 %2 %U -o create_dir_umask</span>=<span class="org-highlight-numbers-number">000</span> -o create_file_umask=<span class="org-highlight-numbers-number">111</span> -o umask=<span class="org-highlight-numbers-number">000</span>
2021-01-03 22:52:53 +01:00
</pre>
</div>
<p>
Then, to mount the network drive using <code>sshfs</code>:
</p>
<div class="org-src-container">
2021-10-25 14:37:10 +02:00
<pre class="src src-bash">net use X: <span class="org-string">\\</span>sshfs.kr\thomas@192.168.1.21\srv\storage /persistent:yes
2021-01-03 22:52:53 +01:00
</pre>
</div>
<p>
To un-mount it:
</p>
<div class="org-src-container">
2021-01-08 01:43:48 +01:00
<pre class="src src-bash">net use X: /delete
2021-01-03 22:52:53 +01:00
</pre>
</div>
</div>
2021-01-01 20:12:34 +01:00
</div>
</div>
2022-05-09 10:05:23 +02:00
<div id="outline-container-org0dadda3" class="outline-2">
<h2 id="org0dadda3">Software Setup</h2>
<div class="outline-text-2" id="text-org0dadda3">
2021-01-01 20:12:34 +01:00
</div>
2022-05-09 10:05:23 +02:00
<div id="outline-container-org0277c2c" class="outline-3">
<h3 id="org0277c2c">Syncthing</h3>
<div class="outline-text-3" id="text-org0277c2c">
2021-01-01 20:12:34 +01:00
<p>
<a href="https://docs.syncthing.net/users/autostart.html#autostart-windows-startup">https://docs.syncthing.net/users/autostart.html#autostart-windows-startup</a>
</p>
<p>
Go to <code>%APPDATA%\Microsoft\Windows\Start Menu\Programs\Startup</code> and create a shortcut linking to <code>C:\path_to\syncthing.exe -no-console -no-browser</code>
</p>
<p>
Then, Syncthing can be accessed with: <a href="http://localhost:8384/">http://localhost:8384/</a>
</p>
</div>
</div>
2022-05-09 10:05:23 +02:00
<div id="outline-container-org37cf1aa" class="outline-3">
<h3 id="org37cf1aa">Cura</h3>
<div class="outline-text-3" id="text-org37cf1aa">
2021-01-01 20:12:34 +01:00
<ul class="org-ul">
<li><a href="https://github.com/fieldOfView/Cura-OctoPrintPlugin">https://github.com/fieldOfView/Cura-OctoPrintPlugin</a></li>
</ul>
</div>
</div>
</div>
</div>
<div id="postamble" class="status">
<p class="author">Author: Dehaeze Thomas</p>
2022-05-09 10:05:23 +02:00
<p class="date">Created: 2022-05-09 lun. 10:04</p>
2021-01-01 20:12:34 +01:00
</div>
</body>
</html>