Nixing | Linux Adventures https://nixing.mx/feed.xml Blog about my journey in the Linux and Development world en-us How to Configure Gitea Webhooks How to Configure Gitea Webhooks Published: 2022-02-13 | Last Updated: 2022-02-13 | ~25 Minute Read Context We will be looking at how to configure Gitea's webhooks feature today, this feature uses git's hooks capabilities. I have mentioned this feature in the past, but decided not to use it then. I thought I'd walk through how that would be setup since I'm working on a project that will benefit from this feature. This can be seen as a continuation of the previous post where we installed a simple Nginx web server on our LXC container. By the end of this post we expect to have a website that gets updated automatically every time there is a push to Gitea. Environment We will have two main systems to work with, a client and a server. The server is hosting a Gitea instance and the client is our LXC Nginx web server. Since our LXC container has a very minimal set of packages we will need to install some programs along the way. We need to install git on our container, this is easily done via `slackpkg`: root@slack-nginx:~ slackpkg update gpg https://nixing.mx/posts/configure-gitea-webhooks.html https://nixing.mx/posts/configure-gitea-webhooks.html Sun, 13 Feb 2022 00:00:00 -0600 Unprivileged Linux Containers in Slackware 15 Unprivileged Linux Containers in Slackware 15 Published: 2022-02-08 | Last Updated: 2022-02-11 | ~33 Minute Read Context We have taken a look at setting up containers in past posts, however all containers in those posts have been running under the `root` user, which is not ideal. From a security standpoint this means that if for some reason the processes running inside the container were to leak out to the host those processes would have root access on the host. We will take a look at using unprivileged Linux containers on a Slackware 15.0 system. Foreword The latest stable Slackware version 15.0 has been recently released and I thought it would be a great opportunity to update some of the work in pasts posts to include both the latest version of Slackware as well as LXC. In past LXC related posts the version being used was the older `lxc-2.0.11`. In Slackware 15.0 the provided LXC version is `lxc-4.0.11` which is the latest available from upstream as of this writing. Initial research There are already amazing guides online on how to run unprivileged LXC containers on Slackware, however they are aimed towards the older (pre-4.x) versions of LXC. They are however still very valid and I used them heavily as reference for this writing. I've listed them here for the readers' reference as well: https://nixing.mx/posts/unprivileged-containers-in-slackware-15.html https://nixing.mx/posts/unprivileged-containers-in-slackware-15.html Tue, 08 Feb 2022 00:00:00 -0600 Nginx Web Server in Linux Containers (LXC) Nginx Web Server in Linux Containers (LXC) Published: 2022-02-03 | Last Updated: 2022-02-11 | ~8 Minute Read Introduction As you might recall we previously created a Slackware based Linux container. I think it would be nice to have this container start doing some useful things. Today we will look at adding an Nginx web server to a Linux container. Building Nginx I have chosen to build the Nginx package on the container host, this will allow us to easily install the package inside the container. Take a look at this previous example in case a refresher is needed as to how to build a Slackware package. This is what the package looks like on the host: root@container-host:/tmp ls | grep .tgz nginx-1.12.2-x86_64-1_SBo.tgz Installing Nginx dependencies Before installing the Nginx package that we built on the host system we need to make sure the container has the required runtime dependencies for nginx: `libxml2`, `libxslt`, `gd`, `perl`, `libcrypt`, `libgpg-error`, `fontconfig`, `harfbuzz`, `freetype`, `libXpm`, `libX11`, `libxcb`, `libXau`, `libXdmcp` https://nixing.mx/posts/nginx-web-server-in-linux-containers.html https://nixing.mx/posts/nginx-web-server-in-linux-containers.html Thu, 03 Feb 2022 00:00:00 -0600 How to install Profanity with OMEMO support on Slackware How to install Profanity with OMEMO support on Slackware Published: 2022-02-01 | Last Updated: 2022-02-01 | ~12 Minute Read Introduction I have been wanting to use the profanity chat client with OMEMO support for a while now. While the client itself has a Slackbuild available, it does not build the client with OMEMO support. Today I will be showing how to build the profanity chat client in order to add OMEMO support so you can use this feature if you so choose. What is OMEMO OMEMO is an encryption protocol for the XMPP messaging standard which is simple to use and offers a nice set of features. This allows for better message security, however I do have to mention the obligatory word of caution and remind the reader that nothing is absolutely secure on the internet. Initial trouble I was pointed to OMEMO by a friend that hosts an XMPP server and wanted to try it out. My chat client of choice which is included in the full installation of Slackware is pidgin, but its OMEMO support is not yet ready. Current client I have used pidgin a lot in the past however upon looking at the different clients that support OMEMO I found that pidgin developers are still working on adding OMEMO support. A closer look at the issue shows that this has been in the works for 6 years with the latest update 3 years ago. https://nixing.mx/posts/install-profanity-with-omemo-support.html https://nixing.mx/posts/install-profanity-with-omemo-support.html Tue, 01 Feb 2022 00:00:00 -0600 Bourne to Blog Update Bourne to Blog Update Published: 2022-01-25 | Last Updated: 2022-01-25 | ~1 Minute Read Bourne to Blog is 1.0! I'm happy to announce that all the features I wanted to implement for Bourne to Blog are now complete and fully functional! After a year and some odd months of working on and off on this project I have completed all the features that I initially planned to implement. To be honest I added a few that I didn't know I wanted as well, but I think they bring value overall. With this and my continued use of the tool over time I'm calling the current state 1.0 aka stable! I truly enjoyed creating this tool and learned a ton about several different Linux utilities in the process. So I think this is a win-win all around. Next steps I will continue to work on fixing bugs and improving the script, however I doubt that new features will be added to the core script, unless I missed something. :p Now that Bourne to Blog is in a more stable state maybe I will have a bit more time to work on the tracking tool I recently started. https://nixing.mx/posts/bourne-to-blog-update.html https://nixing.mx/posts/bourne-to-blog-update.html Tue, 25 Jan 2022 00:00:00 -0600 Tracking your time spent in the terminal Tracking your time spent in the terminal Published: 2022-01-23 | Last Updated: 2022-01-25 | ~19 Minute Read Motivation At the end of 2021 I noticed many people posting some information from their social media accounts, like Spotify and others, about the details of their usage on those applications. I don't use some of these services because I prefer open source alternatives, however the idea to look back and see your behavior on a given platform/application over time is really interesting to me. Most of the applications I use don't have that type of feature and I don't mind, but for some others I'd like to know some stats of my usage to drive decisions about habits or general behavior tweaks. Tracking yourself can prove to be useful to better yourself or simply to know more about how you operate in general. An example of the power of tracking yourself is Stephen Wolfram's personal analytics which showcase many different data points from his life which he then analyzes. Like in the previous example this practice can allow us to use data in a way that could potentially bring meta-information to light that would otherwise be very difficult to obtain. Inspired by this, I thought it'd be nice to track my activities on the terminal over time. I decided to create a tool for this since I was not able to find anything that did this from the terminal in a way that worked for me. A complex system like Wolfram Alpha is definitely not the goal, but I'll try to make a tool that I can easily use and that provides enough insight for me to consider useful. Requirements I expect this tool to fulfill the following list of requirements: - Terminal based - Bash scripted - Simple to use I think the first two are pretty self explanatory but I'd like to elaborate a bit on the third requirement. I've seen other tools for this task, mainly TimeWarrior, Pomogoro and Timetrace, however they seem to focus on to-do or freelancing style functionality. I have a much simpler workflow in mind for my activity tracking so I will focus on that. https://nixing.mx/posts/time-tracking-in-the-terminal.html https://nixing.mx/posts/time-tracking-in-the-terminal.html Sun, 23 Jan 2022 00:00:00 -0600 Exploring a Slackware SlackBuild Exploring a Slackware SlackBuild Published: 2022-01-14 | Last Updated: 2022-01-14 | ~16 Minute Read Introduction We've previously discussed general package management and Slackware package management so I thought I'd build on that by going over the anatomy of a Slackware SlackBuild script that you can use to install software on your system. SlackBuilds are usually associated with the third party slackbuilds.org repository, however they clarify that this was not something they originated. Prerequisites You should have a full Slackware installation but the general minimum requirements are: 1. The sources for your application 2. A build toolchain installed on your system 3. The native Slackware pkgtools. This should be enough to create most packages from a SlackBuild, and more than enough for the package we will inspect today, Slackware's own `pkgtools`! Downloading the source code We can get the `pkgtools` sources from an available Slackware mirror, in my case I'll use the Slackware UK mirror: Create the directory where we will be working: https://nixing.mx/posts/exploring-slackware-slackbuilds.html https://nixing.mx/posts/exploring-slackware-slackbuilds.html Fri, 14 Jan 2022 00:00:00 -0600 Slackware Package Management Slackware Package Management Published: 2022-01-13 | Last Updated: 2022-01-13 | ~16 Minute Read Introduction This is my attempt to go over Slackware package management in a way that can help newcomers to the distro understand it much faster. I have been using Slackware for about 10 years now, since version `13.37`, and love it but I must admit I still don't know everything there is to know about it. This however is not due to the complexity of the distro but in fact the opposite, it is so easy and simple to use that you don't *need* to learn all the ins and outs of how it works to have a perfectly stable system running. My gaps in knowledge originate from me being lazy and not because Slackware is so complex that even after ten years I still have not learned it all. I'm sure there are other users who, like me, after many years of using the distro are still not very familiar with some parts of the system. If this is the case for "veteran" users of the distribution I can imagine why it must seem daunting for users that may be thinking about giving it a try for the first time. Package management methodology In case you need a quick refresher on package management, I have written about general package management here. I will be focusing on Slackware's way of package management in this post. Slackware states as part of its philosophy that it is: > _A distribution that does not add layers of abstraction or complexity on top of existing solutions. For instance, Slackware package management is handled by simple scripts acting on compressed tarball package files (*.tgz, *.txz, *.tbz) and there is no dependency handling for package management._ This simple statement is one of the many features that make Slackware stand apart from other Linux distributions, however it is not as evil as it may seem at first sight to those more used to distributions that handle dependency resolution for them automagically. In practical terms Slackware allows the system administrator to handle the installation of software on their system from A to Z. In other words if you want to install say the Firefox web browser you will have to not only worry about the Firefox program but all of the programs that it depends on. This is just an example and usually not the case for the Firefox web browser since it comes included in a full Slackware installation, however this applies for any program that you may wish to install and is not included as part of the Slackware "full installation" binaries provided in the Slackware repositories. https://nixing.mx/posts/slackware-package-management.html https://nixing.mx/posts/slackware-package-management.html Thu, 13 Jan 2022 00:00:00 -0600 Package Management on Linux Distributions Package Management on Linux Distributions Published: 2022-01-12 | Last Updated: 2022-01-12 | ~5 Minute Read What is Package Management? If you are familiar with GNU / Linux distributions you have surely come across these words at one point or another. For some users, usually more technically inclined, this is a factor that can "make or break" their decision of whether they will use a given Linux distribution or not. Package management is simply a way to manage the many different software tools that are present on a Linux system. We'll be taking a look at an overview of package management today. Why is Package Management Important? This is not always obvious to the new Linux user, precisely because package management does its job so well, but package management plays a central role in keeping a Linux system operational over time. The main job of a package management tool is to ensure that software installation, update and removal occurs in a user friendly manner. A proper package manager will aid the user throughout their use of a Linux distribution when trying to customize their system to fit their needs. Major Package Management Systems There are two main package management systems in use by Linux distributions today, those are the `rpm` (Red Had Package Manager) and the `dpkg` package management system crated by the Debian project. RPM https://nixing.mx/posts/package-management-on-linux.html https://nixing.mx/posts/package-management-on-linux.html Wed, 12 Jan 2022 00:00:00 -0600 Integrating Openring to a Blog Integrating Openring to a Blog Published: 2021-12-07 | Last Updated: 2021-12-07 | ~10 Minute Read Context I thought I'd make this post in an attempt to contribute to others the way Drew Devault's make a blog initiative contributed in helping me finally commit to making my blog a reality. I did get to be one of the lucky people that were awarded the $20 USD cash reward, however that is not why I started my blog, that was merely a bonus. This post is about another one of his initiatives that I believe provides a way for people to discover each other, that initiative is Openring. What is Openring From the sourcehut repository: > _tool for generating a webring from RSS feeds, so you can link to other blogs you like on your own blog._ It's quite self explanatory but in all honesty it always left me a bit confused as to how it worked from just looking at the repository. This doesn't mean that Openring is hard to use, it just didn't click for me right away, so I will be creating a post that I wish I had seen back when I first started my blog. A bit of History This concept goes back to the earlier days of the web where users that wanted to join the Webring had to be "let in" by the Webring moderators. `Webring.com` was later purchased by Yahoo and eventually disbanded. https://nixing.mx/posts/integrating-openring-into-a-blog.html https://nixing.mx/posts/integrating-openring-into-a-blog.html Tue, 07 Dec 2021 00:00:00 -0600 How to mount and unmount a LUKS encrypted USB How to mount and unmount a LUKS encrypted USB Published: 2021-12-03 | Last Updated: 2022-02-11 | ~2 Minute Read Introduction This is a very simple and to the point guide about how to use a LUKS encrypted drive from the command line. I write this since I recently had to use it and the specific commands escaped my memory due to not using this often enough. For this you will need some programs installed on your computer, mainly `cryptsetup`. Slackware has this program installed as part of its full installation. Mounting the USB drive In order to mount the USB drive you need to run the following as the root user: cryptsetup luksOpen /dev/sdx1 name-of-volume Once you have done this, the mounting process should work the same as with non encrypted drives but using the `/dev/mapper` mapper path as source: mount /dev/mapper/name-of-volume /tmp/usb-mount-folder At this point you should be able to see the contents of the USB drive as usual. Unmounting the USB drive Once you are done using your USB drive or other mounted media you have to apply the same steps in a reverse order. https://nixing.mx/posts/mounting-and-unmounting-luks-encrypted-usb.html https://nixing.mx/posts/mounting-and-unmounting-luks-encrypted-usb.html Fri, 03 Dec 2021 00:00:00 -0600 How to deploy a MERN stack application manually How to deploy a MERN stack application manually Published: 2021-12-03 | Last Updated: 2022-01-12 | ~5 Minute Read Introduction I have been working on an application recently which is based on the MERN stack and I'm now reaching a point where I would like to deploy it. Upon looking for references online I noticed that deploying to cloud services is all the craze and with good reason, it's fast and simple to do. As part of my learning experience I would like to experience a manual deployment to a server. I will document that process here. Hosting I will be deploying this to a Digital Ocean droplet. I used Ubuntu as the host OS for this deployment, below are the server versions: root@byp:~ cat /etc/lsb-release DISTRIB_ID=Ubuntu DISTRIB_RELEASE=20.04 DISTRIB_CODENAME=focal DISTRIB_DESCRIPTION="Ubuntu 20.04.3 LTS" Base Software Once the ssh access configuration and general system updates were done, I installed the following packages: https://nixing.mx/posts/deploying-a-mern-stack-app-manually.html https://nixing.mx/posts/deploying-a-mern-stack-app-manually.html Fri, 03 Dec 2021 00:00:00 -0600 Exploring Namespaces in Linux Exploring Namespaces in Linux Published: 2021-04-27 | Last Updated: 2022-01-09 | ~9 Minute Read Table of contents Context As part of my journey into learning more about containerization technology I wanted to take a look at the core of what makes it all possible on a Linux system. I have done some things with Docker as well as LXC, however both of these technologies heavily rely on a Linux kernel feature that I'd like to better understand. So we'll be taking a look at this feature in this post. As a note I will be exploring these features on a Slackware system with Kernel version: `5.10.29` What are Namespaces? In a nutshell, namespaces are to processes what workspaces are to desktop environments. Namespaces are a tool to control how processes (and other system resources) and their children see the environment they're running in. This is used to separate and compartmentalize resources on the system. Another way to think of namespaces is as a way to determine what system resources can and cannot see each other. This depends on type of the namespace and an id (inode number) for proper separation. From the `namespaces` man page there are eight namespace types: Namespace Flag Page Isolates Cgroup CLONE_NEWCGROUP cgroup_namespaces(7) Cgroup root directory https://nixing.mx/posts/exploring-namespaces-in-linux.html https://nixing.mx/posts/exploring-namespaces-in-linux.html Tue, 27 Apr 2021 00:00:00 -0500 How to create a Wiki with Bourne to Blog How to create a Wiki with Bourne to Blog Published: 2021-01-24 | Last Updated: 2021-03-19 | ~13 Minute Read Context I have been looking for a way of documenting things that is easy to maintain, portable and resilient. There are many amazing wiki tools out there however, most that I came across either had too many features, making them bloated for my taste, or had too many requirements / dependencies thus complicating the installation process and maintenance. Since the inception of Bourne to Blog I have been trying to add features that make it a flexible tool and decided that it would be fun to use it to make a simple wiki system. Wiki Requirements This wiki is by no means full featured, however it does have the following traits: - Simple to use (Using markdown files only) - Simple to deploy (Therefore simple to rebuild) - Simple to maintain (As set-it-and-forget-it as possible) Infrastructure I'll only need two main servers: - One for hosting / building the wiki https://nixing.mx/posts/creating-a-wiki-with-bourne-to-blog.html https://nixing.mx/posts/creating-a-wiki-with-bourne-to-blog.html Sun, 24 Jan 2021 00:00:00 -0600 Using Linux Containers (LXC) on Slackware Using Linux Containers (LXC) on Slackware Published: 2021-01-21 | Last Updated: 2022-01-09 | ~5 Minute Read Context Ever since I started learning about containerized technologies and started playing with them I have been curious to know more about LXC. This technology is not as popular as other containerization technologies, like Docker for example, however I think it's worth exploring given the fact that its main dependency is the Linux kernel itself, so I thought I'd take a look at how it's used on Slackware. Base Configuration Using LXC is already well documented in the Slackware documentation, so it should be fairly straight forward. I will be using a system with the following specs for reference: root@server:~ cat /proc/cpuinfo | grep "model name" | uniq model name : Intel(R) Celeron(R) CPU J1800 @ 2.41GHz root@server:~ uname -r 5.10.4 root@server:~ cat /proc/cpuinfo | grep "model name" | uniq model name : Intel(R) Celeron(R) CPU J1800 @ 2.41GHz root@server:~ free -h | grep -E "Mem|total" | cut -d " " -f 11,15 total 7.7Gi https://nixing.mx/posts/using-linux-containers-on-slackware.html https://nixing.mx/posts/using-linux-containers-on-slackware.html Thu, 21 Jan 2021 00:00:00 -0600 Setting up Wordpress with Nginx, Varnish, Apache, PHP 7 and MariaDB Setting up Wordpress with Nginx, Varnish, Apache, PHP 7 and MariaDB Published: 2021-01-18 | Last Updated: 2021-02-02 | ~17 Minute Read Context I recently had to do a setup similar to this and I thought I'd share the process with you as well. This is not a full tutorial, it's more of an overview but I think it'll show the general idea behind how the setup was done. System specs These were the specs of the Debian server that I was working with. ubuntu@server:~$ free -h total used free shared buff/cache availabl Mem: 2.0Gi 42Mi 1.8Gi 10Mi 126Mi 1.8G Swap: 0B 0B 0B ubuntu@server:~$ uname -a Linux server 4.19.0-8-cloud-amd64 1 SMP Debian 4.19.98-1 (2020-01-26) x86_64 GNU/Linux ubuntu@server:~$ cat /proc/cpuinfo | grep model model : 85 model name : Intel(R) Xeon(R) Gold 6140 CPU @ 2.30GHz https://nixing.mx/posts/how-to-set-up-wordpress.html https://nixing.mx/posts/how-to-set-up-wordpress.html Mon, 18 Jan 2021 00:00:00 -0600 Dual boot using ELILO and rEFInd on Slackware Dual boot using ELILO and rEFInd on Slackware Published: 2021-01-10 | Last Updated: 2021-02-02 | ~5 Minutes Read Context After deciding to switch over to Slackware current due to a hardware upgrade I thought I'd also start using UEFI. This decision turned out to be interesting and beneficial in some ways. I will miss LILO As stated in the Slackware documentation LILO does not support booting from UEFI capable hardware. After many years of using LILO to manage my dual boot system I was quite sad to let it go. I was however happy to find out that ELILO was available inside the Slackware installation media, so I installed that instead. As a side note, I was pointed to GRUB2 as this is also available on Slackware however for some odd reason (probably my lack of familiarity with it) I was not able to install it successfully after following the provided documentation. I decided to continue with ELILO as it is perfect for my needs. Installing ELILO During the EFI installer you're asked if you'd like to install ELILO which is done thanks to the `eliloconfig` script written by Patrick Volkerding. I selected the following options and got ELILO installed: ![eliloinstall-1](/img/elilo1.png "ELILO Installation screen") ![eliloinstall-2](/img/elilo2.png "ELILO Installation screen") ![eliloinstall-3](/img/elilo4.png "ELILO Installation screen") https://nixing.mx/posts/dual-boot-slackware-using-refind-and-elilo.html https://nixing.mx/posts/dual-boot-slackware-using-refind-and-elilo.html Sun, 10 Jan 2021 00:00:00 -0600 Setting Thunar as Default File Manager Setting Thunar as Default File Manager Published: 2020-12-28 | Last Updated: 2021-02-02 | ~3 Minute Read Context I've recently updated to Slackware current due to some issues I was facing with my dual monitor setup. I upgraded my graphics card to an AMD GPU and the video drivers were not playing nice on Slackware 14.2. I had been toying with the idea of switching to the current branch of Slackware for some time but had always been reluctant due to the "high maintenance" required. With the above issue not letting me use my dual monitor setup, I was "forced" to upgrade to Slackware current. I've been having a great time with it, and have already learnt a few things about the booting process. But today I wanted to do a quick write up about one of the specific issues that I've experienced while using both Slackware 14.2 and Slackware current but addressed until now. Every time I would try to open a download in Firefox by going to "Open Containing Folder" from the Firefox UI, an application other than what I wanted for my file manager opened up. In Slackware 14.2 it was something completely unrelated to files, on Slackware current it was EasyTAG. This made it difficult to use features from programs like Firefox where a file manager was expected to open up when clicking on a certain section of the UI. Research I took to the web to find out why this was happening, I was pretty sure that this was occurring due to my using the i3 window manager instead of a desktop environment like XFCE. I didn't have this type of odd behavior on desktop environments like XFCE and KDE, and in case it did happen they probably have built in mechanisms to select your default applications. So I found out how it is that the programs are invoked while using i3, it's done via the xdg-utils package. This package has the xdg-open command which is used to open all sorts of applications when clicking on different UI elements from other programs such as Firefox. I had come across `xdg-open` in the past and use it in my i3 config file but this time I needed to to a bit more digging into how it works in order to fix this particular issue. I then found that I needed to supply a desktop entry for the application that I wanted to use. More information in general about the use of MIME Applications in XDG can be found here. Solution https://nixing.mx/posts/thunar-as-default-file-manager.html https://nixing.mx/posts/thunar-as-default-file-manager.html Mon, 28 Dec 2020 00:00:00 -0600 CSS Grid Navigation Bar CSS Grid Navigation Bar Published: 2020-08-20 | Last Updated: 2022-01-09 | ~8 Minute Read Finally updating my blog navigation bar Since the release of Bourne to Blog I have been wanting to add a CSS sample file, however the current navigation bar of the site was not to my entire liking. So I decided to update it so that way I can include a sample file for Bourne to Blog that contains a fully working CSS Grid core layout for others to modify at their whim. The Current solution Currently in the website menu bar I was using `float`s and it kept coming to mind that there had to be a way to do it with CSS Grid natively. The current solution is pretty simple and looks like the following: HTML: https://nixing.mx/posts/css-grid-nav-bar.html https://nixing.mx/posts/css-grid-nav-bar.html Thu, 20 Aug 2020 00:00:00 -0500 Update to my blogging workflow Update to my blogging workflow Published: 2020-08-17 | Last Updated: 2022-01-09 | ~10 Minute Read Motivation As I have stated before my blogging workflow had room for improvement and since then I have wanted to work on making it easier for myself to write posts. As I mentioned in that previous blog post I wanted to build this blog from scratch and seeing as I used a small bash script previously to create my blog posts I thought I would expand on that. Upon review of whether others had done the same in the past I came across other really nice bash tools to maintain and publish posts to a blog. The one with the most "fame" seems to be bashblog but there are also org-bash-blog and pandoc-bash-blog. Although those are really nice, and seem to be actively developed, I thought that if I used them I would not be adhering to the rules that I had set for myself, specifically the "from scratch" rule. So I decided to write my own version of a bash tool for this purpose and Bourne to Blog was born. Creation The thought process behind the script took my current workflow as a starting point, so I'd like to point out that the way I create my blog posts may not necessarily be the same way you do it. So I think it's very important to describe my current workflow. Initial Plan In my original post I briefly mentioned my overall workflow, but I will expand on that here. On some of the initial brainstorming sessions that I had when I first started my blog, I came up with the idea that the header and footer of the page for my blog posts were always going to be the same (static within static pages? :p). I wanted to focus on the blog post content rather than the hassles of maintaining a web site. So I decided to separate the header and footer files since they would always be the same, This allowed me to focus on the content of the posts and when I was ready to publish something I would simply concatenate the header and footer files to the post content to create the final website. https://nixing.mx/posts/update-to-my-blogging-workflow.html https://nixing.mx/posts/update-to-my-blogging-workflow.html Mon, 17 Aug 2020 00:00:00 -0500 My experience building Linux From Scratch (LFS) My experience building Linux From Scratch (LFS) Published: 2020-07-27 | Last Updated: 2022-01-10 | ~23 Minute Read Motivation I, probably as many others, have heard about the LFS book that is provided by the LFS project. This magical book provides the recipe to create your very own Linux system. I have been really excited to play around with this but have not had the time. I decided to make the time as this is something that I have looked forward to doing for a long time. I didn't really know how to record my progress with this though, at first I wanted to make sort of an ongoing series where I would update here with separate blog posts of my progress, however that seemed like a lot of work. I decided it's best to simply record my experience as I go and make a single post once I'm done. I only recorded the sections I found to be relevant, not the entire process package by package, so expect some parts of the book being skipped (mainly compilation sections). My Setup I thought about doing this on a VM, but I have a laptop that I'm not currently using for anything else, so I thought it would be good to have actual hardware to run this on and not take up CPU from my main desktop while compiling the packages. My current build system has the following specs: - Lenovo Thinkpad T440p - Intel(R) Core(TM) i5-4300M CPU @ 2.60GHz - 8GB RAM - 20 GB dedicated LFS partition - Slackware 14.2 https://nixing.mx/posts/my-experience-with-linux-from-scratch.html https://nixing.mx/posts/my-experience-with-linux-from-scratch.html Mon, 27 Jul 2020 00:00:00 -0500 Revamped the CSS for the blog Revamped the CSS for the blog Published: 2020-07-06 | Last Updated: 2021-02-02 | ~7 Minute Read Reason Lately I have been working on several web projects as practice for programming / web development. As part of those projects I have been looking for a way to write the CSS for them following the KISS principles. I know that there are amazing and fully fledged CSS frameworks like Bootstrap or Bulma but since I consider myself still a learner and not a full fledged developer, I try to stay away from them. I feel like learning how to use the frameworks won't help me learning CSS itself. Initial struggles One thing I had been having issues with was coming to terms with some sort of standard to use for the CSS in my projects. It was kind of hard to determine what should go first, what second, etc. I had tried to come up with different methods of my own as far as convention and syntax, but it was hard to remember from project to project. The alternative A friend with whom I was working with on my last project shared an interesting CSS project, Basic.css. I took a look and immediately thought it was a perfect way to do CSS for all of my projects. I really like the simplicity and usage of variables in CSS, I did not know vanilla CSS could do that, I'm guessing the SASS folks didn't either? :P Using the Basic.css core and then making my own tweaks to it, I came up with my own base CSS style file. In the future all I have to do is write minimal CSS for specific parts of whatever project i get to work on, and I'll have consistent and KISS compliant CSS. I feel like the flexibility is amazing, and I'll only write CSS that is actually used, instead of having 95% of a framework's features unused and their code taking up space unnecessarily. Updating the CSS for this blog https://nixing.mx/posts/css-update.html https://nixing.mx/posts/css-update.html Mon, 06 Jul 2020 00:00:00 -0500 RDP with dual monitor on Slackware and I3 Window Manager RDP with dual monitor on Slackware and I3 Window Manager Published: 2020-04-14 | Last Updated: 2021-02-02 | ~6 Minute Read Why? Recently I have been required to change my work dynamic due to the current pandemic, and I thought it'd be fun to have a setup where I remote into my work machine from Slackware and still have access to my Linux system (my work system is Windows based). I can easily disconnect when I'm done working and start working on other activities from Linux. Connecting via RDP to my remote system should be simple enough to achieve, but I found myself wondering how to achieve this simple task on my current setup. My Desktop Setup As you may know from my one of my previous posts I currently use the i3 window manager on my Slackware system. This has been great ever since that last post and no issues have come up whatsoever. I recently added another monitor to my setup and with that and my idea to remote into my work system I found myself in one of those situations where you have your setup just right and it's perfect but another variable just creeps in and now you have to figure out how to make a very specific setup work. In my case this specific scenario is the following: I want to RDP from my dual monitor system to my non dual monitor system and I want to be able to use the remote system as if it were connected to both of my displays...on i3. Specifically I wanted to be able to use both screens that I have on my client system (Slackware) as if they were physically connected to my remote system (Windows), i.e. open a browser on one monitor and my email application on another monitor and have them both be full screen, and have audio input from my client system be sent to the remote system as well as audio from the remote system be sent back to the client system. Initial Dabbling I went on to Google and did some homework, I found other posts related to my same scenario, thankfully, which helped me get some sort of direction as this is the first time I deal with this sort of setup. Specifically I found this reddit post which sort of detailed what I was facing, then this other post which further expanded on the first. These two posts and additional google results got me to a point where I could RDP in successfully, which was a great start point, but neither of the two main requirements were met yet, so I was gonna have to keep digging into the matter. What I was able to come up with after the initial research was this command for xfreerdp: xfreerdp /u:username /v:ipaddress /sec:tls /multimon /rfx -grab-keyboard +fonts https://nixing.mx/posts/dual-monitor-rdp.html https://nixing.mx/posts/dual-monitor-rdp.html Tue, 14 Apr 2020 00:00:00 -0500 Age Calculator Project Age Calculator Project Published: 2020-04-12 | Last Updated: 2021-02-02 | ~12 Minute Read Motivation I watched a video about time as a life resource a while back and it really struck me. The way they explained the amount of time we have in life and how we choose to use it resonated with me. I have also been watching a Netflix series lately that deals with time, Dark. Both of these along with the current search for a programming / web development project led me to come up with an idea of representing our age in a way that provides better perspective of how much time we actually have. The HTML I started with a simple HTML file, only the necessary items on the page. I did add a few `id`s to the HTML for the Javascript of the page. This is what I came up with: https://nixing.mx/posts/age-calculator.html https://nixing.mx/posts/age-calculator.html Sun, 12 Apr 2020 00:00:00 -0500 Using Slackware Docker Containers Using Slackware Docker Containers Published: 2019-10-27 | Last Updated: 2022-01-09 | ~15 Minute Read Introduction Since I have been playing around with Docker and I really like Slackware Linux I thought a combination of the two would be amazing. I looked around the Docker Hub in order to see if there were any images that I could use. I didn't find any official images, however I found an image created by vbatts that I could use, awesome! Although that was a great way to see Slackware on Docker there was a small itch on my mind for making a base image on Docker that had nothing to do with any other image or base out there. A truly trusted image that I could use for deploying things on with a bit of peace of mind in that regard. Vincent has also created the necessary information in order to do that, yup he's amazing. So with the focus that Slackware has on stability and the ease of deployment of Docker I couldn't wait to start using Slackware Docker containers. Initial Troubles Although I really wanted to start making my own base images I was left scratching my head after seeing a `Makefile` on vbatts' repository for Slackware on Docker. Why was a Makefile being used in this context? It turns out that when creating custom images for docker it is more common than not to use Make in order to get a set of mechanisms in place to differentiate the requirements of one part of the build and another. My guess here is that vbatts is using this method for that reason. So with that bit of information now in mind it made more sense to see a Makefile in the documentation. Now I had to see how the script worked. Creating our first Slackware Docker image I got to work on the image, I wanted to see a dry run of what make would be doing in order to better understand the process that I was about to launch, so after cloning the repository to my system I did: $ make --dry-run https://nixing.mx/posts/slackware-on-docker.html https://nixing.mx/posts/slackware-on-docker.html Sun, 27 Oct 2019 00:00:00 -0500 Setting up RSS Manually for my blog Setting up RSS Manually for my blog Published: 2019-10-24 | Last Updated: 2022-01-09 | ~5 Minute Read Initial Thoughts So I have been looking for a way to set up RSS for my blog in the past couple of weeks, however I'm not fond of using a web tool for what seems like such a simple task. I wasn't really familiar with how to create an RSS feed and it seems like everyone is more concerned with how to *read* an RSS feed. I must admit I was part of latter rather than the former. I tried to look around for simple scripts that did this, and found all sorts of things from PHP libraries to online tools that crawl your website and then generate the RSS file. That all seemed great but I really didn't know what those tools did, I'd rather know. Another thing that created a pain was that I really wanted to do it now, so writing it from scratch seemed like the option to go with, however seeing as I'm currently still learning CSS/Javascript, and my plan is to move over to PHP once "I'm ready", I thought I shouldn't put too many things on my plate all at once. As I researched about this I looked at how RSS was actually created and its story, and found it's latest definition and took a look at it. I had not actually taken the time to look at what an actual file was comprised of. It's not that complicated, so I thought I would do it by hand at this stage since I only actually have a handful of blog entries thus far. I suppose that as the entries grow I would have to find a method of updating the RSS file programmatically, however I believe that for now and for the posts I have, creating it manually shouldn't be that bad or time consuming. Configuration So I simply got a sample file from the documentation posted by Harvard and read the field descriptions and wrote it out. This is the sample file that I got: https://nixing.mx/posts/setting-up-rss-manually.html https://nixing.mx/posts/setting-up-rss-manually.html Thu, 24 Oct 2019 00:00:00 -0500 Setting up Nginx as a reverse proxy using Docker Setting up Nginx as a reverse proxy using Docker Published: 2019-10-22 | Last Updated: 2021-02-02 | ~30 Minute Read Why? I have been looking at some cloud technologies lately, specifically kubernetes, and since docker is at the heart of it, or containers anyway, I decided to learn about the core tech that makes these technologies work. I had never used this kind of technology up until about a year ago, so it's still all fairly new to me. I have a couple of services that I like to run for myself, however they're all using virtualization instead of containerization so I wanted to test how this new way of doing things stacked up against the previous. Setting up I will be using Slackware 14.2, I will be installing docker CE from the slackbuilds scripts as well as docker-compose. At the time of writing the versions of each package are as follows: Docker: $ docker version Client: Version: 18.09.2 API version: 1.39 Go version: go1.11.9 Git commit: 6247962 Built: Fri Sep 20 03:53:54 2019 OS/Arch: linux/amd64 Experimental: false https://nixing.mx/posts/nginx-reverse-proxy-on-docker.html https://nixing.mx/posts/nginx-reverse-proxy-on-docker.html Tue, 22 Oct 2019 00:00:00 -0500 Setting up my blog Setting up my blog Published: 2019-10-17 | Last Updated: 2021-02-02 | ~6 Minute Read The Why I thought about doing a blog originally about 5 years ago, I wanted to have some type of outlet but I didn't think I would have enough to say, so I kept putting it off mainly due to that thought. After some time I just decided to go forward with it and see how it went rather than make up excuses about how I wasn't going to have enough content for it. The idea behind this blog is to document all things related to my progress in the Linux world and programming / web development. I wanted to have a blog that complied with a few basic rules: 1. It had to be technical in nature 2. It had to be made entirely from scratch 3. It had to look modern enough for my liking 4. I had to do it with basic tools, mainly vim These basic rules, specially the second one, really weren't all that bad except that I had no idea how to do it. I took a look at several of the tools out there like jekyll which has free github hosting as well. But that just didn't seem like something I would be happy with. "Hey wanna check out my blog, I was lazy about it and just threw on it on github"... Not that there is anything wrong with doing it that way, it just didn't seem to work well with the goals I had set for the blog. I later took a look at other similar tools like Next.js, Hugo and Gatsby. Again, all of these were great, but I just had a different approach to it all in my mind. I wanted to really learn how to do it, how to develop it all. There was generally one problem with that, it was absolutely daunting to think of creating something that is better than what open sourced frameworks did. I mean, there are literally thousands of commits to these projects, all done by much more experienced developers than myself. This is something that kept making me want to just tuck my nice little idea away, but my idea of doing it from scratch was just too stuck in my mind for me to give up on it, and by the same token, the idea of doing it all on my own was just too intimidating to get started. After this initial vicious cycle of doubt and negativity, I got interested in several fields that were new to me and wanted to learn more about, mainly cloud technology. Things like docker, cloud vendors and kubernetes popped up on my radar. This was the moment of inflection for me, I just had to get something done. https://nixing.mx/posts/blog-creation.html https://nixing.mx/posts/blog-creation.html Thu, 17 Oct 2019 00:00:00 -0500 i3 Window Manager freezing unexpectedly on Slackware 14.2 i3 Window Manager freezing unexpectedly on Slackware 14.2 Published: 2019-10-16 | Last Updated: 2021-02-02 | ~6 Minute Read Background I have sort of put this issue to the side in hopes of it going away on it's own or with an update from the distro maintainers to no avail (Not that this is the right way to do things, but as is to be expected from a human being, well...I get lazy :P ). The current behavior remains after putting this off a bit over a year. This is when I decided to actually go down the rabbit hole and attempt to get down to the bottom of the issue and fix it. In the mean time I have switched to XFCE for my DE so that I can actually use my system. So I suppose you can say that I have been hiding from the problem in hopes that someone else will fix it. No one had fixed it, (at least to my knowledge, and it was still occurring on my system anyway) so I had finally had enough of putting up with a system that is not to my entire liking. Not to say anything bad about XFCE and now with the new XFCE 4.14 being released I bet it's amazing, and better than ever. I honestly can't wait to try it out, but I really would like to just have the i3 Window Manager working and use it as my daily driver. Symptoms This is what is happening on my system: 1. Everything is working as expected when booting 2. Open the Firefox web browser, navigation occurs as usual 3. Close the FIrefox web browser, desktop suddenly freezes upon closure. 4. No response from any command on keyboard (including `CTRL+F2` to attempt and get a TTY) 5. A hard shutdown has to be done in order to recover the system 6. Once the system is back up after a shutdown / restart, i3 works as expected Troubleshooting So without further delay I got to checking what the issue really was. The first step I took was to Google whether or not this issue had already been reported by others. It seemingly was, I found out that there was an issue already reported on i3's github repository. This issue was reported as closed and fixed later by this issue. Since I had the issue still occurring on my system, I went through the debugging instructions that the i3 team recommends, below are the results: https://nixing.mx/posts/i3-freezing.html https://nixing.mx/posts/i3-freezing.html Wed, 16 Oct 2019 00:00:00 -0500