Thursday, 29 November 2012

Cheat to win

Wanted to share this brilliant link, all the cheat sheets in one place, Linux and loads of programming languages Python, Php, Ruby, Java, etc. Any help with learning is good help in my book.

Happy cheating.

click here to learn.


Saturday, 24 November 2012

Copy a website

This terminal command will copy a website into a folder name of your choice into your home directory. Handy for saving your own website or blog. Could be used to show a friend with no internet connection some websites. This even works well on my Raspberry pi, to show sites onto a TV with no internet access.

wget --mirror -p --convert-links -P "name of folder" "URL of website"

So if you wanted to save this blog into a folder called "blogview" you would enter

wget --mirror -p --convert-links -P blogview

4 seconds later it was copied.

Note the second -P is upper case.


Raspberry pi xbmc

New toy through the post today, a Raspberry pi. Thought I would upgrade my TV with it for a first tinker and install the XBMC media centre onto it so I can connect my old TV to the net. 

Connect an SD card to your PC that you would like the media centre installed on (2gb min). Open a terminal (any Debian based distro will be the same process) enter "sudo wget +x"

This will down load the installer.

Then enter "sudo python" to run the script.

You will see an installer like the one below.

Be careful on the next bit as you want to chose the correct drive to write to. The first one is my PC hard drive (/dev/sda:). The second one is my SD card (/dev/sdb:). The drive sizes will give you an extra check you have the right drive.

So in the choice I typed "/dev/sdb:" then enter.

When it's finished, the installer will tell you to put your SD card in your Raspberry pi and start it up, from then it installs itself which takes about 15mins.


Libre office spell check not working

Loads of posts about spell check not working in the forums and as mentioned in my earlier post on installing LMDE.

to install the packages for English and USA are.........

sudo apt-get install myspell-en-gb

sudo apt-get install myspell-en-us

then sudo apt-get update

sudo apt-get upgrade


Friday, 23 November 2012

Terminal learning

Enter the following into a terminal.

echo 'man $(ls /usr/bin | shuf -n 1)| sed -n "/^NAME/ { n;p;q }"' >> ~/.bashrc

This will display a different random command or program description every time you open the terminal for you to learn.


Thursday, 22 November 2012

Fedora wireless driver

Even after all the updates on a fresh install of Fedora 17 I still had no wireless connectivity, with a message saying "wireless firmware missing" the following fix had it up and running.

How to install broadcom wireless driver/firmware bcm4312 Fedora.

su -c 'rpm -Uvh'

su -

yum update

yum install kmod-wl


Wednesday, 21 November 2012

Linux mint debian edition install

LMDE is based on Debian testing, be aware that it won't be as stable as Linux mint, it's also trickier to install with some experiencing update problems, you will also have to manually partition your hard drive, having said that, I think it's worth the effort and rolling releases are kinda cool.

After downloading always check the MD5 checksum, right click on the ISO file, "check MD5 sum"

OK, burn ISO to DVD or USB stick, run LMDE "live" then select install, choose your language/timezone etc until you get to the partition manager.

If you want to install just LMDE on the hard drive delete everything, then select create partition table, then select the main partition and select ex4, then re-size the partion with the arrows or by dragging it back so you have 1gb free, then select this 1gb of blank space and select Linux-swap for this space. then apply.

This will take a minute or so to finish.

You should now have a main partition and a small 1gb swap partition.

Right click on the main dev/sda1 partition and select "manage flags" then tick the "boot" box.

Click on refresh then select the main partition, then right click and set as "assign to root".

Follow the instructions for the name/password etc.

To install grub to the MBR (master boot record) install the grub boot loader on dev/sda

Restart when instructed to, then install the updates.


There have been problems with updates, I found this the smoothest way.

Ignore the Mint updater for now and update in the terminal.

"sudo apt-get update" enter, then enter your root password.


"sudo apt-get upgrade"

You will be given a few choices with replacement packages during the upgrade, the advise on the install manager is to "keep file" as opposed to "install new version". I updated to all new packages with no problems, although in theory this way will be more unstable, so the choice is yours.

after a while you may be stuck at an error message, if so close then reopen the terminal and do "sudo apt-get update" to re-sync then "sudo dpkg --configure -a" then "sudo apt-get upgrade". "enter" after each one.

After such a big upgrade with a new kernel, when finished, you should now reboot and recheck for updates the mint installer should work now.

There seems to be a problem with spell check in Libre office (not working) with this updated version, just update the languages to cure this, 
to install the packages for English and USA are.........

sudo apt-get install myspell-en-gb

sudo apt-get install myspell-en-us.


Tuesday, 20 November 2012

Crunchbang #!

My favourite distro at the moment, with a nice & friendly forum following. It takes an age to wipe the drive when encrypting, but when installed it's really fast, even on my daughter's 10 year old laptop which is older than herself.

My Conky code wouldn't work with Crunchbang 11 so cheat by copying/pasting your favourite Conky code into the default setup in the .conkyrc file, and remove the code you don't want displayed. All working now.

Also Spideroak had a small difference in getting it to run, here are the steps.

SpiderOak setup

1 Download the ubuntu/debian version from and install.

2 Unlike other programmes you have to name this in the settings/gui menu with a capital S & O (SpiderOak) on the execute line or it won't open.

Bluetooth terminal setup

1 sudo apt-get install bluez-gnome bluetooth gnome-bluetooth

2 Right click on desktop screen and select prefferences, openbox config, edit and add the line. (sleep 5s && bluetooth-applet) &

That's it, all lovely.



1 Never install software that you don't go looking for and research yourself. Anything that pops up unexpectedly is probably not to be trusted. Always download from a good source, stay within the Linux repositories unless you are sure the software and site is genuine. Running scripts from forums may not be safe.

2 Install and enable a firewall, most distro's will be running iptables. If you need a firewall just run "sudo apt-get install ufw". when installed, run "sudo ufw enable". You will get confirmation back saying "Firewall is active and enabled on system startup"

If you prefer an interface, install gufw after the above, this will give you a graphical user interface that will show up in your programmes list instead of using a terminal.

3 Don't trust emails/messages unless you are sure who they are from, long lost relations won't contact you asking for money or directing you to a link or download. If you need to check an account it's much safer to check your Paypal or similar account yourself rather than following a link

4 Take a second to check the URL, it's easy to set up a site that has a similar name to the one that you want that you may not notice instead of going to the genuine one eg. instead of

5 Keep everything updated, most of your updates will be to patch security flaws that have been found, keeping everything that's installed up to date is a must.

6 Use good passwords. Something random using symbols, numbers, lower and upper case will improve your chances of someone guessing or brute forcing a password,with a minimum of 10 characters, it should look obscure like this one &7GliP~s#W397bVq^f (don't use this one). Never use the same password for different sites or apps.

7 Make use of two factor authentication, security is sometimes a trade off with convenience, take a little time to go though settings, and use a separate verification code that is sent to your phone as well as your strong password.

8 Don't use the same email for things you buy and your social sites/blogs. Don't use an obvious answer to your password reset question like your true maiden name, use a password type answer so it can't be guessed, the password reset scenario is a real security problem that users should be allowed to opt out of, the recent Skype password reset problem is a prime example.

9 Router security. Some makes of router only use a few select passwords, it's a good idea to change the router name/service set identifier (SSID) and password. Wi-Fi protected setup (WPS) is no longer safe and should be switched off and WPA/2 enabled. Unless you play online games, universal plug and play (UPnP) should also be switched off if you don't need to use it as this will open extra ports. search your router settings as each make varies on how to do this.

10 Some browser plug ins will be a good help, Firefox has a couple that I like, "No script", this stops scripts running until you physically allow them to. "Ghostery" is an eye opener, tracking you who is tracking you, also very configurable, allowing you to block whatever you choose to.

11 Use a user account that has no admin rights (no sudo) for everyday tasks, only use root user when needed such as installing software or updating.
removing admin/sudo rights will better protect against the exploitation of up to 90% of vulnerabilities in some cases.

For my Windows friends

Keep your antivirus up to date, a good free one is Microsoft's own Microsoft security essentials for "real time". download from here

Malewarebytes is quite effective as a stand alone scanner. download from here

Zonealarm is a good free firewall, although it doesn't seem to work on Windows 8 yet. works on W8 now with good results after a leak test. download from here

Also run the Microsoft built in scanner. select start, run then enter MRT in the box. this will run

the malicious removal tool.

Look out for extra unwanted installs in Windows programmes, extra software boxes are usually checked by default.


Router security part 3 (Quad9)

You know how DNS works from part 2, so now it how to change your DNS. my favourite 2 providers: 1 Open DNS family friendly. great fo...