Shallow Thoughts : : linux

Akkana's Musings on Open Source Computing and Technology, Science, and Nature.

Sat, 22 May 2021

Mutt mailer: Show Messages With Attachments

A discussion on the Mutt-Users list a while back involved someone trying to configure mutt to show on the index screen which messages had attachments.

I had no idea that was possible! But it's something I've wanted for ages. Normally, mutt shows a list of attachments after the end of the email message. That was useful back in the day when people trimmed their email messages; but now, when most people append the contents of an entire message thread going back several weeks, scrolling down to the end of an email message is barely even possible.

What I'd really like is to see in the message view whether the message has attachments -- up at the top of the message, along with the headers. But showing it in the folder index would be a great start.

What Constitutes an Attachment?

First you have to define what attachments you care about. Most normal email messages have attachments just for the text.

Read more ...

Tags: , , ,
[ 10:46 May 22, 2021    More linux | permalink to this entry | ]

Fri, 11 Sep 2020

Key Bindings for Copy and Paste Under X11

In the previous article I wrote about how the two X selections, the primary and clipboard, work. But I glossed over the details of key bindings to copy and paste the two selections in various apps.

That's because it's complicated. Although having the two selections available is really a wonderful feature, I can understand why so many people are confused about it or think that copy and paste just generally doesn't work on Linux -- because apps are so woefully inconsistent about their key bindings, and what they do have is so poorly documented.

"Why don't they all just use the standard Ctrl-C, Ctrl-V?" you ask. (Cmd-C, Cmd-V for Mac users, but I'm not going to try to include the Mac versions of every binding in this article; Mac users will have to generalize.)

Simple: those keys have well-known and very commonly used bindings already, which date back to long before copy and paste were invented.

Read more ...

Tags: , ,
[ 12:54 Sep 11, 2020    More linux | permalink to this entry | ]

Mon, 07 Sep 2020

X is for the X Selection: Copy and Paste on Linux

There's so much confusion about copy and paste in Linux. Many people, coming from the Windows or Mac worlds, complain about copy/paste not working right. And while it's true that some apps don't handle copy/paste very well (Firefox in particular is notably flaky in this area), usually the problem is that nobody has ever told them about one of Linux's best features: the two types of selection, Primary and Clipboard.

The Primary Selection

When you sweep your mouse across some words to highlight them, or double-click to highlight a word, or triple-click to highlight a line, whatever you've highlighted is now in the primary selection.

Read more ...

Tags: , ,
[ 12:28 Sep 07, 2020    More linux | permalink to this entry | ]

Fri, 14 Aug 2020

V is for Video Editing with Shotcut

I have a new camera, a Sony a6100. Frustrated with the bugs and limitations of my ancient Rebel XSi, I decided to jump into the world of mirrorless cameras.

So far I'm pleased with it (though sometimes frustrated by its Byzantine menu hierarchy). One of its nice features, which the Rebel didn't have at all, is movies, and I've been shooting a lot of short movies of radio controlled airplanes when we fly at Overlook Park.

That's the problem: a lot of short movies. I'd like to make them available on YouTube so that my fellow pilots can see them; but uploading a movie to YouTube is a low and elaborate process, and uploading eight or so short clips of less than a minute each is just too much work. It would be so much easier if I could edit them together and upload just one movie.

Time to learn some basic video editing.

Read more ...

Tags: ,
[ 16:02 Aug 14, 2020    More linux | permalink to this entry | ]

Sun, 05 Jul 2020

Q is for Quadraphonic

... which is what I have now on my Carbon X1 gen 7 laptop.

Early reviews of this particular laptop praised its supposedly excellent speakers (as laptops go), but that has never been apparent on Linux.

It is an improvement over the previous version -- the microphone works now, which it didn't in 19.10 -- though in the meantime I acquired a Samson GoPro based on Embedded.fm's recommendation (it works very well).

But although the internal mic works now, the sound from the built-in speakers is just terrible, even worse than it was before. The laptop has four speakers, but Ubuntu is using only two.

Read more ...

Tags: , ,
[ 12:44 Jul 05, 2020    More linux | permalink to this entry | ]

Thu, 07 May 2020

PulseAudio from the Command Line

Controlling PulseAudio from the Command Line #tags linux,audio,pulseaudio,ubuntu,cmdline

Controlling PulseAudio via pavucontrol is all very nice, but it's time consuming and fiddly: you have to do a lot of clicking in a lot of tabs any time you want to change anything.

So I've been learning how to control PulseAudio from the command line, so I can make aliases to switch between speakers quickly, or set audio defaults at login time.

That was going to be a blog post, but I think this is going to be an evolving document for quite some time, so instead, I just made it a page on the Linux section of my website: Controlling PulseAudio from the Command Line.

I also wrote a Python script, pulsehelper.py, that uses some of these commands to provide clearer output and easier switching. It even uses color and bold fonts if you have the termcolor module installed. Like the document, this script is likely to be evolving for quite some time.

Happy listening and recording!

Tags: , , ,
[ 12:21 May 07, 2020    More linux | permalink to this entry | ]

Mon, 04 May 2020

PulseAudio via GUI: Pavucontrol

(Note: this is not an alphabet post. You may have noticed I'm a little stuck on I. I hope to get un-stuck soon; but first, here are a pair of articles on configuring audio on Linux.)

I'm a very late adopter for PulseAudio. In the past, on my minimal Debian machines, nearly any sound problem could be made better by apt-get remove pulseaudio. But pulse seems like it's working better since those days, and a lot of applications (like Firefox) require it, so it's time to learn how to use it. Especially in these days of COVID-19 and video conferencing, when I'll need to be using the microphone and speakers a lot more. (I'd never actually had a reason to use the microphone on my last laptop.)

Beginner tutorials always start with something like "Go into System Preferences and click on Audio", leaving out anyone who doesn't use the standard desktop. The standard GUI PulseAudio controller is pavucontrol. It has four tabs.

[Configuration tab in pavucontrol]

Read more ...

Tags: , , ,
[ 18:04 May 04, 2020    More linux | permalink to this entry | ]

Mon, 30 Mar 2020

D is for Devilish Place Names

It was surprisingly hard to come up with a "D" to write about, without descending into Data geekery (always a temptation). Though you may decide I've done that anyway with today's topic.

Out for a scenic drive to shake off some of the house-bound cobwebs, I got to thinking about how so many places are named after the Devil. California was full of them -- the Devil's Punchbowl, the Devil's Postpile, and so forth -- and nearly every western National Park has at least one devilish feature.

How many are there really? Happily, there's an easy way to answer questions like this: the Geographic Names page on the USGS website, which hosts the Geographic Names Information System (GNIS). You can download entire place name files for a state, or you can search for place name matches at: GNIS Feature Search.

When I searched there for "devil", I got 1883 hits -- but many of them don't actually include the word "Devil". What, are they taking lessons from Google about searching for things that don't actually match the search terms?

I decided I wanted to download the results so I could count them more easily. The page offers View & Print all or Save as pipe "|" delimited file. I chose to save the file.

Read more ...

Tags: , , , ,
[ 16:30 Mar 30, 2020    More linux/cmdline | permalink to this entry | ]