Planet Larry

June 08, 2008

Martin Matusiak

new word dialog

Suppose we had a dialog box for adding new words, what would it look like?

The age old tradition of mock dialogs continues…

Ps. Qt Designer on the whole is quite nice to work with, quite a bit better than Glade. Any gui designer is bound to be annoying, but I suppose Qt Designer is approaching the least annoying (and most effective) you can get.

June 08, 2008 03:04 AM :: Utrecht, Netherlands  

Bandan Das

Some more silliness

Based on my weird ideas, I cooked up a small scipt that will save me some time by automatically versioning new files that come up in my home directory. You "may/may not" have any use for it but if you want to have a peek, it's right here. Feel free to modify or use it for something else (that is weirder).

What it does : It compares and finds out a list of newly created files/directories, asks whether to add them (or ignore them) and then commits the changes and pushes it to my Amazon S3 drive. You will want to take care of the paths in there that are specific to my system.

Have fun!

read more

June 08, 2008 02:19 AM :: India  

June 07, 2008

Steven Oliver

Why C++ is “hard” in 2 sentences


One of the best quotes I’ve seen in a very long time…

In The Art of Computer Programming Don Knuth apologizes for not giving good examples of co-routines, because their advantages are not obvious in small programs. Many C++ features are like that in that: They don’t make sense until you face a problem of the kind and scale that needs that feature.

Bjarne Stroustrup

Enjoy the Penguins!

June 07, 2008 07:52 PM :: West Virginia, USA  

Luca Gasperini

Laptop ubuntu suspend and nvidia virtual tty

I decided to keep ubuntu even if I don’t like this new release ( hardy ) at all. When it came out it used to hang for no reason , the new kernels seem to have solved the issue.

I had two big problems, I couldn’t hibernate/suspend and I couldn’t switch to the ttys with Alt+F1 for example.

Starting from the latter I realized that the nvidia-glx package instead of the nvidia-glx-new does the job. Since I don’t know the difference between the two packages and I really don’t care to have the newest nvidia driver I consider this problem fixed.

Now suspend works and not sometimes or just one time like it used in the past, I had to change some config options in /etc/default/acpi-support

SAVE_VBE_STATE=false
POST_VIDEO=false
SAVE_VIDEO_PCI_STATE=true

Hiberating is still a problem or better waking up from hibernation is a huge deal on my laptop. It does hibernate and it tries to wake up during next boot but when X starts everything freeze. It seems a kernel or xorg problem because I can’t turn on/off the capslock led. Here’s the bug I’ve filled, hopefully someoene will look at it.

June 07, 2008 03:44 PM :: Italy  

June 06, 2008

Martin Matusiak

writing “she” just to be on the safe side

I won’t state this is common and therefore some kind of major concern. But I have been seeing this with increased regularity. Some people who write about an abstract and gender neutral person (eg. “the salesman”) will write “she” when referring to this person, apparently just to be on the safe side vis a vis sexism. This is yet another case of being concerned with the wrong issues and expending energy on things that don’t matter.1

If you are a reader who actually finds fault with use of the male pronoun to describe a non-specific gender neutral person, stop victimizing yourself (if you’re a woman) or stop sympathy-victimizing (if you’re a man). (See how I neatly handled both cases, I’m so politically correct.)

Guy Steele said it best, on a completely different subject, in his talk “Growing a language”:

To keep things short, when I say “he” I mean “he or she”, and when I say “his” I mean “his or her”.

But it really shouldn’t be necessary to make this qualification to anyone who can understand that use of a pronoun in a context where it appears incidentally is not a covert plot to put you down. Monty Python also had an elegant and hilarious contribution to this discussion in Life of Brian.

  1. Of course, this whole blog entry is just an example of that too, but I can still argue that I’m the only person arguing this issue while there’s many more wasting their energies on the issue at hand. :P

June 06, 2008 10:02 PM :: Utrecht, Netherlands  

Steven Oliver

Goosh


I just found this website called Goosh. Its basically Google overlayed with a fake bash like shell. While at first this was interesting, it soon turned stupid, only to then turn into something that might be incredibly useful. A lot of Linux, especially Gentoo, users have probably has to use Links or Lynx at least once in their life to search the internet because they could not get there system to boot into the GUI. A site like Goosh will make using Google from these (generally) text only browsers 10x easier! Long live the Goosh.

Enjoy the Penguins!

June 06, 2008 04:50 PM :: West Virginia, USA  

Matija Å uklje

Setting up wireless printing and scanning on HP All-in-One devices

Setting up a HP printer in GNU/Linux is probably a lot easier to do then any other brand — mostly thanks to the awesome HPLIP. This short tutorial will explain how to set up CUPS and SANE to use a HP All-in-One printer with the integrated wireless print server (e.g. HP Photosmart C4380), because there is a small caveat that needs pointing out.

read more

June 06, 2008 03:32 PM :: Slovenia  

Bandan Das

Coolest patch ever

So, I was recently talking to a colleague of mine who has spent a good number of years in the defense industry. As he was reminiscing the good old days, the conversation gradually drifted to a more interesting discussion about a guy who was a software developer: It was the cold war era and there was this critical monitoring system (with some version of MULTICS running on it) that needed an important kernel update. And the catch: the system can't be switched off even for a second and (probably) it was a core update or may be LKMs didn't exist then :)

So, our smart guy did something that no one had ever done in those times. He built a system with an exactly similar configuration and made whatever changes needed to the kernel. Then, he compiled it and came up with a binary diff between the changed kernel and the original one. The next step: Yes, you guessed it, he identified sections of the running kernel where there have been changes and set the non-executable bits on them (in the critical system). After that, it was just a matter of applying the patch. And there you are! the system stayed on as it always was :)

PS: I am really not sure how possible it is with today's OSes but I find the whole idea quite fascinating.

read more

June 06, 2008 02:54 PM :: India  

Jürgen Geuter

Gadgets, widgets, plasmoids, whatever you call them, they're pretty worthless.

Google released their Google Gadgets for Linux as open source. Those do even support both big toolkits (GTK and Qt) so they don't look alien in the user's environment, which is pretty neat. But let's make a few steps back first.

Those gadgets or widgets or whatever you wanna call them (everyone and their mom seems to have build their own little thingy there) are little apps that live on your desktop. They can display a calendar or a clock, they can grab some info from the internet and display it to you and there's also a lot of system information display widgets out there. What they have in common is that they are usually more about displaying stuff than about interaction.

Of course they do offer a context menu to configure them and often they do have a few actions that can be triggered by a click (like for example changing the volume or switching active application), but traditionally they don't have a lot of interaction (for that you would probably want a "proper" application anyways with all the flexibility it has).

Widget technologies are all about making it easier to create those "mini programs": The developer does not have to take care of much low-level code, you have a framework of the things you need and you can get your little application going in very little time and sometimes even platform independent (as long as the framework is platform independent).

So all in all it sounds really smart, right? All those neat little things doing stuff and showing other stuff? After all, a lot of the hype around KDE4 was based on the whole "plasmoid" idea (which is essentially the KDE flavoured copy of the widget idea).

Well, as it is so often, while it might sound smart, it actually is not. Let me outline why.

Widgets take up space. I don't really mean the one they take on your harddrive cause that one is cheap, but screen space. If you wanna have that information visible to you on your desktop you will try not to have your applications overlap the widgets because if you do, why would you wanna have the widgets in the first place?

And that is the real problem: Widgets steal your screen real estate.

While they might offer neat little information, you pay it with less space on your screen to put the things you actually need: The things you work with.

It's actually similar to having icons on your desktop: That's wrong cause when you open windows you wanna use your monitor to see the application you work in which means you won't be able to see the icons on your desktop. The desktop is not there to be cluttered with files (which, with any decent file-selector dialog) can be just as easily and quick be found when the reside in $HOME and if you put icons there to run applications you'll have to minimize what you are doing just to run something else (which is wrong on so many levels that I don't even wanna bother listing them here).

Widgets look nice on screenshots but that's all they are useful for. Look at all those screenshots full of widgets: Do you really think that, when you add the applications you work in, you'll see any of the widgets? Or do you really wanna make your applications so tiny that they fit in?

Widgets are a problem of information overload. Do you really need yet another clock on your desktop to steal your focus? Do you really want to see updated stock quotes all the time (and if you really do, widgets offer to little functionality to react anyways)? Do you really need to have some random quote on your desktop changing every 5 minutes?

No you don't. All those things make it harder for you to concentrate on the things you really wanna do, they distract and you can spend hours finding new widgets, playing with them and having fun (not that that in itself is bad, I love spending time every few months to change my desktop background) but when people tell you that all those things are about productivity it's usually wrong.

Having simple applications run in the background (probably with an icon in your systray) that send you a notification in certain events makes sense. That way you can filter what information you need and what helps you do whatever you wanna do. But plastering that crap all over the desktop is always the wrong decision (except for making fancy screenshots of course).

June 06, 2008 09:59 AM :: Germany  

Brian Carper

Work

When I was in college, one of the guys in one of my classes was an older fellow who'd been working in the Real World for a while, and he asked me one day what kind of job I wanted after I graduated. I remember saying "I have no idea. Pretty much anything. If Microsoft drove up to my house with a truck full of money, I'd go work for them."

Looking back now, I was wrong. There really are more important things than money. I couldn't do a job I didn't thoroughly enjoy. Not for long anyways. I don't make as much money doing what I'm doing right now as I could be making elsewhere, but I like it. I like the atmosphere of working in a research setting. I can't imagine working in a corporate setting.

I feel really bad for people who work jobs that they hate. When I got out of college I worked for six months doing tech support over the phone for a residential satellite dish company. If not for the fact that I needed money to survive, I wouldn't have. Near the end I was considering going to live under a bridge somewhere. If faced with the choice, I'd probably rather dig ditches for a living than do that again.

If hell existed, for me hell would consist of being eternally bored. I've had jobs that required no thought, just mindless repetition of tasks that were slightly too complicated to get a computer or machine to do. I can't imagine a worse fate. I can feel my brains start to leak out of my ears after an hour of a boring task.

When you have a job where you have to play with data, as I do at times, it can sometimes start turning into that kind of boredom. But then I start writing programs to do all the mindless repetition for me. Instead of spending lots of time solving little problems and doing little tasks, I solve bigger, harder, much more interesting problems that incidentally solve lots of little problems at the same time.

Computers are useful tools for everyone. But in one sense, a computer is often a waste in the hands of anyone but a programmer. The way most people use computers is like using a powerful microscope as a hammer to pound in a nail. Any time you find yourself copying and pasting a bunch of things over and over for an hour, there's something wrong. Any time a human being is forced to do a linear search through a long list of ANYTHING on a computer screen, someone along the line has failed. There are so many of these little problems in most people's lives that a programmer can solve for people.

June 06, 2008 04:32 AM :: Pennsylvania, USA  

June 05, 2008

Dirk R. Gently

Quick Guide to Writing Scripts (Repub.)


Note: This is a re-publication of elflords original Quick Guide to Writing Scripts minus a few type-o’s that I’ve re-published with his permission. It is a really good tutorial for those new to bash scripting that like getting their hands dirty without all the fluff that goes with it.

A quick guide to writing scripts using the bash shell

A simple shell script

A shell script is little more than a list of commands that are run in sequence. Conventionally, a shell script should start with a line such as the following:

#!/bin/bash

This indicates that the script should be run in the bash shell regardless of which interactive shell the user has chosen. This is very important, since the syntax of different shells can vary greatly.

A simple example

Here’s a very simple example of a shell script, it runs a few simple commands.

#!/bin/bash
echo “hello, $USER. I wish to list some files of yours”
echo “listing files in the current directory, $PWD”
ls     # list files

First, notice the comment on line 4. In a bash script, anything following a pound sign # (besides the shell name on the first line) is treated as a comment (ie the shell ignores it). It is there for the benefit of people reading the script.

$USER and $PWD are variables. These are standard variables defined by the bash shell itself, they needn’t be defined in the script. Note that the variables are expanded when the variable name is inside double quotes. Expanded is a very appropriate word: the shell basically sees the string $USER and replaces it with the variable’s value then executes the command.

We continue the discussion on variables below …

Variables

Any programming language needs variables. You define a variable as follows:

X="hello"

and refer to it as follows:

$X

More specifically, $X is used to denote the value of the variable X. Some things to take note of regarding semantics:


  • Bash gets unhappy if you leave a space on either side of the = sign. For
    example, the following gives an error message:
    X = hello
  • While I have quotes in my example, they are not always necessary. Where you need quotes is when your variable names include spaces. For example:
    X=hello world # error
    X=”hello world” # OK

This is because the shell essentially sees the command line as a pile of commands and command arguments separated by spaces. foo=baris considered a command. The problem with foo = bar is the shell sees the word foo separated by spaces and interprets it as a command. Likewise, the problem with the command X=hello world is that the shell interprets X=hello as a command, and the word “world” does not make any sense (since the assignment command doesn’t take arguments).

Single Quotes versus double quotes

Basically, variable names are expanded within double quotes, but not single quotes. If you do not need to refer to variables, single quotes are good to use as the results are more predictable.

An example:

#!/bin/bash
echo -n ‘$USER=’     # -n option stops echo from breaking the line
echo “$USER”
echo “\$USER=$USER”  # this does the same thing as the first two lines

The output looks like this (assuming your username is elflord)

$USER=elflord

The double quotes still have a work around. Double quotes are more flexible, but less predictable. Given the choice between single quotes and double quotes, use single quotes.

Using Quotes to enclose your variables



Sometimes, it is a good idea to protect variable names in double quotes. This is usually the most important if your variables value either (a) contains spaces or (b) is the empty string. An example is as follows:
#!/bin/bash
X=”"
if [ -n $X ]; then 	# -n tests to see if the argument is non empty
	echo “the variable X is not the empty string”
fi

This script will give the following output:

the variable X is not the empty string

Why? Because the shell expands $X to the empty string. The expression [ -n ] returns true (since it is not provided with an argument). A better script would
have been:

#!/bin/bash
X=”"
if [ -n "$X" ]; then 	# -n tests to see if the argument is non empty
	echo “the variable X is not the empty string”
fi

In this example, the expression expands to [ -n "" ] which returns false, since the string enclosed in inverted commas is clearly empty.

Variable Expansion in action

Just to convince you that the shell really does “expand” variables in the sense I mentioned before, here is an example:

#!/bin/bash
LS=”ls”
LS_FLAGS=”-al”

$LS $LS_FLAGS $HOME

This looks a little enigmatic. What happens with the last line is that it actually executes the command

ls -al /home/elflord

(assuming that /home/elflord is your home directory). That is, the shell simply replaces the variables with their values, and then executes the command.

Using Braces to Protect Your Variables

OK. Here’s a potential problem situation. Suppose you want to echo the value of the variable X, followed immediately by the letters “abc”. Question: how do you do this ? Let’s have a try:

#!/bin/bash
X=ABC
echo “$Xabc”

This gives no output. What went wrong? The answer is that the shell thought that we were asking for the variable Xabc, which is uninitialised. The way to deal with this is to put braces around X to separate it from the other characters. The following gives the desired result:

#!/bin/bash
X=ABC
echo “${X}abc”

Conditionals, if/then/elif


Sometimes, it’s necessary to check for certain conditions. Does a string have 0 length? Does the file “foo” exist, and is it a symbolic link, or a real file? First, we use the if command to run a test. The syntax is as follows:
if condition
then
	statement1
	statement2
	……….
fi

Sometimes, you may wish to specify an alternate action when the condition fails. Here’s how it’s done.

if condition
then
	statement1
	statement2
	……….
else
	statement3
fi

Alternatively, it is possible to test for another condition if the first “if” fails. Note that any number of elifs can be added.

if condition1
then
	statement1
	statement2
	……….
elif condition2
then
	statement3
	statement4
	……..
elif condition3
then
	statement5
	statement6
	……..
fi

The statements inside the block between if/elif and the next elif or fi are executed if the corresponding condition is true. Actually, any command can go in place of the conditions, and the block will be executed if and only if the command returns an exit status of 0 (in other words, if the command exits “successfully” ). However, in the course of this document, we will be only interested in using “test” or “[ ]” to evaluate conditions.

The Test Command and Operators


The command used in conditionals nearly all the time is the test command. Test returns true or false (more accurately, exits with 0 or non zero status) depending respectively on whether the test is passed or failed. It works like this:

test operand1 operator
operand2

for some tests, there need be only one operand (operand2) The test command is typically abbreviated in this form:

[ operand1 operator operand2 ] To
bring this discussion back down to earth, we give a few examples:

#!/bin/bash
X=3
Y=4
empty_string=”"
if [ $X -lt $Y ]	# is $X less than $Y ?
then
	echo “\$X=${X}, which is smaller than \$Y=${Y}”
fi

if [ -n "$empty_string" ]; then
	echo “empty string is non_empty”
fi

if [ -e "${HOME}/.fvwmrc" ]; then 			# test to see if ~/.fvwmrc exists
	echo “you have a .fvwmrc file”
	if [ -L "${HOME}/.fvwmrc" ]; then 		# is it a symlink ?
		echo “it’s a symbolic link
	elif [ -f "${HOME}/.fvwmrc" ]; then 	# is it a regular file ?
		echo “it’s a regular file”
	fi
else
	echo “you have no .fvwmrc file”
fi

Some pitfalls to be wary of


The test command needs to be in the form
operand1 <space> operator < space > operand2” or
operator <space> operand2 , in other words you really need these spaces, since the shell considers the first block containing no spaces to be either an operator (if it begins with a ‘-’) or an operand (if it doesn’t). So for example; this:
if [ 1=2 ]; then
	echo “hello”
fi

gives exactly the “wrong” output (ie it echos “hello”, since it sees an operand but no operator.)

Another potential trap comes from not protecting variables in quotes. We have already given an example as to why you must wrap anything you wish to use for a -n test with quotes. However, there are a lot of good reasons for using quotes all the time, or almost all of the time. Failing to do this when you have variables expanded inside tests can result in very
wierd bugs. Here’s an example:

#!/bin/bash
X=”-n”
Y=”"
if [ $X = $Y ] ; then
	echo “X=Y”
fi

This will give misleading output since the shell expands our expression to:

[ -n = ]

and the string “=” has non zero length.

A brief summary of test operators

Here’s a quick list of test operators. It’s by no means comprehensive, but its likely to be all you’ll need to remember (if you need anything else, you can always check the bash manpage … )

WordPress css theme bonked table. Please scroll down.






















































operator produces true if… number of operands
-n operand non zero length 1
-z operand has zero length 1
-d there exists a directory whose name is operand 1
-f there exists a file whose name is operand 1
-eq the operands are integers and they are equal 2
-neq the opposite of -eq 2
= the operands are equal (as strings) 2
!= opposite of = 2
-lt operand1 is strictly less than operand2 (both
operands should be integers)
2
-gt operand1 is strictly greater than operand2 (both
operands should be integers)
2
-ge operand1 is greater than or equal to operand2 (both
operands should be integers)
2
-le operand1 is less than or equal to operand2 (both
operands should be integers)
2

Loops

Loops are constructions that enable one to reiterate a procedure or perform the same procedure on several different items. There are the following kinds of loops available in bash:


  • for loops
  • while loops

For loops


The syntax for the for loops is best demonstrated by example:
#!/bin/bash
for X in red green blue
do
	echo $X
done

The for loop iterates the loop over the space separated items. Note that if some of the items have embedded spaces, you need to protect them with quotes. Here’s an example:

#!/bin/bash
colour1=”red”
colour2=”light blue”
colour3=”dark green”
for X in “$colour1″ $colour2″ $colour3″
do
	echo $X
done

Can you guess what would happen if we left out the quotes in the for statement? This indicates that variable names should be protected with quotes unless you are pretty sure that they do not contain any spaces.

Globbing in for loops


The shell expands a string containing a * to all filenames that “match”. A filename matches if and only if it is identical to the match string after replacing the stars * with arbitrary strings. For example, the character “*” by itself expands to a space separated list of all files in the working directory (excluding those that start with a dot “.” ) So,

echo *

lists all the files and directories in the current directory,

echo *.jpg

lists all the jpeg files, and

echo ${HOME}/public_html/*.jpg

lists all jpeg files in your public_html directory.

As it happens, this turns out to be very useful for performing operations on
the files in a directory, especially used in conjunction with a for loop. For
example:

#!/bin/bash
for X in *.html
do
		grep -L ‘<UL>’ “$X”
done

While Loops


While loops loop “while” a given condition remains true. An example of this:
#!/bin/bash
X=0
while [ $X -le 20 ]
do
	echo $X
	X=$((X+1))
done

This raises a natural question, why doesn’t bash allow the C like for loops?

for (X=1,X<10; X++)

As it happens, this is discouraged for a reason: bash is an interpreted language, and a rather slow one for that matter. For this reason, heavy iteration is discouraged.

Command Substitution

Command Substitution is a very handy feature of the bash shell. It enables you to take the output of a command and treat it as though it was written on the command line. For example, if you want to set the variable X to the output of a command, the way you do this is via command substitution.

There are two means of command substitution: brace expansion and backtick
expansion.

Brace expansion works as follows: $(commands) expands
to the output of commands This permits nesting, so commands
can include brace expansions

Backtick expansion expands `commands` to the output of commands,

An example is given:

#!/bin/bash
files=”$(ls )”
web_files=`ls public_html`
echo $files
echo $web_files
X=`expr 3 \* 2 + 4` # expr evaluate arithmetic expressions. man expr for details.
echo $X

Note that even though the output of ls contains newlines, the variables do not. Bash variables can not contain newline characters (which is a pain in the butt. But that’s life) Anyway, the advantage of the $() substitution method is almost self evident: it is very easy to nest. It is supported by most of the bourne shell variants (the POSIX shell or better is OK). However, the backtick substitution is slightly more readable, and is supported by even the most basic shells (any #!/bin/sh version is just fine)

June 05, 2008 06:44 PM :: WI, USA  

Matija Å uklje

Hello planet(s)

First Hook's Humble Homepage has been (re)added to the Planet Kiberpipa (which aggregates Cyberpipe members' feeds) and now it has also reached Planet Larry (with feeds from Gentoo users).

This calls for a celebrational:

#!/usr/bin/env python
# -*- coding: utf-8 -*-
print "Hello, planet(s)! :]"

June 05, 2008 04:51 PM :: Slovenia  

Steven Oliver

A new Mac OS X


A new version Mac OS X (version 10.6) is supposedly coming out soon. Yes Leopard is still very young and normally I would not care at all what Apple does but now that I own one I’m very concerned about it. Generally a major update like that would cost me some money, in Apple’s case probably no more than $100 but either way I’ve only had my MacBook for like a month or a little more than that now and I really don’t like the idea of having to shell out another $100 for a major OS update. The only thing worse than this is buying Vista only to have to spend $9000 to upgrade to Windows 7.

Enjoy the Penguins!

June 05, 2008 04:48 PM :: West Virginia, USA  

Sean Potter

BIOSLEVEL Happenings

I've been publishing a few articles a week at BIOSLEVEL.com. The increases in traffic have definitely been noticeable. We just need to take better advantage of this for monetizing the traffic so the site is atleast able to completely pay for its own hosting and advertising.

Two articles were published this week, the first of which wasn't actually a review, but rather a short tutorial on how to use chroot to recover root passwords. It's nothing new, but I guarantee there's plenty of Linux users out there that don't know how to do this.

The first article was of Noctua's NF-P12 120mm case fan. Normally I wouldn't consider a case fan a very exciting review, but Noctua included some very innovative features with the unit, as well as a silencing kit. You'll have to read the review to get all the juicy details.

Before the week's over, I'm hoping to have two more reviews published, one on a hard drive, and one of a video card. The parents are going to be out of town for the weekend, so maybe I'll have some time with no interruptions.

June 05, 2008 03:35 PM

Steven Oliver

Google and Privacy


I recently read an article claiming that Google does not properly display its privacy policy. According to California law it has to display it openly and conspicuously (a big word that means you can’t hide it). So without cheating, I promptly left the article and went straight to Google.com to find it for myself.

So we’ll start, and we’ll count the clicks it takes as well, since later on the in the article not only do they reveal the location but one person even claims “its not just a few clicks.” To me a few equals five. Given that background, lets count.

int numclicks = 0;

Once on www.google.com I looked around and saw nothing that said privacy. No real surprise there. So I, in what I felt was fairly obvious and intuitive clicked, “About Google.”

numclick += 1;

From there I resumed my search for the word privacy. That makes me sound like a computer or something but thats how you work. Your brain constantly does keyword searches. Within seconds the words “Privacy Policy” were instantly found exactly where you would expect them. At the bottom beside the copyright. So I clicked “Privacy Policy.”

numclick += 1;

That then takes me to another page. The real point of this page is something I’m not sure of, but none the less your there and inside a large blue box are giant blue letters that read “Google Privacy Policy.” So I clicked it.

numclick += 1;

Bottabing bottaboom. There you go. A clean, simple, looking privacy policy that I won’t even attempt to read because I don’t care. The point here is after it was all said and done:

printf(%d, numclick);
3

Well last I checked that was not only obvious and ridiculously easy to find, it only took three clicks which is less than 5 and thus I have proven that idiot the BBC interviewed has never used the internet. Do come back.

Enjoy the Penguins!

EDIT: The guy said “couple” not a “few.” A couple is two. I counted three. The man is still an idiot, I don’t care.

June 05, 2008 02:32 PM :: West Virginia, USA  

Johannes Gilger

bottom-up git documentation

gitAs you can imagine I have been using git some more since the last post about it (and I’ve even been giving GitHub some more thorough investigation, but I’ll be posting about that later). Back then I already understood most of it (definetely enough to work with it), but just recently I got the feeling of really understanding git, especially the underlying data-structures and the consequences for the (power)-user.
The things that helped me were (besides the git manual which is good, but not graphical, and when it comes to the understanding of the data-structures, having little graphics is a must):

  • Git from bottom up, a cool PDF i discovered on the git-wiki.
  • The RailsConf-Talk by Scott Chacon, who also wrote the PeepCode Git PDF (which I haven’t read due to lack of interest and credit-card). The link points to a video and the slides can also be downloaded as PDF (they are pretty self-explanatory imho).
  • Git Magic, which is a cool guide and pretty well structured.
  • And for the people who are really into screencasts there is also

  • gitcasts.com, which too is made by Scott Chacon

June 05, 2008 10:58 AM :: Germany  

Dan Ballard

Re: A Timeless, Desert Island Language

You know, dear internet, I'm very impressionable some times. Anyways, I was leafing through my feeds when I found this neat blog post by fellow name Dave Roberts, entitled A Timeless, Desert Island Language in my Planet Lisp section. And it's a quick neat fun read, with a conclusion you might not expect.

And if you read it, you'll probably be able to predict what shinny new idea/project has caught my attention, especially if you were already familiar with my kink for computer languages.

I want to find some time to take a quick stab at writing a simple Lisp interpreter!

June 05, 2008 05:01 AM :: British Columbia, Canada  

June 04, 2008

Steven Oliver

JFS: So far so good


In the spirit of all things open source I like to give new things a try. I mean why not? This isn’t Windows or OS X. I can reinstall easily, get my data back fairly easily, reinstall as many times as my hardware can stand, and try the newest edition of everything basically free.

So, when I recently reinstalled Gentoo on my desktop I tried out JFS. I’ve used ext2, ext3, ReiserFS, and even XFS. ext2 and ext3 are very stable but they’re not very quick. ReiserFS in my experience has been really good. But sometimes you get that, “i don’t want to use that, everyone else does” mood so you refuse. Finally, my stints with XFS have always ended in a crashed file system. Almost always do to a hard reset because of power failure. JFS on the other hand has survived its first obstacle. Depsite the power going out last night my computer rebooted this morning unscathed. Yes, it had to go through the whole replaying journal bit, but after that everything seems fine.

Enjoy the Penguins!

June 04, 2008 09:42 PM :: West Virginia, USA  

Dirk R. Gently

Uni-no-code


Because my laptop is getting older my ethernet and wireless hardware has failed on me so I’m relagated to downloading the webpages I want to read at the library. I don’t complain, this actually works just fine for me. Firefox though cannot open multiple pages at once:

firefox *.htm

So I built a script that does so:

#!/bin/bash
# firefox to open all .htm, .html files

for X in *.htm
do
    firefox "$X"
done

for Y in *.html
do
    firefox "$Y"
done

Only problem is, XP doesn’t write unicode so Firefox will complain that it can’t find the file when it encounters a character it doesn’t understand. Unknown characters in Unicode will map as “�”. This may not translate well on WordPress, or the Browser, or the OS you’re using so here’s a pic:

XP Uni-no-code

For any developers out there, do you have an idea how to write a script to rewrite the filenames so they are Unicode (or remove the un-unicode lettering) without having to manually type in each name?

June 04, 2008 06:07 PM :: WI, USA  

Sean Potter

My Workstation

Nikos posted his desktop to his blog, which was syndicated by Planet Larry, a Gentoo-oriented syndication. My blog is also syndicated there. He tagged a few people to show their setups, and I've been meaning to take a few pictures of mine, so I decided to show off as well. You can see a few other setups from Gentoo users and developers and George on Planet Larry.

My brand new Nikon D40 DSLR came yesterday, and today I've got a fully-charged battery. So why not take a few snapshots with the new camera?

First up is the desktop itself. From left to right, there's a 17" Samsung LCD, a 22" Acer LCD, and a 20" Princeton LCD. The 22" and 20" are connected to my desktop through DVI to my GeForce 8800GTX. The 17" is used with my benchmarking rig, or my server as needed. Below the monitors are my MacBook, G15 Keyboard, and Logitech G5 and MX510 mice.

Next up are my towers. The one on the bottom is my desktop, featuring a Core2Quad Q6600 CPU, 4GB of RAM, a GeForce 8800GTX video card, two 36GB Raptors, and about 400GB between three other drives.

Above it is my benchmarking rig, which has an AMD Phenom 9500 Quad-Core CPU, 2GB of RAM, a 250GB hard dive, and an AMD Radeon HD3870 video card.

Lastly, I'm posting a picture of some of my upcoming reviews and previous reviews. They're sitting on my shelves. Some of the stuff I can't talk about is behind the sheet. Shhhh!

I didn't picture my home server because it's currently in pieces waiting for a new heatsink. I also didn't picture the Asus Barebones I previously reviewed on BIOSLEVEL because it's connected to my TV for an upcoming article!

I hope you enjoyed my workstation. I'm tagging Roy, Colin, and John.

June 04, 2008 06:02 PM

Iain Buchanan

GoogleEarth flight simulator

Last night I was thinking "GoogleEarth imagery would make a great backdrop for a flight simulator"...
  1. Start GoogleEarth (I have version 4.2.205.5730 on Gentoo Linux)
  2. Turn on the "terrain"
  3. Press ctrl-alt-a
  4. Choose between an F16 jet fighter, or an SR22 4 seat propeller aeroplane.
  5. Fly! The mouse works as the usual joystick controller (down=pull up; up=down, just as I like it!)
You have some other controls too: g (landing gear); up/down arrows (throttle); f (extend flaps); F (retract flaps). And yes - since you have landing gear you _can_ crash! Turn on the terrain option for a 3D view. I landed at my local airport! Not quite as smooth as my good ole Janes FA/18, but still very cool...

It may be a bit buggy - if it locks up just restart GoogleEarth, and choose from one of the default starting points.

Of course, I'm not the first to know - Google has fully documented the keyboard shortcuts!

June 04, 2008 05:22 AM :: Australia  

June 02, 2008

Dirk R. Gently

A Walk with PCMan


A Walk with PCManA few months ago, I had tripped upon a post in Ubuntu’s forums that the PCMan file browser was restarting development and became a bit curious. A year or two ago there have been postings that I had seen in the Gentoo forums about how good a lightweight file browser it was. Then yesterday, I saw that Tombuntu had an overview of the new PCMan and then I just happened to see an ebuild made for it. So I decided to give it a try.

Currently, I use the brute horse (Nautilus) for file browsing. Nautilus is a really good browser but on this old klunker it cold-starts in 15 seconds and warm-starts in five and it would be nice if I could find something quicker. Before, I have replaced Nautilus with Thunar as the default browser, but Nautilus caught up a lot in speed when I removed the Enlightenment Sound Daemon as a variable, and frankly I had just become too lazy to change it back when I updated to Gnome 2.22.

The ebuild compiled PCMan painlessly - thanks George for the update. For the ebuild UsE flags, I built with and without the ‘desktop’ flag. The ebuild notes the desktop flag as ‘desktop integration’ but I didn’t notice a difference either way. Perhaps it is for desktop-less installs (fluxbox,…). The ‘fam’ flag is necessary for file monitoring support, it works in conjunction with gamin which is already built along with Gnome. Also, I took out the confirm delete patch as PCMan-4 has a confirm dialog when deleting a file/folder (I’m guessing the patch was for PCMan-3.*).

I found PCMan’s menu entry in ‘System Tools’ and loaded PCMan. PCMan cold-started in about 5 seconds.

Pic PCMan boot

Beginning thoughts: I liked PCMan. First, PCMan recognized my GTK and icon theme and also recognized the bookmarks I previously made in Nautilus. Big pluses. PCMan feels alot like Nautilus which is great because I am used to Nautilus’s behavior. The response time was nice as well (changing from one folder to the next took about one second). Picture previews are a must for me and PCMan did that just fine. PCMan also has tabbed browsing. I heard about this coming to Nautilus 2.24 and I like the thought of it. PCMan has the ability to drag between tabs and the ability to reorder tabs, very nice.

A Walk with PCMan

Ubuntugeek has a post that will launch PCMan for folder’s in the Place’s Listing in the Gnome Menu. I could probably use the Thunar script I previously used and link /usr/bin/nautilus to make PCman my default browser but I don’t feel like doing the work - be lost on the next update anyhow. Besides, I want to keep Nautilus as my desktop browser because it does a damn good job at it. For now I’m going to keep using PCMan and be content on opening folders on the desktop by right-clicking them and choosing PCMan. Lightweight desktops should think about giving PCMan a try.

June 02, 2008 04:35 PM :: WI, USA  

Jürgen Geuter

Virtualization as security measure

Since buying my new laptop I have access to hardware accelerated virtualization for the first time: The virtualized machines run with pretty much native speed which makes my life a lot easier. I develop software for clients in a sane environment (linux) and just do some testing and packaging on windows. No need for dual-booting and whatnot, cool!

But lately you will see virtualization praised as a security technology a lot: People are advised to run their company firewall as a virtual machine, to have the content filters and other run as virtual machines, too. This sounds like a very smart idea for a bunch of reasons:


  • The virtualized system can be minimal when it comes to features/packages which makes it less vulnerable to attacks (every software you install is a possible security flaw).

  • The virtualized system can be treated like being on a different network or like being in a demilitarized zone.

  • You can buy pre-built and automatically updated appliances that do the job. Those are expensive but some people are really into paying for stuff that could be free.



People will come up with many more advantages (which is a very lame excuse for me being lazy and not wanting to invent even more ;-) ). But there's quite a big misconception there.

People seem to think about how software is vulnerable and bug-ridden but forget that hardware has bugs, too. And virtualization is not even purely hardware, there's a big piece of software right in the middle of it. Let's look at a really simplified example:

My firewall appliance has a kernel and 100 packages. We know that every package is a possible security hole so we have 100+1 packages that could be vulnerable, right? Wrong! We have 100+1+1. Maybe even all the packages on the host (in case the virtualization has only one leak). The virtualization technology itself is another problem that you have to worry about.

Whenever you build virtualization to implement security you have to realize that you will have actually more possible attack vectors than you used to have before.

Virtualization can be quite handy, especially when it comes to moving appliances to different hardware or backing up complete appliances, but from a pure security point of view they are always worse than the same set of software installed on a "real" machine.

The recent hype around virtualization somehwat reminds me of the OO-hype: People thought it would automatically solve every issue there was until someone figured that having a class with just static public methods is just the poor man's hack for something many other languages make easier. The same thing with virtualization: It does not automatically solve all your problems and might make some things even worse. Use it when it really helps.

June 02, 2008 02:48 PM :: Germany  

Nikos Roussos

my desktop

about some time ago, some gentoo developers (starting from tsunam) published photos of their working environments.

so let's if i can trigger some gentoo users :)

here is mine:

everything i need is in place. on the left you can see an external drive (the red one) and a modem/router on the left of it. behind my screen lies my laptop (next to the laser printer) and next to my mouse i use to place the stuff i am currently reading :)

next to my office i have a bench where i have placed a scanner, an audio amplifier and my old laptop (which is actually my current desktop pc, connected to mouse/keyboard/screen seen on the previous photo).

i ping kargig, agorf and dirk r. gently :)

June 02, 2008 01:13 PM :: Athens, Greece

Alex Bogak

Universal Tracker

Hi All

My friend started a new project for the Android platform: the universal tracker called "Unit".

Cited his definition:
Unit is a mobile application for tracking lists of owned, loaned and borrowed assets (such as books, CDs, DVDs or board games) using Android mobile platform.
Here's a demo screenshot:


He's currently looking for help developing the application, so if you like this, join him!!

Thanks :-)

June 02, 2008 08:12 AM :: Israel  

Brian Carper

Cool feature in Vista

Vista has this really cool feature. When I log in to work via VPN and then close my laptop's lid to put it to sleep, when I open the lid later, I get the CTRL+ALT+DEL login screen as normal, except that my mouse cursor is now invisible! If I can somehow manage to position the invisible mouse cursor over a button, let's say the one to shut the computer down, and I click it, Vista says something about not having enough memory to perform that operation, and crashes or hangs!

Oh wait, that's not a feature. That's a big hairy stinking bug. My mistake.

June 02, 2008 06:05 AM :: Pennsylvania, USA  

Sean Potter

Gentoo 2008.0 — Something New?

The Gentoo 2008.0 Beta has been in existence for a few months, but I've only recently gotten around to testing it. Obviously I like the updated kernel and hardware detection since the last release, but there's a few things I'm not a fan of, or rather, one large thing:

A graphical installer for installing the base system. I don't know. I guess it'll make it easier for new Gentoo users, but I think I may very well stick to the good old command line for installation. With each release, Gentoo seems to be moving farther and farther away from what it used to be.

Will the graphical installer include support for a Stage 1 installation? I doubt it. In Stage 1, everything on the computer is compiled natively according to the user's settings. For example, a base system comes with components X, Y, and Z. In a stage 3 setup, these components are pre-compiled and left alone. In stage 1, each of these components are recompiled for optimal use.

I just hope Gentoo doesn't move towards using binary packages.

June 02, 2008 03:23 AM

Iain Buchanan

VMWare and the fubar keyboard effect

For what seems like 300 years I've been struggling with the horrible effect of VMWare workstation on my keyboard. I have a perfectly good license for VMWare workstation 4, so I continue to use it regardless of the fact that version 6 is available.

This never used to be a problem, but it got successively worse: Once VMWare grabbed the keyboard, many function keys would remap to nothing (ctrl, shift, alt, etc), or worse, some other key function! I solved this out-side of vmware thanks to a gentoo-user thread - just run `setxkbmap` (funnily in a package called ... setxkbmap).

This still didn't solve the problem where within VMWare, my arrow keys, del and ins, etc. were still screwed. For a keyboard-shortcut lover such as myself, who uses the keyboard more than the mouse, this is very annoying.

Finally I thought I'd try VMPlayer (and wow, does the suspend / resume feature work fast!). The problem was even more evident - now every use of VMWare many non alpha-numeric keys were unusable.

The solution:
Apparently it is an issue with the evdev input driver. Thanks to "doranikov", The solution is simple: Tell VMWare what your keyboard really does! Put this in ~/.vmware/config:
xkeymap.keycode.108 = 0x138 # Alt_R
xkeymap.keycode.106 = 0x135 # KP_Divide
xkeymap.keycode.104 = 0x11c # KP_Enter
xkeymap.keycode.111 = 0x148 # Up
xkeymap.keycode.116 = 0x150 # Down
xkeymap.keycode.113 = 0x14b # Left
xkeymap.keycode.114 = 0x14d # Right
xkeymap.keycode.105 = 0x11d # Control_R
xkeymap.keycode.118 = 0x152 # Insert
xkeymap.keycode.119 = 0x153 # Delete
xkeymap.keycode.110 = 0x147 # Home
xkeymap.keycode.115 = 0x14f # End
xkeymap.keycode.112 = 0x149 # Prior
xkeymap.keycode.117 = 0x151 # Next
xkeymap.keycode.78 = 0x46 # Scroll_Lock
xkeymap.keycode.127 = 0x100 # Pause
xkeymap.keycode.133 = 0x15b # Meta_L
xkeymap.keycode.134 = 0x15c # Meta_R
xkeymap.keycode.135 = 0x15d # Menu
done!

P.S. hello to all the planet larry readers :)

June 02, 2008 03:04 AM :: Australia  

Steven Oliver

Irssi tip


Anyone who uses Irssi must know this. It will save you and your eyes.

/ignore -channels #gentoo, #paludis * JOINS PARTS QUITS NICKS

EDIT: That didn’t seem to work… I’ll try again tomorrow :(

Enjoy the Penguins!

June 02, 2008 01:33 AM :: West Virginia, USA  

June 01, 2008

Jürgen Geuter

thinkwhack 0.1

If you have read about the thinkwhack thingy I am building and you have a thinkpad laptop, you can see some of the action now since there is a 0.1.

Right now it does probably not properly enforce dependencies so you have to manually make sure that "pygtk" and "pygst" (python gstreamer bindings) are installed as well as the hdaps module for your laptop loaded. You also need to have "xrandr" installed for the action to work.

The only thing properly implemented right now is "tilting" which means: The laptop realizes that it's lieing on the side and rotates the display properly (which is actually quite cool for reading longer texts on the laptop).

"thinkwhack" starts disabled so you have to rightclick the tray icon and start it manually, the little circle on the icon shows you whether it's off (red) or on (green). Turning the display around takes a while (since the program waits till it considers the state "stable", but if you just turn it around on the table and set it on its side it should work.

I used the data I have from my laptop so the values might be somewhat off for yours, I'll build configuration dialogs for those values as one of the next things so you can finetune the software to your needs.

Apart from that I'm going to add "Swing" and "Shock" events and allow more actions that just rotating the display.

If you have a thinkpad laptop you can check it out via the Python cheesechop/pypi via
easy_install thinkwhack in your terminal or by downloading the tar.gz from the pypi page. if you download that tar.gz manually you'll have to run "python setup.py install" in the directory you untard the sources to.

June 01, 2008 06:02 PM :: Germany  

Steven Oliver

The price of looking pretty


As I discussed in my last post I configured bitchx to run more or less as part of my background through various bits of trickery. Looked great, especially when all my windows were minimized and there was a steady stream of chat happening in the room. It would have made an excellent screen shot as well. But like plastic surgery it comes with a price. Unlike having conky glued to your desktop, if you left clicked on where bitchX was you would get nothing because Eterm doesn’t have a context menu. And when bitchX consists of roughly a 1/3 of your screen that poses a problem.  So since then, I have gotten rid of that and instead I just have Eterm open up as a normal window on boot. Minus all the annoying Windows 95 like bars that come with mind you.

It was nice will it lasted I guess…

Enjoy the Penguins!

June 01, 2008 03:08 PM :: West Virginia, USA  

Zeth

StumbleUpon Extension is Proprietary Software

StumbleUpon is a web service that allows you to share links with other users. Sometimes readers have shared this site and my number of visitors have gone up (cheers for that).

StumbleUpon is commonly used through a toolbar provided as an extension through Firefox or Internet Explorer, and a comment-in-the-last-post reminded me about it.

This made me think, what is the licence of this Firefox extension? If you go to the StumbleUpon-homepage, there is no software licence or terms at all. If you click the "Download now - Free" button, you go through to the download-page, still no licence or terms. I unzipped the extension, looking for a software licence, nothing.

Eventually, after a bit of digging and Googling, I found their Toolbar-License and guess what it is proprietary software, so if you want to run free software/open source, then get it off your system now!

The licence only gives you:

"a non-transferable ... non-sublicensable ... license to reproduce (solely to install and execute) the Toolbar on one of your computers, in executable object code format only, for your personal, non-commercial use only,"

Of course, the "Toolbar" is released as a Firefox extension, in plain-text Javascript and XUL, not in object code format. There is not really object code at all in Javascript, object code is a C term. But the lawyer writing the boilerplate probably didn't know or care about the difference. Anyhow, the licence continues:

"You may not modify, make derivative works of, copy, reproduce, publish, or reverse engineer the Toolbar"

This is in complete opposition to free software/open source, where all users have four freedoms:

  • The freedom to run the program, for any purpose (freedom 0)
  • The freedom to study how the program works, and adapt it to your needs (freedom 1). Access to the source code is a precondition for this.
  • The freedom to redistribute copies so you can help your neighbor (freedom 2).
  • The freedom to improve the program, and release your improvements to the public, so that the whole community benefits (freedom 3). Access to the source code is a precondition for this.
Discuss this post - Leave a comment

June 01, 2008 01:28 AM :: West Midlands, England  

Are your Firefox extensions proprietary software?

In the last-post, I went through the most popular Firefox extensions and talked about whether they were good ideas or not. However, it seems that not a lot of people think about another side to this, i.e. what are your Firefox extensions licenced under?

It turns out that a lot of the extensions available through Firefox are not free/open source software at all.

One example is the StumbleUpon Extension. StumbleUpon is a web service that allows you to share links with other users. Sometimes readers have shared this site and my number of visitors have gone up (cheers for that). StumbleUpon is commonly used through a toolbar provided as an extension through Firefox or Internet Explorer, (and a comment-in-the-last-post reminded me about it).

This made me think, what is the licence of this Firefox extension? If you go to the StumbleUpon-homepage, there is no software licence or terms at all. If you click the "Download now - Free" button, you go through to the download-page, still no licence or terms. I unzipped the extension, looking for a software licence, nothing. This made me very suspicious, when people are proud of their licence, they put it right in front of you, what are they hiding?

Eventually, after a bit of digging and Googling, I found their Toolbar-License and guess what? Yes you guessed it, it is proprietary software. So if you want to run free software/open source, then get it off your system now!

Their licence only gives you:

"a non-transferable ... non-sublicensable ... license to reproduce (solely to install and execute) the Toolbar on one of your computers, in executable object code format only, for your personal, non-commercial use only,"

Of course, the "Toolbar" is released as a Firefox extension, in plain-text Javascript and XUL, not in object code format. There is not really object code at all in Javascript, object code is a C term. But the lawyer writing the boilerplate probably didn't know or care about the difference. Anyhow, the licence continues:

"You may not modify, make derivative works of, copy, reproduce, publish, or reverse engineer the Toolbar"

This is in complete opposition to free software/open source, where all users have four freedoms:

  • The freedom to run the program, for any purpose (freedom 0)
  • The freedom to study how the program works, and adapt it to your needs (freedom 1). Access to the source code is a precondition for this.
  • The freedom to redistribute copies so you can help your neighbor (freedom 2).
  • The freedom to improve the program, and release your improvements to the public, so that the whole community benefits (freedom 3). Access to the source code is a precondition for this.

Don't sell out your freedoms so cheaply! If you want the most free software computer possible, look up the licenses of your extensions.

For example, here are five popular extensions that are free software/open source:

  • Firebug: Mozilla Public License 1.1
  • Flashblock: Mozilla Triple Licence (MPL 1.1/GPL 2.0/LGPL 2.1)
  • AdblockPlus: Mozilla Public License 1.1
  • FireGPG: Mozilla Triple Licence (MPL 1.1/GPL 2.0/LGPL 2.1)
  • NoScript: GPL

Please do audit your own, and let us know what you find. Knowing which extensions are free and which are not free would be really helpful.

Digg-entry

Discuss this post - Leave a comment

June 01, 2008 01:28 AM :: West Midlands, England  

May 31, 2008

Martin Matusiak

an absurd industry

There are many things that seem reasonable to the average rational person, but then there are some that just seem absurd.

First, a little background. Security is not just a playground for hackers and software companies. It seems that way sometimes, but security has become a rather potent industry in its own right since the days of the first well publicized viruses and Windows exploits. So much so that finding and reporting security exploits is now commonly a job rather than an underground, subculture activity. There is a bunch of people who are employed to do this now, and who effectively drive the standards for security by publishing bugs in various products.

Now, whenever something has value of some kind, simple economic principles naturally imply that it can be used in a trade. Security vulnerabilities indeed have certain value. By discovering a weakness in a product that noone else knows about, you stand to gain something if you decide to use it maliciously. If not, you may still consider selling it to someone who will use it maliciously. And if you’re just not into that kind of evil, you still have a certain leverage over the vendor that sells this product, because you know more about it than they do. So you could easily contact them and say I found a weakness in your product, which allows people to steal your customers’ data. Although I don’t intend to abuse this personally, we both know there are plenty of people out there who do, and who work hard to find these bugs themselves. If this weakness in your software should remain intact, and abused by someone, you’re gonna be in a lot of trouble. So how about you recompense the efforts of my research and I will hand it over?

As a vendor, this isn’t the most pleasant email to get. But after all, this person has found something that is our fault, and we have only ourselves to blame for selling something that has such an obvious weakness in it (or we don’t think it’s serious and we’ll just wing it, hoping noone gets burnt on this). Okay, raw deal for the vendor, but if you’re selling something that your customers bought in good faith, and it turns out it could pose a threat to their data, it’s definitely your fault.

Depending on how successfully this person is able to negotiate with the vendor, the outcome may be various. But if the [let's call him a] researcher isn’t able to come to terms, the next best thing is just to make it public. Like we saw already, a vulnerability has a certain value. If you’re not able to claim this in hard currency, you’ll at least want the recognition for finding this bug so that you can hone your reputation as a security professional and maybe someone will give you a [better] job.

But there is a problem. As we know from every Hollywood corporation-vs-little-guy story, companies always respond to threats the same way: calling their lawyers. The lawyers always try the same thing: hush it up. So they send out lots of scary documents, trying to shut the guy up. And whatever your legal position is, you’ll never win, cause corporations have armies of lawyers (armies of janitors too, actually, armies of everything). So chances are they will successfully silence you and your plan of publishing the vulnerability fails. You don’t get any money, and you don’t get any credit. The vulnerability remains intact, the vendor, even if they know how to fix it, probably won’t do anything about it cause noone is pushing them to.

This is the bizzarre landscape in which an industry, which would otherwise seem absurd, somehow makes sense. These security researchers don’t have protection against legal warfare, so there are actually certain companies now that trade in vulnerabilities. They will buy them from researchers and then try to reclaim a profit from the vendor, or even sort of broker the deal without putting the researcher in jeopardy. This way, the researcher can either get money for it, or if that fails, publish it.

Not surprisingly, vendors make a big stink about what they call “responsible disclosure” (ie. telling them first, hoping they don’t try to silence you I guess), but the truth is they abhor these things being made public, as Jonathan Zdziarski explains at length.

*

Incidentally, if you’re at all interested in security, you should check out some of the fascinating talks on security from various security events. Conferences like DefCon generally publish all the talks online. You’ll be blown away by what’s actually possible (and not just possible, probably being done right now) and your perception of how secure you should feel online will be changed forever. If you want to be both enlightened and entertained, try Dan Kaminsky, he likes to showboat.

May 31, 2008 08:47 PM :: Utrecht, Netherlands  

Jürgen Geuter

Centralized installing of windows software in linux environments

If you have used wine before you probably know that it defaults to installing its software into $HOME/.wine/. This is somewhat messy when you want to have software installed centralized because how do you guarantee that all users have the windows software available?

You could give everyone a default .wine dir that defines a new drive d: which is a mapped network drive and install everything there but that's all kinds of messy and probably won't work all that well. After a few tests, this is the setup that I think works best:

You create a different .wine for every application. To make sure wine uses the right one you just have to set the WINEPREFIX variable. Often you don't actually want all the users to use exactly the same instance of the windows software (because of setting or data) so they all will need their own little installation.

For each windows software you create a starter script that does invoke the software with the right WINEPREFIX set and that does make sure that a proper .wine-APPLICATION dir exists. That way you can make sure that for example .dlls and .exes are synced to the $HOME/.wine-APPLICATION/ dir of every user (for example by calling rsync). This way you can have all the users in your network use windows programs that you can store and keep updated centralized. If all your home dirs are on one central server all you will need is wine on the clients and the starter scripts that you can keep in sync really easily with a cronjob.

The .wine-APPLICATION folders are separate (every program has its own little windows so to speak) which limits weird hard to find bugs when software interacts and users only get them if they really start the software. You have some overhead because the software will be copied to every user's home but for smaller applications that are not really built for multiuser this is the best idea.

For "real" multi-user windows apps installing them on a centralized drive that is then mapped to it's own .wine dir is probably the cleanest approach.

May 31, 2008 12:13 PM :: Germany  

Zeth

Will Epiphany be able to compete with Firefox's extensions?

I recently looked at the forthcoming Epiphany browser based-on-Webkit. However, some people told me that Firefox has so many extensions that it would not be possible for a new browser to compete, even among the target audience of GNOME users. Is this true?

I am not a C hacker and don't want to be at this stage, so I can't really help with the heavy lifting in finishing the new Epiphany. However, the previous Gecko-based version allowed you to write extensions in Python, so if that is true in the new version, I could write an extension or two.

The old gecko version of Epiphany had various extensions, and a dozen or so of the best were bundled in the Epiphany-Extensions package.

Firefox extensions

It is early days because, as far as I know, the new Epiphany extension API is not written yet, however, we can do a little research about Firefox extensions, and seeing which ones are worth replicating on Epiphany. I myself have FireGPG (allows you to use GPG with webmail), Flashblock (blocks Flash movies unless whitelisted) and FireBug (see below).

There are 2353 add-ons and themes in the Firefox add-on database, several are abandoned in that they have not been updated to work with modern versions of Firefox. The bottom 1000 have had very little impact. For example, the "Et Lolcat" extension translates English to 'locat', it has only been downloaded 26 times ever. I doubt the lack of a lolcat extension is going to prevent anyone from using Epiphany.

As you might expect, outside the big hitters, the popularity of extensions tails off pretty fast. The top few add-ons have been download hundreds of thousands of times, the 100th add-on has been downloaded 10,000 times, the 1000th add-on has hardly ever been downloaded by anyone.

So lets ignore all the themes as Epiphany themes according to your desktop theme; lets also ignore all the abandoned extensions and the extensions which have never really been downloaded by anyone. So we can say there are less than 500 extensions that are actually relevant for our purposes. This is still a massive number. I cannot think of another piece of software that has 500 active extensions.

In the rest of this post, I look through the list of the top 100 downloaded-add-ons. This list of course is dynamic, so will change according to when you view it. So where I have included a number, it is the position in the top 100 when I looked at it. Do not worry I don't talk about 100 add-ons, a lot of the top 100 add-ons are themes and dictionaries which I have ignored.

The top three

Video DownloadHelper (1) - This allows people to rip videos out of sites like Youtube, as does UnPlug (37) and a million others. This could be easily replicated by Epiphany but maybe a better approach would be a "save-as" button in Gnash? Likewise Flashblock would not be required if Gnash has an option for "only play when the user agrees to".

Adblock Plus (2) provides advert blocking, as does Adblock and Adblock Filterset.G Updater (38). In the old Epiphany, there already was a decent adblock. This can and no doubt will be easily replicated by an Epiphany extension.

NoScript (3) provides blocking and white-listing of Javascript. This could be easily replicated by an Epiphany extension. Epiphany already gives you the ability to turn Javascript on and off globally, the extension just needs to give the ability to control this behaviour per site.

Not all extensions are priorities

IE Tab (7) allows Windows users of Firefox to open non-standard webpages in IE. This is not available on Firefox for Linux so is irrelevant. People should not write IE only webpages.

Next we have the replacements for Firefox's rubbish download dialog: DownThemAll (4), Download Statusbar (6), PDF Download (10), Fast Video Download (15), ScrapBook (28). Hopefully Epiphany's download dialog will be good enough out of the gate. So these are not a priority.

Foxmarks (9) and Speed Dial (29) are replacements for Firefox's annoying bookmarks dialog. Epiphany's bookmark manager is better, so these extensions are not a high priority.

Greasemonkey (5) is a higher level extension tool, it basically makes it easier to write extensions for Firefox, especially per site extensions. If Epiphany's extensions are easy to write, this will not be needed.

The Fasterfox (17) extension allows you to prefetch pages, as well as make concurrent connections, i.e. download the same page ten times at the same time. I am undecided weather this extension is a good idea for the web. I wouldn't want people using it on my sites.

A web browser is not a desktop environment or package manager

Quite a few of the extensions use Firefox as a convenient way to make and distribute an application, not surprising as Windows does not have a package manager. These extensions may have none or only tangential connection to the fact that Firefox is a web browser. Many of these in Linux would work just as fine or better as a separate application, indeed many equivalent applications already exist and are probably better.

FireFTP (18) is an FTP client, GNOME has GFTP which is perfectly fine. FoxyTunes (27) is a media player frontend, Linux has billions of media players. Forecastfox (12) tells you the weather, the GNOME desktop already tells you the weather, we can even look out a window. Likewise, FoxClocks (30) tells you the time, which the GNOME desktop does by default. After 40, we have RSS Readers such as the "Feed Sidebar" and "Sage", as well the IRC client ChatZilla. GNOME has lots of RSS Readers, e.g. Straw and Liferea, and Linux has lots of IRC Clients. The best way to use IRC is to use a client that can run 24/7 on the server, such as Irssi.

ScribeFire is a Firefox extension that provides a text editor for blogging. There is GNOME-blog available through all the package managers, but I prefer to use a real text editor. FoxSaver is an extension to provide a screensaver and photoviewer, GNOME has the Eye of GNOME image viewer and its own screensaver. ReminderFox (35) provides reminders, as GNOME already does.

PicLens (8) provides desktop effects for Firefox on Windows. It is not available for Linux, but Compiz with Epiphany does a better job. The same applies to "Tab Effect" (21) and FireGestures (24).

The Firebug (13) extension is a fantastic toolkit for web designers that turns your browser into a complete Dreamweaver clone. This would perhaps be better as a webkit based application, the same goes for "Web Developer" (20).

"Better Gmail 2" (14) provides extra options for Gmail, turning Gmail into a rich desktop application. The whole point of web-based email is that you can access it from any computer anywhere without special software. If you want to use installed software, then Gnome has Evolution which is richer than any web application.

I also skimmed through the 100 to 200 most popular add-ons, and it was more of the same. I hate to be a snob, but it seems that the most downloaded extensions are not necessarily the best ones!

Conclusion

There are many hundreds of Firefox extensions, some of them are absolutely fantastic, however many are repetitive, many also replicate things that already exist on a GNOME based system by default or are quickly available in the package manager. A large number of the extensions are old and have not been ported to modern versions, and some of them are just bad ideas.

This survey has convinced me that it is quality not quantity that matters, that with just 20 well chosen extensions, Epiphany could offer the features that 80% of GNOME users want, with 50 well chosen extensions, it could offer the features that 95% of GNOME users want. I am talking about extensions that actually have something to do with web browsing, not turning Firefox into a jukebox, or into a calendar, into a Compiz replacement, or into an operating system of its own.

Discuss this post - Leave a comment

May 31, 2008 11:40 AM :: West Midlands, England  

Steven Oliver

Bye bitch…x ;)


That ellipses was a comedic pause. You may laugh.

Anyway, I got rid of BitchX. While I was glad that I tried it, this client called Irssi is much better. It was one of those feelings where the program just feels crappy. Irssi doesn’t feel like that yet, but we’ll see. And if you need any help simply follow this guide. Worked for me. Irssi appears to rememer commands on its own which is nice, but I’d like to edit some conf or script files. Haven’t looked for them yet, but I’ll see later

Enjoy the Penguins!

May 31, 2008 01:51 AM :: West Virginia, USA  

May 30, 2008

Matija Å uklje

There are three OOXML appeals

Against all odds, it was neither Norway nor the UK who filed the appeal to the ISO/IEC JTC 1 concerning their DIS 29500 (i.e. OOXML), but South Africa, Brazil and India!

ISO/IEC JTC 1 now has to take into consideration these three appeals (there is also a rumour about a fourth one), but the options are still quite open for the JTC 1 (or more exactly the ISO and IEC bureaucratic elite) to quasi-elegantly bypass these appeals and still push OOXML to become IS 29500.

read more

May 30, 2008 08:06 PM :: Slovenia  

Steve Dibb

planet larry: maintenance cleanup

I’m still getting overdue stuff taking care of, this time in Planet Larry. I’ve finally cleaned up the scripts and the configs to make it much, much simpler to debug and run the update process. Not only that, now it runs about 15 times faster (under one minute, actually).

Something interesting I realized the other day is that Universe gets about 5% of the traffic that Planet does. As a result, I changed it from updating twice an hour to once every 2 hours. Planet, on the other hand, I changed it from twice an hour to every fifteen minutes, and I might make it update even more frequently than that.

Anyway, all that’s changed is a bunch of boring backend stuff, which was some much needed cleanup that I’ve been putting off for a very, very long time. The fact that planet has been a maintenance nightmare is what has mostly kept me from dragging my feet on getting anything done, but now that that headache is gone, I feel hugely relieved.

There’s still more stuff to do, but I think I’m over the worst of it. What I’d like most is to work on next is getting the actual frontend cleaned up, and get a new design. That’s not really my thing, so if someone can help out, that’d be much appreciated.

May 30, 2008 07:16 PM :: Utah, USA  

Jürgen Geuter

Feature uniformity in open source and opinionated software

In open source software there's a trend towards feature uniformity. Let me explain what