Tag: ubuntu
Advent 2023: MOTD on Ubuntu
I never intended for this Advent 2023 series to be a "Matthew's Bash Tips" series, but evidently, that's where things are going.
Today, I detail how to get the "message of the day" on Ubuntu
Managing Multiple PHP versions via the ondrej/php PPA
Last week, I did some system updates, and then decided to compile the most recent PHP releases. I've used phpbrew to manage multiple PHP releases for a number of years, and having it install a new version is fairly routine.
Except this time, it wasn't. Due to updates I installed, I was getting errors first with compiling the GD extension, then with ext-intl:
-
If you want Freetype support in ext-gd, you are expected to install the package libfreetype-dev. On Ubuntu, this now installs libfreetype6-dev, which no longer includes the
freetype-config
binary that PHP'sconfigure
script uses to determine what features it supports. -
Similarly, ext-intl depends on the package libicu-dev. Ubuntu's package now omits the
icu-config
binary used by PHP to determine feature support.
I searched for quite some time to find packages that would resolve these problems. I could have found the source code and compiled it and linked to that, but that would mean keeping that up-to-date on top of my PHP installs.
I even looked in the ondrej/php PPA, as that repository has multiple PHP versions already, including source packages.
And then I thought: why not try using those instead of phpbrew?
The rest of this post is how I made that work.
Fixing gnome-shell app indicators in Ubuntu
I am a long-time gnome-shell user. I appreciate the simplicity and elegance it provides, as I prefer having a minimalist environment that still provides me easy access to the applications I use.
That said, just as with any desktop environment, I've still run into problems now and again. One that's been plaguing me since at least the 18.04 release is with display of app indicators, specifically those using legacy system tray APIs.
Normally, gnome-shell ignores these, which is suboptimal as a number of popular
programs still use them (including Dropbox, Nextcloud, Keybase, Shutter, and
many others). To integrate them into Gnome, Ubuntu provides the gnome-shell
extension "kstatusnotifieritem/appindicator support" (via the package
gnome-shell-extension-appindicator
). When enabled, they show up in your
gnome-shell panel. Problem solved!
Except that if you suspend your system or lock your screen, they disappear when you wake it up.
Now, you can get them back by hitting Alt-F2
, and entering r
(for "restart")
at the prompt. But having to do that after every time you suspend or lock is
tedious.
Fortunately, I recently came across this gem:
$ sudo apt purge indicator-common
This removes some packages specific to Ubuntu's legacy Unity interface that interfere with how appindicators are propagated to the desktop. Once I did this, my appindicators persisted after all suspend/lock operations!
Fixing AMD Radeon Display Issues in Ubuntu 14.10
After upgrading to Ubuntu 14.10, I faced a blank screen after boot. As in: no GUI login prompt, just a blank screen. My monitors were on, I'd seen the graphical splash screen as Ubuntu booted, but nothing once complete.
Fortunately, I could switch over to a TTY prompt (using Alt+F1), so I had some capacity to try and fix the situation. The question was: what did I need to do?
Server Upgrades... lost entries...
My good friend, Rob, hosts my site for me, in return for helping with server maintenance. After being on Gentoo for the past three years, though, we decided it was time to switch to something a little easier to maintain, so last night we wiped the system partitions and installed Ubuntu server.
I'll say this: the setup is much faster! However, we had a few gotchas that surprised us — it didn't setup our RAID array out-of-the-box, which led to a good hour of frustration as we tried to verify that the install wouldn't wipe it, and then to verify that we could re-assemble it. (We succeeded.) Additionally, we second-guessed a few things we shouldn't have, which led to needing to back out and reconfigure. But what was over a 12 hour install with Gentoo we accomplished in a matter of a few hours with Ubuntu server — so it was a huge success that way.
Unfortunately, our mysqldump of all databases… wasn't, a fact we discovered only after importing it into the new system. I ended up losing my blog database and PEAR channel database. Fortunately, the PEAR channel has not changed at all in the past year, so we had an old backup that worked, and I had a snapshot of my blog database from three weeks ago I was able to use. As a result, there are a few missing entries, but for the most part, all works. If you commented on one of those missing entries, my apologies.
Now that the install is done, I'm also finalizing some design changes to my blog — it's time to leave the black and white for more colorful grounds. Look for a revamp in the coming weeks!
Gutsy Gibbon review
Early in the week, I decided to avoid the release rush and go ahead and update my laptop to Ubuntu's Gutsy Gibbon release. Overall, it's quite good, with one caveat I'll elaborate on later.