gtk3 combobox

The combobox shows nothing?
Then you lack a renderer.
add it this way:

addnodecombo = self.builder.get_object("addnodecombo") # in my case get the combo box from gtk.Builder
addnodecomborender=Gtk.CellRendererText() # create a renderer
addnodecombo.pack_start(addnodecomborender, True) # add the renderer (what True does I haven't looked up)

# set the column (in my case 0)
# this can be a different column as the id column.
# what "text" does is most probably setting a column name which isn't shown. I think it can be everything
addnodecombo.add_attribute(addnodecomborender, "text", 0)

how to use gtk3 treestore in pygobject

1. Step:
create a treestoremodel
model=Gtk.TreeStore(str,str) (or use Gtk.Builder for this)

2. Step:
add an entry in the highest level and take its iterator. This can be done with
it=model.insert_with_values(None, -1, [0,1], [“hello”, “world”])
None: parent (None is the highest level)
-1: the last position=appending
[0, 1]: the columns
[“hello”,”world”]: fills the selected columns with values
it: the iterator, it becomes important for the next step

3. Step:
now we have an iterator. In the first call of insert_with_values we used None.
This is replaced by the iterator. And voila a child object

model.insert_with_values(iter, -1,[0,1],[“hello”,”child1″])
model.insert_with_values(iter, -1,[0,1],[“hello”,”child2″])

The last thing to do is to add the treestore to a treeview and add some Renderers for the columns,
but for that there is already a tutorial:

why commercial (proprietary) software sucks

People especially economists compare buying a software with buying a car. But this isn’t true. Actually the purchase is comparable to buy a license to use a special car with many restrictions.

e.g. you can’t

  • install it on as many pcs you want. In contrast everyone you trust and has driver license can drive your car
  • modify it (just a very little).
  • give it away/sell it
  • cannibalize it after it stopped working (a broken car you can strip from useful components)
  • go to a car dealer/repairshop of your choice (there are some movements in the car industry to restrict this either)
  • disable advertisments (in the car world they are optionally for your car)
  • have a choice which car you use. In software world nearly every company tries to lock in the users

One similarity is: you are the product.
Many people live from you by exploiting your nescience (in the car as in the software industry)

Android Autosync

Sorry it was late yesterday. I rewrote this article:

Checklist adding a google account to android:

  • deactivate Autosync by tapping on the email address (in accounts) and deactivating every sync option
  • deactivate in google preferences: check device for malicious apps especially the option beyond that you send them data

This is why I cannot recommend Android. It’s a clear breach of trust (you see the first thing never if you don’t know it and google doesn’t say it anywhere that autosync is active by default)

As I said in my former blog post I wouldn’t recommend deriviates either (same hyper-commercial App community)

I think the same is true for IOS and Windows 8 smartphones.

What exists and looks good is firefox os.  There are even some cheap smartphones. But I have no experience with it.

But I need App: xy
Install android-x86 in a virtual machine. I think it’s straigthforward so I don’t explain.
But be careful, don’t forget the checklist.
Anyway this is also a good way for non-smartphoner to have access to apps.
One difficulty is to install apps which doesn’t want be installed on tablets.
An approach is to install the apk file. Better would be to tricking android in believing a smartphone (sorry I didn’t find out how yet)

android and admins

The Android userbase is an hostile environment for admins and developers. Even android is technically a very good idea (except java).

Firstly every problem is appified. You don’t get any usefull information about internal stuff (e.g. where files lay around) by searching after the problem. The solution for every problem is: install app xy (and boost the download score of someone).

Secondly most android developers come from the windows world. They don’t share for free. Saying: this world doesn’t give anything for free why should I do so? Many apps say: hey I fix this, but lacking information how they do it. Sadly there is no filter to filter them away.

Thirdly transferring knowledge is risky. Some important features/bugs could be “fixed”. Or you could get legal trouble. Even android is under gpl this discourages people from transferring knowledge.

Fourthly you get logged and recorded on every step. I never thought about the normal world implications: Every app you looked, you installed, deinstalled is haunting you. Not the secret services, but the companies. They push advertisment crap. On a small display this is especially annoying.

Fifthly some apps have advertisements. They put you into the risk of beeing hacked by their advertisment crap (happened often enough). Also eating your internet, display space and battery. Imagine this on your PC. Every 10 Minutes something pops up and annoys you. I hadn’t this for years (since I switched to linux).
(I heard from a prof that the internet speed improvements are mostly for advertisments (that the speed penalty by them is noticed less))

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.