thorko.deLinux / Unix systems administrator

Latest SysadminDB entries

Enable touch events in chromium / chrome

To enable touch events in chromium / chrome browsers open the chrome://flags page and search for "touch" and "pinch" and switch the dropdown menu to enable. Close your browser and start it again and you will see you can touch and zoom on your screen (of course only if you have a touchscreen).

High CPU usage with chromium and spotify

When using fglrx driver on an acer e5-551g laptop chromium and spotify using the options --type=gpu-process which then ends up in high cpu usage.

To disable this option for chromium and spotify:

Create a file in /etc/chromium.d/disablegpu

export CHROMIUM_FLAGS="--disable-gpu"

In spotify go to preferences->User interface and disable "Enable hardware acceleration"

SaltStack - Using grains in top.sls

Targeting a minion by grains

  'G@role:zabbix and G@type:proxy':
    - match: compound
    - zabbix

More compound matches can be checked here

Using grains in state files (sls)

{% if grains['type'] == 'proxy' %}
- source: salt://files/server.conf
- user: {{ grains['zabbix_splunk_search_user'] }}
- group: zabbix
- template: jinja
{% elif grains['type'] == 'server' %}
- source: salt://files/server.conf
- user: zabbix
- group: zabbix
- template: jinja
{% endif %}

Debian - build a deb package

Install some packages required to build the package

apt-get install dh-make autotools-dev fakeroot devscripts

Download the source and extract it

tar -xzvf httpd-2.4.1.tar.gz && cd httpd-2.4.1
dh_make -n -s -e

edit debian/control file

fakeroot debian/rules clean
dch -i local 'Your Version'
cp ../httpd-2.4.1.tar.gz ./
sudo debuild -us -uc


Test webserver with telnet

(echo -e "GET / HTTP/1.0\n\n"; sleep 1;) | telnet 80

(c) 2014 by