Easy steps to move away from GMail

2016-01-12 (1)

So if you are like me, paranoid and all then by now you have been wondering “how to move away from gmail”. There are e-mail services like Fastmail (check my sidebar) that offers to import from gmail, but it can only be done once else you might fall into duplication hell. Today I’m going to go over what I did:

Starting fresh

Wait, what? You deleted all your e-mails? No, of course not. I have a decade worth of e-mail and I can’t be bothered to go through all that data. First step is to go to Google Takeout and back up your data. Back up your mail data and download the archive when it’s done.

I did want to start fresh. There’s a catch on why though, I don’t need to keep track of my e-mails. There are people that do have to keep track of them maybe due to work.

Use a encryption tools like Veracrypt, Bitlocker, etc.

2016-01-12 (1)

While Bitlocker gets a bad rap for not being open source thus not being able to audit [insert childish “b-but it’s Micro$soft” comment]. What I’ve read from it personally I consider it safe as long as you don’t back up your recovery keys to Microsoft. If you have invested yourself in Windows please do yourself a favor and research more about Bitlocker, else you could also completely encrypt your physical volume with Veracrypt.

The point of using these tools is to create a container, size may vary due to your mbox file. I will continue explaining later in this post.

Choose your e-mail client

Personally there are many ways to access your mbox file. Heck if you wanted you could create a virtual pc (virtual box) with linux, all encrypted with your mbox file in it and read it through Thunderbird. So it would go like this (virtual image fixed size gets to a Veracrypt container, load the image whenever you want with Virtual Box).

That’s too complex, seriously. What I did was simple, I chose/downloaded Thunderbird from Portable-Apps and installed it in my C:/ to later move it to my Veracrypt container.

Install ImportExport Tools for Thunderbird

Installing portable Thunderbird was the first step. Now install the ImportExport tools because with that tool you can import your mbox file to Thunderbird. Note that this process while take minutes to complete if the mbox is too big.

Let it index

This also may take minutes or hours. Once you have finished importing your mbox, let Thunderbird finish indexing.

Calculate the size of your Thunderbird portable folder

2016-01-12 (2)

Once it has finished indexing, go to the installation folder of Thunderbird and calculate how big it is. Let’s assume that it’s 2GB, so go open up Veracrypt and create a container around 2.5GB or 3GB.

Move your thunderbird installation

Since this is a portable edition of Thunderbird you can just move the folder to the container. The point of this is that you can put your container in a USB and use it whenever you want.

Time to delete

2016-01-12 (4)

Please ensure that your container has all the data before deleting.

Delete all the data from your gmail account and the initial installation folder of thunderbird. We don’t want that data lying in your personal pc unencrypted do we?

Upload it to the cloud

You can upload it to Sync or Dropbox if you feel like. I prefer Sync because you can upload it and move it to the Vault that way it won’t be deleted by anyone.

Enjoy your privacy, and peace of mind. Congratulations your data is no longer on Gmail. Now with your data safeguarded on the cloud + encrypted, you can start using a fresh e-mail address. Do keep in mind that instead of using your real address, you can create aliases like if you sign up to Facebook or Pinterest you could say [alias]+[folder]@fastmail.com where as alias is linked to your real account, and +folder is where you want the e-mail to go.

So consider the possibility of a site getting hacked, and said site uses a weak hashing algorithm (heck, it could even be in plaintext). Using an alias will buy you time to change your e-mail password if it turns out that you used the same password in both accounts. The hackers will have to go through lengths to actually find your real account. Plus, they also can’t log in to your Paypal as the e-mail they got is an alias, taking in account that you also use different passwords. So yea, you get to buy time on all accounts. If you liked this, do consider Fastmail services check my sidebar.

Implementing TreeView expandAll/collapseAll starting on top-levels

I should start by a disclaimer that I’m neither a C++ or Qt expert, there may be better or elegant ways to do it and I have found this implementation is more straightforward than digging in TreeView’s QML source code.

So we have a small problem, the TreeView in QML doesn’t provide any way to expand or collapse items. Alright, what would be the best way to tackle this? Let’s look at the available options at our hands:

  • TreeView QML provides the following methods:
    • expand (QModelIndex)
    • collapse (…)
    • others …

And then we have implemented the AbstractItemModel. If you sit for a moment and think we can actually aggregate new methods to our AbstractItemModel with Q_INVOKABLE and call them in our QML code.

So we will implement a new method called getChildrenIndexes (that of course is sort of a bad name when I think about it).

QVariantList GenericModel::getChildrenIndexes()
QVariantList indexes;
GenericNode *parent = rootItem->child(0)->parent();

for(int i = 0; i != parent->childCount(); ++i) {
GenericNode *child = parent->child(i);
indexes.push_back(createIndex(i,0, reinterpret_cast<quintptr>(child)));

//reinterpret_cast<quintptr>(c) ( found in inners of QModelIndex)

return indexes;


Then put the Q_INVOKABLE QVariantList getChildrenIndexes(); in your model header.

In our QML code it will go like this:

onAssignSubscriptionModel: {
treeView.model = model; // TODO: throw a WorkerScript at it.
var someIndexes = treeView.model.getChildrenIndexes();
console.log(someIndexes); // Our QVariantList gets converted to an array
for(var i = 0; i <= someIndexes.length – 1; i++) {
someIndexes = undefined; // not sure if effective but I want it garbage collected afterwards.


After that? Your items should be automatically expanded. Note that this is an expensive process, it’s not much about creating the indexes but more that it will tax the QML engine side if you have a lot of items. At the same time I’d like to say that I did go through it with around 13k items in my database and didn’t notice any slow down, keep your eyes open though.

A quick summary? We got the indexes of our top-level items. Do remember that the root item is always invisible. Which brings me to

remember to adapt this to whatever node structure or container you have nobody should expect rootItem->child(0)->parent(); line in anyone’s AbstractItemModel meaning, you probably don’t have a child or parent method, maybe.

Running Child of Light on Linux

Child of Light

Hello everyone, today I’ll be posting a guide on how to run Child of Light, a beautiful RPG game by Ubisoft. This how-to requires you to have minimum knowledge of the terminal. Do not fret though, if you do all the steps you shouldn’t worry about a thing.

My guides don’t include installation process. I will only include them when I see the need to have one. I got Child of Light on Steam, however the process should be similar to uPlay too. You can contact me through e-mail, please understand that I might be busy and it’ll take a while for me to reply.

Gameplay Video on Linux

Let’s get started! Here we will create a directory, download the binaries and extract it. By the way, for the binaries signature, click here.

mkdir -p ~/WINE/binaries/patched/x86
cd ~/WINE/binaries/patched/x86
wget http://storage.thehumble.ninja/wine-1.7.36-COL.tar.xz
tar xvf wine-1.7.36-COL.tar.xz

Now let’s export WINE to the PATH.

Important Note: You need GNUTLS libraries installed for uPlay to work.


export PATH=$PATH:/home/$USER/WINE/binaries/patched/x86/wine-1.7.36-COL/bin
export WINEPREFIX=/home/$USER/WINE/bottles/childoflight
winetricks d3dx9 wininet winhttp

We have finally set up our WINE bottle, called childoflight. Let’s launch Steam, if you don’t have it installed, take your time now and install it. After you install Steam, remember to run Steam.exe like this.


wine /path/to/steam/folder/Steam.exe -no-dwrite

Once you have Steam installed, please download Child of Light. Once it has finished downloading. Launch the game from Steam.

You’ll see uPlay installing itself as base. Once it’s done you’ll be asked to log in.

Once you have set uPlay, close it completely and only leave Steam open. This is something you need to know.

Important Note:

uPlay doesn’t close completely. You have to look for the process and kill it. If you use applications like htop or ksysguard or an equivalent, look for the process and kill it. This step has to be done manually, even if you close Steam it will ask you to close Child of Light, this is because uPlay.exe process hangs.

Now launch the game. Play to your heart’s content!

Set up a shell script.

Please note that you have to edit it at your discretion.


export WINEPREFIX=/home/YOUR_USER/WINE/bottles/childoflight
export WINEDEBUG=-all

$WINE "/PATH/TO/STEAM/Steam.exe" -no-dwrite

Save as ChildOfLight in ~/WINE/shortcuts. Remember to chmod +x it. Now you can easily run it as ~/WINE/shortcuts/ChildOfLight

That’s all.

Have suggestions, want to tell me something? Hit the About Me page and contact me. I might not get to you fast. I would be thankful if you use “[DGZEN]” as prefix in the start of the title, it’ll be easier to look for.


[Guide] Final Fantasy XIV: A Realm Reborn on GNU/Linux

Final Fantasy XIV: A Realm Reborn is a Massive Multiplayer Online Game (MMO) by Square Enix. As you might expect the world of FFXIV is filled incredibly amazing music that revolves around old themes, and classes such as Dragoons, Summoners, White Mages, Black Mages, Ninja, Botanist, etc.

I’ll be breaking down this guide into several sections.



The WINE I’m providing has CSMT patches integrated. I also merged the patches that were made a year ago to solve the user interface flickering issue. Originally this guide was going to include PlayOnLinux instructions, but it became apparent that creating a shortcut in POL is an uphill battle, for some reason it didn’t want to create a simple shortcut.

Winetricks is required to be installed before using this guide.

Getting it running

First, I’m going to assume that you have downloaded the game either through Virtual Box or having a Windows partition. This guide will not cover the installation phase of the game. However, you are most welcome to create a new thread on GamersOnLinux forums.

Download the binaries here, you can also download the source here.

After downloading the binaries:

Create the following folder

    $ mkdir -p ~/WINE/binaries/x86
    $ cd ~/WINE/binaries/x86
    $ wget http://storage.thehumble.ninja/wine-1.7.24-FFXIV-CSMT.tar.xz

Move the downloaded binaries to that folder, once moved type in the terminal

    $  tar xfv wine-1.7.24-FFXIV-CSMT.tar.xz

Temporarily we will append WINE to the PATH environment variable.

Type this to get the current directory you are in.

    $ cd wine-1.7.24-FFXIV-CSMT/bin; pwd

Copy/Paste the result here, example:

    $ export PATH=$PATH:/home/$USER/WINE/binaries/x86/wine-1.7.24-FFXIV-CSMT/bin

Now, it’s time to install all the software required to run Final Fantasy XIV.

    $ export WINEPREFIX=/home/$USER/WINE/bottles/FFXIV; export WINEARCH=win32
    $ winetricks d3dx9 devenum ie8 quartz wininet winhttp xact_jun2010 wmp10

It’s important that the applications be installed, do not skip any of them.

Let’s launch it!

Once it’s done, go to the installation folder of Final Fantasy XIV. For example, my installation folder is this one (“/media/david/Usagi/FINAL FANTASY XIV - A Realm Reborn/“). You will need to enter the boot folder, thus making it “/media/david/Usagi/FINAL FANTASY XIV - A Realm Reborn/boot

Launch the game!

    $ wine ffxiboot.exe

If it doesn’t let you click on the EULA, don’t worry.

Edit the EULA file:

    nano ~/my games/FINAL FANTASY XIV - A Realm Reborn/FFXIV_BOOT.cfg


EulaAgreement   0


EulaAgreement   1

Now, let’s just forget about the game for a moment. If you are following the instruction to install FFXIV without PlayOnLinux, do these steps:

    $ wine regedit

Follow the steps: We are going to create some keys here.
In a nutshell, we just create the folder (key) in HKCU/Software

The key will be named “Direct3D”

The string keys within Direct3D will be the following

CSMT = enabled
StrictDrawOrdering = disabled

Here are some images so you get the idea!

Once everything is set, run the game again.

$ wine ffxivboot.exe

Log in, and play to your hearts content!

Let me simplify this for you, my dear reader! Let’s create a shell script

$ mkdir ~/WINE/shortcuts

Using your favorite editor, create a file called FFXIV


    export WINEPREFIX=/home/david/WINE/bottles/FFXIV 
    export WINEDEBUG=-all 

    #export LD_PRELOAD="libpthread.so.0 libGL.so.1" 


    $WINE "/media/david/Usagi/FINAL FANTASY XIV - A Realm Reborn/boot/ffxivboot.exe"

Important note:

After the game launches, be sure to kill ffxivlauncher.exe in the terminal. The process does not close completely and it hogs the CPU.

Simply type

$ killall ffxivlauncher.exe

Astebreed on WINE

Heyo guys!

I got this little Japanese Shoot ‘Em Up. It run almost flawlessly on
wine-1.7.11 and wine-1.7.18-CSMT. I think my only problem with it is that the
audio doesn’t work. It seems it uses xact, sadly I can’t seem to get the
audio working in any way, it just doesn’t want.

I’ll report back. To be honest you don’t need to install any library to get it
running, besides xact (which doesn’t work either).

The game is excellent, if you are into mechas like I am. You’ll love the
designs they have.


– xact_jun2010
– directx9
– dinput [builtin]

Control Setup:

*Disable: *Vibration

*Disable: *Hat Switch

Fixing ALSA lib pcm.c:7843:(snd_pcm_recover) underrun occurred while keeping PulseAudio in your system

August 30, 2020 notes:

Warning this is a very old post from 2014.

The information presented here may no longer apply to modern systems.

Please contact your GNU/Linux distribution of choice community for help with PulseAudio.

You might be interested in [added 08/04/14 04:30 PM]:

An Additional Note for WINE underrun audio issue

This method has been tested in Linux Mint “petra” 16, it should work nicely
with other linux distributions.

Before you start:

This solution has worked for me. I’m still testing it, usually it’s easy
to run into any underrun problem after alt-tabbing from games several times.
I’m still testing this solution. I need more people to test it too so we can
be sure that we eliminated the problem.

What we are going to do today is fix this annoying issue. What are the
symptoms of having this problem?

  • In console: You will receive a lot of warnings saying ALSA lib pcm.c:7843:(sndpcmrecover) underrun occurred
  • The sound gets distorted, filled with static and it plays really fast.
  • Due to PulseAudio failing to recover, it will keep retrying thus using even more CPU. (It ends up hogging the CPU)

This solution was originally based on WINE And PulseAudio
. Like it mentioned, using
such solution will remove a features PulseAudio provides to multiple
soundcards. I decided to look a bit further since I wanted to use the
following audio output sources: video card’s HDMI, USB Speakers, and headset.

This is the final result:

Be able to move Audio Output to other Playback Devices

Well, I’m sure you want to get started into applying the solution in your own
system. So let’s get started.

Like I said before, this has been tested in Linux Mint, this guide is using
examples that will appear in Linux Mint. You will have to adapt this
solution in whatever way your distribution has PA set up.
I edit the files
in /etc/pulse/default.pa, even if they are there it doesn’t start as a system-
wide daemon. However, there’s a high chance that your configuration is in
~/.pulse/default.pa or ~/.config/pulse/default.pa. It’s your task to
find which configuration your PA uses in your distribution community forum.**

Or you can just use:

    locate default.pa

As you have noticed I use KDE, so I’ll be using Kate text editor to open
my configuration files.

Important Notes:

  • Do not type “$”, the dollar sign in the terminal. This is used to hint the reader that I’m writing a command in the terminal.

First Step:

We are going to check how many soundcards your system detects. For this we
will do the following command

    $ cat /proc/asound/cards

This will print the following (the results won’t be the same):

    david@david-desktop:~ > cat /proc/asound/cards  
     0 [PCH            ]: HDA-Intel - HDA Intel PCH  

                          HDA Intel PCH at 0xfb400000 irq 52  

     1 [NVidia         ]: HDA-Intel - HDA NVidia  

                          HDA NVidia at 0xfb080000 irq 17  

     2 [MicroII        ]: USB-Audio - Audio Advantage MicroII  

                          C-Media INC. Audio Advantage MicroII at usb-0000:06:00.0-1, full speed  

Let’s take a look at this. We have 3 soundcards installed

* 0 is my Intel on-board audio card.
* 1 is my NVIDIA GeForce GT400 HDMI output
* 2 is my USB Audio Speakers

So what’s with the numbers? They are called deviceid in PulseAudio. This
tells PulseAudio “hey man, load this card with this unique deviceid for me,
will ya?”. So that’s what PulseAudio will do in t he following examples.

Now that we have the device id, let’s open /etc/pulse/default.pa. It’s
up to you to choose what you are going to load or not.

Back up your default.pa first

    sudo cp /etc/pulse/default.pa /etc/pulse/default.pa.bak


    sudo kate /etc/pulse/default.pa

Search for module-udev-detect and module-detect,
disable them by adding a # at the start of the line. As presented in the

Here we are telling PulseAudio. “I’ll be the one deciding what to load or
not”. We are disabling the automatic detection.

Now comes the important part

Above those lines there are these ones, find module-alsa-sink and
uncomment it, like this

This is an example.

The first, and *most important line *we are going to add is

load-module module-alsa-sink device=dmix

(Optional) What is dmix?

PCM plugins extend the functionality of PCM devices allowing low-level sample
conversions and copying between channels, files and soundcard devices. The
dmix plugin provides for direct mixing of multiple streams.

What we are telling PulseAudio is “don’t hog the hardware directly, use dmix
as your default device”. PulseAudio will make the first available sink as
default. (This is an assumption I made)

If you remember the cards we printed early with the IDs, add

load-module module-alsa-sink device_id=1 
load-module module-alsa-sink device_id=2 

Which is the equivalent of:

* 1 is my NVIDIA GeForce GT400 HDMI output 
* 2 is my USB Audio Speakers

What you are going to do is put the device id we printed early. Usually I
avoid using 0 because dmix is probably using it already.

(Optional Step) In the occasion that you have a headset like me plugged in your on-board card.

Add after load-module module-alsa-sink device_id=2

load-module module-alsa-source device=hw:0,0

How can I find more capture devices?

    $ arecord -l
    List of CAPTURE Hardware Devices

    card 0: PCH [HDA Intel PCH], device 0: ALC887-VD Analog [ALC887-VD Analog]

      Subdevices: 1/1

      Subdevice #0: subdevice #0

    card 0: PCH [HDA Intel PCH], device 2: ALC887-VD Alt Analog [ALC887-VD Alt

      Subdevices: 1/1

      Subdevice #0: subdevice #0

(Optional) Use Audacity to find more capture devices:

I noticed that Audacity lists all the devices with their respective hardware
numbers, like this:

Please don’t use pulse audio settings because you haven’t configured it yet.
*Take notice of “hw:0,0” or “hw:0,2”. *You can test which one works, that’s
the main idea behind using Audacity.


Remember to replace the device of module-alsa-source with the one that worked for you.


Next Step? Save the file and restart your system.
Why restart your computer? I noticed while I was trying to figure out how pulseaudio worked that sometimes there would be a conflict in the modules. This would kill the sound completely and PulseAudio wouldn’t listen to me in the sense that no matter how many times I killed it, it wouldn’t start.

Side notes:

  • In the original solution, we saw that the user wrote a local .asoundrc file. This is unneeded as you are making dmix become the default, so exporting extra variables is not needed. You can still use that type of solution to find creative ways of using your audio cards.
  • I have moved the Audio Output source to my USB Speakers, Headset over and over and over to trigger the underrun. With the solution in place I’ve yet to run into an underrun problem
  • The other solution would be removing pulseaudio completely, but if you have multiple cards you are going to suffer in terms of changing audio output source on the fly.

Final Result

I hope this helped you. Feel free to leave a comment!