Tox chat

For me it's amazing Christmas gift from Open Source!


"A New Kind of Instant Messaging

With the rise of government monitoring programs, Tox provides an easy to use application that allows you to connect with friends and family without anyone else listening in. While other big-name services require you to pay for features, Tox is totally free and comes without advertising."



This is what I really subscribe for! Thank you!


Qt: Dynamic Copy File in the Thread example, requires Wraparound class

  • Wraparound class

ThreadCopyFile::ThreadCopyFile(QObject *parent) : QObject(parent)
    qDebug() << this << "Created";

    this->v_thread = new QThread();
    this->v_copyFile = new CopyFile();




    delete this->v_thread;
    delete this->v_copyFile;

public slots:

void ThreadCopyFile::finished()
    qDebug() << this << "Finished";
    qDebug() << this << "Destroyed";

  • Class for actual work

CopyFile::CopyFile(QObject *parent) : QObject(parent)
    qDebug() << this << "Created";


    qDebug() << this << "Destroyed";


    void done();

public slots:

void CopyFile::Copy(void)

    QString src = "/media/data/torrent/linuxmint-17.2-mate-32bit.iso";
    QString dst = "/tmp/linuxmint-17.2-mate-32bit.iso";


        qDebug() << "file exists";

            qDebug() << "Files removed";
            qDebug() << "Files  fail to remove";

    qDebug() << "Copy File started";

        qDebug() << "Copy File finished";
        qDebug() << "Copy File fail";

    emit done();

UI runs on other thread, everything work nicely :)


Update Linux Kernel on Mint or Ubuntu

for upgrade you need three packages, depending on you architecture:

linux-headers ... ... ... amd64.deb
linux-headers ... ... ... all.deb
linux-image   ... ... ... amd64.deb

if you use Ubuntu based Linux distro, you can pick one of these: 

for example:

$ sudo update-grub

If for some reason you want to downgrade the kernel, it loads the newest kernel by default, so just uninstall new one (three packages that I mentioned) and it will load second on the list after reboot. Make sure you have at least one kernel installed! :)





git-annex: error while loading shared libraries: libgnutls.so.26: cannot open shared object file: No such file or directory
fatal: 'annex' appears to be a git command, but we were not
able to execute it. Maybe git-annex is broken?


sudo ln -s /usr/lib/arm-linux-gnueabihf/libgnutls.so /usr/lib/arm-linux-gnueabihf/libgnutls.so.26


QT UI for youtube-dl


There is some obvious things should be fix'ed, but is't usable right now... and more convenient then terminal.



Linux Mint 17 on Laptop Acer Aspire-E5-571G PART4

  • Using Microphone

$ alsamixer 
Press F6 select sound card...  Set Mic Boost to 20 and disable Auto-Mute M (use arrow buttons)

Check audio device for capture audio from mic, by

$ cat /proc/asound/devices

  1:        : sequencer
  2: [ 0- 8]: digital audio playback
  3: [ 0- 7]: digital audio playback
  4: [ 0- 3]: digital audio playback
  5: [ 0- 0]: hardware dependent
  6: [ 0]   : control
  7: [ 1- 0]: digital audio playback
  8: [ 1- 0]: digital audio capture
  9: [ 1- 0]: hardware dependent
 10: [ 1]   : control
 33:        : timer

Try record for 20 seconds

arecord -f cd -D hw:1,0 -d 20 test.wav

It worked for me, I able to hear myself. 

Graphical "Sound Preferences" looks like not handle the device properly. To use mic with graphical apps you probably have to select the capture device manually.



Internet connection sharing with Raspberry Pi via Ethernet

My laptop is connected to internet via WiFi and I want to connect raspberrypi via Ethernet cable. I want to be able connect to raspberrypi via ssh and I also want for raspberrypi to be able access the internet. I have basic understanding about networks. And I think this task should event easier then setup a router. Bud it is not! Unless you know exactly what to do! You can find tips with a million terminal commands... You  can study advanced networks... bridging or nat and then run dhcp server... If you running a server this is all great! On a laptop you do not need all this...

Click Edit!

Change to "Shared to other computers"

Just my local network connection information, no voodoo magic!

First time I set this up! It did not work! Solution is: RESET laptop after configuration is done!

To find out raspberrypi IP:

rolas@Aspire-E5-571G ~ $ cat /var/lib/misc/dnsmasq.leases
1434209461 b8:27:eb:75:89:01 raspberrypi ff:eb:75:89:01:00:01:00:01:1c:dd:60:6a:b8:27:eb:75:89:01



Changing password on Linux

If You set password only once during the installation and later on decided to change your password it can be confusing. What you have to know is during installation it sets the same password for your user and for root.

For example you enter the same password when you install some thing as root:

$ sudo apt-get install audacious         

and  when connecting to your machine via ssh as user:

$ ssh user@

If you want to keep it that way with new password, you have to change it for both user and root:

$ sudo passwd
$ passwd

If you wondering what is a good password , check this link:


After playing with this site a come to conclusion that it can be two types of good passwords:

  • relativity short password (9 characters) containing combination of  lower case letters, capital letters,  numbers and symbols. What could be harder to remember.
  • longer password (18 characters) containing only lower case Latin letters, but in this case You can use sentence in foreign language. It can be much easier to remember. Perhaps you can use a bit longer sentence in English as well.    


Linux Mint 17 on Laptop Acer Aspire-E5-571G PART3

Automatic brightness control very very annoying, it dims down almost random, so you have to set it couple times...

To disable improper automatic brightness control, uncheck this:

To control brightness manually from 0% to 100% , install xbacklight

$ sudo apt-get install xbacklight

Don't know how to overwrite functional keys for brightness, so I made two new shortcuts for brightness control, with commands:

$ xbacklight -inc 5
$ xbacklight -dec 5

For non 60 fps videos, mplayer works pretty well with this config:

$ cat ~/.mplayer/config
# Write your default config options here!




  • Installing latest git version


$ sudo add-apt-repository ppa:git-core/ppa

$ apt-get update && apt-get --only-upgrade install git

$ apt-get install git-annex
$ git --version
git version 2.3.0

$ git annex version
git-annex version: 5.20140412ubuntu1


  • Git-annex binary for Raspberry-pi


  • Windows version



Installing Texmaker

  • Linux

$ sudo apt-get install texlive-full texmaker

To see the result press F6 to convert  and then press blue arrow next to "View PDF".

  •   Windows


  • Gray background with white letters



Hello \clearpage



Digital background color

I think in the old days, white screen with black letters was design to make an impression of sheet of paper. Now it still exists.
On Smart Phones and Tablets it's changing cause less white light means longer battery life. On the Desktop not a lot of normal people care. Unless that’s your style and You want to be unique.

My digital background's turning black not only cause its environment friendly, but the main reason is how it effects my eyes. I noticed that dark background while programming are less intense for my eyes.

It worth mention that, the room where you work also sloud be similre lighting as your computer screen. You also shloud look at the monitor a fiew degrees down and don't forget blink. This way your eyes will be less dray.  About blinking it's easier to say than done! :)

If you do tee or coffee break, to give your eyes a break you should look throw the window far far away.

I do not ware glasses!  At least Yet!

I have one weaker eye then the other. My vision changing during the week. If I would do eye test , ware you cover one eye and then have to see and say letters or animal names watching form the distance, on a Friday after intensive work week I most likely failed, but on Monday after a weekend in the village away and away from PC, I most likely pass the test.

So it's great that Qt-Creator can have a dark skin!


And "Sublime text" it's great by default. If You did not try yet, It's a great editor, definitely should try out!


Keep your eyes healthy :) and have fun programming!


Linux Mint 17 on Laptop Acer Aspire-E5-571G PART2

Linux Mint 17 on Laptop Acer Aspire-E5-571G PART1
  • Nvidia driver

I added this PPA
And install Nvidia-343 driver
I find out that prismusrun is alternative to optirun
  • Avoiding Video tearing while watching 60 fps video

VLC useless
Mplayer works only with Intel vaapi
$ export VDPAU_DRIVER=va_gl &&  mplayer -cache 8192 file.mkv 
XBMC kodi can use both Nvidia or Intel vaapi (default)
$ prismusrun kodi
$ kodi
Totem works with Nvidia
$ prismusrun totem
  • Gaming

I Instaled Wine1.7 and using prismus StartCraft II works!
$ prismusrun wine /path/to/StarCraft-II-Setup-enGB.exe
  • Resource

  • Note

Hard drive on this laptop is large 1TB, but not very fast. Thats why mplayer better works with bigger cache option. I came to conclusion that most of the lag is hard drive retailed. So I made a few more settings. Set swappiness to 1 (how to) ant added "noatime" to FSTAB.


Web chat on Raspberry Pi using nodejs

  • Writing image to SD card

 sudo dd bs=1M if=./2014-12-24-wheezy-raspbian.img of=/dev/sdc

  • Installing nodejs and modules


I used this version: http://nodejs.org/dist/v0.11.7/
Newer versions "npm" not working, throws "Illegal instruction". 

  • Working chat app example


  • Javascript & JQuery tutorial