Install Signal Desktop and setup the tray for i3-gaps [Linux Mint / Ubuntu]

This is post on installing + setting up Signal Desktop application on an i3 / i3-gaps setup and enabling signal’s tray icon on your status bar.

Requirements:

1. Linux Mint/Ubuntu [This was tested on Linux Mint 20.2 ]
2. Window Manager – i3 or i3-gaps [ I am using i3-gaps ]
3. i3-bar / py3status
4. Signal Desktop Linux [ Ref: https://signal.org/download ]

Section 1: Install Signal Desktop

1. Install signal’s offical public software signing key.

wget -O- https://updates.signal.org/desktop/apt/keys.asc | gpg --dearmor > signal-desktop-keyring.gpg
cat signal-desktop-keyring.gpg | sudo tee -a /usr/share/keyrings/signal-desktop-keyring.gpg > /dev/null

2. Add repository to your list of repositories

echo 'deb [arch=amd64 signed-by=/usr/share/keyrings/signal-desktop-keyring.gpg] https://updates.signal.org/desktop/apt xenial main' |\
  sudo tee -a /etc/apt/sources.list.d/signal-xenial.list

3. Update your package database and install signal

sudo apt update && sudo apt install signal-desktop

[Note: The above instructions are from https://signal.org/download as of Sep 2021. Please refer to their website for the latest install instructions.]

Section 2: Setting up Signal for i3-gaps

If you invoke signal directly via rofi or manually from your terminal using signal-desktop, it works great but it does not enable tray icon by default which could be problamatic if you need to to minimize to the system tray (or to run in the background) if you quit out of the app. Arg!!

Luckily, signal-desktop ships with an additional flag that allows you to use the tray icon which will allow the Minimize function to work properly. To run signal with the tray icon, run the following:

signal-desktop --use-tray-icon > /dev/null &

Here is a screenshot from my setup with the signal tray seen in the bar. (You could right click image and open in new window for better viewing)

Screenshot of signal-desktop application with the system tray enabled

Adding keybindings i3 config:

I am sure there is a better way to do this. For now, I created a script start-signal.sh that calls signal-desktop with the additional argument.

vim ~/start-signal.sh

#!/bin/bash
signal-desktop --use-tray-icon > /dev/null &

Then make it executable:

chmod +x ~/start-signal.sh

I have configured my keybinding to Mod key + S (Windows key and s) to start signal-desktop and Mod + Shift + s (Windows key + Shift + s) which will kill signal. You can modify the text in bold below as per your liking. Here is a snippet of my i3 config file for reference:

vim ~/.config/i3/config

set $mod Mod4
set $terminal terminator
set $signal_with_tray ~/start-signal.sh
set $exec exec –no-startup-id

# Start Signal using Mod key + s
bindsym $mod+s $exec $signal_with_tray

# Kill Signal using Mod key + Shift + s
bindsym $mod+Shift+s $exec $terminal -e ‘pkill signal-desktop’

 

Regards,
ΞXΤЯ3МΞ

Mount TrueNAS Core Samba share on Linux

This is a guide that describes on how to mount a remote Samba share configured on TrueNAS on to a Linux machine.

 

Login in your Linux machine. (I am using a Linux Mint 19.3 in this demo. This should technically work on other Debian/Ubuntu based systems as well).

Use the following commands to get your current user’s user ID (UID) and group ID (GID) respectively.

id -u $USER
id -G $USER

Create a file /etc/.truenas_creds. This is where you would store the samba credentials.

Replace text in red with the username and password of the remote SMB share which was configured in TrueNas.

cat /etc/.truenas_creds
username=enter_username_here
password=enter_password_here

Modify the file permissions so that root is the owner and set the file permission to 600.

sudo chown root: /etc/.truenas_creds
sudo chmod 600 /etc/.truenas_creds

In your linux machine, create a folder to where you want the contents of the remote samba share to be mounts. For example: create a directory named /mnt/truenas/.

sudo mkdir /mnt/truenas/

-Below is a sample syntax that can be used for populating /etc/fstab.

//ip-of-nas-server/enter-remote-samba-share/location /enter-local-mount/location/here/ cifs credentials=/etc/.truenas_creds,iocharset=utf8,uid=enter_your_uid_here,gid=enter_your_gid_here,noperm 0 0

-Here is what that I added in /etc/fstab.

//192.168.1.12/mnt/truenas /mnt/truenas/ cifs credentials=/etc/.truenas_creds,iocharset=utf8,uid=1000,gid=1000,noperm 0 0

My TrueNAS server’s IP => 192.168.1.12

Remote samba share => /mnt/truenas

Local mount location => /mnt/truenas/

Credentials for samba share => /etc/.truenas_creds

-Once complete, run the following to mount all entries looking at /etc/fstab.

mount -a

-If there are no errors in the above command, check your local mount path to verify that the mount was successful.

ls -l /mnt/truenas/

References:

linuxize

Askubuntu

Check partition information in Linux

To show currently mounted partition in human readable format, use:

df -h

df -h sample output screenshot

Another way to check partition information using parted.

sudo parted /dev/sda print

parted sample output screenshot

Here, we can see that the disk size is 120GB along with the partition information.

To view the list of partitions using fdisk, use:

fdisk -l

To view the list of block devices:

lsblk

Hope this helps! Cheers 🙂