Category: hackery


Waking up to new Ubuntu

October 10th, 2010 — 11:38pm

Today Ubuntu 10.10 was released, at 10:10am. Last night I prepared my laptop for a complete reinstall, I took a backup of everything important from both Ubuntu and Windows, and prepared GParted and Windows 7 CD’s.

This took a while, so it was late when I went to bed. That left me with a conundrum, I wanted to install Ubuntu as soon as it came out, but I also wanted to sleep… Hmm..

Continue reading »

1 comment » | hackery, linux, ubuntu

My New Desktop

December 7th, 2009 — 5:49pm

Since its exam time, of course I’m spending my time doing anything but studying. So, I’ve completely redone my Ubuntu desktop.

Continue reading »

2 comments » | hackery, linux, ubuntu

Handy Songbird Tips – AllTray, MMKeys and ubuntu-notify

November 5th, 2009 — 12:01am

I love Songbird, it’s a great music playing program and I’ve been using it since it hit it’s 0.6 release. Anyway, today I discovered 2 cool little things that have made my Songbird experience much better.

Continue reading »

1 comment » | hackery, linux, ubuntu

World Community Grid in Linux – Peer certificate authentication problem

November 1st, 2009 — 4:53pm

UPDATE – Tyler in the comments notes that this is also a problem in 32 bit versions, so I’ve modified the title accordingly

Last night I performed a fresh install of Ubuntu 9.10. One of the first things I did was to install the BOINC manager so I could continue contributing to the World Community Grid

I fired up the BOINC manager and for some reason, the blasted thing wouldn’t connect and download new jobs. I switched to ‘Advanced View’ and had a look under the ‘Messages’ tab. There was the following error message -

"Scheduler request failed: peer certificate cannot be authenticated with known CA certificates"

What the hell does that mean, well, I found some information on this really helpful site.

The issue appeared to be that the file ca-bundle.crt was not included on the installation of the BOINC software.

So, the instuctions were to download the file, and add it to the BOINC data directory. Where the heck is the BOINC data directory? Well, after a little poking, I found it. This is only an issue if you installed the package from the repositories, otherwise, the data directory is easy to find, as it’s in your home folder.

To fix the problem,

1. Download this file

2. Copy the file to the BOINC data directory,

sudo mv /path/to/the/file/ca-bundle.crt /var/lib/boinc-client

3. Now, to get the client to recognise the new file, you need to stop the daemon, restart it, then restart the manager. If this all sounds like a pain in the arse, just reboot your PC and it will do all this for you. If you don’t want to reboot, run

sudo /etc/init.d/boinc-client restart

Then start the BOINC manager again, you should be up and running.

5 comments » | hackery

Build a single kernel module in FreeBSD

July 16th, 2009 — 11:40am

This is a simple piece of information that may save some of you some time.

There are a few reasons that you would like to build a single kernel module in FreeBSD, and thankfully it is easy to do.

Firstly, find the module you need.

cd /usr/src/sys/modules/YOURMODULE

Often there will just be one file, a Makefile in these directories. That’s not a problem, just run

make

Now you will be left with a load of files, the one you need is the *.ko one.

To load this onto a running system, use the

kldload

command.

Done and done! To check your work, run

kldstat

Comment » | hackery

mount command different in FreeBSD & Linux

May 1st, 2009 — 4:21pm

At work I use both Linux and FreeBSD extensively. Recently while going through some old bash scripts trying to make sense of them, I had two terminals open, one for looking through the script and the other for looking up man pages, to decipher command line switches.

This was going fine, until I can across a certain command that just didn’t make sense, the mount command.

The operation was happening at boot up, where a partition was being mounted as the root filesystem.

mount -f -o rw /dev/md0 /

This mounts dev/md0 on /. Sinple enough, the -o option specifies that the partition is to be mounted readable and writable. What about the -f part though.

I switched across to my other terminal, and typed in man mount to have a look for this command switch. According to the man page, go on, check for yourself, this command ‘fakes’ the mount, i.e, does everything except the system call.

manpage linux

manpage linux

This had me puzzled for a while, until I realised that I was looking at the man page for the LINUX implementation of mount,not the FreeBSD implementation, so I ssh’d to a FreeBSD box and had a look and sure enough, I found,

screenshot-shaneshane-work-desktop

Sure enough, the command is different, but what a difference!

In Linux, -f ‘fakes’ a mount, whereas in FreeBSD, it ‘forces’ a mount. Those are two completely different things, you could hypothetically want to check a volatile FS using -f to fake a mount, and then acting based on the return from that, but if you run the command on FreeBSD, it will force the mount, a dangerous thing to do!

So note to self – Linux and FreeBSD are NOT THE SAME…watch out for the subtle differences between even the most fundamental of commands in the two operating systems

Comment » | hackery

Watch out for checksums

April 15th, 2009 — 9:25am

I was fiddling around with snort there yesterday, creating new rules and stuff like that. I almost tore my hair out for a while though, thanks to one small problem.

I was looking for HTTP packets, so was searching for “GET” requests, and whatever I tried, the packet, (that I knew was there!) would not show up. After some pouring through man pages, I tried the -k none command line switch, and it began to work.

It seems that the packets’ checksum had failed and because of this, snort was ignoring it. Probably the right thing to do, but its handy to know how to turn it off, and know that it does cause problems.

So instead of

snort -c snort.conf -r traffic.cap -l log

Try

snort -c snort.conf -r traffic.cap -l log -k none

Comment » | hackery

conky

April 21st, 2008 — 9:28am

I just set up conky on my Hardy machine, its as simple as can be, a quick “sudo apt-get install conky” did it for me.

The cool thing about it is that you specify exactly how it works, by creating and editing a file in your home directory called .conkyrc , this file is a little hard to understand so you’re better to (like I did) use a pre configured file, I’ll post mine here, along with a screenshot. It makes your desktop look seriously l33t!

.conkyrc

screenshot

Comment » | hackery, linux, ubuntu

Making the terminal more friendly

March 4th, 2008 — 11:06am

Ah the terminal, the terrifying black box that scares many new users off. “But don’t you have to program it and use it all the time?” is regularly heard from uninformed Windows and Mac users. Once you give it a go though, the terminal is your friend, the stigma lifts and you realise its your flexible customisable friend! One thing that I find really annoying though, is the way that you have all these commands and keywords to remember, I especially have using chmod and all its options, as well as tar. They’ve got loads of different arguments when in reality, you only use one particular combination all the time.

Heres where your .bashrc file comes in, with this file, you can make it easier to execute the commands you enter most often, imagine instead of having to type “sudo mount -t vfat /media/sbd1″, which I have to do everytime i want to mount my external hard drive (If you know of a fix, please tell me!), all you have to type is “mhd”!

This is really simple to do, all you have to do is add this line to your .bashrc file – alias mhd=”sudo mount -t vfat /media/sbd1″ Now every time you type mhd, it executes the command shown. Here’s a step by step

1. Open a terminal

2. Open the .bashrc file, “sudo gedit /.bashrc”

3. Add the required lines

4. Save the file

5. Run the following command, “source /.bashrc ”

6. You’re good to go!

6 comments » | hackery, linux, ubuntu

Can’t Remember That Command? Check The Cheat Sheet!

February 11th, 2008 — 11:50pm

Ever been tinkering around with the terminal and just blanking on that command you need? No problem, pull up any of the cheatsheets from this site! There’s so many to choose from I don’t even know which one to recommend, but any of them should do the job when you get scripters’ block!

Comment » | hackery

Back to top