tomoyo – tomoyo-loadconfig doesn’t load

You want to load a exception/domain file into tomoyo but you can’t because of some strange errors (exit with 1)?
And you are sure that tomoyo is loaded (has to be in the kernel bootline) and you ran tomoyo-initpolicy as root?

Here is the solution:
You may have not the permission to write into the /sys/…/tomoyo dir. You have to authorize some programs to do so.
Now check /etc/tomoyo/manager.conf. You see multiple paths. Now check if they are all real or went over links.
You can do this with realpath:

realpath <path>
realpath /usr/sbin/tomoyo-editpolicy

if the output is not the same as the input, then replace the path in the file with the output.Now reboot the PC (is needed to load the manager.conf) and now it should work


blender multiple smoke domains

sometimes you need more than one object to produce smoke but hups? what’s that? Just one object produces smoke.

The solution and the reason for this problem are simple:both objects are in the same flow group

What’s flow group?
You can create for an object a group via:
pressing on the cube in the right side bar (where can preferences of objects)
then scroll down to groups and press on the + sign to create a new one

And now you have a group. To asign a smoke domain to a group go to the smoke menu and click into the field flow group, then assign the group with the right smoke producing object.

tomoyo howto

First forget the curse tools tomoyo gives to you. They are good but very limited

The begin:
install tomoyo,( configure the kernel for tomoyo if your distribution hasn’t done it, here a guide:
run sudo /usr/lib/tomoyo/init-policy to init the config
and append security=tomoyo to the kernel boot line in grub.cfg (better: /etc/default/grub and update bootloader) or whatever
and reboot

Create a rule for a program:
Important rule: name important resources with an speaking name, you can also insert comments with #
Now append:

1. initialize_domain yourprogram from any

use_profile x
use_group 0
to /etc/tomoyo/domain_policy.conf
where x is the number of the ruleset.
an overview gives:
and load it with:
tomoyo-loadpolicy -df </etc/tomoyo/domain_policy.conf

basicly there are now two ways to develope now a ruleset
1. switch to policy 1, run the program, close it, save down the changes
2. use policy 2/3, run tomoyo-auditd and look in /var/log/tomoyo/rejected00 2 or 3.log what permissions the program needs to run.
for using wildmarks have a look in
add the new rules to domain policy and reload the config via:
tomoyo-loadpolicy -df </etc/tomoyo/domain_policy.conf

some links which will explain some aspects more detailed:

here you have a sample file:

blender – useful navigation view

With the normal navigation view you will have soon many problems. For example you cannot/can bad zoom into buildings, other objects.
So press shift-f to get an kick-ass view (navigation should be obvious but I explain it in detail: zoom – mouse wheel, left, right,up, down: mouse). Then press the left mouse button and switch back to the normal zoom mode in the new position or ESC to jump back to where you began to use the view.

webcam flickers under linux -powerline frequency false

problem was: my logitech c270 webcam had stripes wandering around, I think you could call it flicker. I tried everything but nothing helped. Just changing the resolution helped a bit.
now the real solution and the real problem: adjust via v4l2-ctl -c powerline_frequency the powerline frequency. The flickering immediately stopped for me. To see which values it can have use v4l2-ctl -L
for me worked:
v4l2-ctl -c powerline_frequency=1
It was simply the power supply!!! It has an other frequency in Germany than in the home country of logitech. The technicians saw this problem coming so include such an option but… they were too silent (should have dropped an entry in the FAQ explaining that).

Ok, I use linux and the tool of logitech would surely have adjusted this but I’m windows free.

networkmanager: /etc/Networkmanager/system-connections: connections doesn’t show up

If you play a bit with the configuration under /etc and you accidentally change the permissions of /etc/Networkmanager you can end up with no connection to the internet.

The problem is not too less permissions but too much:
– root with group root must own /etc/Networkmanager/system-connections and have the octal permissions 755
– and root with group root must own the files beyond this directory. But the octal permissions of the files have to be set on 700

how to close small wounds

If you cannibalize old devices for example you will sometimes cut yourself. Of course you don’t want to have a longer break so here is a guide how to close a small wound quickly.

If it’s just a little wound (at best a cut) you can wash the wound (nothing should be in the wound) and your other hand and then press your finger on the wound so the edges of the wound are pressed together. You mustn’t press softly but also you needn’t press ultra-hard.
After some minutes (1-3) you will feel the hurt ceasing but press a bit longer.
Afterwards remove your finger and voila, it doesn’t bleed anymore (but don’t strain it).
This technique is also useful for stopping the bleeding after removing cannulas (with injections I’m not sure if there are sideeffects).

Disclaimer: I’m not a physician. I’m just a tinkerer who learned it from one.

bash: coproc

sometimes you need to run a function or whatever in background. One possibility is to use bg but this isn’t very elegant and you have often problems.A better way is to use coproc. Syntax:

coproc [optional NAME] command [optional redirects]

The killing feature  is the name. Finally no %1 and so on. The command is bit strange to code: you enclose the command with curly brackets and end the command with ; (important!).
Here a coding example:

coproc mycoproc { for (( i=0; $i<4; i++ ));do sleep 3; echo $i; done; } #running command
echo "I'm not blocked"
cat <&${mycoproc} #get the results

If you don’t want the “[1]+ finished” you can use head or sed to cut it out.

how to create a bookmarklet (aka smart bookmark)

1. What is a bookmarklet?
A bookmarklet is basically a script which is executed by open a  special link. It can appear as bookmark or as an address in a link (href=”bookmarklet”) but not not as an address in the URLbar (prohibited by default). The script programming language is in most cases javascript (don’t know if there are other ones).

2. How to use a bookmarklet?
The only problem to use a smart bookmark is the raw access to the address bar of a link. Many browsers have lots of fancy interfaces but just one hidden interface for entering the address directly.
In firefox it is the right click on the bookmark bar or an Odyssey through the bookmark menu

3. How can I program a bookmarklet?
Before I come to an example in javascript some important points for programming a bookmarklet:

  1. you have access to the current page (or if somebody drops a page on the bookmarklet to this page)
  2. javascript knows lambda functions (function (){………})
  3. but sadly not sleep (use setTimeout instead)
  4. you can define functions (with names) in other functions (including lambda functions)
  5. you can use just one single line delimited by ;
    But programming isn’t easy this way. Write normal javascript code and use a converter (or convert by hand).
    For example my converter (; aren’t set on line breaks;this means you need to set them manually):
  6. ‘javascript:’ can have a strange construct:  javascript:(function(){……})()
  7. You can test your scripts before converting or squashing on one line in mozilla scratchpad (firefox->scratchpad (DE: Notizblock)

ok, now a little example:

javascript:alert("Hello World")

now a bit more complicate script which doesn’t change the address bar


and in the end a timeout driven function

function d(){

squashed to one line:

javascript:(function(){function d(){alert("Hello%20World")};window.setTimeout("d()",1000);})()

using blender as video editor (introduction)

I won’t go into detail. This article should be suitable for a normal computer user who want to edit videos. I will explain from the beginning.

The first thing to do is to download and install blender. If you use a distro which have at least package version 2.5 install it this way elsewise download and install blender from:

Let’s come to the important part. If you start blender you will see a 3-D-Modell. But this isn’t important.
Click on the top bar with content “Default” (press on the symbol left of the writing) and select “Video Editing”.
You will see two timelines (next to some other less important elements).
The bigger one is for including and working with the videos you import the lower, smaller one is for setting the green column (current frame) and adjusting the length of the whole video (the brighter grey area in the big timeline).
Now let’s come to the tools:
Add a video by clicking on the button “add” (beneath big timeline) and choose “movie”. Two stribes will appear in the big timeline.
The green one is sound, the blue one the moving pictures.
Play the movie with clicking on the play button (bottom-middle, triangle pointing to the right).
You will see the green column wandering around and see,  when the green column is passing the both strips, the moving pictures in the right corner.
Stop the playback of the movie with the “pause” button.
The next tool is moving and rearranging the strips:
Select one of them by clicking the right mouse button on the strip (strip has a white frame and a darker color), then press and hold down the mouse button again (still pointing at the strip but not at the little triangles (they are for resizing, not part of this tutorial)).
Now you can move the strip among the lines (higher lines lay over lower lines (just movie stream)) or left and right.
Whenever your hold strip collide with another strip it frame went red. You can’t place it in this state.
Now find a place to place it with the left mouse button.
A last essential tool I will explain before I show how to save (as video). It is the cutting tool.
Control if the strip you want to cut is selected, then move the green column by clicking the left mouse button or playing the movie and stop at the right frame. Be careful! Both timelines use different units. The one in the middle uses seconds, the other uses frames as unit.
Afterwards select “Strip” (bottom of bigger timeline), then one of the cut functions (doesn’t matter which).
Effect: The strip will divide in two parts you can arrange.

The next thing to do is to save this new video (be careful: it has the length of the frames between “Start” and “End”, also every empty space is filled with the 3-D-Modell).
Click at the field with the content “Video Editing” (the field you click at in the beginning) and select “Default”.
Now the ugly part:
Click at the camera symbol and scroll down to “Output”. Select the wished output directory. Go down to the field with writing “PNG” and select between H.264, MPEG, Ogg Theora and Xvid your favourite movie format, click at encoding to open the sub menu, we need now.
Select in the sub menu an audio codec (field right to “audio codec” which has the label “None”) which is supported by the previous selected video format (e.g. H.264 and PCM fit together)
The last thing to do is to render. Open the menu on top named “Render” (if it isn’t there, press the little plus button in the top bar (right to the info symbol)), select “Render video” and watch the the video rendering.