ParrotOS And i3 Part 1

matty jones
6 min readDec 9, 2020

ParrotOS is a relative newcomer in the Linux security and privacy world, having started in 2013. While Kali is a great choice for penetration testing, Parrot is more pliable. It will certainly work out of the box but can be made better with some tweaks.

If you haven’t read ParrotOS And Hack The Box Buildout Part 1 and ParrotOS And Hack The Box Buildout Part 2 yet, you should skim them for installing a virtual machine of ParrotOS, configuring the sharing, and then updating the OS, tools, and some simple configurations. This article takes nothing for granted and assumes a completely untouched install of ParrotOS Mate in a virtual machine to keep things simple for those that just want i3.

This series will be less about HTB and more about installing and setting up a Parrot specific i3 on top of Mate. I will then provide insight into some of the challenges with stripping Mate and Gnome entirely from Parrot in Part 2.

While this can be done, you need to ask yourself why you are doing this and how comfortable are you with the i3 way of doing things. It is easy to do, but not so easy to come back from.

The next several parts of this series will be more spread out and will deal with stripping everything out from a Mate install and for those that want ultimate control, building ParrotOS directly from Debian 11, with i3 as the native window manager.

Clap {1…50} and follow me to keep an eye out when the later parts to this series and my others drop.

Note: There is an effort underway to build a supported version of Parrot with i3.

Install i3

Before we do anything we need to make sure i3 is installed. By default, it should be, but we need to update it and we can install polybar and rofi as well. I will try to keep this as unopinionated as possible, but a few things are just too useful. Remember to do sudo apt update first.

At this point, you can reboot and select i3 at the login manager to get things started. You can automate all of this from installing i3 -> fully configured environment but I am not going to touch on that much as doing so is generally very opinionated I will leave it up to you, the reader, to automate where it makes sense for you.

Initial Configuration

At this point, i3 is installed and running, trust me. The screen is blank as there is no valid configuration out of the box. Bring up a terminal window with Alt + Enter, if you are on OSX as I am it is Option + Return.

The first thing is to remove the existing config file with rm ~/.config/i3/config then we can create a valid config, using the configuration wizard, i3-config-wizard. It will ask a few questions and you are on your way.

As a word of note, it may make sense to select the Windows/Command key as the modifier but at least with VMWare Fusion, you may run into issues cutting and pasting, so you should select Alt as the modifier key. You can also just copy the default config cp /etc/i3/config ~/.config/i3/.

Whenever you make config changes, it is a good idea to reload the config, to be certain you didn’t break something. In this case, you should restart i3 with Alt + Shift + e, to be sure everything is set right. If you have an issue you will see a nagbar and box at the top of the screen giving you a general idea of what is borked.

At this point, you have a clean, abet sparse workspace. The only thing you will notice is the stock status bar at the bottom right of the screen.

There are some changes that need to be made to the config file before we can call it baseline. The major one is addingexec --no-startup-id vmware-user-suid-wrapper to the bottom to allow cut/paste between host and VM.

Polybar

If the stock bar on the bottom is not doing it for you, there are ways to configure it via i3status, it is fairly straight forward but not the best middle ground between performance and eye candy.

Getting an example polybar up and running is fairly basic but will require a few additional packages.

When doing the font config, you can leave all the defaults as they are except you want to enable bitmap fonts by default. There is also mention of setting some bits in your X config file, you shouldn’t need them for this use case and setup.

Back in the i3 config file, you will need to comment out the bar section and add exec_always --no-startup-id $HOME/.config/polybar/launch.sh at the bottom of the file.

We then need to reflect the correct bar in the launch script. vim ~/.config/polybar/i3 and change the last line from parrot to example and make the script executable with chmod +x ~/.config/polybar/launch.sh .

rofi

The last piece I recommend is replacing the stock dmenu with rofi. Again I am not going to run through all the configuration options and themes available, except to say the possibilities are enormous. Reditt as well as other sites have many examples of the uses and themes you can have.

Here is a simple generic implementation. I pulled the theme from a Reddit post and made a few changes under the hood, namely replacing the keyboard shortcut for dmenu. Now instead of a run box at the top of the screen, I have a mouse aware workspace switcher, run menu, and application menu front and center when I need it.

Once you have it installed you can do the same by commenting out the existing dmenu shortcut and adding bindsym Mod1+d exec --no-startup-id “rofi -combi-modi window,drun,ssh -theme solarized -font “hack 10” -show combi” to your i3 config file.

Wrap UP

This is by far the simplest method to use i3 with ParrotOS till the supported version drops. There is no timeframe for this though. If you want a lighter, slightly more performant box, you can use sudo autoremove --purge mate-* and sudo autoremove --purge gnome-* if you really want to take it to that level. I caution, this can be a rabbit hole if you don’t have some experience with Linux, especially networking. Do yourself a huge favor and create a snapshot before doing it.

In order to get this working, you will need to reinstall several packages, including network management interfaces, a display manager, and some other random packages related to VPN's.

This is rather extreme and we will look to tackle this in a future post. The second part to this series will cover some of the configurations in greater detail as well as how to get started creating a custom ParrotOS specific configuration including themes, backgrounds, and adding some additional eye candy including conky, for those that like those things.

--

--