Ricing Kali Linux – Part 2

Forward

In this tutorial we will cover installing i3-gaps, the urxvt terminal emulator, feh, wal, and rofi. It’s assumed you went through part 1. If not, you may want to go read that now.

Installing i3-gaps
Logging into i3

I’m not a fan of re-inventing the wheel. There’s a wonderful how-to for installing i3-gaps on Ubuntu that works well for Kali. Head over and follow it, then come back… Done? Great. Now reboot. At the log in screen enter the username, then after hitting next you’ll see a gear.

You’re now logged into the i3 window manager. This is a different world than most window managers.  You will be very VERY well served by learning the basic commands and what they do. Take a few minutes to go over the i3 Reference Card and learn how to open up new terminal windows.

Notice the Red Error

So you have probably noticed the ugly red error message by now. That’s a result of the I3 Status bar being referenced, but not installed.  There are several options available for status bars (the i3 bar, polybarm lemon bar, etc.) in this series will just add the basic status bar for now. Maybe the polybar later. We’ll see.

The i3 Status Bar

So go ahead and open a terminal window with (usually by hitting [alt] + [enter]) and entering the following command: apt install i3status. Once that’s done log out ([alt] + [shift] + [e]) and back in. You should now see the red/white/green status bar. i3 is now ready to go in its most basic form.

Replace the default console app with URXVT

The default terminal doesn’t offer much flexibility so I like to replace it. My terminal of choice is URXVT.  Install the URXVT terminal by running apt install rxvt-unicode.

Taking a Snapshot
Take a Snapshot!

Things are about to start getting messy. Snapshot now or proceed at your own peril. 😉

Make i3 the default terminal

I’ll assume you know how to edit text files in Linux.  If not, here’s a link to using vi. I won’t lie though, if you are trying to Rice Kali Linux, and you don’t know how to edit a text file, I genuinely wonder how you ended up here. 😉

The URXVT Terminal Window

Anyway, edit the i3 config file which is ~/.i3/config. In there, find the line “bindsym Mod1+Return exec i3-sensible-terminal” and replace it with “bindsym Mod1+Return exec /usr/bin/urxvt”. Once it’s saved exit out of all terminal windows and  reload the i3 config by pressing [alt]+[shift]+[r].

Remove the URXVT Scroll Bars and Apply Transparency

Create the file ~/.Xdefaults, and in it enter the following line to get rid of the scrollbar and apply transparency:
URxvt*scrollBar: false (NOTE THE CAPITAL “B”!!!)
URxvt*transparent: true
URxvt*shading: 40

Install feh to Add a Wallpaper

Download a wallpaper you like, and save it somewhere easy to access.

Wallpaper By Dean Ashley on ArtStation

(I’ll leave how you download it up to you…) I usually put it in /wallpapers and name it wallpaper.png or something similar. Install feh by running  “apt install feh” Once it’s done edit your ~/.i3/config file to add the line exec –no-startup-id feh –bg-scale ‘/wallpapers/wallpaper.jpeg’  You now have a scaled background each time you log in. That said, the text is kind of an odd color. Let’s fix that.

Install and Configure PyWal
Terminal Colors Changed with PyWal

Running feh without pywal can make for some ugly (and possibly unusable) color schemes for the terminal. To fix that we use PyWal. Install Python3-pip by running “apt install install python3-pip”, then install pywal running “pip3 install pywal”. Once that’s done, add the following lines at the end of your .bashrc (according to the documentation you should put this in the .i3/config file but it NEVER LAUNCHES FOR ME!!!)
wal -i /wallpapers/wallpaper.jpeg
clear

Tighten up Those Gaps!

The tutorial is good, but I prefer a smaller gap.

So edit your ~/.i3/config file and update the following lines:
gaps inner 10
gaps outer 0

Wrapping Up

We made some serious progress here. We installed  i3, the i3 status bar, URXVT, feh, and PyWal. We also configured some transparency and colors. Stay tuned for Part 3 where we’ll dig a little deeper and install rofi, polybar, and other fun stuff!

Light Probe – Small Adjustments

Spent a few hours addressing some odds and ends today. Got the “enter” key working from CLI entry textbox. It now actually runs the command when you hit enter, then clears the entry textbox. I also added a CLI command to display the LCD Address. SHOW-LCDADDRESS is working as expected.

I made the LCD settings variables. (address, total rows, total columns). This was done just as a best practice to facilitate easier use of different LCD’s later.

The functions in the Arduino code were moved around into a more logical sequence. Doesn’t affect code flow, but does affect readability.

Latest build here.
Latest source code is on GitHub.
I’m on Twitter. 

Light Probe – Time For A (Mega) Upgrade

So as this project has grown I’ve started to see memory warnings in the IDE. “Low memory available, stability problems may occur.”  Didn’t think too much about it until today when I kept running into weird issues where stable code just wouldn’t run correctly. For example, the printNextline()  would only print half the output of the line (WTF?) and the parseAndExecuteCommands(). After spending an embarrassingly long time picking through the code looking for the problem I decided to actually the shiny new Mega 2560 I bought the first time I saw the command and put that baby into production.

Learned the Mega is not a straight pin-for-pin match of the Uno.  Mega has a SDA/SDC pins (Sweet), and for whatever reason the LCD2004 has a difference address on the Mega than on the Uno. 0x37 and 0x3f respectively.  That said, after I got the conversion done it’s running smoothly again.

Latest build here.
Latest source code is on GitHub.
I’m on Twitter. 

Watching the World

It’s one thing to intellectually understand that the world is constantly attacking every address on the internet. It’s another to actually be able to visualize the data and see it.  For fun I have been forwarding all of my inbound traffic logs to Graylog, and have enabled the Geolocation features.  I never expected Seychelles to be one of the top sources of inbound traffic, but it is.  Of course the usual suspects show up. Russia, southeast Asia, etc. But there is SO MUCH traffic from that tiny little island.  Just an interesting observation.

 

BadStore

Just playing around with some basic stuff. BadStore is ludicrously old, but it’s like playing the original Mario. Still fun.  There’s just to many little things to play with. MySQL, XSS, form validation failure, SQL injection.  I recently set up a retropie box for similar reasons.  Having fun.

Frustrated with Inject_CA

Spent this morning trying to get the Inject_CA module to work properly (or at least properly as I see fit). It is successfully inserting the key in to the registry, and reports success, but the actual certificate isn’t showing up in the Certs MMC.  If I don’t see it there, then I have to assume it’s no actually loading properly. Nothing useful from Google so far.  Well persistence will hopefully pay off, because this one is too useful to pass up.