This blog began as a result of my flailing-about to learn how to install and use Ubuntu and basic applications. But once I got going with Ubuntu, the blog became a repository of general Ubuntu-related tips.
Tuesday, August 6, 2024
Lessons learned from escaping Pipewire's audio-cutting-out issue
At one point in my quest to find a way to avoid Pipewire's years-long problem of audio randomly cutting out, I concluded that the solution would be to get an Android tablet to use as a music server. However, after using the Celluloid and Parole media players on my full installations of Ubuntu Mate 22.04 and Xubuntu 22.04 (which have PulseAudio, not Pipewire), each on a separate µ-SD card and each plugged into an Orlian µ-SD-to-USB adapter when in use, I've concluded that both are solid general-purpose distros, and that either would be a good temporary music server until Pipewire is fixed and I can go back to MX-Linux, or until I get a new Android tablet. A live installation of either would probably work, but Ubuntu live installations take forever to boot. Oddly, they both have the same couple of weird irritants [1] that would probably torment newbies, but I've found that they can be dismissed or shut down without causing any problems. After using the Xubuntu installation for a few hours, it interrupted the music-playback to notify me that software-updates were available, even though it was running on an air-gap PC and could not have known about any such updates. Notifications can be disabled, but something that can't be disabled might take their place. So, ultimately, it might be necessary to use an Android device to get away from all of these bogus impediments.
I tried Strawberry (from the Strawberry site, since it's not in the Ubuntu repository) on UM2204, but it had a "buffering" problem, as if the LUKS-encrypted SD-card I use as a source is a slow internet connection. The version that comes with MX-Linux 23 doesn't have this problem, but Pipewire, at least for now, has the audio-cutting-out problem. Version 1.2.2, which is in the testing-phase, supposedly addresses this issue.
Now that I've gotten away from the Clementine player and resampling [2], I've realized that CD-grade digital has the potential to sound downright juicy when played through a good digital playback device. The best budget DACs use TI/Burr-Brown Advanced Segment DAC-chips (ASDs), which I explained in my Zen DAC V2 review. ASDs might be the ultimate DAC-chip for audio playback, due to their unique design which gives them low jitter-sensitivity (output noise vs. clock jitter) and unusually tight control over low-level detail. However, ASDs are apparently incompatible with the requirements of ADCs, because there are no ADCs which use ASDs. But the recordings which sound so good through ASDs are made with regular sigma-delta converters, which clearly can be made to sound amazing, for a price. Still, Audio Research and Bel Canto use ASDs in their DACs, which are among the best.
From the music industry's perspective, CD-grade digital is a threat to their bottom line, because it lasts forever and can be distributed forever without paying them. So, they like to put their best versions on LPs, which are impossible to copy perfectly. Furthermore, most people are reluctant to buy used LPs because they might be worn out and/or otherwise damaged, so if they want the best version of classic albums from the 60's and 70's,they'll probably end up getting new LPs, which are made from great digital recordings made early in the digital era, but which will never be released in a good digital form. Streaming might be based on the best recordings, because it's watermarked and can't be pirated with impunity, but watermarking apparently degrades the audio at least subtly (since it has to be woven into the music to be effective), which can make all the difference to those who care about sound quality.
Notes
[1] I've noticed a "system program problem detected" pop-up, which is the only indication of a supposed problem, and a supposed "unattended upgrade" that loads down the CPU and prevents the PC from shutting down normally. I'm supposed to believe that an actual unattended upgrade could be occurring even though the installation is running on an air-gap PC. In the first case, I click on the button that just gets rid of the pop-up, and in the other I use the task manager to kill the process, or if I'm trying to shut the PC down and the "upgrade" is preventing it, I just push the power button until the PC shuts down.
[2] Resampling is a mathematical process which introduces audible errors or consumes large amounts of system-resources. Pro-grade gear such as mixing consoles typically uses sample-rate-converter chips, which are very transparent. Resampling to a higher frequency can't IMPROVE sound quality, because resampling cannot add information, such as high-end or low-level detail. High sampling rates are used when converting to and from digital to allow the use of simple, clean, and cheap analog anti-aliasing filters, but when the high-frequency "DSD" used in ADC-chips for sampling the analog input is internally converted to high-res PCM (such as for use by recording engineers, who process it down to CD-grade digital for distribution), very little if any of the musical information is lost.
Although high-res makes it easier for recording engineers to do their job, CD-grade digital is plenty for consumers. Those who disagree probably have never heard a good CD-grade digital recording played back on a good system. I use a Zen DAC V2, which I reviewed in AudioCleanAndCheap.blogspot.com, although when I reviewed it I was unwittingly listening to poorly resampled data.
Tuesday, June 4, 2024
MX-Linux Snapshot-tool compression-setting affects size of Snapshot AND size of resulting live installation
The MX-Linux Snapshot tool, which turns MX-Linux installations into ISOs which include all of the installation's settings and added software, has an option to select a level of compression from a menu of five levels. I ignored this setting until one of my Snapshots, which was made with the least amount of compression, was just slightly too large to fit onto a 4GB USB2 flash drive, which I like because they're cheap, they work well for this purpose, and they run cool, indicating low power consumption. But I assumed that there would be no point in compressing the Snapshot further, because I assumed that it would always end up being the same size when installed as a live installation. So I just installed it on a 16GB USB3 flash drive that I didn't need for anything else.
But because I'd have to buy a bunch of new flash drives for my system of backing-up data, ISOs, and installations, so that it could handle ISOs and live installations larger than 4GB, I decided that I shouldn't rule out the possibility that a higher level of compression would reduce the size of the live installation, and not just the size of the Snapshot in an ISO form.
So, I tried the zstd compression-setting, which reduced the size of the Snapshot, AND the size of live installations made from the Snapshot, to 3.1GB. The installation loads and runs as fast as the installations made from the 4.1GB Snapshot. As far as I can tell, the only drawback of using the zstd compression-setting is that it took a few minutes longer to create the Snapshot.
Thursday, August 18, 2022
Enlightenment - for those who have nothing better to do with an OS than change settings
Curiosity about the Enlightenment desktop drove me to use nearly 500MB of my internet-data allocation to install it on Ubuntu 22.04, which I now admit is nice, although in my opinion the workspace-switching scheme is a solution in search of a problem. In a nutshell, "Enlightenment" is a misleading name, because as far as I'm concerned, it's one of the least enlightened desktops I've used, although I never actually got around to using to do anything. For example, the default fonts are microscopic, and I couldn't figure out how to change them. Perhaps it was meant for developers to use as the basis for an actual desktop, such as Bodhi and Elive, by setting it up to make it usable.
The file manager (Fileman) is a PITA to use. To open an encrypted partition, I had to use Disks to unlock and mount it, but it still didn't appear in the file manager's devices-column, so to access it via the file manager (although it would have been easier to just keep using Disks), I had to go to the /media/<user-name> directory, and I finally found it. Perhaps it was meant to conceal encrypted partitions from those who aren't aware of them, but most other file managers display encrypted partitions in the devices-column as soon as they're plugged in. Bodhi Linux, which is Ubuntu combined with Enlightenment, uses Thunar, the XFCE file manager, which is one of my favorites, so I'm not the only one who doesn't like Fileman.
I was also expecting some sort of a whiz-bang window-manager which would make it easy to move from one to another, but as far as I can tell, that's not the case. Anyways, taskbars seem like the optimal approach for doing this when the window of interest is hidden behind another, and Enlightenment has an optional taskbar in addition to its "i-bar."
But it's not all bad - there are various innovative features, but they don't make up for the deficit in usability.
So, I'm not going to waste any more time on Enlightenment. My distro of choice is MX-Linux XFCE, because I can get a lot done with it, without having to change a lot of settings and figuring out how to change them, and it has the Snapshot tool that makes it easy to create an ISO of a configured MX-Linux installation, with all of the settings and added software. The resulting ISO can be turned into a live installation on a USB2 drive (instead of one of those warm/hot-running USB3 drives), and the resulting installation can be run on an air-gap PC, for the ultimate in security, since it retains no session-data upon shutdown. Instead, data would be saved on separate drives.
Sunday, August 7, 2022
Using Conky standard MX-antiX configuration as disk I/O monitor
Rev 8/15/22
A good option for a disk I/O monitor is to install Conky (conky-std) and use the standard MX-antiX configuration (see image). To obtain the corresponding configuration file from MX-Linux, open the Home directory, press Ctl-H to display hidden files, then open the .conky directory, then the MX-antiX directory, and copy the "MX-antiX17" file and rename it Standard_antiX_Conky_conf_file.txt. The same version is supposedly on the internet, but I tried the posted version, but it didn't produce the same results, so below I have included a copy of the version which I copied from MX-Linux, which you could test on a live installation.
There are various ways to use it as the configuration file, one of which is to put it in a text file, name it conky.conf, and place it in the Home/.conky directory created by installing Conky. The previous conky.conf directory would have to be removed or renamed. Another way is to put it in a text file named whatever you like and placed wherever you like, although I'd name it Standard_antiX_Conky_conf_file.txt and put it in the .conky directory. Then shut Conky down and restart it with the command "conky -c <path/name of configuration file>." To get the path of a file, right-click on it and select Properties in the menu which appears.
Standard MX/antiX Conky configuration-script:
conky.config = {
-- Standard antiX .conkyrc file written by Team antiX.
-- Feel free to use.
-- anticapitalista@riseup.net
-- Note: delete the line above to disable automatic scaling with DPI
-- on the live system.
-- set to yes if you want Conky to be forked in the background
background = true,
short_units = true,
cpu_avg_samples = 1,
net_avg_samples = 1,
out_to_console = false,
-- X font when Xft is disabled, you can pick one with program xfontsel
--font 7x12
--font 6x10
--font 7x13
font = '8x12',
--font 7x12
--font *mintsmild.se*
--font -*-*-*-*-*-*-34-*-*-*-*-*-*-*
--font -artwiz-snap-normal-r-normal-*-*-100-*-*-p-*-iso8859-1
-- Use Xft?
use_xft = true,
-- Xft font when Xft is enabled
--xftfont gentium:size=12
--ftfont DejaVu Sans:size=10
font = 'DejaVu Sans:bold:size=9',
--xftfont DejaVu Sans:size=9
-- Create own window instead of using desktop (required in nautilus, pcmanfm and rox desktops)
own_window = true,
own_window_transparent = true,
own_window_hints = 'undecorated,sticky,skip_taskbar',
-- Text alpha when using Xft
xftalpha = 1.0,
--on_bottom no
-- mail spool
-- mail_spool $MAIL
-- Update interval in seconds
update_interval = 1,
-- Use double buffering (reduces flicker, may not work for everyone)
double_buffer = true,
-- Minimum size of text area
minimum_width = 5, minimum_height = 5,
maximum_width = 180,
-- Draw shades?
draw_shades = false,
-- Draw outlines?
draw_outline = false,
-- Draw borders around text
draw_borders = false,
-- Stippled borders?
stippled_borders = 0,
-- border margins
--border_margin 10
-- border width
border_width = 1,
-- Default colors and also border colors
default_color = 'white',
default_shade_color = 'white',
default_outline_color = 'white',
color1 = 'ffffff',
color2 = 'ffffff',
color3 = 'ffffff',
color4 = 'yellow',
color8 = '77ccff',
color9 = '5599cc',
-- Text alignment, other possible values are commented
-- alignment top_left
alignment = 'top_right',
--alignment bottom_left
--alignment bottom_right
-- Gap between borders of screen and text
gap_x = 30,
gap_y = 30,
-- Add spaces to keep things from moving about? This only affects certain objects.
use_spacer = 'right',
-- Subtract file system buffers from used memory?
no_buffers = true,
-- if_up_strictness link: up | link | address
if_up_strictness = 'address',
-- set to yes if you want all text to be in uppercase
uppercase = false,
-- boinc (seti) dir
-- seti_dir /opt/seti
--# antiX additives examples. Add below Text##
--#Battery examples##
--#${color}battery: ${color}$acpiacadapter, ${battery_percent BAT1}%
--#${color}battery:${color} ${battery}
--${color}ACPI Battery: ${color}$battery
--${battery_bar 11,0}
--#Wireless example##
--${color}Wireless:
--${color}essid: ${wireless_essid $template6}
--${color}IP:${color} ${addr $template6}
--${color}speed: ${color} ${wireless_bitrate $template6}
--${color}link strength: ${color} ${wireless_link_bar 7,50 $template6}
own_window_argb_value = 0,
own_window_argb_visual = true,
own_window_colour = '000000',
-- time template
template0 = [[${if_match "pmfix${time %p}" == "pmfix"}${time \1}${else}${time %I:%M}${endif}]],
-- battery templates
template1 = [[${if_existing /sys/class/power_supply/BAT\1}\n${color}bat\1:${color3}${alignr}${battery_percent BAT\1}%\n${color1}$alignr${battery_bar 4,170 BAT\1}${endif}]],
template2 = [[${template1 0}${template1 1}]],
-- network templates
-- template3 = [[${color}\1 \2: $alignr${color3} ${\2speed \1}\n${color2}$alignr${\2speedgraph \1 30,170 5599cc 5599cc}]],
-- template4 = [[${if_up \1}${template3 \1 up}\n${template3 \1 down}\n${endif}]],
-- template5 = [[${template4 $template4}${template4 $template5}${template4 $template6}${template4 $template7}]],
template4 = 'eth0',
template5 = 'eth1',
template6 = 'wlan0',
template7 = 'wlan1',
};
-- fluxbox adjustment
return_code = os.execute('pidof -q fluxbox')
if _VERSION == 'Lua 5.1' and math.floor(return_code/256) == 0 or
_VERSION ~= 'Lua 5.1' and return_code then
conky.config.own_window_transparent = true
conky.config.own_window_argb_visual = false
end
-- stuff after 'TEXT' will be formatted on screen
conky.text = [[
${color3}${alignc}MX Linux
${color8}$alignc${font DejaVu Sans:size=12}${template0 %H:%M}$font
${color}${alignc}${time %a %d %b}
${color}${alignc}Uptime: $uptime
${color}res:${alignr}${color3}${execi 600 xdpyinfo | awk '/dimensions/ { print $2}' }
${color}dpi:${alignr}${color3}${execi 600 xdpyinfo | awk '/resolution/ { sub(/x[0-9]*/,"",$2); print $2}' }
${color}cpu use:${alignr}${color3}${cpu}${color}%
${color}cpu freq:${color3}${alignr}${freq}
${color}$alignr${cpugraph cpu0 30,170 5599cc 5599cc}\
# battery
${template2}
${color}disk I/O:${alignr}${color3}${diskio}
${color}${alignr}${diskiograph 30,170 5599cc 5599cc}\
# network
${if_up $template4}
${color}$template4 up: $alignr${color3} ${upspeed $template4}
${color}$alignr${upspeedgraph $template4 30,170 5599cc 5599cc}
${color}$template4 down: $alignr${color3} ${downspeed $template4}
${color2}$alignr${downspeedgraph $template4 30,170 5599cc 5599cc}${endif}${if_up $template5}
${color}$template5 up: $alignr${color3} ${upspeed $template5}
${color}$alignr${upspeedgraph $template5 30,170 5599cc 5599cc}
${color}$template5 down: $alignr${color3} ${downspeed $template5}
${color2}$alignr${downspeedgraph $template5 30,170 5599cc 5599cc}${endif}${if_up $template6}
${color}$template6 up: $alignr${color3} ${upspeed $template6}
${color2}$alignr${upspeedgraph $template6 30,170 5599cc 5599cc}
${color}$template6 down: $alignr${color3} ${downspeed $template6}
${color2}$alignr${downspeedgraph $template6 30,170 5599cc 5599cc}${endif}${if_up $template7}
${color}$template7 up: $alignr${color3} ${upspeed $template7}
${color2}$alignr${upspeedgraph $template7 30,170 5599cc 5599cc}
${color}$template7 down: $alignr${color3} ${downspeed $template7}
${color2}$alignr${downspeedgraph $template7 30,170 5599cc 5599cc}${endif}
${color}${alignr}${color8}Used / Total
${color}mem:${alignr}$mem ${color3} /${color} $memmax
${color}swap:${alignr}$swap ${color3} /${color} $swapmax
${color}root:${alignr}${fs_used /} ${color3} /${color} ${fs_size /}
]]
Xubuntu 22.04: Not my top choice, but a serious contender
Although between MX-Linux 21 XFCE and Kubuntu 22.04, my OS-needs are fulfilled, I couldn't resist getting a copy of Xubuntu 22.04 and giving it a spin. What I found was basically a fun distribution with lot of good stuff, but also with some minor problems, and not a slick as Kubuntu 22.04 or Linux Mint 20.3. Still, I could easily live with it.
The main feature I wanted to try on Xubuntu was zooming the screen with a keyboard, which turned out to be easy, with the help of a couple of simple xdotool commands which someone posted to the internet:
running the following command from the terminal, zooms in:
xdotool keydown Alt click 4 keyup Alt
and this command zooms out:
xdotool keydown Alt click 5 keyup Alt
As he suggested, I turned them into shell scripts, but ultimately assigned each one to a function key. (First create the scripts, give them execute-permission, and then put them somewhere safe such as in a bash-scripts folder in your Home directory, and perhaps make them read-only so they can't be deleted inadvertently. To create a shortcut-key, select Settings in the main menu, then the Keyboard utility, and then the Application Shortcuts tab, and the rest should be obvious.) He suggested a key-combo, but each time the command is run, the display in or out by a discrete amount, and if you want to zoom more, you have to press the key-combo again, which isn't convenient. But by assigning it to a function key, I can hold the key down, and it continues to zoom, although still not smoothly.
My other main interest was whether it's particularly well suited for use as an offline installation which cannot be connected directly to the internet, which it isn't. However, it can be used as such using the technique I describe in this post for authenticating a package index obtained via APT-offline by installing it via APT-offline on an installation of the same type which has been updated via a direct internet connection.
A direct update installs missing keys and updates outdated keys, but without providing any indication that this is taking place. I learned this accidentally, by entering "echo 'Binary::apt::APT::Keep-Downloaded-Packages "1";' | sudo tee /etc/apt/apt.conf.d/10apt-keep-downloads" (which can be copied w/o the beginning and ending quotes, and pasted into the command-line via Ctl-Shift-V, and ensures that software-modules which are installed via a direct connection are retained in /var/cache/apt/archives after being installed - the archives-directory is the destination for software-modules downloaded as part of the normal installation-process). I entered this command before performing a direct update on Kubuntu 22.04, and later found the Debian-archive-keyring package in the archives-directory even though I hadn't installed it or anything which requires it. So, it was obviously installed during the direct update, without any indication that it was being done. As far as I've been able to determine, there is no other way to install or update keys, without a thorough familiarity with the APT security system, and as far as I can tell, there are no current, publicly-available descriptions of this system.
Although debian-archive-keyring apparently isn't installed during the initial direct update on Xubuntu 22.04, as it is on Kubuntu 22.04, some keys are apparently installed or updated on Xubuntu 22.04, because until a direct update is installed, some of the required keys are apparently missing or outdated, as indicated by the "cannot authenticate packages" (CAP)-warnings which appear when installing software, using a package index which has been installed via APT-offline. (The package manager, APT, is disabled until the package index is updated. The direct update required a 45MB download, and the update via APT-offline required about 48MB.) It appears that APT's developers designed its security system so that keys can be updated whenever necessary, without regard for a schedule, and distributed with updates, so that the updated package index can be authenticated.
Xubuntu 22.04 has a good selection of apps, although the text-editor doesn't have a functional spelling-checker (it has a plugin, but I couldn't get it to work). One of my posts describes a "custom action" for Thunar, XFCE's file manager, for opening text-files with the spelling-checker Aspell (included in Xubuntu) by right-clicking on them and selecting the spelling-check option. The image viewer is great except for its limited zoom-capability, so I usually install Eye of Mate. Although Xubuntu has some good widgets, it doesn't have a disk I/O widget, but you could use Conky with the MX-Linux standard configuration (described in one of my posts), nmon, or GKrellM. I decided against installing APT-offline's GUI, because it would have required many packages, totaling about 18MB. Installing Kdenlive would require a 200MB download, as opposed to 60MB for Kubuntu 22.04.
Xubuntu 22.04 doesn't have a package-installer GUI, which surprised and disappointed me until I realized that the command "sudo dpkg -i <deb-pkg>" accomplishes the same thing. So, I was wrong about not being able to install APT-offline on plain Ubuntu until the package index is updated.
The bottom line is that although Xubuntu 22.04 isn't the most highly-polished distro I've used, and it has some minor problems which are apparently left as an exercise for the user, it's fun to use, unlike some distros I've used, such as MX-Linux Fluxbox, which is too much work for too little reward, and not sufficiently polished for my tastes. But Fluxbox is fast, and compared to antiX, which looks as if it was designed by someone who is legally blind, and which for example can't copy/paste between apps or open encrypted drives without entering text-commands, even Fluxbox is very user-friendly.
Monday, July 25, 2022
Mint's HDHomerun problem
Everything was going fine with my new Linux Mint 20.3 XFCE installation, which I was considering for use on the desktop PC which I use as a PVR and for processing ISOs and large files in general, until the moment when I fired up the HDHomerun-GUI (hdhomerun-config-gui), tuned in a station, and hit View, to which VLC responded by opening and displaying a black screen.
After wracking my brains over the course of a couple of days, and searching for answers on the internet and finding nothing (which itself is a clue that something's rotten), I've concluded that this is a dirty trick which is implemented by sensing the hardware, and when certain hardware is detected, corrupting or disabling the HDHomerun's output stream so that VLC can't display it. It's the only thing that makes sense, partly because I booted my $200 Brix with an encrypted flash drive installation of Mint 20.3, and was able to watch TV through it, and even record it to the flash drive, although I wouldn't advise recording video to flash drives, especially if they're encrypted. Mint has a reputation for having hardware compatibility issues, but it makes no sense that it would have more than other types of Ubuntu. But when it works, it's great.
I ended up going with Kubuntu 22.04, which I preferred slightly over Mint even before the HDHR problem. Dolphin can't access system folders, but a version with system access and superuser privileges is coming soon. In the meantime, there's Krusader, which is amazing for a file manager that can be installed on Kubuntu with a single 3.5MB package, although it's more cumbersome than Dolphin, so I use it only when necessary.
Sunday, July 24, 2022
How to run an interactive shell script in a terminal with two clicks in Mint XFCE
Rev 7/24/22
Running non-interactive shell scripts is just a matter of giving them execute-permission (right-click on file, select Properties, then Permissions, etc.), and then double-clicking on them.
But if your shell script requires user input, you need to run it in a terminal, and one way to do that is to create a Thunar custom action named something like Run Shell Script that runs the following command, without the brackets: [xfce4-terminal -e "./%n"], with the appearance-condition of *.sh. This is all explained in my post entitled "Performing spell-check via right-click in XFCE." Then, to execute the shell script, just right-click on it, then select Run Shell Script in the menu which appears.
Mint 20.3 XFCE also has "screen zoom" (or "desktop zoom") capability. You just select Compiz as the window manager (go to Settings in the main menu, and select Desktop Settings, which is not the same as Desktop), and if you want to use the keyboard to control the zoom-level, go into Compiz-settings and disable the mouse zoom-settings (perhaps not necessary) and select some key-combination for zoom-in and zoom-out. I chose Alt-Super-(up-arrow) and Alt-Super-(down-arrow), respectively, and it works like a charm.
There are many other settings related to zoom, but I just left them alone. You could, for example, make it possible to use a mouse or touchpad to trace out a rectangular area on the screen and zoom it to full screen, or at least to maximum zoom-level if it's too small to zoom to full-screen. (The left mouse-button is Button 1.) In Xubuntu 22.04, the XFCE window-manager, xfwm4, apparently has a zoom function, so you wouldn't need to use Compiz for that.