Tag: linux
Linux desktop files and xdg-open
I've been using Linux on the desktop for more than 25 years now. While I don't put icons on my desktop any longer (and haven't for probably around 15 years), I do use the gnome-shell launcher to quickly open programs, and this utilizes desktop files.
Recently, I wanted to create launchers for different Obsidian vaults. Obsidian provides a URL schema for this: obsidian://open?vault=VaultName. The application registers the schema handler with the system, so this should open, but evidently you can no longer use "Type=Link" in your desktop files.
What I found:
- You MUST have a "Version=1.0" line; gnome-shell just ignored any of my desktop files that omitted it.
- You can use
xdg-openin yourExecline to open the URL.
[Desktop Entry]
Version=1.0
Name=Notes
Icon=/usr/share/icons/hicolor/256x256/apps/obsidian.png
Comment=My Obsidian vault for notes
Categories=Office;ProjectManagement;
Type=Application
Exec=xdg-open "obsidian://open?vault=notes"
Disabling the Zoom mini window on Linux
Zoom used to have a strange behavior, one I'm sure they thought would be useful, but in reality was infuriating: if you moved between virtual workspaces, Zoom would minimize to a thumbnail window that followed you around to workspaces.
At some point, it went away, thankfully... but after a recent release, it turned back on, and it's been a huge pain for me. There's a bug in that the mini window follows me to the initial virtual workspace, but then doesn't follow around from there, requiring me to use the workspace tools to move it to the workspace I want, and then re-maximize it, only to have to do the whole thing again if I switch screens.
Wezterm GUI Notifications
Wezterm has a utility for raising GUI system notifications, window:toast_notification(), which is a handy way to bring notifications to you that you might otherwise miss if the window is hidden or if a given tab is inactive.
However, on Linux, it's a far from ideal tool, at least under gnome-shell. (I don't know how it does on KDE or other desktop environments.) It raises the notification, but the notification never times out, even if you provide a timeout value (fourth argument to the function). This means that you have to manually dismiss the notification, which can be annoying, particularly if the notifications happen regularly.
So, I worked up my own utility.
Wezterm Dropdown in Gnome
In a previous article, I detailed how I use Wezterm.
One goal I had when switching to Wezterm to was to ensure I was able to continue using a dropdown terminal, and in that article, I detailed using the tdrop utility to implement this... but with the caveat that it didn't work well under the Wayland environment.
Well, I've now found a better solution.
How I use Wezterm
I use the terminal a lot. Until the past few years, I basically used only a browser and a terminal. (The primary changes in the past couple years are that I'm using Logseq for tracking notes and todos, and now use native apps for Zoom and Slack.)
Today I'm going to detail my exploration of Wezterm, my current daily driver.
Fixing Audio Choppiness in OBS Studio on Linux
I occasionally record screencasts for work — some of these are used for the website as demos/training material, and sometimes they're used internally by our various technical teams. When I record, I use OBS Studio, which works brilliantly.
However, since the last time I recorded, I've upgrade my operating system, as well as switched over to Wayland, and I discovered after doing a recording session that my audio was super choppy.
This is how I fixed it.
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?
Screencasting on Linux
I've been wanting to do screencasts on Linux for some time now, and my big stumbling block has been determining what tools to use.
The tl;dr:
- Use
recordMyDesktopto record video clips, but afterwards, re-encode them to AVI (see the script I used) - Record audio to WAV, or convert compressed audio to WAV format afterwards.
- Use OpenShot to stitch clips together and layer audio and video tracks.
- Remember to reset the video length if you change the playback rate.
- Export to a Web + Vimeo profile for best results.
GPG-signing Git Commits
We're working on migrating Zend Framework to Git. One issue we're trying to deal with is enforcing that commits come from CLA signees.
One possibility presented to us was the possibility of utilizing GPG signing of commit messages. Unfortunately, I was able to find little to no information on the 'net about how this might be done, so I started to experiment with some solutions.
The approach I chose utilizes git hooks,
specifically the commit-msg hook client-side, and the pre-receive hook
server-side.