• Zeth will be attending PyCon UK on the 12th to 14th September 2008.

This Week: Heroes and Monsters

17 August 2007

As regular readers will know, this is my occasional series of what I have read this week on the supersized interwibble.

Charting your command history

Firstly, a guy called Tom wrote in with a link to his blog:

> Hi Zeth, > > I recently came across your commandline blog and have found it a good read. It reminded my that a couple of weeks earlier (for no reason other than curiosity) I had done this > > http://www.tomgibara.com/misc/command-history > > Given the thrust of your blog, I thought it might be interesting to you and maybe your readers. > > Tom

So his idea is to do a little analysis of the your shell's command history. I followed his methodology on one of my computers, although I only used the default size (500 commands) as the sample and I have ditched the less popular ones to make it narrow enough to fit on this blog; so here are my results:

`.. image:: http://commandline.org.uk/images/posts/other/data-1-small.png

System Message: WARNING/2 (<string>, line 26); backlink

Inline interpreted text or phrase reference start-string without end-string.
alt:Most frequently used commands graph

System Message: WARNING/2 (<string>, line 28)

Definition list ends without a blank line; unexpected unindent.

`_

System Message: WARNING/2 (<string>, line 28); backlink

Inline interpreted text or phrase reference start-string without end-string.

Blocking Firefox

Marcin has a great post about some shills who are blocking Firefox from their webpages because some Firefox users install third-party adblocking extensions. Nutcases. Like refusing to sell newspapers to people whose secretaries might own scissors.

The kind of people who use Firefox are probably also the type of people who can distinguish between a useful hyperlink that has context and some random advert, so most of them will mentally block out the majority of ads anyway. While it is true that only a minority of web site visitors use Firefox, they are a sizeable minority (one estimate is 34%) and often they are the most demographically important users. Firefox users are consciously self-selected, so they are younger, richer and more educated. Not the people that any serious website wants to lock out.

I seriously doubt that even half of Firefox users, probably a lot less, have an adblocking extension installed so this misguided approach is punishing the innocent.

An even more important point is that there are ad-blockers for Internet Explorer, such as `this one`_, the first that came up in Google, and `this one`_, the second to come up. So what you are going to do now, block Internet Explorer too?

Anyway, as I always say, as a publisher of a website, you should be committed to giving the best impression that you can to your visitors, within the individual constraints that you have; not dictating who they are or how they access the site is an essential element of good web design.

tante responds in a different way, namely to look at models of funding websites and argues that creativity is the key to an advert strategy that users will not torpedo:

> Get out of your "I add a banner ad to my page and get paid for the retards that click on it" state of mind. Don’t see your customers as click-machines. That’s disrespectful and if you treat your customers like crap, they’ll go as soon as they can.

Taking over the world

Robin Bloor asks Could Linux become the dominant OS? He argues that it gradually triumph over a long period of time.

> The trends suggest that Linux will become the dominant OS - the commodity OS - both for the PC and the server, to the eventual detriment of Microsoft's revenues.

My view is that the monoculture of Windows is both unsustainable in the market and undesirable for society, and instead of replacing one dominant operating system with another, the majority of the market will be a diversity of free operating systems, whether based on Linux, BSD, Solaris or on things that have not been invented yet. We can say with more certainly that the future seems very Unix-like.

Cheer the Heroes

Seema has written a short article about how to make OpenOffice start faster, the screenshots are from Ubuntu, but the tips should apply to OpenOffice on any system.

I noticed that a guy called Rob Cakebread is developing a tool called g-pypi, here is the description:

> "g-pypi automatically generates Gentoo ebuilds for Python packages by querying the Python Package Index (PyPI/Cheese Shop)"

As you can imagine, this has huge potential. Rob has already managed to apply the tool to the entire Cheese Shop, in the process creating some 1315 ebuilds, a thousand of which are not currently in Gentoo. There is already a tool called g-cpan which does a similar job for Perl.

The next one is not new, but first read by me this week. Those of you into programming might be interested in Richard Jones's article listing Python's anti-pitfalls. By that, he means that "because the language has these features, it is harder to make programming mistakes".

Boo the Monsters

Andrew is firmly on the blog train, with a recent post about how truly awful and dated Sourceforge feels as an interface (it really is), and he discusses the predicted monstrosity that is the iPlayer in How not to write a cross platform application.

Some poor yank found that England has no free speech, at least in Peterborough, where busybody council bureaucrats seem to have nothing better to do than send wardens to harass some bloke about his chosen T-shirt, is this the beginning of the end for the kiss-me-quick hat?

Matt Hartley writes that there is a 'coming divide' between community and corporate Linux distributions, an interesting perspective but sadly he does not substantiate his argument with much in the way of evidence. I think that the individual Linux distributions often seem more important than they actually are, when there is actually a lot of action upstream and downstream action which is more important. The divide is not so much between profit/non- profit organisational models but rather between Linux distributions that have a clue and those that make stupid short term choices to throw away their goodwill, brand value and community relationships.

Quantifying web-app insecurity

I say we take off, nuke the site from orbit. It's the only way to be sure. - Corporal Hicks, Aliens

Some Linux distros have been doing audits of their servers and found problems, Gentoo has taken the official online package database offline for a little while. This is not much of a loss, other online package search sites exist, such as `this one`_ or `this one`_, and every Gentoo computer has package search facilities build in.

Slightly more interesting is that an Ubuntu sys-admin took down many of it's community maintained servers for 24 hours. Sounds like a good plan, I would have done the same. However I am not so sure about some of the reasoning behind it:

> the servers, especially zambezi were running an incredible amount of web software (over 15 packages[1] that we recognised) and of all the ones where it's trivial to determine a version, they were without exception out-of-date and missing security patches. An attacker could have gotten a shell through almost any of these sites. > > [1] art-web, gallery, drupal, phpmyadmin, wordpress, postnuke, phpbb, smf, moodle, planet, aspseek, moin, taskfreak, cms made simple, mediawiki, ...

I know most of these applications quite well, and some of them, due to the nature of the application are security nightmares in various ways, for example discussion forums are notoriously difficult security wise, as you are letting anyone come along and put arbitrary text in your database.

Fortunately, these are all open source projects, so they are hardly going to turn around and sue the guy for slander, however, I think his post is in danger of tarring all these projects with the same brush.

PlanetPlanet, for example is a very simple application, the only input is the RSS feeds. I am trying to think of how to get a shell through it (putting some specifically designed code in the blogs?). If PlanetPlanet has followed basic Python security practices then it should be more or less sandboxed from being able to do anything exciting.

MoinMoin's last known security problem appeared to be three years ago. The exploitability of the bug was classed as remote and the exploit theoretically allowed unauthorised users to revert or delete pages. A significant problem yes, but "could have gotten a shell", I'm not so sure about. I am not saying he is wrong, I just do not personally have any proof. Do you guys?

Anyone using a Windows server or desktop is betting that the numerous and real security problems will not affect them. I think sometimes we go a bit far in the open source world. If there is even the remotest academic possibility of a theoretical exploit then people go bananas. In this case it was justified, as there was a suspicion that one or more of the servers was actively attacking other machines.

Most of these PHP web apps are certainly liable to spam, however there is a difference between spam and insecurity.

The sys-admin goes on to state that:

> Unfortunately it's simply not possible for us to maintain that amount of software in any sane or secure fashion.

Yes there is, get rid of Ubuntu from your server and install Gentoo, then you can use the `webapp-config`_ command to automatically update all the instances of your web applications.

Ubuntu is a desktop focused distribution and is good at that, it if is bad at virtual hosting these web applications then use a distro that has specialised server tools for that, like Gentoo. ;)

`Command Line Warriors`_ 2007

System Message: WARNING/2 (<string>, line 213); backlink

Duplicate explicit target name: "this one".

System Message: WARNING/2 (<string>, line 234); backlink

Duplicate explicit target name: "this one".

System Message: WARNING/2 (<string>, line 235); backlink

Duplicate explicit target name: "this one".

Docutils System Messages

System Message: ERROR/3 (<string>, line 50); backlink

Duplicate target name, cannot be used as a unique reference: "this one".

System Message: ERROR/3 (<string>, line 50); backlink

Duplicate target name, cannot be used as a unique reference: "this one".

System Message: ERROR/3 (<string>, line 134); backlink

Duplicate target name, cannot be used as a unique reference: "this one".

System Message: ERROR/3 (<string>, line 134); backlink

Duplicate target name, cannot be used as a unique reference: "this one".

1 gregf says...

Maybe someone should point out the user agent switcher we can install as well. :)

Posted at 8:40 p.m. on August 17, 2007


2 Bug says...

I'd like to replace sudo with su and remove it's count a bit :). Also, blocking Firefox... Yeah, get rid of the early adopters, the group that is most likely to buy anything online... That's just dumb.

Posted at 7:07 p.m. on August 18, 2007


What do you have to say?

Show Editing Help


PyCon UK

About

Hello, my name is Zeth, I'll be your host here.

Command Line Warriors is about taking control of your own technology, it looks at our experiences of computing; especially using GNU/Linux, the Python programming language, the command-line and issues such as techno-ethics, best practices and whatever is cool now. If you take control of your technology then you are a Warrior too!

This site is your site too which means that you can contribute and get involved. You can leave comments using the facility provided. For me, the comments and discussions are by far the best part of the site. So please do have your say!

Latest Discussions

deesha

September 8, 2008
hey all, i just wanted to check the other stuf if nay1 can help me what i want is i have to convert the line starting with my function name ...
Email Syntax Check in Python

Daniel Black

September 3, 2008
Hey, sounds good already. There's another Python script for command-line 140-character-messaging (won't call it "tweeting" for obvious reasons), Tweety Py, that's currently languishing. Not, I think, because the developer's disinterested, ...
Using new social networking service Identi.ca from the command line

Antonio Araujo

September 2, 2008
Dear friends, has anyone built debian packages of db xml 2.4.13? Best regards Antonio
Native XML storage with Berkeley DB XML - part one

Zeth

September 1, 2008
Thanks everyone for your different solutions, absolutely fantastic. I have tried them all. The one from Ciaran McCreesh was the one I was subconsciously groping for.
Sisu and typing unicode in GNOME

andylockran

September 1, 2008
In ubuntu, I do ctrl, and the functions to the right of my keyboard for extra characters. Such as: alt gr + ; + e for é I'll post more ...
Sisu and typing unicode in GNOME

Jinks

September 1, 2008
I am from Germany but i use an US-layout keyboard since that's a lot easier for most my programming needs. Now, having to also write the occassional german letter or ...
Sisu and typing unicode in GNOME

Toni

September 1, 2008
Hi, You might want to add an xkb keymap. Make backups before you begin ;) And sorry about formatting. in /usr/share/X11/xkb/symbols/gb, after "intl", add this: partial alphanumeric_keys xkb_symbols "intl_fi" { ...
Sisu and typing unicode in GNOME

Ciaran McCreesh

September 1, 2008
On a UK keyboard you do alt-gr+[ followed by a to get ä. You don't need the control key at all.
Sisu and typing unicode in GNOME

name

September 1, 2008
Hi!,
List files recursively by modified time

name

September 1, 2008
Hello!,
List files recursively by modified time

Leif

September 1, 2008
On my Norwegian keyboard, the diaeresis is easily accessible, like on Jani's Finnish one. It's one of the few keys that doesn't advance the cursor, along with the tilde, circumflex ...
Sisu and typing unicode in GNOME

Lornix

September 1, 2008
ä <= compose, ", a ö <= compose, ", o å <= compose, o, a Ä <= compose, ", A Ö <= compose, ", O Å <= compose, o, A ...
Sisu and typing unicode in GNOME

name

September 1, 2008
Good day!,
List files recursively by modified time