Ubuntu

Bash: A Simple Script for Changing Display Brightness with XRANDR

I run two external displays on my laptop; the brightness keys on the laptop don't affect them. I could probably find an app or extension for Xubuntu to handle dimming the displays, but since I spend a lot of time on the command line, it's just as easy to dim them from there with the help of XRANDR and a simple Bash script. This post outlines how to set the script up. I'll also cover an optional "night mode" that reduces blue gamma from the display.

If you're on Xubuntu, Ubuntu, or just about any other flavor of Linux, you're probably using the X server to handle your display configurations. That should also mean that you have XRANDR available on the command line. XRANDR can change display configurations in any number of ways, but today I wanna look at it for controlling brightness. Here's the deal, though: I don't wanna have to memorize yet another command line syntax just to dim my monitors. Whichever way XRANDR handles the dimming, I'm gonna move it into a Bash script and alias it so I can adjust brightness on the fly!

Relative Symlinks for Removable Media/Devices

Symlinks can be a useful and sometimes necessary part of working on the command line. They're often used with absolute paths, extending from either root directories or your user folder. If you're working on a removable disk, however, absolute paths might change depending on which user has the disk mounted. In this case, using relative paths for you symlinks is a great way to ensure they work regardless of who mounts them. Here's a look at how this can be done.

If you've ever used removable devices across multiple user profiles, you might have noticed that, once mounted, the path to the drive changes depending on user. Here's a quick example: suppose I have two users/profiles on a computer and one removable disk named "Extras". For each user, once the disk is mounted, the path to the disk would vary--like this:

Launch Xampp from Linux Command Line -- The Easy Way

Quick and easy ways to Launch XAMPP from the command line with aliases.

Start & Stop -- The Easy Way!

You've installed XAMPP for Linux! Congratulations! Now that it's installed, how do you get it running? ApacheFriends has you covered for the basics, of course, but their methods make use of the command line, and aren't exactly efficient in terms of keystrokes.

If all you need to do is get services (Apache, MySQL, ProFTPD) started or stopped, ApacheFriends suggests you use the following:

Ubuntu: Déjà Dup Backup Failed to Execute Child Process

It's just the way of Linux, especially on legacy hardware: every now and then you screw things up beyond repair--like when you change graphics drivers and can no longer access a login screen. I recently got myself in a pinch and, after hitting my head against a wall for several hours, decided that I'd look at reinstalling Ubuntu and restoring from a Duplicity/Deja Dup backup. Unfortunately, my first attempts to restore the backup presented me with an error that seems to be somewhat common. The fix, as often seems to be the case, was a simple permissions change.

Background

I should know better than to mess with drivers on my old Mac Pro -- the hardware is finicky at best. Out of curiosity, though, I decided the other day to switch to an Nvidia driver. Big mistake!--I soon found myself unable to get to the login screen, and attempts to even get into the command line weren't particularly fruitful (an issue, I suspect, with the boot disk being encrypted).

Ubuntu: Disk Permissions & Multiple User Profiles

This is probably a no-brainer for advanced Linux users, but for newbies it may strike as awkaward that if you create/partition a disk with one user on your computer, another user won't automatically have "access" to it. This is a good opportunity to revisit the function of permissions in Linux--a quick review of Users and Groups.

TL;DR

When creating a partition, the "Disks" application/utility sets permissions to 700 by default (read/write/execute access for the disk owner only). You'll want to change that if you've got multiple users who need to access the disk on your computer. I'll discuss solutions below.

Weekly Recap: .htaccess Fun, Ubuntu Encrypted Drive Fun, Xubuntu Password Fun

Just a quick recap of all the fun I had this week. No great revelations here, but sometimes it just feels good to vent.

Don't Try This at Home, Kids

As a general rule I don't like to push changes to a client's .htaccess file during business. If you've ever had the pleasure of working with regular expressions (regex), you'd know why. This is largely a holdover, however, from my earlier days as a developer--when regex seemed about as intuitive as ancient Chinese.

Ubuntu: Recovering Encrypted Files with Ecryptfs-Util

It's easy to get turned around on this, so here's a little walkthrough. Once you get the hang of it, recovering encrypted files should be more or less easy.

Background

One of my first Linux installs was Xubuntu on a 2008 MacPro (at two 3Ghz processors with 4 cores each, 15.6 Gb RAM, and an upgraded GeForce GTX card, it's still a contender in 2020). I bought the computer, prior to upgrade, for about $350 on eBay as a pet project, hoping it could take the place of my 2012 Mac Mini--a computer Apple was no longer looking to support with OS releases. The idea was to install Xubuntu on the MacPro and let one of Apple's last decent computers shine anew. At the time, it seemed like a pain to get Xubuntu to play nice with Apple's hardware.

Drupal 9 Upgrade: Start to Finish

Good news: after all the sweat and blood of getting our site ready, the upgrade took all of 30 minutes. This really may be the easiest Drupal upgrade in a decade. It's still not for the faint of heart. Here's a quick recap on the steps necessary to do this upgrade. I'll be sure to link back to my previous articles so you can see the work and challenges involved with each step in detail.

Drupal 9 Up Front

Compared to all the work that went into prepping the site, the actual upgrade is a walk in the park. I'll be sure to cover the actual upgrade process in Step 5 of this article; I'd like to do a quick recap on the entire process, though--so, if you've already read my earlier Drupal 9 Upgrade posts, feel free to skip to Step 5. Otherwise, let's reconnect with what the basic steps are for a D8 to D9 upgrade.

Drupal 9 Upgrade: Issues with Composer

The upgrade from Drupal 8 to 9 has been hailed by Drupal.org as the easiest upgrade in a decade. The first steps in the upgrade process look to be getting your testing environment in order... for me, that means working through a couple of nasty headaches with Composer (self inflicted... of course).

It's been a long couple of weeks...

... long...

Enabling Japanese Language Input on Xubuntu

There's a lot of documentation for Ubuntu on how to setup foreign language inputs--not so much for Xubuntu (a.k.a. XFCE Ubuntu). Here's a quick walkthrough!

I run Xubuntu on my work computer; I'd run straight-up-Ubuntu, but it's just too late--too much of a pain to migrate at this point. For my foray into Linux distros, I wanted a light build and Xubuntu was my weapon of choice. For the most part, Xubuntu and Ubuntu are sibling OS'es, though. And, this means that if I ever need to figure out how to fiddle around with Xubuntu, the Ubuntu forums are generally the best place to start.