thorko.deLinux / Unix systems administrator

GitLab Projects

buildserver Build Status Coverage Status

kupfer plugins


Latest SysadminDB entries


CopyQ is a clipboard manager which supports custom commands on selections.

It is very handy to select some text and search it in Google. Open CopyQ main window and hit F6 for the command window. Add a new command and select "Global Shortcut". Set your shortcut and in the command window, paste this script

copyq: var cmd = "chrome";
var search = "" + str(clipboard());
execute(cmd, search);

Hit on ok.
Select your text and hit your choosen shortcut. It'll open Google in chrome and search for your selected text. 

Recoll is a desktop full-text search tool. 

Here are some useful hints. 

To index .md files add the following line to .recoll/mimemap

.md = text/plain

Do a more advanced search

"arch"C AND "btrfs|install"r AND -dir:.icedove

search for arch (case sensitive) and a regular match on btrfs or install and exclude .icedove directory

Howto map your X display to a container

Sometimes you want to use your X display in a container, for instance to start firefox.

On your host run

xhost +

This will allow anyone to connect to your Xorg server

Now you can start your container 

docker run -ti --memory 2gb --rm -e DISPLAY=unix:0 -v /tmp/.X11-unix:/tmp/.X11-unix -v=/dev/dri:/dev/dri:rw myimage mycmd

Debian - Downgrade package

Make sure your /etc/apt/sources.list contains different releases

deb unstable main contrib non-free
deb-src unstable main contrib non-free
deb buster main contrib non-free
deb-src buster main contrib non-free

Create a file called /etc/apt/apt.conf.d/80targetrelease

APT::Default-Release "sid";

This is your default release, which apt tries to install the package available on that mirror

If you want to install an old version you have to run

~$ apt-get -t buster install perl-base=5.24.1-7

This installs the perl-base package version 5.24.1-7 if it is available in buster release

Cgroups on Debian

~$ apt-get install cgroup-bin cgroup-tools

Create systemd unit files


# This is a mostly empty service, but allows commands like stop, start, reload
# to propagate to all tinc@ service instances.
Description=Cgroup Rules Engine cgconfig.service
ExecStart=/usr/sbin/cgrulesengd -f $LOG_FILE $LOG
ExecStop=/bin/kill -TERM ${MAINPID}
ExecReload=/bin/kill -12 ${MAINPID}


Description=Cgroup Config Parser
ExecStart=/usr/sbin/cgconfigparser -l $CONFIG_FILE
#ExecStop=/usr/sbin/cgclear -e -l $CONFIG_FILE





Create your config files

The following example will limit your email client thunderbird in cpu and memory


group Email { 
perm {
task {
uid = <your username>;
gid = <your username>;
fperm = 774;
dperm = 775;
admin {
uid = <your username>;
gid = <your username>;
fperm = 774;
dperm = 775;
cpu {
memory {


*:thunderbird cpu,memory /Email

(c) 2014 by