Tony Fernandez

The Packets Never Lie

Fix: Pop!_OS turns off one monitor — December 19, 2022

Fix: Pop!_OS turns off one monitor

For the past few weeks I have had this very annoying issue with my new 2022 Thelio from System 76. The issue was that, when I would leave my desk for a bit and my monitors would turn off, sometimes, the right monitor would no longer be configured as part of the Join Display setting.

I would have to go into the settings or type Super+P to get it joined again which, over the course of a day, can be many times.

I worked with System 76’s support team and we were able to resolve it.

I wanted to share the solution in-case anyone runs into this issue in the future.

The following command, as the man page states, “disables DPMS (Energy Star) features”.

xset -dpms
Using Mimic3 with Mycroft Core — October 4, 2022

Using Mimic3 with Mycroft Core

Below are the steps I needed to take to get Mimic3 working on my Pop OS workstation with Mycroft Core.

The instructions below assume that you have mycroft-core installed in your home directory ~

Step 1: Install Mimc3

Mimc3 can be installed a few different ways. See here for documentation.

I will be installing using python pip.

Install the necessary system packages:

sudo apt-get install libespeak-ng1

First, ensure that you’re using the latest pip:

mycroft-pip install --upgrade pip

Then, install the package:

mycroft-pip install mycroft-plugin-tts-mimic3[en]

You can replace [en] with your language or with [all].

Note: The mycroft-pip binary is in the ~/mycroft-core/bin folder

Enable the plugin

mycroft-config set tts.module mimic3_tts_plug

Step 2: Adjust the $PATH

If you were to launch mycroft-core now, you would not hear any audio. That may be because your .local/bin folder is not in your $PATH.

You can fix that with the following command:

echo 'export PATH="$PATH:/home/$USER/.local/bin"' >> .bashrc

That should be all you need to get started with Mimic3

How To: Enable Root Login on a UC Module (IP Office) — August 22, 2022

How To: Enable Root Login on a UC Module (IP Office)

Below are the steps to enable root access on a UC Module using WinSCP

  1. SSH into the UC Module using the Administrator account
  2. Edit the sshd_config file by entering `vi /etc/ssh/sshd_config`
    • To begin editing in ‘vi’ type the letter i
    • Go to the line that says “PermitRootLogin” and change no to yes
  3. Save the file
    • To save press the Esc button then type 😡
  4. Restart the ssh daemon by using the command `/etc/init.d/sshd restart`

That should be all you need. Thanks to my coworker for providing this useful tip.

Moving a Plex Docker Container — August 16, 2022

Moving a Plex Docker Container

Today while trying to move my Plex docker container from one host to another, I ran into an error.

Plex is currently unavailable

What I had done was shut down the container on my old server, moved the data files to my new host, then recreated the container.

To transfer the files I used `scp /docker/plex user@host:/home/user`

I then moved those files over to my `/docker/plex` folder

That was where I went wrong.

To fix this issue, use rsync and ensure archive mode is on.

rsync -avp --progress /docker/plex user@host:/docker --rsync-path="sudo rsync"

The rsync command above is what I used. Keep in mind that since the /docker path was owned by root, I had to temporarily add the following to my sudoers file:

username ALL=NOPASSWD:/usr/bin/rsync
Linux Mint Media Keys Not Working — August 9, 2022

Linux Mint Media Keys Not Working

I recently ran into an issue where my Media Keys were not working on Linux Mint. They would work if I rebooted, however, they would eventually stop working.

I found other users having the same issue.

The root of the issue appears to be that csd-media-keys is sending the Play/Pause, Next and Prev commands to the wrong application.

So far there has been no resolution from the Linux Mint developers, so I wanted to document a workaround.

Step 1: Install playerctl

Run the following command in a terminal to install playerctl:

sudo apt install playerctl -y

Step 2: Delete the built-in keyboard shortcuts

Search for Keyboard in the Linux Mint search menu and go to the Shortcuts tab.

In the Sound and Media category, look for the following keyboard shortcuts: Play, Previous track, Next track.

For each entry, click the Keyboard binding and press backspace to clear it.

Step 3: Add custom keyboard shortcuts

In the Categories pane, go to Customer Shortcuts

Click Add custom shortcut

Add the following shortcuts:

NameCommand
Play/Pauseplayerctl play-pause
Next Trackplayerctl next
Previous Trackplayerctl previous

Be sure to map a keybinding in the Keyboard bindings pane

That should be all you need.

FusionPBX: Monitoring a Voicemail Box with a BLF Line Key — May 21, 2022

FusionPBX: Monitoring a Voicemail Box with a BLF Line Key

Recently I had a customer request the ability to monitor a Voicemail box using a BLF Line Key on their phone.

This request isn’t new however. We’ve had numerous customer request this in the past. I decided to add this functionality to the already incredible amount of features that FusionPBX has.

FusionPBX uses a prefix when monitoring different types of applications. For example, Call Flows, Parking, DND etc.

Call Flows as an example uses the flow+ prefix to the extention.

Parking uses park+ as the prefix.

Voicemails as of FusionPBX version 5.0.1 and beyond use the voicemail+ prefix.

Below is an example of what that will look like when programming this for any phone.

As usual, please comment if you like this article and/or you’d like some assistance.

Windows not an option in Cockpit-Machines — November 4, 2021
Proxmox ZFS – No Disks unused — November 1, 2021

Proxmox ZFS – No Disks unused

Sometimes when you are trying to configure a ZFS dataset on Proxmox, you will get the message “No Disks unused” even if you have didks that are not currently in use.

The explanation is simple. There are still partitions on the drives that you’d like to use.

The fix will be to remove all partitions via fdisk.

Go to the web interface of your Proxmox server. Next, if you have a cluster setup, select the Proxmox host in question. Otherwise select your only host.

Go to >_ Shell

Next, run fdisk on the drive in question.

$ fdisk /dev/sdc

At this menu, you can press p to view the current partitions for that drive.

Command (m for help): p
Disk /dev/sdc: 2.2 TiB, 2400476553216 bytes, 4688430768 sectors
Disk model: AL15SEB24EQY    
Units: sectors of 1 * 512 = 512 bytes
Sector size (logical/physical): 512 bytes / 4096 bytes
I/O size (minimum/optimal): 4096 bytes / 4096 bytes
Disklabel type: gpt
Disk identifier: CA092BC9-FB44-7849-854F-EE2458F58923

Device          Start        End    Sectors  Size Type
/dev/sdc1        2048 4688412671 4688410624  2.2T Solaris /usr & Apple ZFS
/dev/sdc9  4688412672 4688429055      16384    8M Solaris reserved 1

Next, delete the partitions by typing the d letter.

Command (m for help): d
Partition number (1,9, default 9): 1

Partition 1 has been deleted.

Command (m for help): d
Selected partition 9
Partition 9 has been deleted.

These changes are not live until we write them with the w letter.

Command (m for help): w
The partition table has been altered.
Calling ioctl() to re-read partition table.
Syncing disks.

This will bring us back to the Linux CLI.

Go to the ZFS tab and click Create: ZFS

You will now see your drive in the list.

Blocking unauthenticated SIP INVITES on FreePBX / PBXact — September 24, 2021

Blocking unauthenticated SIP INVITES on FreePBX / PBXact

Today I noticed a new PBX (PBXact) we deployed for a customer was accepting unauthenticated SIP INVITES from the internet. I had opened port 5060 to the world. Risky, I know. But I had a false sense of security I guess since I was under the impression that FreePBX / PBXact will block and eventually ban failed SIP communication attempts.

It’s true that it was working for incorrect registrations however I noticed that the repsonsive firewall was still allowing random SIP INVITES from anywhere to be routed.

The fix was simple, go tio Settings > Asterisk SIP Settings

In the General SIP Settings tab, set Allow SIP Guests to No

That’s all. Now, when running sngrep, I no longer see my PBXact accepting INVITES from random locations. Instead it sends a 401 Unauthorized message.

Below are the logs (before and after) I got from sngrep

BEFORE
AFTER

Installing Ubuntu 20.04 with Software RAID 1 — April 27, 2021

Installing Ubuntu 20.04 with Software RAID 1

I was having trouble finding a guide/steps to setup a software RAID 1 while in the Ubuntu installer. I stumbled upon a blog post that had the steps written out very nicely however since it was written as a comment I thought people may overlook it when they are first scrolling through search results. I will list out his steps as well as include screenshots and a bit more information.

My Setup

I will be testing on my KVM setup however all the steps below apply the same as if the server was a physical server.

I have two drives that are both 200G. I plan to have them setup in a raid1 mirror that will have a partition table like this:

tfernandez@ubuntu-2:~$ lsblk
NAME        MAJ:MIN RM   SIZE RO TYPE  MOUNTPOINT
loop0         7:0    0  69.9M  1 loop  /snap/lxd/19188
loop1         7:1    0  55.4M  1 loop  /snap/core18/1944
loop2         7:2    0  31.1M  1 loop  /snap/snapd/10707
sr0          11:0    1  1024M  0 rom   
vda         252:0    0   200G  0 disk  
├─vda1      252:1    0     1M  0 part  
├─vda2      252:2    0     1G  0 part  
│ └─md0       9:0    0  1022M  0 raid1 
│   └─md0p1 259:0    0  1018M  0 part  /boot
└─vda3      252:3    0   199G  0 part  
  └─md1       9:1    0 198.9G  0 raid1 
    └─md1p1 259:1    0 198.9G  0 part  /
vdb         252:16   0   200G  0 disk  
├─vdb1      252:17   0     1M  0 part  
├─vdb2      252:18   0     1G  0 part  
│ └─md0       9:0    0  1022M  0 raid1 
│   └─md0p1 259:0    0  1018M  0 part  /boot
└─vdb3      252:19   0   199G  0 part  
  └─md1       9:1    0 198.9G  0 raid1 
    └─md1p1 259:1    0 198.9G  0 part  /
Continue reading
Design a site like this with WordPress.com
Get started