{"version":"https://jsonfeed.org/version/1.1","title":"Foster Hangdaan's Blog","home_page_url":"https://www.foster.hangdaan.com/","feed_url":"https://www.foster.hangdaan.com/blog/feed.json","description":"A strange place where I write something other than code.","language":"en","items":[{"id":"https://www.foster.hangdaan.com/blog/posts/make-your-own-ddns/","url":"https://www.foster.hangdaan.com/blog/posts/make-your-own-ddns/","title":"Make Your Own DDNS","authors":[{"name":"Foster Hangdaan"}],"content_html":"<p>Ever tried hosting a server in your home network but annoyed at the fact that\nyour public IP address keeps changing? Imagine for a moment that you're running\na <a href=\"https://nextcloud.com/\">Nextcloud</a> server located at <code>nextcloud.example.com</code>.\nAll of a sudden, the public IP changes and your domain is still pointing to the\nold IP address. As a result, connectivity to your server gets disrupted. The\nchange can happen at any time and without warning. It can take some time for you\nto find out. Once you do, you'll have to manually update the\n<a href=\"https://en.wikipedia.org/wiki/List_of_DNS_record_types#A\">A-record</a> of\n<code>nextcloud.example.com</code> to restore connectivity.</p>\n<p>As you can see, spontaneous IP address changes are disruptive events; a\n<a href=\"https://en.wikipedia.org/wiki/IP_address#IP_address_assignment\">static IP address</a>\nor a <a href=\"https://en.wikipedia.org/wiki/Dynamic_DNS\">DDNS</a> service is essential for\nrunning public servers. Internet service providers usually offer static IP\naddresses only in their business plans. So this leaves out the vast majority of\ninternet users. The other option, DDNS, is a feature supported by some routers.\nHowever, utilizing this feature typically involves having to sign-up for a\nhostname on a DDNS provider like <a href=\"https://www.noip.com/\">No-IP</a>. If you get one\nof No-IP's free accounts, then you must\n<a href=\"https://www.noip.com/support/knowledgebase/confirm-my-hostname-free-account-support-question-day\">manually confirm hostnames</a>\nevery 30 days.</p>\n<p>So, the options we have thus far require us to either:</p>\n<ul>\n<li>Pay for a more expensive internet plan.</li>\n<li>Utilize a router feature that requires creating a hostname on a third-party\nDDNS provider.</li>\n</ul>\n<p>If only there was another way...</p>\n<h2 id=\"the-solution\" tabindex=\"-1\"><a href=\"https://www.foster.hangdaan.com/blog/posts/make-your-own-ddns/#the-solution\" class=\"header-anchor\">The Solution</a></h2>\n<p>The answer is to create our own DDNS. We can achieve a DDNS-like system with a\n<a href=\"https://en.wikipedia.org/wiki/Shell_script\">shell script</a> that runs every hour;\nscheduled via <a href=\"https://en.wikipedia.org/wiki/Cron\">Cron</a>. The script performs\nthe following tasks everytime it runs:</p>\n<ol>\n<li>Obtain the current public IP address and the domain's A-record.</li>\n<li>Compare the public IP and the A-record's value.</li>\n<li>If they are not the same, it updates the A-record to the value of the public\nIP address.</li>\n</ol>\n<p>This system provides some major advantages:</p>\n<ul>\n<li>Can be deployed on any computer with a modern\n<a href=\"https://en.wikipedia.org/wiki/Linux\">Linux</a> installation.</li>\n<li>Does not depend on a DDNS provider.</li>\n<li>No need for a router with DDNS support.</li>\n<li>The script is flexible and can be changed to use another\n<a href=\"https://en.wikipedia.org/wiki/Domain_name_registrar\">domain registrar</a>.</li>\n</ul>\n<h2 id=\"requirements\" tabindex=\"-1\"><a href=\"https://www.foster.hangdaan.com/blog/posts/make-your-own-ddns/#requirements\" class=\"header-anchor\">Requirements</a></h2>\n<ul>\n<li>\n<p>Basic proficiency with Linux and its command line.</p>\n</li>\n<li>\n<p>A computer with a <a href=\"https://www.debian.org/\">Debian</a>-based distribution\ninstalled.</p>\n<p>This computer will be referred to as the <em>Host Computer</em>. It will be online\n24/7 to keep the scheduled script running.</p>\n</li>\n<li>\n<p>Domain (or subdomain) with its DNS A-record set.</p>\n<p>Your domain registrar must have an <a href=\"https://en.wikipedia.org/wiki/API\">API</a>\nwhich provides the ability to read and update records. This guide will be\nusing the <a href=\"https://developer.godaddy.com/doc\">GoDaddy API</a> to update an\nA-record on <a href=\"https://www.godaddy.com/\">GoDaddy</a>.</p>\n</li>\n<li>\n<p><strong>Optional</strong>: Familiarity with\n<a href=\"https://en.wikipedia.org/wiki/JavaScript\">JavaScript</a> or\n<a href=\"https://en.wikipedia.org/wiki/TypeScript\">TypeScript</a>.</p>\n<p>Having some basic TypeScript knowledge allows you to modify or update the\nshell script.</p>\n</li>\n</ul>\n<h2 id=\"preparation\" tabindex=\"-1\"><a href=\"https://www.foster.hangdaan.com/blog/posts/make-your-own-ddns/#preparation\" class=\"header-anchor\">Preparation</a></h2>\n<h3 id=\"host-computer\" tabindex=\"-1\"><a href=\"https://www.foster.hangdaan.com/blog/posts/make-your-own-ddns/#host-computer\" class=\"header-anchor\">Host Computer</a></h3>\n<p>Perform these steps on the Host Computer.</p>\n<h4 id=\"update-the-system\" tabindex=\"-1\"><a href=\"https://www.foster.hangdaan.com/blog/posts/make-your-own-ddns/#update-the-system\" class=\"header-anchor\">Update the System</a></h4>\n<p>Open a terminal then enter the command below to update the system.</p>\n<pre><code class=\"language-sh\">sudo apt -y update &amp;&amp; sudo apt -y upgrade\n</code></pre>\n<h4 id=\"install-cron\" tabindex=\"-1\"><a href=\"https://www.foster.hangdaan.com/blog/posts/make-your-own-ddns/#install-cron\" class=\"header-anchor\">Install Cron</a></h4>\n<p>Cron is included in most Linux distributions but we will install it just to be\nsure:</p>\n<pre><code class=\"language-sh\">sudo apt install cron\n</code></pre>\n<h4 id=\"install-deno\" tabindex=\"-1\"><a href=\"https://www.foster.hangdaan.com/blog/posts/make-your-own-ddns/#install-deno\" class=\"header-anchor\">Install Deno</a></h4>\n<p><a href=\"https://deno.com/\">Deno</a> is a secure runtime environment for JavaScript and\nTypeScript. It is the environment for which the TypeScript-programmed shell\nscript will be running under.</p>\n<p>At the time of writing, Deno is not available in the\n<a href=\"https://en.wikipedia.org/wiki/APT_(software)\">APT</a> repositories; we will be\nusing the installation script instead.</p>\n<blockquote class=\"info\">\n<p>Refer to the Deno documentation for\n<a href=\"https://docs.deno.com/runtime/manual/getting_started/installation\">additional installation options</a>.</p>\n</blockquote>\n<p>Run the following command to install Deno:</p>\n<pre><code class=\"language-sh\">curl -fsSL https://deno.land/x/install/install.sh | sh\n</code></pre>\n<p>Confirm that Deno is properly installed by checking its version:</p>\n<pre><code class=\"language-sh\">deno --version\n</code></pre>\n<p>An output like the one below indicates that Deno was successfully installed:</p>\n<pre><code class=\"language-txt\">deno 1.38.3 (release, x86_64-unknown-linux-gnu)\nv8 12.0.267.1\ntypescript 5.2.2\n</code></pre>\n<h3 id=\"godaddy-api-keys\" tabindex=\"-1\"><a href=\"https://www.foster.hangdaan.com/blog/posts/make-your-own-ddns/#godaddy-api-keys\" class=\"header-anchor\">GoDaddy API Keys</a></h3>\n<p>Follow the <a href=\"https://developer.godaddy.com/getstarted#setup\">GoDaddy API setup</a>\nto create the API secret and key. Take note of the key and secret as they will\nbe needed shortly.</p>\n<blockquote class=\"warning\">\n<p>Ensure that you get the API secret and key for the <strong>production environment</strong>;\nnot the ones for the test environment.</p>\n</blockquote>\n<h2 id=\"the-script\" tabindex=\"-1\"><a href=\"https://www.foster.hangdaan.com/blog/posts/make-your-own-ddns/#the-script\" class=\"header-anchor\">The Script</a></h2>\n<blockquote class=\"info\">\n<p>The script sends requests to two endpoints from GoDaddy's Domains API:</p>\n<ul>\n<li><a href=\"https://developer.godaddy.com/doc/endpoint/domains#/v1/recordGet\">GET /v1/domains/{domain}/records/{type}/{name}</a></li>\n<li><a href=\"https://developer.godaddy.com/doc/endpoint/domains#/v1/recordReplaceTypeName\">PUT /v1/domains/{domain}/records/{type}/{name}</a></li>\n</ul>\n<p>Refer to the\n<a href=\"https://developer.godaddy.com/doc/endpoint/domains\">GoDaddy Domains API documentation</a>\nfor the complete list of endpoints.</p>\n</blockquote>\n<blockquote class=\"info\">\n<p>The public IP address is obtained from an instance of\n<a href=\"https://code.fosterhangdaan.com/foster/ipme\">IpMe</a> at\n<a href=\"https://ipme.fosterhangdaan.com/\">https://ipme.fosterhangdaan.com</a>.\n<a href=\"https://www.ipify.org/\">Ipify</a> can be used as an alternative.</p>\n</blockquote>\n<p>Here is the content of the script:</p>\n<pre><code class=\"language-ts\">#!/usr/bin/env -S deno run --allow-net\n\n/**\n * A script which synchronizes a GoDaddy A-record with your public IP\n * address.\n */\n\n// Change this value to your GoDaddy domain.\nconst domain = &quot;example.com&quot;;\n\n// Change this value to your GoDaddy API key.\nconst GODADDY_API_KEY = &quot;key&quot;;\n\n// Change this value to your GoDaddy API secret.\nconst GODADDY_API_SECRET = &quot;secret&quot;;\n\n// If you prefer to use Ipify instead, change this URL to:\n// https://api.ipify.org\nconst publicIpUrl = &quot;https://ipme.fosterhangdaan.com&quot;;\n\nconst domainParts = domain.split(&quot;.&quot;);\nconst domainRoot = domainParts.slice(-2).join(&quot;.&quot;);\nconst domainName = domainParts.slice(0, -2).join(&quot;.&quot;) || &quot;@&quot;;\n\nconst goDaddyUrl =\n  `https://api.godaddy.com/v1/domains/${domainRoot}/records/A/${domainName}`;\n\nconst goDaddyRequestHeaders = new Headers({\n  Authorization: `sso-key ${GODADDY_API_KEY}:${GODADDY_API_SECRET}`,\n});\n\nconst [publicIpResponse, goDaddyResponse] = await Promise.all([\n  fetch(publicIpUrl),\n  fetch(goDaddyUrl, { headers: goDaddyRequestHeaders }),\n]);\n\nif (!publicIpResponse.ok) {\n  throw new Error(`Failed to fetch public IP address from ${publicIpUrl}.`);\n} else if (!goDaddyResponse.ok) {\n  throw new Error(&quot;Failed to fetch A-records from GoDaddy.&quot;);\n}\n\nconst goDaddyJsonResponse = await goDaddyResponse.json();\n\nif (goDaddyJsonResponse.length === 0) {\n  throw new Error(&quot;No GoDaddy A-records found.&quot;);\n}\n\nconst publicIP = await publicIpResponse.text();\nconst goDaddyIP = goDaddyJsonResponse[0][&quot;data&quot;];\n\nif (publicIP !== goDaddyIP) {\n  console.log(\n    `The public IP address has changed. Public IP: ${publicIP}; Old IP: ${goDaddyIP}`,\n  );\n  goDaddyRequestHeaders.append(&quot;Content-Type&quot;, &quot;application/json&quot;);\n  const response = await fetch(goDaddyUrl, {\n    method: &quot;PUT&quot;,\n    headers: goDaddyRequestHeaders,\n    body: JSON.stringify([\n      {\n        data: publicIP,\n      },\n    ]),\n  });\n  if (!response.ok) {\n    throw new Error(&quot;Failed to update GoDaddy A-record.&quot;);\n  } else {\n    console.log(`GoDaddy A-record successfully updated to ${publicIP}.`);\n  }\n}\n</code></pre>\n<h2 id=\"schedule-the-script-to-run-every-hour-with-cron\" tabindex=\"-1\"><a href=\"https://www.foster.hangdaan.com/blog/posts/make-your-own-ddns/#schedule-the-script-to-run-every-hour-with-cron\" class=\"header-anchor\">Schedule the Script to Run Every Hour with Cron</a></h2>\n<p>On the Host Computer, save <a href=\"https://www.foster.hangdaan.com/blog/posts/make-your-own-ddns/#the-script\">the script</a> as a file at\n<code>/etc/cron.hourly/ddns.ts</code>. Make sure to replace some necessary values:</p>\n<ul>\n<li>Replace <code>example.com</code> in <code>const domain = &quot;example.com&quot;;</code> with your GoDaddy\ndomain.</li>\n<li>Replace <code>key</code> in <code>const GODADDY_API_KEY = &quot;key&quot;;</code> with your GoDaddy API key.</li>\n<li>Replace <code>secret</code> in <code>const GODADDY_API_SECRET = &quot;secret&quot;;</code> with your GoDaddy\nAPI secret.</li>\n</ul>\n<p>Grant read, write, and execute permissions only to the <code>root</code> user:</p>\n<pre><code class=\"language-sh\">sudo chown root:root /etc/cron.hourly/ddns.ts\nsudo chmod 700 /etc/cron.hourly/ddns.ts\n</code></pre>\n<blockquote class=\"warning\">\n<p>Access to the script should be granted only to authorized users (such as\n<code>root</code>) since the script contains sensitive information: your GoDaddy API\nsecret and key.</p>\n</blockquote>\n<p>The script should now be scheduled to run every hour by Cron.</p>\n<h2 id=\"conclusion\" tabindex=\"-1\"><a href=\"https://www.foster.hangdaan.com/blog/posts/make-your-own-ddns/#conclusion\" class=\"header-anchor\">Conclusion</a></h2>\n<p>In this guide, we have setup an hourly Cron script that updates a GoDaddy\ndomain's A-record if the public IP address changed. You can now rest assured\nthat your hosted services will be protected from disruptions caused by public IP\naddress changes.</p>\n<p>Feel free to modify the script to your needs; especially if you are using a\ndomain registrar other than GoDaddy.</p>\n<p>As always, <a href=\"https://www.foster.hangdaan.com/#contact-me\">contact me</a> for any comments or suggestions regarding\nthis guide.</p>\n","date_published":"2023-12-02T00:00:00.000Z"},{"id":"https://www.foster.hangdaan.com/blog/posts/retro-gaming-on-an-old-laptop/","url":"https://www.foster.hangdaan.com/blog/posts/retro-gaming-on-an-old-laptop/","title":"Retro Gaming on an Old Laptop","authors":[{"name":"Foster Hangdaan"}],"content_html":"<p>Throughout the years I have amassed a collection of laptops. Most of which are\nunused and collecting dust in storage. If you're reading this, chances are\nyou're in the same situation. Like me, you're also trying to find some new\npurpose for that old, yet functional, piece of electronic heap. The answer:\nRetroPie. In this guide, I will show you how to turn an old laptop into a retro\ngaming station with RetroPie.</p>\n<p>The\n<a href=\"https://retropie.org.uk/docs/Debian\">RetroPie Setup Instructions for Debian</a>\nforms the foundation for this guide. You may refer to that documentation as a\nsupplement.</p>\n<blockquote class=\"info\">\n<p>If you get stuck, the best place to get help is by visiting the\n<a href=\"https://retropie.org.uk/forum\">RetroPie forum</a>.</p>\n</blockquote>\n<h2 id=\"what-is-retropie\" tabindex=\"-1\"><a href=\"https://www.foster.hangdaan.com/blog/posts/retro-gaming-on-an-old-laptop/#what-is-retropie\" class=\"header-anchor\">What is RetroPie?</a></h2>\n<p><a href=\"https://retropie.org.uk/\">RetroPie</a> allows you to turn a computer into a retro\ngaming station. It is mainly targeted for the\n<a href=\"https://www.raspberrypi.com/\">Raspberry Pi</a> series of single-board computers;\nhence its name. Don't let that fool you, though. RetroPie can be used just as\nwell to convert a PC or laptop into a retro gaming station.</p>\n<h2 id=\"prerequisites\" tabindex=\"-1\"><a href=\"https://www.foster.hangdaan.com/blog/posts/retro-gaming-on-an-old-laptop/#prerequisites\" class=\"header-anchor\">Prerequisites</a></h2>\n<ul>\n<li>\n<p>Laptop with <a href=\"https://www.debian.org/News/2023/20231007\">Debian 12.2</a>\ninstalled. Any <a href=\"https://www.debian.org/\">Debian</a>-based distribution such as\n<a href=\"https://ubuntu.com/\">Ubuntu</a> and <a href=\"https://www.linuxmint.com/\">Linux Mint</a>\nshould also work.</p>\n<p>If you have multiple laptops to choose from, then I suggest selecting the\nfastest one available. The laptop's performance determines the types of\nemulators its able to run. On slow laptops, you will experience low framerates\nwhen running more demanding emulators such as <a href=\"https://pcsx2.net/\">PCSX2</a> and\n<a href=\"https://dolphin-emu.org/\">Dolphin</a>.</p>\n</li>\n<li>\n<p>Familiarity with Linux and its command line interface.</p>\n</li>\n<li>\n<p>Internet connection.</p>\n</li>\n<li>\n<p>A gaming controller. You can connect more after the installation.</p>\n<p>I have tried using an <a href=\"https://www.8bitdo.com/pro2\">8BitDo Pro 2</a> and an Xbox\n360 controller. RetroPie has great support for both of them.</p>\n</li>\n<li>\n<p>ROMs</p>\n<p>I will not be going over how and where to obtain ROMs in this guide. For\nsimplicity, I will be using a Gameboy Advance ROM in the examples.</p>\n</li>\n</ul>\n<h2 id=\"retropie-setup\" tabindex=\"-1\"><a href=\"https://www.foster.hangdaan.com/blog/posts/retro-gaming-on-an-old-laptop/#retropie-setup\" class=\"header-anchor\">RetroPie Setup</a></h2>\n<h3 id=\"setup-debian\" tabindex=\"-1\"><a href=\"https://www.foster.hangdaan.com/blog/posts/retro-gaming-on-an-old-laptop/#setup-debian\" class=\"header-anchor\">Setup Debian</a></h3>\n<p>Update the system and packages:</p>\n<pre><code class=\"language-sh\">sudo apt update &amp;&amp; sudo apt upgrade\n</code></pre>\n<p>Install RetroPie dependencies:</p>\n<pre><code class=\"language-sh\">sudo apt install git dialog unzip xmlstarlet\n</code></pre>\n<h3 id=\"install-retropie\" tabindex=\"-1\"><a href=\"https://www.foster.hangdaan.com/blog/posts/retro-gaming-on-an-old-laptop/#install-retropie\" class=\"header-anchor\">Install RetroPie</a></h3>\n<p>Download the latest RetroPie script:</p>\n<pre><code class=\"language-sh\">git clone --depth=1 https://github.com/RetroPie/RetroPie-Setup.git\n</code></pre>\n<p>Enter the RetroPie directory:</p>\n<pre><code class=\"language-sh\">cd RetroPie-Setup\n</code></pre>\n<p>Execute the script:</p>\n<pre><code class=\"language-sh\">sudo ./retropie_setup.sh\n</code></pre>\n<p>The main menu should appear on the screen like the one below:</p>\n<p><img src=\"https://www.foster.hangdaan.com/blog/posts/retro-gaming-on-an-old-laptop/021af5d6-cc50-4ac7-8734-750d2a2e3789.png\" alt=\"Screenshot of installation main menu\"></p>\n<p>Select <strong>Basic Install</strong> and press <kbd>Enter</kbd>. On the next screen, select\n<strong>Yes</strong> to start the installation process.</p>\n<blockquote class=\"info\">\n<p>The installation process compiles most of the emulators from source. This can\ntake an hour or more on a slow laptop.</p>\n</blockquote>\n<p>You will be taken back to the main menu once the installation is complete. After\nthe installation process has finished, exit the main menu and proceed to\ninstalling ROMs.</p>\n<h3 id=\"install-roms\" tabindex=\"-1\"><a href=\"https://www.foster.hangdaan.com/blog/posts/retro-gaming-on-an-old-laptop/#install-roms\" class=\"header-anchor\">Install ROMs</a></h3>\n<p>Before running RetroPie, we should install some ROMs. ROMs are located in\n<code>~/RetroPie/roms</code>. It contains subdirectories for each supported system (GBA,\nPlaystation, etc.).</p>\n<p>For example, to install Gameboy Advance ROMs, place any ROM file in\n<code>~/RetroPie/roms/gba</code>:</p>\n<pre><code class=\"language-sh\">cp pokemon-emerald.zip ~/RetroPie/roms/gba/\n</code></pre>\n<blockquote class=\"info\">\n<p>The default Gameboy Advance emulator, <strong>lr-mgba</strong>, accepts ROM files in the\nfollowing formats: <code>.7z</code>, <code>.gba</code> and <code>.zip</code>. Refer to\n<a href=\"https://retropie.org.uk/docs/Game-Boy-Advance\">the documentation</a> for a\ncomplete list.</p>\n</blockquote>\n<h2 id=\"retropie-first-startup\" tabindex=\"-1\"><a href=\"https://www.foster.hangdaan.com/blog/posts/retro-gaming-on-an-old-laptop/#retropie-first-startup\" class=\"header-anchor\">RetroPie First Startup</a></h2>\n<h3 id=\"start-retropie\" tabindex=\"-1\"><a href=\"https://www.foster.hangdaan.com/blog/posts/retro-gaming-on-an-old-laptop/#start-retropie\" class=\"header-anchor\">Start RetroPie</a></h3>\n<p>Select RetroPie on the app dashboard to launch it.</p>\n<p><img src=\"https://www.foster.hangdaan.com/blog/posts/retro-gaming-on-an-old-laptop/be60a03a-aa41-48f9-b02f-5c8c728e66f6.png\" alt=\"RetroPie on the GNOME app dashboard\"></p>\n<p>At first launch, Retropie will look for connected controllers and configure\nthem. Connect your controller now and follow the on-screen instructions to\nconfigure it.</p>\n<blockquote class=\"info\">\n<p>Alternatively, if you don't have a controller, you can press and hold the\n<kbd>A</kbd> key on your keyboard to configure your keyboard as your\ncontroller.</p>\n</blockquote>\n<p><img src=\"https://www.foster.hangdaan.com/blog/posts/retro-gaming-on-an-old-laptop/706ae312-eecc-470b-8b3a-429c220962af.png\" alt=\"RetroPie controller setup\"></p>\n<h3 id=\"launch-a-game\" tabindex=\"-1\"><a href=\"https://www.foster.hangdaan.com/blog/posts/retro-gaming-on-an-old-laptop/#launch-a-game\" class=\"header-anchor\">Launch a Game</a></h3>\n<p>The main menu will display only the systems for which there are available ROMs.\nSince we installed a Gameboy Advance ROM in a previous step, the Gameboy Advance\nsystem should be displayed on the menu.</p>\n<p><img src=\"https://www.foster.hangdaan.com/blog/posts/retro-gaming-on-an-old-laptop/14701639-0179-4d2c-934f-ad3a63e6f85e.png\" alt=\"RetroPie main menu\"></p>\n<p>Our game should appear within the Gameboy Advance game selection screen. Launch\nthe game by selecting it then pressing the <kbd>A</kbd> button (or the\nequivalent) on your controller.</p>\n<p><img src=\"https://www.foster.hangdaan.com/blog/posts/retro-gaming-on-an-old-laptop/6b9c2f7a-773d-4bac-a6f8-69668fba80dc.png\" alt=\"Gameboy Advance game selection screen\"></p>\n<h2 id=\"conclusion\" tabindex=\"-1\"><a href=\"https://www.foster.hangdaan.com/blog/posts/retro-gaming-on-an-old-laptop/#conclusion\" class=\"header-anchor\">Conclusion</a></h2>\n<p>Hopefully, the installation went well and your old laptop is now a bonafide\nretro gaming station capable of playing a variety of classic games.</p>\n<p>If you are having issues, refer to the\n<a href=\"https://www.foster.hangdaan.com/blog/posts/retro-gaming-on-an-old-laptop/#troubleshooting\">Troubleshooting section</a>, the\n<a href=\"https://retropie.org.uk/forum\">RetroPie forums</a> or the\n<a href=\"https://retropie.org.uk/docs\">RetroPie documentation</a>.</p>\n<p>For some ideas on what you can do after installing RetroPie, checkout the\n<a href=\"https://www.foster.hangdaan.com/blog/posts/retro-gaming-on-an-old-laptop/#post-installation\">Post Installation section</a>.</p>\n<p><a href=\"https://www.foster.hangdaan.com/#contact-me\">Contact me</a> for any comments or suggestions regarding this guide.</p>\n<h2 id=\"post-installation\" tabindex=\"-1\"><a href=\"https://www.foster.hangdaan.com/blog/posts/retro-gaming-on-an-old-laptop/#post-installation\" class=\"header-anchor\">Post Installation</a></h2>\n<p>A few things you can do after installing RetroPie:</p>\n<ul>\n<li>\n<p>If your laptop has an HDMI or DisplayPort port, connect it to a TV or an\nexternal monitor for a larger screen.</p>\n</li>\n<li>\n<p>Add your installed PC games from <a href=\"https://store.steampowered.com/\">Steam</a> or\n<a href=\"https://www.gog.com/\">GoG</a>.</p>\n<p>RetroPie can launch installed PC games directly from the RetroPie menu without\nleaving or closing its window. This involves adding a custom system which\nlaunches the games via a shell script. I'll be creating separate guide on how\nto do this. So stay tuned!</p>\n</li>\n<li>\n<p>Setup Debian to\n<a href=\"https://retropie.org.uk/docs/Debian/?h=autologin#ubuntu-does-not-autologin\">auto login at boot</a>\nand RetroPie to\n<a href=\"https://retropie.org.uk/docs/Debian/#configure-retropie\">auto launch at login</a>.\nThis removes the manual intervention needed to log in and launch RetroPie\nafter booting up.</p>\n</li>\n<li>\n<p>Use the <a href=\"https://retropie.org.uk/docs/Scraper/?h=scraper\">scraper</a> to populate\nthe meta information and artwork for your games.</p>\n</li>\n<li>\n<p>Adjust the power settings for a better gaming experience. For example, you can\nprevent the screen from turning off or prevent the laptop from going to sleep\nwhen it's idle.</p>\n</li>\n<li>\n<p>Install more ROMs and build your retro game collection.</p>\n</li>\n<li>\n<p>Connect more controllers for multiplayer.</p>\n</li>\n</ul>\n<h2 id=\"troubleshooting\" tabindex=\"-1\"><a href=\"https://www.foster.hangdaan.com/blog/posts/retro-gaming-on-an-old-laptop/#troubleshooting\" class=\"header-anchor\">Troubleshooting</a></h2>\n<p>This section goes over how to resolve issues not available in the\n<a href=\"https://retropie.org.uk/docs/Debian/?h=debian#faq\">FAQ section of the Debian installation instructions</a>.</p>\n<h3 id=\"top-bar-cuts-off-window-when-fullscreen\" tabindex=\"-1\"><a href=\"https://www.foster.hangdaan.com/blog/posts/retro-gaming-on-an-old-laptop/#top-bar-cuts-off-window-when-fullscreen\" class=\"header-anchor\">Top Bar Cuts Off Window When Fullscreen</a></h3>\n<p>On Debian 12.2, the top bar still occupies space even when the RetroPie window\nis fullscreen. This pushes the RetroPie window downwards cutting off its bottom\nportion.</p>\n<p><img src=\"https://www.foster.hangdaan.com/blog/posts/retro-gaming-on-an-old-laptop/300394f7-bd14-4ffa-8cc6-2eaf6966d728.png\" alt=\"RetroPie fullscreen cut-off\"></p>\n<p>This seems to be caused by the default display protocol, Wayland. So a simple\nsolution is to switch the display protocol from Wayland to Xorg.</p>\n<p>Begin by logging out to get to the login screen. On the login screen, select\nyour user.</p>\n<p><img src=\"https://www.foster.hangdaan.com/blog/posts/retro-gaming-on-an-old-laptop/ced2816f-7ffd-478f-b86d-e5062caa970b.png\" alt=\"Debian login screen\"></p>\n<p>Click the gear icon at the bottom-right of the screen to open a menu. Select\n<strong>GNOME on Xorg</strong>.</p>\n<p><img src=\"https://www.foster.hangdaan.com/blog/posts/retro-gaming-on-an-old-laptop/1450cb87-24e7-468f-b136-42bb6b989615.png\" alt=\"Display server settings\"></p>\n<p>Log back in then launch RetroPie. Its window should now be displayed in its\nentirety.</p>\n<p><img src=\"https://www.foster.hangdaan.com/blog/posts/retro-gaming-on-an-old-laptop/14701639-0179-4d2c-934f-ad3a63e6f85e.png\" alt=\"RetroPie fullscreen no cut-off\"></p>\n","date_published":"2023-11-28T00:00:00.000Z"},{"id":"https://www.foster.hangdaan.com/blog/posts/favourite-color-palettes/","url":"https://www.foster.hangdaan.com/blog/posts/favourite-color-palettes/","title":"Favourite Colour Palettes","authors":[{"name":"Foster Hangdaan"}],"content_html":"<p>Whether it's for UI design or theming, these colour palettes have played a great\nrole in enhancing the eye-candy of my software projects. In fact, this very\nwebsite uses one of the colour palettes on this list. I hope to share this list\nso that you may also find great use for these colour palettes in your own\nprojects.</p>\n<h2 id=\"h_4-monokai\" tabindex=\"-1\"><a href=\"https://www.foster.hangdaan.com/blog/posts/favourite-color-palettes/#h_4-monokai\" class=\"header-anchor\">4: Monokai</a></h2>\n<p>A warm, yet dark, colour palette created by\n<a href=\"https://monokai.nl/\">Wimer Hazenberg</a>. Monokai is available in many text\neditors, terminal emulators, and (Linux) desktop environments.</p>\n<p>There is also a variant called <a href=\"https://monokai.pro/\">Monokai Pro</a> by the same\nauthor. This new palette is a modern interpretation of the classic palette and\naims to improve functionality and legibility; perfect for coding.</p>\n<h2 id=\"h_3-dracula\" tabindex=\"-1\"><a href=\"https://www.foster.hangdaan.com/blog/posts/favourite-color-palettes/#h_3-dracula\" class=\"header-anchor\">3: Dracula</a></h2>\n<p><a href=\"https://draculatheme.com/\">Dracula</a> is a dark colour palette created by\n<a href=\"https://zenorocha.com/\">Zeno Rocha</a> back in 2013. Since then, Dracula has grown\nto be one of the most popular colour palettes ever created and has been ported\nto many applications. There is no light variant available for this colour\npalette because Dracula is afraid of the light.</p>\n<p>Like Monokai, Dracula has a modern remake designed for terminal emulators and\ncode editors called <a href=\"https://draculatheme.com/pro\">Dracula Pro</a>.</p>\n<blockquote class=\"info\">\n<p>Dracula Pro is a paid theme and its license must be purchased.</p>\n</blockquote>\n<h2 id=\"h_2-catppuccin\" tabindex=\"-1\"><a href=\"https://www.foster.hangdaan.com/blog/posts/favourite-color-palettes/#h_2-catppuccin\" class=\"header-anchor\">2: Catppuccin</a></h2>\n<p><a href=\"https://github.com/catppuccin/catppuccin.git\">Catppuccin</a> is a pastel colour\npalette which skyrocketed in popularity since its inception in 2021. It consists\nof 4 colour variants: Latte, Frappe, Macchiato and Mocha (with Macchiato being\nthe main variant). Catppuccin is very popular in the Linux theming community due\nto its eye-pleasing pastel colours which pair nicely with pastel wallpapers.</p>\n<h2 id=\"h_1-tokyo-night\" tabindex=\"-1\"><a href=\"https://www.foster.hangdaan.com/blog/posts/favourite-color-palettes/#h_1-tokyo-night\" class=\"header-anchor\">1: Tokyo Night</a></h2>\n<p>This is it... my favourite colour palette:\n<a href=\"https://github.com/enkia/tokyo-night-vscode-theme.git\">Tokyo Night</a>. A colour\npalette made to celebrate the lights of downtown Tokyo at night. Unlike many of\nthe other colour palettes on this list, Tokyo Night has a light theme among its\nthree variants:</p>\n<ul>\n<li><strong>Night</strong> - The main, dark variant.</li>\n<li><strong>Storm</strong> - The same palette as Night except for a lighter background colour.</li>\n<li><strong>Light</strong> - A light variant for those who prefer a light theme.</li>\n</ul>\n<p>Remember I mentioned that this website uses one of the colour palettes on this\nlist? Well, Tokyo Night is that colour palette. This website uses the Night\nvariant for its dark theme and the Light variant for its light theme.</p>\n<p>I also created an <strong>unofficial</strong>\n<a href=\"https://code.hangdaan.com/tokyo-night\">Tokyo Night organization</a> to serve\nas a hub where one can find the ports made by others as well as ports made by\nmyself. You can find a good amount of resources in that organization if you plan\non using Tokyo Night in a project.</p>\n","date_published":"2023-08-26T00:00:00.000Z"}]}