Using Docker as non-root

Normally you need to run docker as root:
$ sudo docker run hello-world
If this is going on your nerves, you can add your normal user to the docker-usergroup.
But before you do this, read the warning in this Post (where i also got the code from)

$ sudo groupadd docker
$ sudo gpasswd -a $USER docker

logout / logout from your computer and run:
$ docker run hello-world
Should work now!

If you got something like config.json – Permission denied
$ docker run hello-world
WARNING: Error loading config file: /home/joergi/.docker/config.json - stat /home/joergi/.docker/config.json: permission denied

This can be fixed by typing in this (from this post)
$ sudo chown "$USER":"$USER" /home/"$USER"/.docker -R
$ sudo chmod g+rwx "/home/$USER/.docker" -R


mySQL workbench can’t connect via ssh tunnel

If you can’t connect with your mysql-workbench to a database via ssh have a look at your logfile:

tail -f -n 100 ~/.mysql/workbench/log/wb.log

and you will see this error:

14:12:58 [ERR][]: Traceback (most recent call last):
File “/usr/share/mysql-workbench/”, line 265, in _connect_ssh
look_for_keys=has_key, allow_agent=has_key)
File “/usr/lib/python2.7/dist-packages/paramiko/”, line 306, in connect
File “/usr/lib/python2.7/dist-packages/paramiko/”, line 465, in start_client
raise e
ValueError: CTR mode needs counter parameter, not IV

change your

sudo nano /usr/lib/python2.7/dist-packages/paramiko/

press CTRL+W for searching for the term

return self._cipher_info[name]['class'].new(key, self._cipher_info[name]['mode']

and replace this

return self._cipher_info[name]['class'].new(key, self._cipher_info[name]['mode'], iv, counter)


return self._cipher_info[name]['class'].new(key, self._cipher_info[name]['mode'], '', counter)

as mentioned in the Github pull requst

All credits are going to user hansaplast for his answer on stackoverflow!

Sync folders in Vagrant but exclude some folders from syncing

Maybe you know this:
you have a huge Java project, maybe the project itself is a sum of many (not even so small)  Java projects.
For sharing the complete setting with other developers you normally use a Vagrant box to make it easy.
At work we needed 2 big projects in one Vagrant box, which included over 10 small maven projects.
Normally I would share it like this:

config.vm.synced_folder "my-project1", "/home/vagrant/my-project1"
config.vm.synced_folder "my-project2", "/home/vagrant/my-project2"

You can imagine, the normal start-time of our server with permanently syncing all folders, including all the target folders took much too long.
On a local machine, without a Vagrant box, it normally needs around 2 minutes to start
But with syncing all target folders, it needs between 7-10 minutes to start the server

Of course, this is not acceptable at all.

So i was looking for some better way for syncing it, and I came to a good solution rsync

config.vm.synced_folder "my-project1", "/home/vagrant/my-project1", type: "rsync",
 :rsync__exclude => ['my-project1/, my-project1/mini_project2/target,my-project1/mini_project2/target,my-project1/mini_project3/target,my-project1/mini_project4/target']
config.vm.synced_folder "my-project2", "/home/vagrant/my-project2", type: "rsync",
 :rsync__exclude => ['my-project2/, my-project2/mini_project2/target,my-project2/mini_project2/target,my-project2/mini_project3/target,my-project2/mini_project4/target']


You do this with every folder you need in your Vagrant box and where you don’t want everything synced.

At the moment it only syncs the folder from you host to your guest system on vagrant up and vagrant reload.
Of course you want to have any changes to be synced to your developer box.

So the solution is:
Open two terminal shells:

First terminal:
vagrant rsync-auto

Second terminal:
vagrant up

When you change now something in the host system, it’s automatically synced on your guest system

Using XIOAMI gamepad with Linux

XIAMOI GamepadI have the XIOAMI gamepad, a cheap gamepad which looks like the classical XBOX gamepad
When I used it first with my Fire TV Stick, it worked like a charm. I wanted to try it with my Linux and with Steam.

When i used it in a game it was totally uncalibrated. Pressing the joystick to the top position had no effect at all on my game character.

jscalibSo, i had to calibrate with a small programm, which I install on the shell with:

$ sudo aptitude install jstest-gtk

start it with:

$ jstest-gtk

This slideshow requires JavaScript.

you should see the following pictures…

  1. press the calibration button
  2. press the start calibration button
  3. rotate the joystick (all joysticks on your gamepad in a circle
  4. move the joystick to up – middle – down -middle – left -middle – right – middle
  5. press the OK button.
  6. save the profile

after than restarting the Steam game, it works perfect.

Being able to develop on a THL 5000 phone on a linux computer

When i tried to deploy a Hello World app from my Linux notebook to my THL 5000 notebook i got this result:

API Level 1 sucks

So, my phone has API level 1, nice – NOT!

Googling my ass off, I could nowhere find the device id for this phone… So Tobi told me: Brute-Force is the way to go and what should I say: it worked!

So: google for the “51-android.rules” or just save this one.

After that copy it in the right place

sudo cp /home/username/download/51-android.rules /etc/udev/rules.d/

and make it working with

sudo chmod a+r /etc/udev/rules.d/51-android.rules

When plugging now my THL 5000 to my notebook, everything works fine!