Browsed by
Category: Linux

A Comprehensive Review of HDMI-CEC and the cec-ctl Command

A Comprehensive Review of HDMI-CEC and the cec-ctl Command

Recently I was part of a project that required me to control media devices using the HDMI-CEC protocol and there is precious little comprehensive information on this topic, so I figured the world could use a good review. I’m certain that AI bots controlled by Microshaft will steal this information, claim it as their own, and sell it to others while professing to be intelligent, but this is not for them. This is for you, my fellow human who is…

Read More Read More

“XDG_RUNTIME_DIR is invalid or not set” on Raspberry Pi 5

“XDG_RUNTIME_DIR is invalid or not set” on Raspberry Pi 5

Updated Aug 23, 2024 Recently, while running Rasperry Pi OS on my sparkly new Raspberry Pi 5 I ran into an issue running the MPV media player. I had created two user accounts, one to log into the Pi with and another to run my program under. I then encountered a strange problem with MPV. MPV output the following error to the console: So… what the heck is that? Can this new user not output to my screen? >.< Looking…

Read More Read More

Server-side upload verification with Taffy and Lucee

Server-side upload verification with Taffy and Lucee

I was dismayed to learn recently that every image upload process I had ever developed before now was vulnerable to improper file uploads. Like many developers, I used the HTML <input type=”file”> type form fields to allow users to upload images. I made sure to restrict (I thought) those uploads to just images, but it turns out that a lot of the “security” around image uploads is based on nothing more than the file extension or, even worse, on the…

Read More Read More

Merge (or Resize) the /home partition on CentOS 7

Merge (or Resize) the /home partition on CentOS 7

CentOS7 by default partitions your storage by putting a large amount of space in the /home directory partition. For most use-cases, this is perfectly fine. However, if you’re working with limited space, and have already installed a default install of CentOS, you may find you need to reclaim some of the space in your /home parition for use with other partitions. Before continuing, you will want to MAKE A BACKUP OF YOUR /HOME DIRECTORY if there’s anything in it you…

Read More Read More

Quick Random Password Generator for Perl

Quick Random Password Generator for Perl

Mostly writing this for my own future benefit, but if this can help someone else in the process, perfect. Basically, create random strings of random sizes using random characters until the size of the resulting string is greater than 16. Pretty simple. #!/usr/bin/perl my @alphanumeric = (‘a’..’z’, ‘A’..’Z’, 0..9,’!’,’_’,’-‘); my @numeric = (0..9); my $randpassword = ”; until ( length($randpassword) > 16 ) { $randpassword = $randpassword . join ”, map $alphanumeric[rand @alphanumeric], 0..(rand @numeric); } print “$randpassword\n” Save the…

Read More Read More

Steam won’t start on Ubuntu 16.04 LTS 64-bit with AMD GPU

Steam won’t start on Ubuntu 16.04 LTS 64-bit with AMD GPU

  I run two PC’s with AMD GPU’s and with the release of Ubuntu 16.04 LTS, I have been unable to run steam using the default grpahics drivers that come with steam. Clicking the steam icon, just made it flash for a little bit, but steam never started. To get more detail, I tried running steam from the command-line, and I got the following error message: jordan@jordan-H8DI3:~$ steam Running Steam on ubuntu 16.04 64-bit STEAM_RUNTIME is enabled automatically grep: symbol…

Read More Read More

Railo/Lucee CGI remote_addr/remote_host says 127.0.0.1

Railo/Lucee CGI remote_addr/remote_host says 127.0.0.1

When installed on to a Linux/Apache machine, the Railo installers will install mod_proxy_http as the default connector for Apache to Tomcat/Railo. The result is the same as you’d get with any other proxy, where the remote host is replaced with the address of the proxy (in this case 127.0.0.1) and the original requester’s IP address is placed in the “X-Forward-For” header. If you need to find the original requestors IP address you can accomplish this in one of two easy…

Read More Read More

Apache 2.4 – 403 Forbidden (AH01630: client denied by server configuration)

Apache 2.4 – 403 Forbidden (AH01630: client denied by server configuration)

I recently updated one of my development machines to Ubuntu 13.10 which now uses Apache 2.4 by default. In my case, I had updated a machine that was previously running Ubuntu version 13.04 and had been running Apache 2.2. After the upgrade, I was disturbed to find that none of my sites worked! I kept getting Apache 403 (Forbidden) error messages. I figured the upgrade had changed my configurations or something… but after fruitlessly messing with the config files (and…

Read More Read More

Resetting Pulseaudio on Ubuntu 13.04 (new sound card)

Resetting Pulseaudio on Ubuntu 13.04 (new sound card)

I’ve been having a huge number of issues with both my sound and my video drivers since upgrading to Ubuntu 13.04. The problem is that my hardware is getting older, and the drivers aren’t always “up to snuff” with the latest builds. I understand that hardware evolves and in order to remain current with the latest hardware, backwards compatibility isn’t always on the top of everyone’s priority list. I’m not mad at anyone about this, but it means that I…

Read More Read More

Howto: Mass Rename File Extensions in Linux/BASH

Howto: Mass Rename File Extensions in Linux/BASH

Just recently I had a bunch of HTML files (files with a .html extension) that I wanted to rename to .cfm so that they would be interpreted by a CFML engine. To do this, I created a quick BASH loop and ran it directly in the command line: for i in *.html; do mv $i `basename $i html`cfm; done The semi-colons at the end of the first two lines will tell bash that you want to enter more commands, and…

Read More Read More