Tony Fernandez

The Packets Never Lie

Separate Firefox Panel Icons per Profile in Linux Mint — February 28, 2024

Separate Firefox Panel Icons per Profile in Linux Mint

Since I recently changed from Chrome to Firefox, I’ve realized that Firefox does not make switching profiles as easy as Chrome does. You either need to

  • Launch Firefox with the -P command line parameter
  • Navigate to about:profiles and launch it from there

I wanted to have two separate taskbar icons that can help me differentiate between my profiles. In my case, Work and Personal.

Continue reading
How to add extra right-click menu options to the Cinnamon taskbar — February 14, 2024

How to add extra right-click menu options to the Cinnamon taskbar

I recently switched back over to Firefox again. As of yesterday I was using Firefox for Personal browsing and Chrome for work. Firefox doesn’t have a nice way to switch profiles on the fly and having to have a dedicated .desktop file with the “-p” option was a no go.

What I ended up figuring out was that in Linux Mint, I can modify the .desktop file that Firefox ships with to add an additional option to the right-click menu on the grouped window taskbar applet.

The default options

The default options that Firefox ships with are great but I want to add another for “Select a Profile”.

At the time of writing, Linux Mint stores it’s firefox.desktop (and a lot of other .desktop files) in the /usr/share/applications folder.

Let’s edit that file. You will first see a [Desktop Entry] on the first line. Scroll down until you see:

Actions=new-window;new-private-window;

And convert it to say:

Actions=new-window;new-private-window;new-profile;

Next, right below that, add a few new lines and the following text:

[Desktop Action new-profile]
Name=New Profile
Exec=firefox -P

Save the file.

The last step you need to do to make this live is to press Alt+F2 and then type r in the prompt and Enter. This will restart Cinnamon.

Now when you right-click the firefox image, you will see the following:

Snom IP Phones not keeping volume settings on FreePBX/PBXacT — February 12, 2024

Snom IP Phones not keeping volume settings on FreePBX/PBXacT

Today I had a customer report that on their Snom IP phones (specifically the D735 and D785 in my case), when they set the volume, after some time, it gets reset to max. Since they are a small office and have a ring-all ring group, it gets loud.

I suspected that the phone must be pulling it’s config periodically and that the provisioning template may be overriding what the user has set.

I logged into the web interface of one of the phones and manually set the volume to 1. I then manually provisioned the phone via PBXacT and it did indeed change the value to the max.

To stop this from happening, we will need to edit the base file of the template.

Go to Endpoint Manager > Basefile Edit and choose your template. Next choose the model of phone that you’d like to fix from the list on the left side.

Search the XML for vol_ringer and click on that line.

On the popup, edit the Perm field, which should be blank, and add a !

It should look like this:

The ! means that if the user has modified this setting, the phone should keep the modified option by the user. If the user has not modified this option, then the phone should take the provisioned value.

Disabling the mic on a webcam/DualShock — March 3, 2023

Disabling the mic on a webcam/DualShock

I have a web camera that has a built-in mic. It sometimes happens that my application will use that mic vs my headset mic because of reasons unknown.

I wanted to be able to disable the system from allowing the mic driver to be loaded so that it can never be used. To accomplish this I used the Linux udev rules to stop the kernel from loading the audio drivers for my device specifically.

Step 1: Find your device’s ID

$ lsusb | grep -i 'camera\|dualshock'
Bus 001 Device 016: ID 0c45:636b Microdia USB 2.0 Camera
Bus 001 Device 009: ID 054c:09cc Sony Corp. DualShock 4

Step 2: Create a udev rule

Below are the two file we will create.

/etc/udev/rules.d/01-webcam-mic.rules
/etc/udev/rules.d/02-dualshock-mic.rules

Create the following rule:


sudo printf "# Block Mic from Webcam\nSUBSYSTEM==\"usb\", DRIVER==\"snd-usb-audio\", ATTRS{idVendor}==\"0c45\", ATTRS{idProduct}==\"636b\", ATTR{authorized}=\"0\"" | sudo tee /etc/udev/rules.d/01-webcam-mic.rules
sudo printf "# Block Mic from Dual Shock 4\nSUBSYSTEM==\"usb\", DRIVER==\"snd-usb-audio\", ATTRS{idVendor}==\"054c\", ATTRS{idProduct}==\"09cc\", ATTR{authorized}=\"0\"" | sudo tee /etc/udev/rules.d/02-dualshock-mic.rules

Step 3: Reload the udev rules

$ sudo udevadm control --reload-rules

Step 4: Reboot

$ sudo reboot
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
Installing Spotifyd in Linux Mint 21 and Ubuntu 22.04 — October 10, 2022

Installing Spotifyd in Linux Mint 21 and Ubuntu 22.04

I ran into an issue installing spotifyd on my Linux Mint PC and I wanted to document what was required to fix this.

The error:

error[E0658]: use of unstable library feature 'bool_to_option'
   --> src/config.rs:636:57
    |
636 |         .map(|path| Cache::new(Some(&path), audio_cache.then_some(&path), size_limit))
    |                                                         ^^^^^^^^^
    |
    = note: see issue #80967 <https://github.com/rust-lang/rust/issues/80967> for more information

To me this werror meant nothing. Apparently, according to a github issue, there is a bug in the Rust compiler. To fix this we need to uninstall rust from the Ubuntu/Lint repository and install it using a different command.

$> sudo apt remove rustc
$> curl --proto '=https' --tlsv1.2 -sSf https://sh.rustup.rs | sh

Next you will need to exit out of your terminal emulator.

Finally you can follow the install instructions provided here.

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.

Design a site like this with WordPress.com
Get started