<?xml version="1.0" encoding="utf-8" standalone="yes"?>
<rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom">
    <channel>
        <title>Homelab on Voltaicforge</title>
        <link>https://6e2dbc8c.voltaicforge.pages.dev/categories/homelab/</link>
        <description>Recent content in Homelab on Voltaicforge</description>
        <generator>Hugo -- gohugo.io</generator>
        <language>en-au</language><atom:link href="https://6e2dbc8c.voltaicforge.pages.dev/categories/homelab/index.xml" rel="self" type="application/rss+xml" /><item>
        <title>DuckDNS with UDM Pro</title>
        <link>https://6e2dbc8c.voltaicforge.pages.dev/p/2022/12/duckdns-with-udmpro/</link>
        <pubDate>Sat, 31 Dec 2022 00:00:00 +0000</pubDate>
        
        <guid>https://6e2dbc8c.voltaicforge.pages.dev/p/2022/12/duckdns-with-udmpro/</guid>
        <description>&lt;img src="https://6e2dbc8c.voltaicforge.pages.dev/p/2022/12/duckdns-with-udmpro/linux_stock.png" alt="Featured image of post DuckDNS with UDM Pro" /&gt;&lt;h2 id=&#34;duckdns-with-unifi-dream-machine&#34;&gt;DuckDNS with Unifi Dream Machine&lt;/h2&gt;
&lt;p&gt;I recently got a UDM Pro and have just managed to get DuckDNS working.&lt;/p&gt;
&lt;p&gt;There are many other suggestions on the internet, for using the webui with &amp;lsquo;dyndns&amp;rsquo; and a variety of settings that should work.
None did for me as of today, on UDM-Pro software version 1.11.0.&lt;/p&gt;
&lt;p&gt;UDM currently uses the software inadyn to provide its ddns capabilities—and it has more providers available that what is exposed in the WebUI.
To get it working I edited the &lt;code&gt;inadyn.conf&lt;/code&gt; manually via SSH.
(Google &lt;code&gt;UDM SSH Setup&lt;/code&gt; if you need to setup SSH access to your UDM)&lt;/p&gt;
&lt;p&gt;If there is no Dynamic DNS setup in the UDM WebUI it disables the servers, so for now I have created a dummy service in the UDM WebUI&lt;/p&gt;
&lt;p&gt;Once SSH&amp;rsquo;d into the UDM, check what config the file your UDM is running:&lt;/p&gt;
&lt;div class=&#34;highlight&#34;&gt;&lt;pre tabindex=&#34;0&#34; class=&#34;chroma&#34;&gt;&lt;code class=&#34;language-bash&#34; data-lang=&#34;bash&#34;&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;&lt;span class=&#34;c1&#34;&gt;# ps aux | grep inadyn&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;&lt;span class=&#34;m&#34;&gt;12799&lt;/span&gt; root     /usr/sbin/inadyn -n -s -C -f /run/ddns-eth8-inadyn.conf
&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;p&gt;In this case, my config file is located at &lt;code&gt;/run/ddns-eth8-inadyn.conf&lt;/code&gt;&lt;/p&gt;
&lt;p&gt;Edit the file (using VI) and add a duckdns config block:
(VI by default doesn&amp;rsquo;t allow editing, press &lt;code&gt;i&lt;/code&gt; to enter &amp;lsquo;interactive&amp;rsquo; mode to turn it into a text editor)&lt;/p&gt;
&lt;div class=&#34;highlight&#34;&gt;&lt;pre tabindex=&#34;0&#34; class=&#34;chroma&#34;&gt;&lt;code class=&#34;language-text&#34; data-lang=&#34;text&#34;&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;provider duckdns.org:2 {
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;    username         = &amp;lt;YOUR_TOKEN&amp;gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;    password         = noPasswordForDuckdns
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;    hostname         = &amp;lt;YOUR_DOMAIN&amp;gt;.duckdns.org
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;}
&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;p&gt;Save and close. On VI, &lt;code&gt;ESC&lt;/code&gt; will exit interactive mode, then &lt;code&gt;:wq&lt;/code&gt; will &amp;lsquo;Write and Quit&amp;rsquo;&lt;/p&gt;
&lt;p&gt;This has successfully got me running with Duck on UDM—but hacky, and won&amp;rsquo;t be part of a backup&lt;/p&gt;
</description>
        </item>
        <item>
        <title>Network UPS with Synology</title>
        <link>https://6e2dbc8c.voltaicforge.pages.dev/p/2021/02/synology-ups-network/</link>
        <pubDate>Sat, 06 Feb 2021 00:00:00 +0000</pubDate>
        
        <guid>https://6e2dbc8c.voltaicforge.pages.dev/p/2021/02/synology-ups-network/</guid>
        <description>&lt;img src="https://6e2dbc8c.voltaicforge.pages.dev/p/2021/02/synology-ups-network/linux_stock.png" alt="Featured image of post Network UPS with Synology" /&gt;&lt;h2 id=&#34;network-ups-with-synology&#34;&gt;Network UPS with synology&lt;/h2&gt;
&lt;p&gt;Port 3493&lt;/p&gt;
&lt;p&gt;On proxmox, install nut-tools&lt;/p&gt;
&lt;div class=&#34;highlight&#34;&gt;&lt;pre tabindex=&#34;0&#34; class=&#34;chroma&#34;&gt;&lt;code class=&#34;language-bash&#34; data-lang=&#34;bash&#34;&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;apt install nut
&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;p&gt;Synology username and password for ups is:
Device: ups
Username: monuser
Password: secret&lt;/p&gt;
&lt;p&gt;Find and uncomment line and fill out details&lt;/p&gt;
&lt;h2 id=&#34;etcnutupsmonconf&#34;&gt;/etc/nut/upsmon.conf&lt;/h2&gt;
&lt;div class=&#34;highlight&#34;&gt;&lt;pre tabindex=&#34;0&#34; class=&#34;chroma&#34;&gt;&lt;code class=&#34;language-bash&#34; data-lang=&#34;bash&#34;&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;MONITOR ups@192.168.2.253 &lt;span class=&#34;m&#34;&gt;1&lt;/span&gt; monuser secret slave
&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;h2 id=&#34;etcnutnutconf&#34;&gt;/etc/nut/nut.conf&lt;/h2&gt;
&lt;div class=&#34;highlight&#34;&gt;&lt;pre tabindex=&#34;0&#34; class=&#34;chroma&#34;&gt;&lt;code class=&#34;language-bash&#34; data-lang=&#34;bash&#34;&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;&lt;span class=&#34;nv&#34;&gt;MODE&lt;/span&gt;&lt;span class=&#34;o&#34;&gt;=&lt;/span&gt;netclient
&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;p&gt;Note: Found on the synology in /usr/syno/etc/ups/upsd.user&lt;/p&gt;
</description>
        </item>
        <item>
        <title>Setup pfSense for TPG NBN</title>
        <link>https://6e2dbc8c.voltaicforge.pages.dev/p/2017/08/setup-pfsense-for-tpg-nbn/</link>
        <pubDate>Sun, 13 Aug 2017 00:00:00 +0000</pubDate>
        
        <guid>https://6e2dbc8c.voltaicforge.pages.dev/p/2017/08/setup-pfsense-for-tpg-nbn/</guid>
        <description>&lt;img src="https://6e2dbc8c.voltaicforge.pages.dev/p/2017/08/setup-pfsense-for-tpg-nbn/Code.jpg" alt="Featured image of post Setup pfSense for TPG NBN" /&gt;&lt;h2 id=&#34;setting-up-pfsense-for-tpg-nbn&#34;&gt;Setting up pfSense for TPG NBN&lt;/h2&gt;
&lt;p&gt;After much frustration, I have finially buggered off the terrible HG659 router that is provided with TPG NBN.&lt;/p&gt;
&lt;p&gt;I had significant trouble getting pfSense to connect to the NBN even using the details on their site. PPPoE should be reasonably simple, connect NBN box to pfSense WAN port, set to PPPoE and enter TPG username/password.&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;Wrong!&lt;/strong&gt;&lt;/p&gt;
&lt;p&gt;After quite some time I found that they use a VLAN setting, and without it being set right it would not connect at all. Its not mentioned in their setting site, conspicuously.&lt;/p&gt;
&lt;p&gt;&lt;img src=&#34;https://6e2dbc8c.voltaicforge.pages.dev/p/2017/08/setup-pfsense-for-tpg-nbn/TPG_NBN_Settings.png&#34;
  width=&#34;1144&#34;
  height=&#34;985&#34;
  srcset=&#34;https://6e2dbc8c.voltaicforge.pages.dev/p/2017/08/setup-pfsense-for-tpg-nbn/TPG_NBN_Settings_hue4ec855828623b186629d811d939d102_88502_480x0_resize_catmullrom_3.png 480w, https://6e2dbc8c.voltaicforge.pages.dev/p/2017/08/setup-pfsense-for-tpg-nbn/TPG_NBN_Settings_hue4ec855828623b186629d811d939d102_88502_1024x0_resize_catmullrom_3.png 1024w&#34;
  loading=&#34;lazy&#34;
  
    alt=&#34;TPG&amp;rsquo;s NBN settigns with no VLAN setting mentioned&#34;
  
  
    class=&#34;gallery-image&#34; 
    data-flex-grow=&#34;116&#34;
    data-flex-basis=&#34;278px&#34;
  
&gt;
&lt;/p&gt;
&lt;p&gt;I got mine working once I set the WAN port to be on a VLAN 2.&lt;/p&gt;
&lt;p&gt;Create a new VLAN, under &lt;em&gt;Interface -&amp;gt; Assign -&amp;gt; VLANs -&amp;gt; Add&lt;/em&gt;. Setup on the WAN Interface (mine is &lt;code&gt;re0&lt;/code&gt;) and with a VLAN tag of &lt;code&gt;2&lt;/code&gt;.&lt;/p&gt;
&lt;p&gt;&lt;img src=&#34;https://6e2dbc8c.voltaicforge.pages.dev/p/2017/08/setup-pfsense-for-tpg-nbn/TPG_VLAN_2.png&#34;
  width=&#34;1055&#34;
  height=&#34;516&#34;
  srcset=&#34;https://6e2dbc8c.voltaicforge.pages.dev/p/2017/08/setup-pfsense-for-tpg-nbn/TPG_VLAN_2_hufe9d9acbe3576823b8e3bb303db8d0b1_53413_480x0_resize_catmullrom_3.png 480w, https://6e2dbc8c.voltaicforge.pages.dev/p/2017/08/setup-pfsense-for-tpg-nbn/TPG_VLAN_2_hufe9d9acbe3576823b8e3bb303db8d0b1_53413_1024x0_resize_catmullrom_3.png 1024w&#34;
  loading=&#34;lazy&#34;
  
    alt=&#34;pfSense VLAN setting of 2 for TPG NBN&#34;
  
  
    class=&#34;gallery-image&#34; 
    data-flex-grow=&#34;204&#34;
    data-flex-basis=&#34;490px&#34;
  
&gt;
&lt;/p&gt;
&lt;p&gt;Add a PPP configuration under &lt;em&gt;Interface -&amp;gt; Assign -&amp;gt; PPP -&amp;gt; Add&lt;/em&gt;. Use Link type &lt;code&gt;PPPoE&lt;/code&gt;, Link Interface of the VLAN you set up before. Enter TPG username/password&lt;/p&gt;
&lt;p&gt;&lt;img src=&#34;https://6e2dbc8c.voltaicforge.pages.dev/p/2017/08/setup-pfsense-for-tpg-nbn/pfSense_PPP_Config.png&#34;
  width=&#34;1436&#34;
  height=&#34;731&#34;
  srcset=&#34;https://6e2dbc8c.voltaicforge.pages.dev/p/2017/08/setup-pfsense-for-tpg-nbn/pfSense_PPP_Config_huae8eb4298e4b1e2f42d52ed0d43e2ec0_81919_480x0_resize_catmullrom_3.png 480w, https://6e2dbc8c.voltaicforge.pages.dev/p/2017/08/setup-pfsense-for-tpg-nbn/pfSense_PPP_Config_huae8eb4298e4b1e2f42d52ed0d43e2ec0_81919_1024x0_resize_catmullrom_3.png 1024w&#34;
  loading=&#34;lazy&#34;
  
    alt=&#34;pfSense PPP configuration&#34;
  
  
    class=&#34;gallery-image&#34; 
    data-flex-grow=&#34;196&#34;
    data-flex-basis=&#34;471px&#34;
  
&gt;
&lt;/p&gt;
&lt;p&gt;For WAN port, under &lt;em&gt;Interface -&amp;gt; WAN&lt;/em&gt;, ensure we have &lt;code&gt;PPPoE&lt;/code&gt; set for IP4 Configuration Type, and again your Username/Password&lt;/p&gt;
&lt;p&gt;&lt;img src=&#34;https://6e2dbc8c.voltaicforge.pages.dev/p/2017/08/setup-pfsense-for-tpg-nbn/pfsense_TPG_WAN_Settings.png&#34;
  width=&#34;1485&#34;
  height=&#34;884&#34;
  srcset=&#34;https://6e2dbc8c.voltaicforge.pages.dev/p/2017/08/setup-pfsense-for-tpg-nbn/pfsense_TPG_WAN_Settings_hu61b0e9715d8c5917a80e590ec4076358_89508_480x0_resize_catmullrom_3.png 480w, https://6e2dbc8c.voltaicforge.pages.dev/p/2017/08/setup-pfsense-for-tpg-nbn/pfsense_TPG_WAN_Settings_hu61b0e9715d8c5917a80e590ec4076358_89508_1024x0_resize_catmullrom_3.png 1024w&#34;
  loading=&#34;lazy&#34;
  
    alt=&#34;pfsense TPG WAN Settings&#34;
  
  
    class=&#34;gallery-image&#34; 
    data-flex-grow=&#34;167&#34;
    data-flex-basis=&#34;403px&#34;
  
&gt;
&lt;/p&gt;
&lt;p&gt;Then under &lt;em&gt;Interface -&amp;gt; Assign&lt;/em&gt;, set the WAN network port to the PPPOE of the VLAN setup above.&lt;/p&gt;
&lt;p&gt;&lt;img src=&#34;https://6e2dbc8c.voltaicforge.pages.dev/p/2017/08/setup-pfsense-for-tpg-nbn/pfSesne_TPG_Interface_Assignment.png&#34;
  width=&#34;1385&#34;
  height=&#34;386&#34;
  srcset=&#34;https://6e2dbc8c.voltaicforge.pages.dev/p/2017/08/setup-pfsense-for-tpg-nbn/pfSesne_TPG_Interface_Assignment_hu623f9a21e9fc52f8e5fbb92d6edca296_43125_480x0_resize_catmullrom_3.png 480w, https://6e2dbc8c.voltaicforge.pages.dev/p/2017/08/setup-pfsense-for-tpg-nbn/pfSesne_TPG_Interface_Assignment_hu623f9a21e9fc52f8e5fbb92d6edca296_43125_1024x0_resize_catmullrom_3.png 1024w&#34;
  loading=&#34;lazy&#34;
  
    alt=&#34;pfSense TPG setting of WAN interface to VLAN&#34;
  
  
    class=&#34;gallery-image&#34; 
    data-flex-grow=&#34;358&#34;
    data-flex-basis=&#34;861px&#34;
  
&gt;
&lt;/p&gt;
&lt;p&gt;You should now have a working NBN setup under pfSense, and that locked down modem can be thrown in the trash where it belongs!&lt;/p&gt;
</description>
        </item>
        <item>
        <title>Setting up Dropbox and encryption in Linux</title>
        <link>https://6e2dbc8c.voltaicforge.pages.dev/p/2017/02/dropbox-encfs/</link>
        <pubDate>Sat, 25 Feb 2017 00:00:00 +0000</pubDate>
        
        <guid>https://6e2dbc8c.voltaicforge.pages.dev/p/2017/02/dropbox-encfs/</guid>
        <description>&lt;img src="https://6e2dbc8c.voltaicforge.pages.dev/p/2017/02/dropbox-encfs/encrypted_encfs_dropbox.png" alt="Featured image of post Setting up Dropbox and encryption in Linux" /&gt;&lt;h2 id=&#34;premise&#34;&gt;Premise&lt;/h2&gt;
&lt;p&gt;Due to the fact that I now run Linux across my Homelab, Desktop and Laptop, I&amp;rsquo;ve been looking into keeping everything in sync.&lt;/p&gt;
&lt;p&gt;Dropbox is reasonably popular for this on Linux systems (outside of P2P sync), but the issues, of course, is security. My mantra is if you put it on the internet assume that everyone can see it, and you can never remove it.&lt;/p&gt;
&lt;p&gt;I wanted to use a Dropbox-style sync for a number of services (backup dotfiles, zim-wiki files, website code, etc). The intention was to be able to start something on the laptop, move to the desktop and be able to pick up where I left off.&lt;/p&gt;
&lt;h2 id=&#34;dropbox-install&#34;&gt;Dropbox install.&lt;/h2&gt;
&lt;p&gt;Installing Dropbox should be easy across most distributions from core repositories.&lt;/p&gt;
&lt;pre tabindex=&#34;0&#34;&gt;&lt;code&gt;# Debain
cd ~ &amp;amp;&amp;amp; wget -O - &amp;#34;https://www.dropbox.com/download?plat=lnx.x86_64&amp;#34; | tar xzf -
~/.dropbox-dist/dropboxd


# Arch
pacaur -S dropbox
&lt;/code&gt;&lt;/pre&gt;&lt;h2 id=&#34;setup-script&#34;&gt;Setup script&lt;/h2&gt;
&lt;p&gt;First, put your password in a file in your home directory, plaintext. We will pass this as an argument to the script, and ensure it has permissions to be read only by your user.&lt;/p&gt;
&lt;p&gt;You can modify the file location if you wish.&lt;/p&gt;
&lt;pre tabindex=&#34;0&#34;&gt;&lt;code&gt;mkdir ~/.config/certificates/
echo &amp;#34;&amp;lt;password&amp;gt;&amp;#34; &amp;gt; ~/.config/certificates/encfs
chmod 0600 ~/.config/certificates/encfs
&lt;/code&gt;&lt;/pre&gt;&lt;p&gt;Then, create the script. Again, you can change the location.&lt;/p&gt;
&lt;p&gt;&lt;em&gt;~/scripts/dropbox.sh&lt;/em&gt;&lt;/p&gt;
&lt;pre tabindex=&#34;0&#34;&gt;&lt;code&gt;cat ~/.config/certificates/encfs | encfs -S ~/Dropbox/encrypted/ ~/Private/
&lt;/code&gt;&lt;/pre&gt;&lt;p&gt;When called, this calls encfs, and supply the password by outputting the file created earlier into it.&lt;/p&gt;
&lt;p&gt;Whilst there are a number of places we could call this upon startup to ensure its loaded upon startup, I chose the lazy option and just had it in my Cinnamon startup apps.&lt;/p&gt;
&lt;p&gt;&lt;img src=&#34;https://6e2dbc8c.voltaicforge.pages.dev/p/2017/02/dropbox-encfs/add_startup_program_cinnamon.png&#34;
  width=&#34;389&#34;
  height=&#34;199&#34;
  srcset=&#34;https://6e2dbc8c.voltaicforge.pages.dev/p/2017/02/dropbox-encfs/add_startup_program_cinnamon_hu92e810ae71172cb38361bcb0096ba3f9_14047_480x0_resize_catmullrom_3.png 480w, https://6e2dbc8c.voltaicforge.pages.dev/p/2017/02/dropbox-encfs/add_startup_program_cinnamon_hu92e810ae71172cb38361bcb0096ba3f9_14047_1024x0_resize_catmullrom_3.png 1024w&#34;
  loading=&#34;lazy&#34;
  
    alt=&#34;Add Startup Program Cinnamon&#34;
  
  
    class=&#34;gallery-image&#34; 
    data-flex-grow=&#34;195&#34;
    data-flex-basis=&#34;469px&#34;
  
&gt;
&lt;/p&gt;
&lt;p&gt;Now, place your files in the &lt;code&gt;~Private folder&lt;/code&gt;. They will be encryped into the &lt;code&gt;~/Dropbox/encrypted/&lt;/code&gt; folder. Repead on another computer to have shared sync.&lt;/p&gt;
</description>
        </item>
        <item>
        <title>Stop Chromium asking for keyring unlock</title>
        <link>https://6e2dbc8c.voltaicforge.pages.dev/p/2017/02/chromium-gnome-keyring/</link>
        <pubDate>Sat, 25 Feb 2017 00:00:00 +0000</pubDate>
        
        <guid>https://6e2dbc8c.voltaicforge.pages.dev/p/2017/02/chromium-gnome-keyring/</guid>
        <description>&lt;img src="https://6e2dbc8c.voltaicforge.pages.dev/p/2017/02/chromium-gnome-keyring/chromium-gnome-banner.png" alt="Featured image of post Stop Chromium asking for keyring unlock" /&gt;&lt;h2 id=&#34;removing-keychain-login-from-chormium&#34;&gt;Removing keychain login from Chormium&lt;/h2&gt;
&lt;p&gt;I recently started using (sigh) Chromium over Firefox due to very slow webgl performance (and general overall faster performance)&lt;/p&gt;
&lt;p&gt;However, annoyingly it asks for the Gnome keychain to be unlocked upon launch.&lt;/p&gt;
&lt;p&gt;A simple fix I found is to simply change the shortcut to&lt;/p&gt;
&lt;pre tabindex=&#34;0&#34;&gt;&lt;code&gt;chromium --password-store=basic
&lt;/code&gt;&lt;/pre&gt;&lt;p&gt;This will drop chromium to a basic password store machanism, so it doesn&amp;rsquo;t use gnome-keyring&lt;/p&gt;
&lt;p&gt;Of course, this assumes your not wanting to use the features of chromium to store login details into the OS&amp;rsquo;s password manager.
However, since you should be using a service like KeePass or LastPass to manage passwords securely, this shouldn&amp;rsquo;t be an issue.&lt;/p&gt;
&lt;p&gt;I canged my Cinnamon settings by selecting &amp;lsquo;Open Editor&amp;rsquo; in the Menu options in settings, then finding the chromium shortcut. I then added the &amp;lsquo;&amp;ndash;password-store=basic&amp;rsquo; to the shortcut.&lt;/p&gt;
&lt;p&gt;&lt;img src=&#34;https://6e2dbc8c.voltaicforge.pages.dev/p/2017/02/chromium-gnome-keyring/chromium-password-basic.gif&#34;
  
  
  
  loading=&#34;lazy&#34;
  
    alt=&#34;Stopping chromium keyring unlock warning&#34;
  
  
&gt;
&lt;/p&gt;
</description>
        </item>
        <item>
        <title>Docking a PuTTY window into Notepad&#43;&#43;</title>
        <link>https://6e2dbc8c.voltaicforge.pages.dev/p/2016/05/ssh-terminal-in-notepadpp/</link>
        <pubDate>Sun, 01 May 2016 00:00:00 +0000</pubDate>
        
        <guid>https://6e2dbc8c.voltaicforge.pages.dev/p/2016/05/ssh-terminal-in-notepadpp/</guid>
        <description>&lt;img src="https://6e2dbc8c.voltaicforge.pages.dev/p/2016/05/ssh-terminal-in-notepadpp/putty_teaser.png" alt="Featured image of post Docking a PuTTY window into Notepad&#43;&#43;" /&gt;&lt;h2 id=&#34;challenge-of-developing-in-jekyll-via-remote-linux-server&#34;&gt;Challenge of developing in Jekyll via remote Linux server&lt;/h2&gt;
&lt;p&gt;During development of this site, I came across too many limitations with using Jekyll on Windows. You can use Jekyll in Windows with &lt;a class=&#34;link&#34; href=&#34;https://github.com/madhur/PortableJekyll&#34;  target=&#34;_blank&#34; rel=&#34;noopener&#34;
    &gt;PortableJekyll&lt;/a&gt;, but I found the Windows environment still limited Jekyll. Mainly ImageMagick for using responsive images, which isn’t worth the hassle of setting up on Windows. I decided it was easier to spool up a Debian VM on my virtual server to install Gem/Ruby/Jekyll on. This lets me keep the website code on my NAS (allowing for easy cloud backup), code on Windows, and run Jekyll on Linux.&lt;/p&gt;
&lt;p&gt;However, swapping back and forward between a terminal and the website code to site build was annoying, so I decided to see if I could ‘dock’ a PuTTY terminal into Notepad++&lt;/p&gt;
&lt;h2 id=&#34;adding-a-putty-terminal-into-notepad&#34;&gt;Adding a Putty Terminal into Notepad++&lt;/h2&gt;
&lt;p&gt;I’ve been using &lt;a class=&#34;link&#34; href=&#34;https://notepad-plus-plus.org/&#34;  target=&#34;_blank&#34; rel=&#34;noopener&#34;
    &gt;Notepad++&lt;/a&gt; to develop in Windows for quite some time now. It’s a fantastic little program for us Windows people. A docked PuTTY window would greatly improve my workflow.&lt;/p&gt;
&lt;p&gt;&lt;img src=&#34;https://6e2dbc8c.voltaicforge.pages.dev/p/2016/05/ssh-terminal-in-notepadpp/putty_terminal_in_npp2.png&#34;
  width=&#34;1179&#34;
  height=&#34;941&#34;
  srcset=&#34;https://6e2dbc8c.voltaicforge.pages.dev/p/2016/05/ssh-terminal-in-notepadpp/putty_terminal_in_npp2_hu7d34ed4b4e283d1ea3b71933d17998e7_99800_480x0_resize_catmullrom_3.png 480w, https://6e2dbc8c.voltaicforge.pages.dev/p/2016/05/ssh-terminal-in-notepadpp/putty_terminal_in_npp2_hu7d34ed4b4e283d1ea3b71933d17998e7_99800_1024x0_resize_catmullrom_3.png 1024w&#34;
  loading=&#34;lazy&#34;
  
    alt=&#34;Picture of Notepad&amp;#43;&amp;#43; with attached PuTTY terminal&#34;
  
  
    class=&#34;gallery-image&#34; 
    data-flex-grow=&#34;125&#34;
    data-flex-basis=&#34;300px&#34;
  
&gt;
&lt;/p&gt;
&lt;p&gt;To do the same as I have above, it’s actually pretty simple.&lt;/p&gt;
&lt;p&gt;Download:&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;&lt;a class=&#34;link&#34; href=&#34;http://www.chiark.greenend.org.uk/~sgtatham/putty/download.html&#34;  target=&#34;_blank&#34; rel=&#34;noopener&#34;
    &gt;Plink&lt;/a&gt; - PuTTY command line&lt;/li&gt;
&lt;li&gt;&lt;del&gt;Ansicon&lt;/del&gt; - (Git repo defunct) Ansi escape sequence converter (to convert Linux CLI escape codes to Windows CLI, else the terminal doesn&amp;rsquo;t work well)&lt;/li&gt;
&lt;li&gt;&lt;a class=&#34;link&#34; href=&#34;https://sourceforge.net/projects/nppconsole/&#34;  target=&#34;_blank&#34; rel=&#34;noopener&#34;
    &gt;nppconsole&lt;/a&gt; - Notepad++ console plugin.
&lt;blockquote class=&#34;book-hint warning&#34;&gt;
  &lt;b&gt;Warning:&lt;/b&gt; I had to use the older &lt;code&gt;11.53&lt;/code&gt; ansicon version under Windows 10 x64, the later versions crashed frequently.
&lt;/blockquote&gt;
&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;The do the following&lt;/p&gt;
&lt;ol&gt;
&lt;li&gt;Extract &lt;em&gt;NPPConsole&lt;/em&gt; to your Notepad++ plugins directory (Program Files x86/Notepad++/Plugins)&lt;/li&gt;
&lt;li&gt;Restart Notepad++ if it&amp;rsquo;s running&lt;/li&gt;
&lt;li&gt;Unzip and copy &lt;em&gt;plink&lt;/em&gt; and &lt;em&gt;ansicon&lt;/em&gt; to a folder of your choosing (I put them both in the Notepad++ folder as it&amp;rsquo;s where the CLI defaults to, and I’m lazy)&lt;/li&gt;
&lt;li&gt;Open a CLI at the Notepad++ folder and run &lt;code&gt;ansicon.exe plink.exe -ssh user@location -pw yourpasword&lt;/code&gt;, replacing the relevant parts with your user/server IP/password.&lt;/li&gt;
&lt;li&gt;All going well, you can now replicate that command in Notepad++. Open Notepad++, select &lt;em&gt;Plugins -&amp;gt; NppConsole&lt;/em&gt; (should be there if you restarted and copied the dll correctly). Run the command and you are set!&lt;/li&gt;
&lt;/ol&gt;
&lt;p&gt;If you have a saved profile in PuTTy you can replace the command with &lt;code&gt;ansicon plink -ssh SESSION_NAME&lt;/code&gt; , replacing &lt;code&gt;SESSION_NAME&lt;/code&gt; with your sessions name from the PuTTY dialogue. This works with key authentication as well, which I much prefer to use. This also saves you the risk of keeping a plaintext password in a potentially insecure location.&lt;/p&gt;
&lt;blockquote class=&#34;book-hint info&#34;&gt;
  &lt;b&gt;Info:&lt;/b&gt; You can use the plugin Nppexec as well instead of NppConsole - but I prefer Nppconsole for this.
&lt;/blockquote&gt;

&lt;p&gt;You now have a working CLI in Notepad++ that can call an SSH session. I wrote a few batch scripts, so I just have to run &lt;code&gt;site-dev&lt;/code&gt; in Windows to jump to my Linux VM that contains Jekyll, then &lt;code&gt;./site-dev&lt;/code&gt; to run a bash script to call up Jekyll in dev mode. Already having made a &lt;code&gt;site-push&lt;/code&gt; bash to push the site to Amazon AWS, so I don’t need to leave Notepad++ to do any development work.&lt;/p&gt;
&lt;p&gt;I couldn’t get Ctrl-C to work with either NppConsole or NppExec, both terminate the command without sending SIGTERM or similar to the PuTTY. Let me know if you figure out a way around this, as it means it’s difficult to gracefully terminate Jekyll. Workaround below.&lt;/p&gt;
&lt;h2 id=&#34;workaround-for-no-ctrl-c-to-exit-jekyll&#34;&gt;Workaround for no Ctrl-C to exit Jekyll&lt;/h2&gt;
&lt;p&gt;My workaround for this has become to have a PuTTY terminal open just for stopping Jekyll. This isn’t as bad as it sounds. Just write a bash script to kill ruby as follows:&lt;/p&gt;
&lt;div class=&#34;highlight&#34;&gt;&lt;pre tabindex=&#34;0&#34; class=&#34;chroma&#34;&gt;&lt;code class=&#34;language-bash&#34; data-lang=&#34;bash&#34;&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;pgrep ruby &lt;span class=&#34;p&#34;&gt;|&lt;/span&gt; xargs &lt;span class=&#34;nb&#34;&gt;kill&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;blockquote class=&#34;book-hint warning&#34;&gt;
  &lt;b&gt;Warning:&lt;/b&gt; This will kill all ruby threads! Note this if you often have other ruby threads often running
&lt;/blockquote&gt;

&lt;p&gt;I saved it as &lt;code&gt;site-kill&lt;/code&gt;. My workflow is &lt;code&gt;site-dev&lt;/code&gt; for the development of this site (with dev flags for config, etc.), &lt;code&gt;site-push&lt;/code&gt; to rebuild the site from scratch and push to AWS. The new &lt;code&gt;site-kill&lt;/code&gt; kills off any ruby threads.&lt;/p&gt;
&lt;p&gt;&lt;img src=&#34;https://6e2dbc8c.voltaicforge.pages.dev/p/2016/05/ssh-terminal-in-notepadpp/ctrl_c_workaround.png&#34;
  width=&#34;932&#34;
  height=&#34;458&#34;
  srcset=&#34;https://6e2dbc8c.voltaicforge.pages.dev/p/2016/05/ssh-terminal-in-notepadpp/ctrl_c_workaround_huf87992d0dc7f47f66ab8f82d597439e6_35490_480x0_resize_catmullrom_3.png 480w, https://6e2dbc8c.voltaicforge.pages.dev/p/2016/05/ssh-terminal-in-notepadpp/ctrl_c_workaround_huf87992d0dc7f47f66ab8f82d597439e6_35490_1024x0_resize_catmullrom_3.png 1024w&#34;
  loading=&#34;lazy&#34;
  
    alt=&#34;Picture of using external ssh script to kill jekyll window instead of killing notepad&amp;#43;&amp;#43; CLI&#34;
  
  
    class=&#34;gallery-image&#34; 
    data-flex-grow=&#34;203&#34;
    data-flex-basis=&#34;488px&#34;
  
&gt;
&lt;/p&gt;
&lt;h2 id=&#34;bonus---markdown-highlighting-in-notepad&#34;&gt;Bonus - Markdown highlighting in Notepad++&lt;/h2&gt;
&lt;p&gt;The default colours finally made me crack during writing this post. Too much white! The language highlighting file I had for Markdown didn’t play ball with custom styles.&lt;/p&gt;
&lt;p&gt;I found a language highlighting file for Markdown on &lt;a class=&#34;link&#34; href=&#34;https://github.com/Edditoria/markdown_npp_zenburn&#34;  target=&#34;_blank&#34; rel=&#34;noopener&#34;
    &gt;GitHub&lt;/a&gt; that had a file for the Zenburn colour scheme. This is what you can see in the screenshots above. So much better!&lt;/p&gt;
</description>
        </item>
        
    </channel>
</rss>
