How to set up the ProtonMail Bridge on Linux

The ProtonMail Bridge allows Linux users to use their ProtonMail account with traditional email accounts. Even ones that do not support ProtonMail, or it’s sophisticated encryption features by default.

Setting up the ProtonMail Bridge on Linux is tricky for new Linux users, but not impossible. If you’re a fan of ProtonMail and want to use your account on your favorite Linux email app, follow along with this guide to get it running!

Note: using the ProtonMail bridge requires a paid account. To upgrade your account, click here.

Installing the ProtonMail Bridge app on Linux

On the official ProtonMail website, it states that there is a version for Microsoft Windows, Apple MacOS, and Linux. However, the Linux button is greyed out and unclickable. When you hover over it, it says to “email for details,” and it’s marked as a beta application.

While it’s true that the developers of ProtonMail Bridge do not make it easy to download the app from their website, there’s no need to contact ProtonMail to get your hands on the latest version of the Bridge app. Why? Someone has placed the program in the Flatpak app store, and it works quite well!

Note: if you do not like Flatpak and would prefer another way to install and use the ProtonMail Bridge application on your system, your best bet is to contact ProtonMail. Ask them about participating in the Linux beta! The contact information is located on this page.

To start the installation of the ProtonMail Bridge application on your Linux PC, start by launching a terminal window on the Linux desktop. Press Ctrl + Alt + T or Ctrl + Shift + T on the keyboard.

Once the terminal window is open, install the “flatpak” package on your Linux system with your computer’s package manager. Or, follow our guide to learn how to install it on various Linux distributions.

When the “flatpak” package is installed, the Flatpak runtime is ready to go. The next step is to add the Flathub app store to your Linux PC. To do that, use the flatpak remote-add command down below.

flatpak remote-add --if-not-exists flathub https://flathub.org/repo/flathub.flatpakrepo

After adding the Flathub app store to your Linux PC, use the flatpak install command below to install the ProtonMail Bridge program. Keep in mind that when you run this command, the Flatpak runtime will also install various dependencies and tools that the app needs to function correctly.

flatpak install flathub ch.protonmail.protonmail-bridge

Assuming the flatpak install command runs successfully, you will have the latest version of the ProtonMail Bridge app set up on your Linux PC. Now, open it up by searching for “ProtonMail Bridge” in the app menu, or by running the following flatpak run command down below in a terminal window.

flatpak run ch.protonmail.protonmail-bridge

Set up the ProtonMail Bridge

Start the ProtonMail Bridge setup process by launching the app (if you haven’t already.) When the program is open, follow the step-by-step instructions outlined below to get it working.

Step 1: The first step in setting up ProtonMail is installing a compatible email account. As of now, the best email app that works with ProtonMail Bridge is Mozilla Thunderbird. Follow this tutorial to install the latest Thunderbird if you do not already have it installed.

Step 2: Go to the ProtonMail Bridge and log in with your account and password. Then, locate the “Mailbox configuration” button and click it. It will provide you with the correct configurations for Thunderbird.

Step 3: Launch Thunderbird on your PC. When it starts up, the new account wizard will appear. Enter your ProtonMail email address into the “Email address” box.

Step 4: Locate the “Password” box and copy the password from the ProtonMail Bridge mailbox configuration window. Be sure to check the box next to “Remember password” so that you do not have to re-enter the password each time Thunderbird is opened.

Step 5: Find the “Manual config” button and click on it. Selecting this button will reveal advanced configuration options for Thunderbird.

Fill out all of the text boxes in the Thunderbird with the information from both the IMAP and SMTP settings in the ProtonMail Bridge mailbox configuration window. All passwords must be set to “Normal password.”

Step 6: Find the “re-test” button at the bottom of the account creation window and click it. It will test the connection settings you have added to Thunderbird and assess if the information is acceptable.

Step 7: Locate the “Advanced config” button at the bottom-left section of the account creation window and click on it. Selecting the “Advanced config” button will force Thunderbird to accept ProtonMail Bridge’s unique account settings.

Step 8: When the “Advanced config” window appears, do not change anything, as your information is already entered. Instead, select the “OK” button to confirm the account information is correct to add your ProtonMail account information to Thunderbird.

Step 9: Upon adding your ProtonMail account to Thunderbird, you will see a pop-up window appear. This pop-up window says, “Add Security Exception.”  Select the “Confirm Security Exception” button.

Please note that there is no actual security concern. The address in Thunderbird (127.0.0.1) is the localhost, which is your computer, running the encrypted ProtonMail Bridge app.

You will need to confirm a security exception twice. One for 127.0.0.1, and one for 127.0.0.1:1025. Keep in mind that the 127.0.0.1:1025 security exception prompt may not appear until you attempt to send an email.

After confirming both security exceptions, your ProtonMail messages will load into Thunderbird. Enjoy!

The post How to set up the ProtonMail Bridge on Linux appeared first on AddictiveTips.

How to access Bitwarden passwords from the Linux command-line

Do you use the open-source password manager Bitwarden on your Linux PC? Do you like the GUI application, but wish that they had a command-line tool to use as well? As it turns out, they do! Follow along with this guide to learn how to access Bitwarden passwords from the Linux command-line!

Installing Bitwarden CLI on Linux

Bitwarden CLI must be installed before we demonstrate how to use it. Thankfully, the developers of the app have made it quite easy to set up. To start the installation, open up a terminal window on your Linux desktop by pressing Ctrl + Alt + T or Ctrl + Shift + T on the keyboard. With the terminal window open, follow along with the command-line installation instructions outlined below that correspond with your Linux operating system.

Snap package

The best and quickest way to get the Bitwarden CLI application working on a Linux distribution is to get the Snap package version. Why? There’s no need to install NodeJS or NPM, or anything like that. Install the Snap runtime, install the package, and go.

If you’re looking to get the Bitwarden CLI through the Snap Store, start by enabling the Snap runtime on your Linux PC. The runtime is easily set up by installing the “snapd” package and enabling the snapd.socket service with systemd.

Note: Can’t figure out how to set up Snapd on your Linux PC? Check out our in-depth tutorial on how to set up Snap packages on Linux.

Once the Snapd runtime is up and running on your Linux PC, the Bitwarden CLI app can quickly be set up on your Linux PC with the following snap install command below.

sudo snap install bw

When the installation is complete, access the help area for Bitwarden CLI by executing the following command.

bw --help

NPM

Those that are unable to run Snap packages must install the Bitwarden CLI tool using the NodeJS package manager (NPM). To get NPM working, enter the commands that match your Linux PC.

Ubuntu

sudo apt install npm

Debian

sudo apt-get install npm

Arch Linux

sudo pacman -S npm

Fedora

sudo dnf install npm

OpenSUSE

sudo zypper install npm

With the NPM package management tool working, use the npm install command to grab the latest release of Bitwarden CLI. Please note that during the installation, NPM may show some errors. These errors usually mean NPM is out of date. To update your release, check the official NodeJS website.

sudo npm install -g @bitwarden/cli

The installation may take some time, as it is built and not a static package like with the Snap release. Sit back and be patient for a couple of minutes till the installation is complete.

When NPM finishes, you’ll be able to confirm Bitwarden CLI is installed on Linux by running:

bw --help

Configuring Bitwarden CLI

The Bitwarden CLI app is set up. Now it is time to configure it so that it can display passwords. To start the configuration, open up a terminal window and follow the step-by-step instructions below.

Step 1: Use the bw login command. This command will allow you to generate a configuration file, and attach your Bitwarden user account to the app.

bw login

Step 2: Upon entering the bw login command, you will see a prompt in the terminal window that says “Email address.” Enter the email address associated with your Bitwarden account, and press the Enter key.

Step 3: After entering your email address, the bw login command will print a second prompt on the screen. This prompt says, “Master password.” Enter the password to your Bitwarden password vault.

Step 4: Once you’ve logged in, you’ll see a message that says, “you are logged in!” Followed by export BW_SESSION=”YOUR_SESSION_KEY_HERE.”

Copy the export BW_SESSION=”YOUR_SESSION_KEY_HERE” command from the output to your clipboard. Then, open up .bashrc in the Nano text editor with the command below.

Note: BW_SESSION=”YOUR_SESSION_KEY_HERE” is an example. The actual command in the Bitwarden CLI prompt will be various letters, symbols, and numbers.

nano -w ~/.bashrc

Step 5: Make a new line in the Nano text editor by pressing the Enter key on the keyboard. Then, paste the code below. Please note that you must change “YOUR_SESSION_KEY_HERE” in the code with the actual session key that appears in the terminal prompt after running bw login.

alias bw-unlock='export BW_SESSION="YOUR_SESSION_KEY_HERE"'

Step 6: Save the edits to your Nano text editor by pressing Ctrl + O. Then, use Ctrl + X to close the Nano text editor.

Step 7: Close the terminal window and re-open it. When the terminal window is back open, run the command bw-unlock to unlock your Bitwarden password vault.

bw-unlock

Using Bitwarden CLI

Using Bitwarden CLI is done through various bw sub-commands. To learn how to find passwords in your vault, try the command-examples below.

List all passwords available

To list all passwords available in the Bitwarden vault, run:

bw list items --pretty

For more information on the bw list command, run bw list –help. It outlines the in-depth operations you can do with it.

List password for a specific website

Need to find the password to a particular site from your vault? Execute the bw bw list items –search command.

 bw get password example.com

Sync passwords with Bitwarden server

To re-sync, the Bitwarden CLI app with the Bitwarden central server, run the bw sync command.

bw sync

Delete item

To delete an item in the vault, do the following. First, run bw list –pretty and find the item’s ID code. Then, use bw delete item.

bw delete item YOUR_ID_CODE_HERE

More BW commands

We covered the basic Bitwarden CLI commands. However, there is more to the app. For more information on how to use Bitwarden commands, run:

bw --help

Need help with a specific sub-command? Remember to replace “sub-command” in the command below with the command you want more information about. Such as bw get, bw list, etc.

bw sub-command --help

The post How to access Bitwarden passwords from the Linux command-line appeared first on AddictiveTips.

How to customize the Linux terminal with bash aliases

An alias is effectively a “shortcut” command in Bash. For example, if you use the terminal in Ubuntu a lot, and get sick of typing sudo apt update;sudo apt upgrade -y all the time, you can create an alias called “update” that will execute those same commands without needing to type out so much.

Bash aliases are defined in every user’s home directory in the .bashrc file. For more information on aliases, run the man command below. It will show you all there is to know about aliases, how they work, and what you can do with them.

man bash | grep alias

You can also take a look at the complete Bash manual by running:

man bash

Setting commands as aliases

The most common use for alias in Bash is using it to execute multiple, long commands at once to save time. In this example, we will go over how to turn Ubuntu’s long update commands into a simple alias.

To start the process, open up a terminal window on your Linux desktop by pressing Ctrl + Alt + T or Ctrl + Shift + T on the keyboard. Then, open up your .bashrc file in the Nano text editor with the command below.

nano -w ~/.bashrc

Inside of the .bashrc file, you will notice a lot of code already there. The developers of your Linux distribution define this text. If you do not understand what any of it is, it is best to ignore it and leave it be, and move to the bottom of the file.

At the bottom of the .bashrc file, press the Enter key to create a new line. It is critical to create a new line in your .bashrc file before adding to it, as you could mess up the code already there.

After creating a new line in the .bashrc file, write out alias on the new line. Each new alias you create must start with alias , otherwise .bashrc and your terminal emulator will not read it correctly.

alias

Following alias= on the new line, you must give your new alias a name. In this example, we are covering Ubuntu’s long update commands, so, we will use ubuntu-update as the new alias name. However, feel free to name your alias whatever you like.

alias ubuntu-update

Once you’ve named your alias, it is time to add in the = sign.

alias ubuntu-update=

Next, after the = sign, add in the first " (quotation mark). This quotation mark will contain all of your commands within the alias.

alias ubuntu-update="

So far we have alias ubuntu-update=". Now it is time to add in the commands that we want the alias to call when ubuntu-update is used.

Note: use ; to write multiple commands in one line. Such as command1;command2;command3, and so on.

alias ubuntu-update="sudo apt update;sudo apt upgrade -y

When you’ve finished writing out the commands in the alias, close it off with the second " (quotation mark). With both quotation marks, it should look like the example below.

alias ubuntu-update="sudo apt update;sudo apt upgrade -y"

Save your new alias by pressing Ctrl + O on the keyboard. Exit Nano with Ctrl + X. Then, close the terminal window and re-open it.

When you’ve re-opened the terminal, run ubuntu-update to try out the new alias.

Setting bash scripts as aliases

Did you know that it is also possible to run bash scripts as an alias? Here’s how it works.

First, open up your .bashrc file. Then, go to the bottom of the file and press the Enter key on the keyboard to create a new line in the file.

sudo nano -w ~/.bashrc

On the new line, write alias followed by the name of the script. In this example, the script name is mybashscript. It should look like alias mybashscript.

alias mybashscript

Next, add in the = sign, and the first " (quotation mark). After adding in the = and ", it will look like the example below.

alias mybashscript="

Following the first " (quotation mark), add in the command to launch your code. Please remember that this is an example, so you will need to replace ~/path/to/bash/script/script.sh with the actual script file, you want to execute within the .bashrc alias.

alias mybashscript="bash ~/path/to/bash/script/script.sh

After writing in the command to execute the script file, close off the alias with the second quotation mark ". When the entire alias is written out, it should look something like the example below.

alias mybashscript="bash ~/path/to/bash/script/script.sh"

Save the edits to the .bashrc file by pressing Ctrl + O, and exit with Ctrl + X. Then, close your terminal window and re-open it to execute your new bash script via an alias.

To launch the alias, run mybashscript (or whatever you’ve named your alias) and press Enter.

The post How to customize the Linux terminal with bash aliases appeared first on AddictiveTips.

How to install the Cloudy GTK theme on Linux

The Cloudy GTK theme is a modification of the famous Arc theme. The design is that of material design, and it is stylish. It offers up a unique, bluish theme that reminds users of a cloudy sky.

The Cloudy theme comes in a variety of different colors, including light grey, soft grey, dark grey, light blue, dark blue, and soft blue. If you’re a fan of blues and greys and love material design, follow along to get the Cloudy GTK theme working on your system!

Downloading the Cloudy GTK theme

The Cloudy GTK theme is meant for both GTK3 and GTK2 desktop environments so that it will work on everything from Gnome Shell, to Cinnamon, Budgie, to more traditional desktop environments like Mate or XFCE 4. However, before we talk about setting up the theme, we must download it.

Cloudy is hosted on Gnome-look.org, a popular Gnome GTK theme website. On the site, they have several different download options available. Take a look around for the “Files” tab, and select it.

Upon selecting the “Files” tab, you will notice several different TarXZ archives available for download. Follow the instructions below to learn how to download these archives.

Note: in addition to being available on Gnome-look.org as TarXZ archives, the theme is readily available for download on GitHub. However, be warned that if you want to download the theme files from GitHub, you must install the Git package on your Linux PC, as it does not come standard on all operating systems.

Light Grey

To get your hands on the light grey version of the Cloudy GTK theme, find the Cloudy-Light-Grey.tar.xz file in the “Files” tab, and click on the blue button to download.

Dark Grey

Want to use the dark grey version of Cloudy GTK on your Linux PC? Locate the Cloudy-Dark-Grey.tar.xz file in the “Files” tab, and click on the blue button to start the download.

Light Blue

Interested in using Cloudy GTK’s light blue variation? Sort through the “Files” list available on Gnome-look.org and find the Cloudy-Light-Blue.tar.xz file in the list. Once you’ve found it, click on the blue download button to get your hands on it.

Dark Blue

Looking to use the dark blue version of the Cloudy GTK theme on your Linux PC? Look through the list of files in the “Files” tab on Gnome-look.org. From there, click on the blue download button next to Cloudy-Dark-Blue.tar.xz to get it.

Soft Blue

Want to use the soft blue version of the Cloudy GTK theme on your Linux computer? Here’s how to download it. First, look at the “Files” tab on Gnome-look.org for Cloudy-SoftBlue-Dark.tar.xz. Then, find the blue download button next to it and click on it with the mouse to start the download.

Soft Grey Dark

To use the soft grey dark variation of the Cloudy GTK theme on your Linux PC, do the following. First, go to the Gnome-look.org page for Cloudy GTK. After that, find Cloudy-SoftGrey-Dark.tar.xz on the list. Then, click on the blue download button next to it to start the download.

Soft Grey Light

Need to download the soft grey light variation of the Cloudy GTK theme to your Linux PC? Sort through the “Files” tab on Cloudy GTK’s Gnome-look.org page and locate Cloudy-SoftGrey-Light.tar.xz. After that, click on the blue download button next to it to get your hands on it.

Extracting the Cloudy GTK theme

As the Cloudy GTK theme files come in a TarXZ format, we must extract it using the command-line. To start the extraction process, press Ctrl + Alt + T or Ctrl + Shift + T on the keyboard to open up a terminal window. Then, use the CD command to move into the “Downloads” directory.

cd ~/Downloads

Once inside of the “Downloads” directory with your Linux terminal session, use the tar command to extract the contents of the Cloudy GTK TarXZ theme files.

tar xvf Cloudy-*.tar.xz

When the files are extracted, the Cloudy GTK theme files will appear in your “Downloads” directory.

Installing the Cloudy GTK theme

Installing GTK themes on Linux can go one of two ways. The first way is installing it as a single-user, which means that only the user that installs it has access to the theme. The second way is system-wide, which allows every user on the system access to the theme. In this guide, we will demonstrate how to set up Cloudy GTK in both ways.

Single-user

Installing Cloudy GTK as a single-user is best done if you’re the only one using your Linux PC. To start the installation, open up a terminal window and use the mkdir command to create a new “.themes” folder in the home directory (~).

mkdir -p ~/.themes

Next, use the CD command to move the terminal window into the “Downloads” folder (if your terminal isn’t already there.)

cd ~/Downloads

From the “Downloads” folder, use the mv command to place the theme files into the “.themes” directory.

mv Cloudy-*/ ~/.themes/

System-wide

If more than one person is planning on using Cloudy GTK, system-wide installation is the way to go. To start the installation, move the terminal window into the “Downloads” directory (if it’s not there already.)

cd ~/Downloads

Once inside of the “Downloads” directory, make use of the sudo -s command to elevate the terminal window to root privileges.

sudo -s

Finally, install the Cloudy GTK theme files to the /usr/share/themes/ directory in the root file system.

mv Cloudy-*/ /usr/share/themes/

Enabling the Cloudy GTK theme

You’ve set up the Cloudy GTK theme on your Linux PC, but installing it is not enough. You must enable the theme on your desktop environment if you want to begin using it.

To enable the theme, open up “Settings” and click on the “Appearance” or “Theme” settings. Then, change the default theme to Cloudy GTK. Or, if you’re having issues getting it working, follow one of the links below!

The post How to install the Cloudy GTK theme on Linux appeared first on AddictiveTips.

How to securely erase a USB flash drive on Linux

Have a USB flash drive with sensitive files on it? Do you plan on giving it away to a family member or friend, but want to securely erase it first? We can help! Follow along and we’ll show you how to securely erase a USB flash drive on Linux!

Option 1 – Erase USB flash drive with KDE Partition Manager

If you’re a beginner Linux user, the best way to erase a USB flash drive securely is with the KDE Partition Manager. Why? It has a built-in “Shred” function that can safely delete any partition on any device, including USB ones.

To start the process of erasing your USB flash drive securely, the KDE Partition Manager must be installed. Open up a terminal window on your Linux PC by pressing Ctrl + Alt + T or Ctrl + Shift + T on the keyboard. Then, follow command-line instructions outlined below that correspond to your Linux distribution.

Ubuntu

sudo apt install partitionmanager

Debian

sudo apt-get install partitionmanager

Arch Linux

sudo pacman -S partitionmanager

Fedora

sudo dnf install kde-partitionmanager

OpenSUSE

The KDE Partition Manager app is available to all OpenSUSE Linux users running 15.1 LEAP or Tumbleweed. If you are still using 15.0 LEAP, you must upgrade, or KDE Partition Manager will not install from the software repositories.

sudo zypper install partitionmanager

Once the KDE Partition Manager is installed on your Linux PC, follow the step-by-step instructions below to learn how to erase your USB flash drive securely.

Step 1: Launch the KDE Partition Manager on your Linux desktop. To do this, open up the app menu by pressing Win. Then, type “Partition Manager” and launch it.

Step 2: When you launch the KDE Partition Manager, a password box will appear. Enter the password to your user account, as root privileges are required to use the program.

Step 3: With KDE Partition Manager open, plug in the USB flash drive you are trying to securely erase into the USB port (if it is not plugged in already).

Step 4: Press the F5 key on the keyboard to refresh the KDE Partition Manager. Refreshing the app will force it to re-scan your devices, which will allow it to detect the newly plugged in USB flash drive.

Step 5: When the KDE Partition Manager app has successfully detected your USB flash drive, look to the “Devices” column and click on it with the mouse to select it.

Unsure about what device is your USB Flash Drive? Look at the box it comes with (or the device itself) and determine the brand-name of the device. For example, if you have a Sandisk Cruzer Glide, “Sandisk Cruzer Glide” will appear in the device list.

Step 6: Upon selecting the USB Flash drive from the “Devices” list, you will be shown the USB flash drive’s partitions. Select each partition on the device with the mouse and right-click on it to reveal the right-click menu.

In the right-click menu, locate the “Shred” option, and select it to tell KDE Partition Manager you’d like to shred the partition (AKA erase it securely).

Step 7: Find the “Apply” button at the top-left section of the app and click it. Clicking “Apply” will initiate the shredding process.

Be patient and wait for KDE Partition Manager to erase your USB flash drive securely. When the percentage in the pop-up window “reads 100%”, the process is complete!

Option 2 – Erase USB flash drive in the command-line

Not a fan of using GUI tools like the KDE Partition Manager but still want to erase your USB flash drive securely? Good news! It is possible to securely erase your drive with the Linux command-line.

To start the erasing process, open up a terminal window by pressing Ctrl + Alt + T or Ctrl + Shift + T on the keyboard. Then, once the terminal window is open, plug in the USB flash drive into the USB port and run the lsblk command.

lsblk

Look through the lsblk output and try to find the name of your USB flash drive. The name should be /dev/sdLETTER. For more help finding out your USB flash drive’s ID, follow our guide on how to find hard drive info on Linux, as it can demonstrate how to use the lsblk command.

Once you’ve found the USB flash drive’s name, take note of it and unmount it from the system using the umount command.

Note: /dev/sdLETTER is an example. Your USB flash drive’s name will be different. Be sure to change /dev/sdLETTER in the command example below, or it will not work!

sudo umount /dev/sdLETTER

If the USB flash drive refuses to unmount, run the command with the -l switch.

sudo umount /dev/sdLETTER -l

With the USB flash drive unmounted, use the DD tool to erase it securely.  Once again, be sure to change /dev/sdLETTER in the command below to the actual name of your USB flash drive found in the lsblk command output.

sudo sudo dd if=/dev/urandom of=/dev/sdLETTER bs=10M

The DD tool takes a long time, so be patient. When the process is complete, your USB flash drive will be securely erased.

The post How to securely erase a USB flash drive on Linux appeared first on AddictiveTips.