Wrapped in gaffa

Programming, Art, Music, Philosophy, Politics

Archive for the ‘Software’ Category

Configuring Debian Squeeze with PolicyKit for sudo

with 7 comments

I’ve recently gone back to the roots and installed Debian testing to replace Ubuntu. I would like to keep the concept of a disabled root account from Ubuntu, I tried for a long time using trial and error until I Read The Fucking Man page and found the solution to configure PolicyKit for sudo users. I’ve chosen to use a new group I called admin like the one from Ubuntu, although using the sudo group would fit the purpose on my single user machine.

As usual:
su root
adduser <username> sudo

With visudo make sure you have a line like this:
%sudo ALL=(ALL) ALL

Expire the root password and set sudo mode in gnome:
sudo passwd -l root
gconftool --type bool --set /apps/gksu/sudo-mode true

Create the group admin and join it:
addgroup admin
adduser <username> admin

Edit /etc/polkit-1/localauthority.conf.d/50-localauthority.conf:

Change this:

To this:

This setup is the one I’ve chosen, with disabled root and a permissive sudo group. There is endless possibilities if you read the man pages of sudoers and pklocalauthority.

That’s it! I hope…

Ari had a an important comment to make:

That configuration file says not to edit it. Just copy the file to something like 90-customauthority.conf with the same customized contents.


Written by gaffa

2009-11-05 at 19:05

Posted in Debian, Gnome, Linux, Software, Ubuntu

Tagged with , , , , ,

Sexism in FOSS

leave a comment »

Clearing My Conscience

A cowardly attempt to make myself look better

First off I would like to point you all to a few blog posts of my own which might be considered sexist, so that you people won’t have to point it out in the comments.

First one is about a porn site called Fuck For Forest. Read it and judge for yourself. In my opinion there’s nothing sexist about that, but if you feel different feel free to comment that post (not this one).

The second one has the headline “Man tits women’s tits, what’s the difference?“, which is about a demonstration for women’s right to bathe topless. I actually considered editing it, but I’ll leave it there for you. I’ts supposed to be written in a humorous tone. I can see the wording might be confusing. Some of it because I’m not a native English speaker, and some of it is intended to be humorous. I stand by that I like women’s breasts and that I have no objections against women bathing topless in public facilities. Luckily for mankind (which might be a sexist term) most men find a woman’s body sexy. The blog post continues with a short paragraph about censorship of sexual photos, and the wording might be clumsy (I don’t know if I was drunk), but I won’t edit it to make myself look better.

Now that that is off my chest I can get to the real point of this blog post. I read a few blog posts by Carla Schroder on LinuxToday which talked about sexism in FOSS. A topic I think got fueled by Richard Stallman’s clumsy religious joke about Saint Ignucius and the deflowering of Emacs-virgins. This article is my perspective on sexism, and the misunderstandings I see more and more often.

What Is Sexism

Let us start out by defining sexism. There seems to be alot of confusion about it.

sex·ism (skszm)
1. Discrimination based on gender, especially discrimination against women.
2. Attitudes, conditions, or behaviors that promote stereotyping of social roles based on gender.

First one is obvious to most of us, but the second definition explains it a little more; Attitudes, conditions or behaviours that promote stereotyping of social roles based on gender.

If I say to a woman “You have a nice ass”, it’s not sexism, but it could be sexual harassment or a compliment depending on the mental state of the person who receives that comment. It’s the person making the comment who has the responsibility to read if it’s appropriate or not, often a comment like that is only acceptable to wifes, girlfriends or close friends where you are both trained in reading each others body language. The reason why it in any case is not sexism is because your body is not a social role. When a man say something like that it doesn’t mean the he thinks less of women, it means he is attracted to women (he might still be a pig).

An example of sexism is if you get valued differently just because of your gender, you will never doubt when that happens. It will not necessarily be any demeaning wording, you will clearly be able to read it from the persons body language. Words are never in themselves demeaning, and that’s the hard part about sexism and other discriminations, you need to be able to read people’s intentions. It’s all psychology, how does the recipient perceive what I say and what does the sender mean with what he says. In my opinion many cases about sexism is not really sexism, it’s misunderstandings where both parties end up feeling that they have been treated wrongfully.

Many common phrases and turns use a single gender. Using them does not mean you are being sexist. Most phrases have a history and many words simply change their meaning a bit. As an example in Danish Football the goalkeeper, which is gender-neutral in English, is called (roughly translated) a goal-man in Danish, it might sound discriminatory in English, but no one thinks of it as being just a man, a female goalkeeper is called the same without hesitation and any thought to the word applying less to her than to her male colleague.

If you are in doubt weather someone is being sexist, you should always confront them politely and ask what they really meant, I’m certain that most of the time it will be a misunderstanding. Real sexism is easy to spot.

What We Can Do About Sexism

Carla is talking about phrases and words in her articles. In the case of Mark Shuttleworth I really felt he was wrongfully accused. Carla didn’t start this and I have deep respect for her, but I feel he was misunderstood by the original complainant and sadly the rest of the proud women of FOSS fell for it. Basically what he did was to use the word guys about a group of people throughout his speech, which is a casual term including both women and men. The fact that someone counted and noticed all the occurrences of the word tells me someone had an agenda. An agenda which might have been meant well, but doesn’t help women in FOSS at all.

Mark also said; “if we approach this from the perspective of saying, how do we make this just awesome for end users, then we will have less trouble explaining to girls what we actually do“. Yes, Mark is talking to men in that phrase. What he is doing is to use his own experiences (he is a man) with how difficult it is to make your wife or girlfriend understand what you spend all your time doing on the computer. It is easier to tell his wife that he is working on getting the Wireless network to work without having to configure it, than to use a lot of technical lingo no one understands. He could have said “girlfriends and boyfriends” or something similar, but just because he didn’t doesn’t mean what he said was sexist.

What I am trying to say with this is that, going after words are not worth your time. Act on the meaning of words instead, and then point it out in proper tone to help you get backing. I know it’s hard if you feel you have been wronged, but it’s more effective than a counter-attack, where you begin to look just as bad as the offender. I promise you that we are a lot of men out there who are willing to back up women, who have been wronged. In the end there will be two sides. Women and Men turning their back on Sexists (of both genders).

The amount of women involved in FOSS is not important. The important thing is that women who are involved with FOSS don’t feel alienated, but feel that they are a part of the team. Therefore I don’t believe in exclusive women communities, which are about getting women into FOSS. Working to specifically get women into Free Software is unimportant, doing that looks like a symptom that the women the FOSS community have, don’t feel they are a part of the team.

Written by gaffa

2009-09-30 at 15:56

Posted in Linux, Philosophy, Politics

Tagged with , ,

Local DNS to work around censorship

with one comment

I live in Denmark and unfortunately that’s a country where courts don’t know the laws they judge by. Which means IFPI got through with a nationwide block of the site thepiratebay.org. The Pirate Bay is basically just a huge public torrent tracker, which means many Open Source projects are using it to distribute files (fx. the game Urban Terror) and even the Danish national television were distributing some files through it. I personally used it to distribute the Creative-Commons BBC documentary The Codebreakers for IOSN (a UN Development Programme).

At first I used /etc/hosts and manually entered the IPs, because I didn’t want to use an external DNS service. I don’t trust any outsiders with all my DNS lookups, I want all lookups except the blocked domains to go to my ISP. Unfortunately a static hosts file is just not the same as doing a DNS lookup for this kind of site. Fx. tracker.thepiratebay.org does not point to one single IP, but 8 different IPs. CNAME records like vip.tracker.thepiratebay.org points to tracker.thepiratebay.org. Another problem is when TPB decides to start a new site like trial.thepiratebay.org, then I have to manually add that domain to /etc/hosts after looking it up at TPBs own nameservers.

Today I decided to try a different approach than the static hosts file. I wanted to set up at DNS proxy. I went with pdnsd, which was very easy to set up. All I had to do was to install the packages pdnsd and resolvconf (on Ubuntu 8.04) and add the two entries below to the pdnsd.conf file. The router entry redirects any lookup not pointing at thepiratebay.org and its subdomains to my router. If you’re not using a router you could enter the IPs of your ISPs DNS servers instead of the IP of your router. The tpb entry is simply an entry that looks up any request for thepiratebay.org and its subdomains and nothing else. The servers used are TPBs own name servers.

server {
    label = "router";
    ip =;
    exclude = ".thepiratebay.org";
    policy = included;
server {
    label = "tpb";
    ip =
    include = ".thepiratebay.org";
    policy = excluded;

Written by gaffa

2009-02-15 at 19:41

Posted in Copyright, Linux, Politics, Software, Ubuntu

Tagged with

Downloading galleries with Zenphoto

with 16 comments

Last weekend I had a Christmas Party or what you call it in english – it is basically a danish tradition where you drink a lot of schnapps, with marinated herring and anything made from pigs on rye bread. A great one also has warm food, but mine didn’t.. I think it all evolves around the schnapps and beer, the rest is just fittings.

Anyway I took a lot of pictures with my quite expensive digital camera before I got too drunk.. and decided to hide it from myself. Digital pictures is no fun unless you can share peoples embarrassing moments online, so I installed Zenphoto on my Dreamhost account. Worked like a charm, but soon people started requesting an archived download of the entire gallery. I did a little search and found out that Zenphoto already had that function printAlbumZip and I just had to add it to the Template which was as easy (even for a PHP virgin like me) as adding <?php if (function_exists(‘printAlbumZip’)) { printAlbumZip(); } ?> somewhere appropiate in the template and turned on persistent archive in Zenphoto, so that the gallery would not be archived more than once. Storage space was not a big issue, but apparently RAM was – I kept getting errors because memory ran out. I took a look at createAlbumZip and found that it was sending the file by using readfile which puts the entire ~500MB into RAM before sending it. I did a small patch to cache and send chunks of 16MB at a time in createAlbumZip, it’s not a pretty patch, but I guess simply using readfile isn’t either.

I replaced this code in zp-core/functions.php:
header('Content-Type: application/zip');
header('Content-Disposition: attachment; filename="' . urlencode($album) . '.zip"');
echo file_get_contents($dest);

With this:
$buf_size = 1024*16;
$file = fopen($dest, "r");
header('Content-Type: application/zip');
header('Content-Disposition: attachment; filename="' . urlencode($album) . '.zip"');
header('Content-Length: ' . filesize($dest));
print fread($file, $buf_size);

Link to gallery

Written by gaffa

2008-12-07 at 17:12

Posted in Programming, Software

Tagged with

Update Anjuta Auto-Complete

leave a comment »

The tags used by the auto-complete feature (Scintilla only) in Anjuta can be updated by running this script:


The script automatically scans your /usr/include folder. It is also running pkg-config to update dependencies for packages.

Maybe there is a way to do this from within Anjuta, but if if there is, it is so unintuitive that it was more obvious for me to open a terminal and write dpkg -L anjuta-common to locate a script ;)

I’m having some issues with the Devhelp extension for Anjuta on Ubuntu 7.10, I’ll post something if I find some time to debug it. I know it crashes on running gtk_moz_embed_realize, but I don’t know why yet ;)

Written by gaffa

2007-12-29 at 02:18

Virtually not a crime

with one comment

A Dutch teenager was arrested for stealing virtual furniture in the game Habbo Hotel and a Chinese man killed (in real life) a man who had sold a virtual sword he had borrowed from his murderer in the game Legends of Mir 3.

What a pathetic world. I blame the implicit greed of capitalism.

If you spend your money buying virtual (non existing) items instead of feeding starving children you deserve to be robbed.

Unicef Logo

Donate Now!

Written by gaffa

2007-11-21 at 19:14

Show me good use of ECMAScript on the Web

with 2 comments

Microsoft want their Silver-something to replace ECMAScript and Flash and Mozilla wants to develop ECMAScript in the direction of Silver-something.

What do I need it for? Nothing.

You can view this blog perfectly fine with a pure HTML and CSS renderer.

Interactivity? What kind of interactivity? Like submitting a comment to this post? It seems to work fine with just HTML/HTTP.

I only know a few great ways of applying ECMAScript and that is in presenting sites like I want to view them, using the Greasemonkey extension for Firefox.

What is the real reason to make my browser execute code from the internet? The answer is advertising. The funny thing is as soon as you disable ECMAScript the content you miss out on is advertising. It is simple to show ads without using ECMAScript, but most ad providers use it to collect information about us. Users don’t need ECMAScript.

I’m sitting here trying to come up with a good use for ECMAScript, Flash and Java, but I just can’t. I need your help, please post a comment.

I can only come up with playing music in your browser and watching video, but really the ideal thing would be a video player plugin and a music player plugin for your browser. You don’t need a completely different audio/video engine as a browser plugin. All you need is a plugin that uses your favourite mediaplayer. The rest is just bloat.

Please post a comment if you disagree (It would help if you explained why you think users need ECMAScript, Flash and Java).

Written by gaffa

2007-11-03 at 15:10