Enpass

Small edit: I’m currently trying out Keepass, which an opensource password manager that has been around for over 10 years. It seems pretty good aswell but the user experience isn’t quite the same since it’s harder to setup and it doesn’t have any cloud syncing for linux. So if you don’ trust a newly established password manager that is closed source keepass is probably the way to go. It allows you to migrate from multiple other password managers including Enpass.

For the longest time I didn’t really follow the idea of “use strong unique passwords for every service”. One the one side I don’t really have any super important accounts (at least not that many) and all the ones that are important have two factor authentification. So I usually used pretty weak passwords and just relied on the two factore authentification. I never had any issues with it (maybe I’m jinxing it here. EDIT: I did ūüėõ, but once again nothing happened) but a while ago I decided I shouldn’t wait until something bad happens to start using better passwords, infact I already got a number of emails from one service which told me that someone was trying to log into my account from somewhere in India, but they couldn’t since they also needed my email (Which obviously didn’t use the same password).

So I went ahead and looked for a good password manager and after a short search I found Enpahttp://keepass.info/ss. Keeping all passwords in one place is both good and really bad. For one their secured and you don’t have to memorize them. On the other hand if someone were to get access they’d have it really easy to compromise all of your accounts.

Enpass advertises itself as the “best password manager”. I haven’t used any others but for now I’m happy with it. It’s cross-platform runs on Linux, Windows and my android phone. It encrypts the entire password database with your master password and can sync across various cloud services like Google Drive.

The best thing about it is the browser addon which allows you to directly interact with enpass and transfer login information to the browser. Also it can generate passwords on the fly while creating a new account with settings like lenght, use special characters or only use pronouncable words. When creating a new account it can also automatically add the login information to the database. Obviously all that can only be done when logged in with the master password. You’ll be automatically logged out after 1 minute of inactivity within Enpass (Which can be changed). Passwords that have been copied to the clipboard will also be cleared after a give timeout.

Something that you should note is that passwords you have generated can be looked up in the password history of Enpass. I didn’t know that in the beginning an thought that the passwords were lost, since the clipboard was cleared.

To sum it up Enpass is a pretty useful tool which is free for Windows, Linux and Mac. The mobile version is limited to 30 database entries though. The only thing that can be concerning is the fact that one company could compromise thousands of accounts if they wanted to, let’s hope they don’t.

fping on windows

I started working on a ping plotter a while ago and back then I still was on linux and was currently getting into C. Now that I’m not on linux anymore I kinda dropped the project for a while. After that pause I’ve finally gone back I decided to ditch C and write it in Python since I’m developing it on windows but want it to work on linux aswell. The ping plotter is supposed to ping an ip over a timespan and then make a graph out of the latency values. For that I’ll use the ping command since that’s the easiest way to get latency values without adiministrative rights. The issue is that the windows ping.exe and the linux ping command return different outputs so formatting them means I have to differenciate between windows and linux.

After some searching I came across fping which is a custom ping program for linux. It’s designed to be used in scripts which digest it’s output. So now the only issue is to compile that for windows. I used cygwin for it since nobody seems to have done it before me. Sadly the build script returns errors when compiling. So here’s how I fixed that:

First get the sourcode from the releases. Now we’ll need to convince cygwin that we have the right headers. Download this header file (made by John Paul Morrison) as icmp.h. Copy it into these folders and replace it with the icmp.h that is in those folders (That one is empty, you can open it if you want):

\usr\include\icmp.h
\usr\include\cygwin\icmp.h

The path to cygwin will usually be C:\cygwin64\ or C:\cygwin\. Now you can run

$ ./configure
$ make

Now you’ll have a fping.exe in the ./src/ folder. Run a command prompt as admin and then run something like

C:\fping\src>fping.exe -s google.com

That should give someting like this

google.com is alive

       1 targets
       1 alive
       0 unreachable
       0 unknown addresses

       0 timeouts (waiting for response)
       1 ICMP Echos sent
       1 ICMP Echo Replies received
       0 other ICMP received

 36.6 ms (min round trip time)
 36.6 ms (avg round trip time)
 36.6 ms (max round trip time)
        0.038 sec (elapsed real time)

Pretty cool, huh? But if you read carefully it needs adminstrative rights on windows and root rights on linux so all of that was kinda wasted… I’ll just use the output of the native ping commands instead but if anyone needs fping on windows here you go. For those whore are to lazy to compile it themselves you can download my compiled binary for windows here (By the way there seems to be an infected version of fping on the web so if you need some confidence, that this one isn’t a virus heres a virustotal scan or scan it yourself). It’s completely unmodified and all credits go to the original authors.

I’ll now go back to getting back into python and formatting ping command outputs. Wohoo.

Windows 10

So I have avoided windows 10 ever since the tray icon showed up for everyone for the free upgrade. The furthest I’ve gone away from windows 7 was 8.1. Since my windows 7 installation was getting kinda slow I decided to make a clean installation, and while I’m at it I thought I’ll go ahead and, for the first time, install windows 10 outside of a virtual machine.

The installation went smooth and I only had to untick about 300 settings about “collecting data to improve my experience”. After the main installation I went ahead and ran a few scripts to disable the rest of the services and I think I now a have a relatively useable installation of windows 10. So after I installed the basic software I need (which I heard can be automated using ninite or allmyapps, but I haven’t tried them) I went ahead and looked at some customisation with designs. There were some pretty cool looking ones but sadly one of them ended up toasting windows and trying to fix it only made it worse. Luckily I made a backup so that helped out a lot.

So after almost loosing my first installation of windows 10 about 2 hours in I stopped with the designs and installed something I knew from windows 8.1: Classic Shell, the free StartIsBack. It gives you a way to customize (or for windows 8 bring it back) your startmenu. The windows 10 start menu is way to big and full of useless stuff in my opinion so with classic shell you’ll get back the windows 7 styled start menu with a skin to fit the flat design of windows 10. It’ll also give you the search bar back and it’ll adjust to the accent color.

Due to the roll back to the backup I lost some software I had already installed, including winamp which was my goto music player for a while now. So I thought I’d use ths opportunity to give foobar a try but quickly dropped it since I didn’t like the interface and installing skins didn’t really work for me. But while looking for skins I found out about AIMP. I’ve never heard of it but I found a cool skin for it and it offers a lot of customization while staying very light weight (at least in terms of RAM usage).

So this is what my current installation looks like:

Classic shell and AIMP with the ncmpcpp skin

That’s basically it. We’ll see how long I can stick with it until I get annoyed or maybe to my surprise I’ll actually stay who knows.

Styling Firefox

A while ago I found out about the firefox addon stylish. It’s an addon that allows you to change the look of your browser and specific websites. Unlike themes it can completely redecorate almost all elements like the url bar, bookmark bar etc.

A small side note: The addon has sadly been bought by a big company. This is not the first time this has happened to an addon, but sadly this means using the addon will send information to that company, since that’s pretty much the only reason they bought it. Currently this is only enabled in chrome and can be disabled under the settings. An update for firefox will probably follow at some point, but I doubt that the option to disable the information collection is here to stay. So use this addon only if you’re okay with sharing some of your data (which I am not). There’s an alternative for chrome called Styler, but I haven’t found one for firefox.

On userstyles.org you can browse website and browser styles. I for one installed DarkTube so the YouTube design is easier on the eyes. So yeah with stylish you can have dark themes for most popular websites which don’t natively support it.

YouTube with the DarkTube theme

So since only making YouTube darker is kinda lame i also wanted firefox to be more darkish and more flat. So after some searching I came across powerline. Which is pretty cool, but the theme doesn’t include the bookmark bar nor the addon icons. But with my amazing css skills and some googling I modified powerline to fit my needs.

Firefox with my modified version of powerline

So as you can see Firefox is now entirely dark themed. The tabs look a little bit like those from chrome and they take up 100% of the window width, devided evenly to all open tabs. The url is centered at the top and on right are the icons from my addons. It’s not perfect but it does the trick.

So if you want to try my version you can get it here. Just copy the css text, make a new style under about:addons and paste in the text.

MPD Query

So I mentioned in another post that I use mpd and ncmpcpp to listen to music. The positive thing about this is that I can just close ncmpcpp when I don’t need it anymore and the music will continue playing, since mpd is responsible for the sound which is running completely in the background. Now sadly I have no indicator about what song is playing right now.

So I looked if anybody made a patch for dwm to display the current song, but everything I found didn’t really work for me. And I didn’t want a bash script to be running in the background. So I found a few people suggesting to make a simple C program to query the current song.

Now this is easier said than done, since I have no idea how to use mpd and C. The first thing I did was download the source code of mpd and copied the include directory into my project folder. So now I can write a program utilizing code from mpd. Now for the tricky part: Getting my program to connect to mpd and get the song name and some other information. I had some example code which showed how to connect and get the play time of the current song, so that helped a little bit, but getting the song name doesn’t work the same way.

For experienced people this task probably would be a thing of ten minutes but I not only had to deal with how mpd worked I also had to figure out how C works. And most time that was me writing like three lines of code, compiling it and finding out it compiled fine but crashed when running. So here’s what I have done so far:

Created a Makefile where the include directory (which containes the headers of mpd) is:

Makefile

VERSION = 3.02
CC      = /usr/bin/gcc

mpdq: mpdq.c
    $(CC) -o mpdq -lmpdclient mpdq.c

So this way compiling is just the command ‘make’. Next up is writing the actual code which started by me finding out how the main method looks in C and then moving onto actually fiddling with mpd. To work with mpd I needed these two headers:

#include <mpd/client.h>
#include <mpd/stats.h>

When those are included and the compiler doesn’t complain about not finding them you should be able to access the necessary methods to connect and query information from mpd:

struct mpd_connection  *connection = mpd_connection_new(NULL, 0, 0);

This will open a connection to the local mpd and return the pointer to the connection if it succeeded. The three arguments are only needed if the connection is to another computer. After that we want to get the current song and from that we can read most Song tags:

// Get current song as a struct
struct song = mpd_run_current_song(connection);
// Read name and artist
char *song_name   = (char *) mpd_song_get_tag(song, MPD_TAG_TITLE, 0);
char *artist_name = (char *) mpd_song_get_tag(song, MPD_TAG_ARTIST, 0);

And that is technically everything important to read information from mpd. The only other things I did were putting this in a loop, adding a command to make it appear in the dwm bar, differentiating between paused/playing and¬† cleaning up when closing. That’s all I have done up until now. I’ll see if I can get some controls like pause/play into the dwm bar but for now this’ll suffice.

DMEDYKJ

Here‘s the source code and here‘s a binary build. Just give it the run flag with chmod a+x and when running it should display the current song in the top left corner (Provided you use dwm and a song is playing in mpd :P).

tox

So my schedule for writng these things is rather random and so I thought I just I’d write about this pretty interesting tool: tox or rather utox. Tox is a chat protocoll which is focused on being fully encrypted and decentralized. Making it a very good alternative to other services which do not provide this level of security and privacy.

Tox is opensource and thus allows everyone to make their own chat client. The one I use is utox. It’s a lightweight program that runs on all major operating systems including mobiles.

uTox offers a bright and dark theme

Another goal of tox clients is to offer a zero configuration experience. No installation process and no setup time, just launch it and it works. When launching any client that uses the tox protocoll you’ll get a tox ID. This is what other people need to add you as a friend. The ID is a ~76 character long string consisting of letters and numbers, so it’s rather hard to remember but if you’re using uTox you can get yourself a tox ID which looks something like this: username@utox.org. That way people have it easier adding you.

Now the cool thing about tox that it isn’t limited to text, it allows you to quickly share screenshots of your desktop or just any file you have laying around with no maximum file limit. You can also do voice calls or video calls, in which you can use your desktop as a video input to share your desktop. Those things can also be done with multiple people in a groupchat.

Left: uTox on Linux / Right: Antox on Android

So to sum it up it’s a pretty useful tool that doesn’t hurt to try out. It’s still in early development though so you’ll experience some bugs and missing features.

btw my tox id is universal@toxme.io

Arch linux and dwm

So this is not the first time that I use arch and dwm, but after getting a new video card and cpu I took a break from using it and went back to windows.

Now that I’ve used windows for a while I decided to take a look at arch again. Sadly, like last time I used it, I had a few annoying issues when installing it. But those were mostly faults on my side.

Arch linux is a really customizable linux distribution which allows you to modify it from the ground up to fit your needs. That also means that installing process takes place in the console. No fancy GUIs. But the basic installation is a pretty straight forward process if you follow the guide.

What you get when booting the installation medium

Sounds like a doable thing, right? Well when I did this the first time the only issues I had were with dualbooting. Which ended up toasting my bootmanager. But that can be fixed with a windows installation disk. So booting the installation medium this time just got me a black screen. Fantastic. Later I found out that that is because I have a “fairly” new nvidia card which need the extra kernel parameter¬†nomodeset to even get to the console.

So after all that and making sure that grub played nice with my windows partition I ended up installing xserver and other things I needed. That was when arch asks you which package you want for libgl. Theres a vesa package (I think that’s the opensource one) and three nvidia packages. Great. Now on the wiki it tells you which you need for your video card but reading the wiki is for loosers so I used the next best package. After installing the nouveau driver, which is the opensource driver for nvidia cards everything looked good. Until I rebootet and got a blackscreen instead of dwm. Now that’s not the first time I had that happend, I once had that on ubuntu as well when I installed the video card driver.

So the first thing where I don’ goofed is in the .xinitrc file. That file is executed when you start the xserver (which is responsible for the fancy nancy graphical stuffs). In there you tell it what window manager to start. But before starting my window manager I ran another command which prevented my window manager from starting. Soo yeah, that explained the blackscreen. After fixing that I found my desktop to be in a very low resolution, but at least I saw a desktop.

I spend about an hour trying to fix this problem by intalling the nvidia drivers from the repositories and the offical website switching between blackscreens and a low res desktop and ended up reinstalling arch completely.

This time I directly installed the proprietary drivers and tadaa, everything worked out fine. I still need to configure a few things like auto mountin usb drives and mounting my windows partition. But all in all I’m happy to get a break from windows from time to time and use linux.

My current setup (Open programs are caja and surf)

For dwm I applied the following patches systray and pertag so I have a sytem tray aswell as seperate modes for all virtual desktops.

That’s it. I also installed mpd and ncmpcpp, just because it looks cool ūüėÄ