Harsh but fair

Open source chicanery and the battle with my inner geek

2013 in review

Posted by raetsel on January 1, 2014

The WordPress.com stats helper monkeys prepared a 2013 annual report for this blog.

Here’s an excerpt:

The concert hall at the Sydney Opera House holds 2,700 people. This blog was viewed about 33,000 times in 2013. If it were a concert at Sydney Opera House, it would take about 12 sold-out performances for that many people to see it.

Click here to see the complete report.

Posted in Uncategorized | Leave a Comment »

The Valley of Rivendell

Posted by raetsel on November 23, 2013

The Valley of Rivendell

Posted in Uncategorized | Tagged: | Leave a Comment »

2012 in review

Posted by raetsel on December 31, 2012

The WordPress.com stats helper monkeys prepared a 2012 annual report for this blog.

Here’s an excerpt:

4,329 films were submitted to the 2012 Cannes Film Festival. This blog had 37,000 views in 2012. If each view were a film, this blog would power 9 Film Festivals

Click here to see the complete report.

Posted in Uncategorized | Leave a Comment »

2010 in review

Posted by raetsel on January 2, 2011

The stats helper monkeys at WordPress.com mulled over how this blog did in 2010, and here’s a high level summary of its overall blog health:

Healthy blog!

The Blog-Health-o-Meter™ reads Fresher than ever.

Crunchy numbers

Featured image

About 3 million people visit the Taj Mahal every year. This blog was viewed about 29,000 times in 2010. If it were the Taj Mahal, it would take about 4 days for that many people to see it.

In 2010, there were 2 new posts, growing the total archive of this blog to 61 posts.

The busiest day of the year was March 9th with 150 views. The most popular post that day was Snmpd filling up /var/log/messages.

Where did they come from?

The top referring sites in 2010 were experts-exchange.com, google.com, ifreestores.com, linuxquestions.org, and forosdelweb.com.

Some visitors came searching, mostly for cisco anyconnect mac, rsync exclude file, snmpd logging, telnet escape, and kde dbus-send save session.

Attractions in 2010

These are the posts and pages that got the most views in 2010.

1

Snmpd filling up /var/log/messages February 2008
27 comments

2

Mac OS X Snow Leopard & Cisco AnyConnect VPN August 2009
16 comments

3

KDE4 Save Current Session – DBUS to the Rescue April 2008
11 comments

4

Escape from Telnet August 2007
2 comments

5

Using Exclude Files in rsync – watch those spaces! May 2008
3 comments

Posted in Reviews | Leave a Comment »

Embedded codes in the echo command \c etc

Posted by raetsel on July 26, 2010

Following on from a post a long time ago about migrating from HP-UX to RHEL I have found another “gotcha” in relation to the use of the echo command.

In HP-UX you can use terminal codes like \c for continue on same line and \n for new line etc.

In RHEL by default these codes are not interpreted. To get them to be interpreted you need to use “echo -e”

Here is a before and after

echo “Here is\t some\b \n\nembedded code”
Here is\t some\b \n\nembedded code
echo -e “Here is\t some\b \n\nembedded code”
Here is  som
embedded code
If you are only use \c codes you could consider removing them and just using echo -n to suppress the new line but I think echo -e is more flexible

Posted in Technical | Leave a Comment »

Script Naming for run-parts for /etc/cron.daily

Posted by raetsel on January 19, 2010

I recently added in a new script to the directory /etc/cron.daily so it would be run once a day along with the other scripts in there but for some reason it wasn’t being run. After much messing about I discovered it was the because the name of the script had a . in it.

Specifically the script was called get_xferlog.sh as is common with shell scripts. I changed this to be just get_xferlog and that is now working ok.

The files in /etc/cron.daily are executed as part of an entry in /etc/crontab:-

25 6    * * *   root    test -x /usr/sbin/anacron || ( cd / && run-parts -v /etc/cron.daily )

So it uses the default settings of run-parts to execute all scripts in the directory /etc/cron.daily and the man page for run-parts says.

If neither the –lsbsysinit option nor the –regex option is given then the names must consist entirely of upper and lower case  letters,  digits, underscores, and hyphens.

If you want to check what run parts will do you can use the –test flag which just lists the scripts that will be executed without actually executing them. Thus

run-parts -v –test /etc/cron.daily

This proved very handy in debugging the issue I was having without having to wait a day between tests for the cron job to run.

I should add that the above applies to Ubuntu based servers,  Red Hat servers using run-parts don’t seem to care about a dot in the filename

Posted in Misc, Technical | 7 Comments »

Mac OS X Snow Leopard & Cisco AnyConnect VPN

Posted by raetsel on August 29, 2009

I’ve just upgraded to Mac OS X version 10.6 Snow Leopard. The results are impressive with increases in speed and reduction in memory usage.

However to connect to work I use Cisco AnyConnect VPN and that wouldn’t run, it just instantly quit.

I uninstalled it using the uninstaller in the Application folder and  then connected to our web portal at work via Safari and downloaded the AnyConnect installer. This installed fine and I can now run the local application like I used to.

The version of AnyConnect we run on is 2.3.0185

Posted in Max OS/X, Technical | Tagged: , | 20 Comments »

Some Logic

Posted by raetsel on May 1, 2009

Recently on #logic via twitter Pete Lewis asked:-

a || b -> !(!a || !b)) ? #logic makes my brain hurt

I  did a quick truth table on paper and said yes but turns out I was wrong as I had  looked at the wrong columns. Doh! Here’s the truth table and you can see for yourself

 

A B A || B !A !B (!A || !B) !(!A || !B)
FALSE FALSE FALSE TRUE TRUE TRUE FALSE
FALSE TRUE TRUE TRUE FALSE TRUE FALSE
TRUE FALSE TRUE FALSE TRUE TRUE FALSE
TRUE TRUE TRUE FALSE FALSE FALSE TRUE

The colums A || B and !(!A || !B) are not equivalent.

Posted in Technical | 1 Comment »

Using Exclude Files in rsync – watch those spaces!

Posted by raetsel on May 15, 2008

Summary

When using filter or exclude files ensure each entry has no spaces at the end of it or it will not match correctly e.g.

- Music/
- downloads/

and not

- Music/[space]
- downloads/[space]

Use two -v options on the command line to get output about what was skipped or included and why.

Use the -n option to simulate what rsync will do without actually copying any files.

Detail

I’ve recently started using rsync to copy files to an online backup server (rsync.net – the name is co-incidental).

Initially I started by using exclude options on the command line for the big directories that I didn’t want uploaded, things like my Music files etc. The command line ended up something like:-

rsync -n -v -a -z --exclude=Music/ --exclude=downloads/ --exclude=".*" --exclude=macky/ --exclude=XBMC/ -r /home/simon/ blah@rsync.net:blahblah

I decided it would make more sense to use an exclude file or filter file rather than an ever expanding command line so the I changed the command to be

rsync -v -a -z --filter='merge /home/simon/rsync_exclude' /home/simon/ blah@rsync.net:blahblah

I then created the file /home/simon/rsync_exclude by cutting and pasting from the old command line and editing the file to put one entry per line with the – sign in front to indicate it should not be included:-

- downloads/
- Music/
- macky/
- XBMC/
- ktorrent/
- /.*

However when I ran the rsync command with the filter file it started to copy up all my Music etc. after much fiddling and use of the very helpful -n option to just simulate what happening and -v -v to show what was being selected I discovered the problem.

In spliting the lines in my exclude file I had left a space at the end of each line and rsync was doing a literal match and so looking for something that matched “Music/[space]” and not finding anything.

So make sure any filter or exclude files don’t have any spaces at the end of the line.

The -n option for rsync is very useful it just simulates what rsync would do if you ran it for real. Also if you run rsync with -v -v ( yes two -v options ) you get detailed output about what is skipped etc.

rsync -n -v -v blah blah
building file list ...
[sender] hiding directory .Skype because of pattern /.*
[sender] hiding directory .kchmviewer because of pattern /.*
[sender] hiding directory .gnupg because of pattern /.*
[sender] hiding file .gtk-bookmarks because of pattern /.*
[sender] hiding file .profile because of pattern /.*
[sender] hiding file .dmrc because of pattern /.*
.......

Posted in Uncategorized | 6 Comments »

Kubuntu Hardy Heron Upgrade

Posted by raetsel on April 28, 2008

On Friday afternoon I upgraded my desktop PC to the KDE4 version Kubuntu Hardy Heron from the KDE 3.5 version of Gutsy Gibbon

Overall I have to say the process was very smooth and by far the most trouble free upgrade I have done. There were one or two funnies and these are outlined below.

Note: I decided to upgrade by downloading the alternate CD images and doing a cdromupgrade rather than doing an upgrade over the ‘net. I did this as I thought the Kubuntu sites might be a bit busy still, it being only one day after Hardy was released.

Overall the process took just 40 minutes including one false start.

Allow upgrades from the network hung

One of the options at the start of the CD ROM upgrade is to allow the system to connect to the ‘net to get the latest downloads. I decided to allow this figuring there wouldn’t be many updates to get. However maybe it was because the site was busy but the upgrade just seemed to hang. So after 10 minutes I cancelled and restarted it and chose not to get the upgrades from the net.

This restart initially hung with an error saying it could not get the lock file:

/var/lib/apt/lists/lock

This was because the aborted upgrade had left the lock file behind. I deleted this file with

sudo rm /var/lib/apt/lists/lock

The upgrade process then started itself automatically without me having to go back out.

Remove the CD before rebooting

At the end of the upgrade the systems says it is going to reboot once you press OK. However I didn’t notice any warning to remove the CD before doing this. As my system is set to boot from CD ROM first the result was my system started the live CD on reboot and asked me to select a language.

I ejected the CD and rebooted my machine and all was fine.

KDE4 Not Installed when upgrading from KDE 3.5

After the upgrade was complete and the login screen came up I checked the available sessions and only KDE was listed. There was no option for KDE4 so I thought maybe it will automatically login to KDE4 and there is no KDE3.5 option.

However when I logged in all I saw was the KDE 3.5.9 desktop ( upgraded from 3.5.8 ).

Thinking about this, it kind of makes sense. Although I was using the KDE4 CD the system is an upgrade and since I’ve never had KDE4 on this machine before it just upgraded what was there.

I was able to easily solve the problem by using adept to install the package kubuntu-kde4-desktop, from the command line the same can be achieved with.

sudo apt-get install kubuntu-kde4-desktop

The upgrade took about 10 minutes and interestingly used the alternate CD ( which I had re-instered after the reboot ). I was fully expecting to to start pulling down the package from the ‘net but it didn’t.

This just leaves me with the lingering doubt that I’m not going to get updates for KDE4 over the ‘net. I need to check my sources.list to see if there is anything else I should be adding in there to get the KDE4 updates.

The installation of kubuntu-kde4-desktop asked me what login manager I wanted to use, KDM or KDE4-KDM. I chose the KDE4-KDM version.

Once the kubuntu-kde4-desktop package was installed I logged out and back in again and under the options for sessions I had KDE and KDE4.

Choosing KDE4 did exactly what it says on the tin.

No Sound

In both KDE 3.5.9 and KDE4 initially I had no sound at all. After a couple of dead ends with installing the pulse audio server the problem turned out to be the channel to my speakers was muted in kmix.

I had to choose Kmix from the Multimedia menu and then click on the speaker icon that appeared in the status bar and choose “mixer” to bring up the full mixer panel. For some reason there were two “Front” channels showing and one of them was muted. Un-muting this gave me my sound back. (Click the pic below to embiggen)

The second Front channel was initially muted

No Sound in Firefox for Realplayer plugin

Although sound was now working in KDE4 in general in Firefox the BBC Radio Player was going through the motions of playing but not producing any sound using Realplayer. This turned out to be the fact that the plugins directory had changed for firefox3 and I had to copy in the relevant plugins from /usr/lib/mozilla/plugins to /usr/lib/firefox-3.0b5/plugins

sudo cp /usr/lib/mozilla/plugins/nphelix* /usr/lib/firefox-3.0b5/plugins

NB: This is a bit of a sloppy way of doing this I should really use softlinks to the orginal plugin files rather than making a copy. Also it should be possible to set this up in your home directory .mozilla directory rather than the global /usr/lib

Virtual Box

I use VirtualBox to run an XP virtual machine for connecting to the VPN and work. When I fired this up after the upgrade I got an error message about the VirtualBox kernel drivers not being loaded. The new version of the main Linux kernel was the reason.

Cleverly the error message told you exactly what to do, run “/etc/init.d/vbdrv setup” as root so for Kubuntu this just meant:-

sudo /etc/init.d/vbdrv setup

I really like VirtualBox and much prefer it to VMWare server. The way it handled this error message just confirms it’s the best choice for me for running a VM.

Hotkeys not loaded by KDE Autostart

The hotkeys application I use to set up my multimedia keys was not loaded when I logged in to KDE4. This was because the Autostart directory for KDE4 is in a different place to KDE3.5

In KDE3.5 is it ~/.Kde/Autostart but for KDE4 it is ~/.kde4/Autostart

So all I had to do was recreate my soft links:

cd ~/.kde4/Autostart

ln -s /usr/bin/hotkeys  hotkeys

I am not sure if .kde4 is the official directory for KDE4 files or if this has been set up by Kubuntu because they are allowing you to run both KDE3.5 and KDE4

Skype Not Working

This is the only issue I have yet to resolve. After the upgrade Skype was completely uninstalled. I tried installing it from apt-get but this gave an error saying there was no valid install candidate.

I still had the .deb package I had downloaded from the Skype website so I just re-installed this using dpkg -i

This gave me Skype back on the menu and it ran ok but whenever I try to make a call it just fails.

I suspect this might be something to do with the sound system and the fact in fixing my lack of volume I installed the pulse audio server.

I will try un-installing pulse audio and see if it makes any difference. Though I would like to use pulse audio to see what it is like and what all the fuss is about.

Posted in Kubuntu, Technical, Uncategorized | Tagged: , | 6 Comments »

 
Follow

Get every new post delivered to your Inbox.