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
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.

Resetting WebLM Password on Avaya SBC Enterprise (ASBCE) — May 8, 2022

Resetting WebLM Password on Avaya SBC Enterprise (ASBCE)

I ran into an issue today when upgrading to version 8.1.3 where my WebLM username/password did not work anymore and the licenses got uninstalled. Apparently this is a known issue. It’s now known to me.

Below are the steps to reset the password to the default admin user.

Step 1: Stop the service

Run the following command to stop WebLM:

service ipcs-ems stop-weblm

Step 2: Modify the Users.xml file that WebLM uses

Change your directory to where the Users.xml file is located:

cd /usr/local/weblm/server/webapp/admin

Backup the existing file

cp Users.xml Users.xml.original

Extract the Users.xml file from the upgrade tar.gz. Below is where it is located inside the file:

sbce-8.1.3.0-31-21052-563c74d7bdc7b0d1115031a5fa0f1927.tar.gz\sbce-8.1.3.0-31-21052.tar\sbce-8.1.3.0-31-21052.iso\Packages\weblm-server-8.1.3.0-2.noarch.rpm\weblm-server-8.1.3.0-2.noarch.cpio\.\usr\local\weblm\server\webapp\admin\Users.xml

Move the file from the tar.gz to the server

Step 3: Restart the service

Run the following command to stop WebLM:

service ipcs-ems start-weblm

Step 4: Login with the default credentials

Username: admin

Password: weblmadmin

Installing SIPp on WSL (Ubuntu 20.04) — December 4, 2021
Setting up Zulu on PBXact / FreePBX — August 4, 2021

Setting up Zulu on PBXact / FreePBX

Today I got a new PBXact server in to test with. I ran into an issue getting Zulu (the desktop softphone) app to work. Below are the steps I took on a brand new PBXact server. The steps below may also work for FreePBX.

Editing your user

Assuming you already have an extension created, there should be a User created that is linked to your extension. Go to User Management.

Click the Edit button on your user.

Go to the Zulu tab.

Select Yes for Enabled.

Select Yes for Enable Softphone.

Click Submit and Apply Config.

Enable Web Sockets for PJSIP

By default, WebSocket(S) is not enabled in the PJSIP settings.

Go to Asterisk SIP Settings.

Go to the SIP Settings [chan_pjsip] tab.

Select Yes for ws and wss.

Click Submit and Apply Config.

Start the Zulu service

Connect to the server via SSH.

The default username/password is root/sangoma.

Enter the command: fwconsole start zulu

You will see an output similar to the following:

[root@uc ~]# fwconsole start zulu
Running PBXact startup...
Taking too long? Customize the chown command, See http://wiki.freepbx.org/display/FOP/FreePBX+Chown+Conf
Setting Permissions...
Setting base permissions...Done in 8 seconds
Setting specific permissions...
 57955 [============================]
Finished setting permissions
Unable to run Pre-Asterisk hooks, because Asterisk is already running on PID 2801 and has been running for 2 minutes, 25 seconds
Running Asterisk post from Zulu module
Zulu Server has already been running on PID 4641 for 1 minute, 13 seconds

Broadcast message from root@uc (Wed Aug  4 16:17:09 2021):

Firewall service will start automatically in 30 seconds or less!


Broadcast message from root@uc (Wed Aug  4 16:17:37 2021):

Firewall service now starting.

Restart the server.

Log into Zulu

Log into the Zulu desktop client.

User: username@ip-or-fqdn

Port: 8002

Password: is set on the

Tcpdump captures on an interval — March 9, 2021

Tcpdump captures on an interval

This quick article is more for me to have a safe place to jot down this command so I don’t need to re-research it every time.

I want to take a packet capture with tcpdump on a server and have the file rotate every hour.

Command:

tcpdump icmp -G 3600 -W 8 -w icmp-%Y-%M-%d_%H.%M.%S.pcap

Let’s break it down.

tcpdumpThe command we are executing to capture packets
icmpIn this example i’d only like to capture ICMP traffic
-G 3600I’d like the file to rotate every 3600 seconds (1 hour)
-W 8I’d like the application to only hold a max of 8 files
-w filenameThe output file. In my example I have put placeholders that will print the date in the file capture

Multiple Companies on one Domain in FusionPBX — December 15, 2020

Multiple Companies on one Domain in FusionPBX

I ran into a customer recently who had three different companies all running on the same FusionPBX domain and run by the same staff. They requested that each user have the ability to choose which Caller ID Name they wanted to display on outbound calls as well as when an inbound call comes to them, they’d like to know which DID/Company was dialed.

This guide will show how I managed to configure this.

Continue reading
Design a site like this with WordPress.com
Get started