Mar 242013
 

The default title bar provided by Awesome is not quite to my taste. And this posting is about fixing that.

The first part is to select some colours. For me, I prefer window decorations to be subtle … grey scale; the window decorations should disappear until you focus on them. And I’m choosing to have a lighter grey for focused windows, and darker for others. The colours are set in the default-theme.lua file :-

theme.titlebar_fg_normal = "#000000"
theme.titlebar_fg_focus = "#000000"

theme.titlebar_bg_normal = "#cccccc"
theme.titlebar_bg_focus = "#e8e8e8"

The next step is to restrict the number of buttons that appear in the title bar – this is of course a matter of choice, but personally I believe that there are too many buttons by default. This is done within the main configuration file and by deleting the buttons you wish removed, which in my case means removing the lines :-

right_layout:add(awful.titlebar.widget.floatingbutton(c))
right_layout:add(awful.titlebar.widget.ontopbutton(c))

Lastly, and in keeping with making the titlebar less obtrusive, there’s shrinking the titlebar to a sensible size :-

awful.titlebar(c, { size=16 })

Which is added after the line: awful.titlebar(c):set_widget(layout) (it could be merged). There are two features I’d like to use with no method easy enough for a thicko like me to spot :-

  1. There seems no obvious way to put the title bar on the left (or right) side of the window; it seems an obvious thing to try given that screens are usually far wider than tall. There are hints that there is an attribute (if that’s the right word) called “position”, but I don’t see a way of setting it.
  2. I have removed a certain number of options for controlling the window, partially because I can never remember what those silly icons mean. But I would quite happily add a menu with all of the relevant methods – and this would be a good place to add the keyboard shortcuts (us old foggies need some helpful hints like that).

 

Mar 122013
 

Netflow (or perhaps IPFIX if you want to be vendor agnostic) is a means by which information on network traffic flows can be stored and sent on to an analysis workstation. As such there are two parts to the process of getting it all up and running – getting flows exported from the router, and getting something to read the flows for analysis.

Configuring The Flow Export

The first thing to do is to determine what interface(s) to monitor network traffic on as each interface needs to be independently configured. In most circumstances, the WAN link is the interface of interest, so we enable things on that interface :-

# conf t
config# interface dialer 0
config_if# ip route-cache flow
config_if# end
# wr mem

The guide I followed also suggested setting the bandwidth value to enable percentage utilisation calculations. I was lazy and skipped this. It also noted that for accurate flow statistics it is necessary to enable flow collection on all participating interfaces. Once this has been enabled, it should be possible to see something of what is going on with the show ip cache flow.

It is also a good idea to export the flows somewhere :-

# conf t
config# ip flow-export destination scrofula 9996
config# ip flow-export source dialer 0
config# ip flow-export version 9
config# snmp-server ifindex persist
config# end
# wr mem

The use of version 9 is dependant on what your analyser software can support. The snmp-server command keeps interface indexes persistent across reboots.

Analysing with NTOP

The installation of this package was accomplished with :-

# apt-get install ntop

This rather depends on the server in question running Debian of course! The details of configuring Ntop are left as an exercise!

 

Mar 082013
 

If you spend any time looking ’round the Internet for information on beards – which is admittedly a somewhat odd thing to do – you will quickly come across a certain segment of the “Internista” referring to something called “feral beards”.

This took me some time to figure out, as the phrase summons to my mind the image of a beard that leaps off the face, scurries off into a nearby bush, and growls menacingly at anyone who comes too close. Which I’m pretty sure I’m safe from that kind of beard unless I start feeding myself mind-bending drugs. But what on earth did they mean ?

Well, it turns out they are referring to the kind of beards that grow on men if the man doesn’t start hacking the growth away. The sort of beard that normal people might refer to as unkempt, or even (if they are being sensible), natural. The word feral is used by those who have certain opinions regarding beards – that those who just let them grow are somehow lazy, unclean, untrustworthy, the “rat’s nest“, “shaggy beards“,  etc. Basically these people just don’t like beards, which is fair enough if you are deciding whether or not to grow your own beard. But using derogatory language about another’s choice ?

Even unkempt is quite inaccurate; if a beard looks like a mess, it could be because it hasn’t been combed in a week, or because you aren’t used to seeing real beards. Now there’s always the possibility that what you’re looking at is really unkempt – complete with bits of food, and wild creatures living in it. But the overwhelming majority of men with beards will spend some time working on them – cleaning them at least daily, combing regularly, and perhaps trimming back a bit.

Which is why I say such beards are natural. Which is not to criticise those who indulge in unnatural practices such as shaving, and trimming their facial hair, but; in fact I wouldn’t use the word “unnatural” except to draw attention to the fact that it isn’t natural! It’s natural, trimmed beard, or shaved face.

And if you start thinking “but a beard just makes you look untrustworthy” or something similar, bear in mind you are indulging in the same kind of thinking that results in burning crosses in the front yard. It may not be the same to the same scale (after all I can always shave my beard off), but it is judging someone by appearance in the same way that a racist judges someone by their appearance.