Howto share your internet connection in Ubuntu.

Since Ubuntu 9.10 Karmic Koala, Ubuntu has an inbuilt way of sharing any connection. There are a couple usage scenarios for this:-

  1. You want to share your mobile broadband connection with other computers on the network
  2. You want to use your Ubuntu machine to extend your network wirelessly e.g. Your laptop is connected to the network via it’s wireless adapter, which is then connected to another machine via a CAT 5 or CAT 6 cable, enabling the other machine to connect to the network and internet.

I wouldn’t envisage using this to share a DSL broadband connection since most people will already be using an ISP supplied router to do this.

Using it is as simple as enabling the method “Shared to other computers” in the network connection in network manager.

This turns your machine into a mini DHCP/DNS server and starts handing out IP addresses in a 10.x.x.x address range. The machine then NAT/routes any traffic coming in on that interface and forwards it to the networks real gateway. I’ve used it a few times now and it works well.

 

Saorview and Freesat

In a departure from the norm I am going to write today about something not necessarily computer related. Given the “current economic climate” (please remember to adopt serious tone) I would like to tell you how to save a few quid on your monthly TV bill in Ireland with the minimum outlay.

Until the Saorview trial started in October last the only way to receive the Irish channels i.e. RTE1, 2, TV3, TG4 and 3e without a monthly subscription was using a good ole fashioned UHF aerial and analog signal. The quality of this both for picture and sound leaves a lot to be desired. Digital reception is much better, Saorview was officially launched 26/05/11, it is the Irish equivalent of Freeview, and similarly allows digital reception of TV through an aerial. Most people in Ireland are also used to receiving the “British” channels e.g. BBC1, ITV, Channel 4, etc, etc. The best way to receive those without subscription is via a Freesat (or equivalent) box linked up to your old Sky dish, if you have one, or a new dish which comes as part of the kit.

Saorview can be received through a standard wide-band UHF aerial, there will be an accompanying satellite service for people who are unable to receive the terrestrial signal but it hasn’t even launched in trial form yet and will require the purchase of more equipment in the form of a special satellite dish and receiver. The reason for this is that RTE et al can’t afford to purchase enough rights to broadcast across Europe as the BBC can, using the same Astra satellite Sky does. Therefore they have to use a satellite which has a small enough foot print to cover Ireland and only Ireland, hence the need for the equipment. Saorview will not be available through Sky.

You can either spend a little or a lot of money on this. My goal was to get any HD channels available and have PVR functionality into the bargain, whilst spending as little as possible. So I will tell you what I plumped for. For the Saorview I purchased a Fortek kit from tvtrade.ie for €121 including VAT and delivery, which included the aerial and mounting (as I didn’t already have one). On the Freesat front I went for the ROSS kit from B&Q at €70, not a true Freesat receiver, in that it won’t automatically pick up channel frequency changes. Both boxes are HD capable and both have PVR functionality if you plug external USB storage in.

Official Saorview compatible boxes can be found at http://www.saorview.ie/products-retailers/saorview-approved-product-listings/

Continue reading

Stream a DVD in Ubuntu

In order to watch a DVD on a device which doesn’t have a DVD drive, it’s possible to stream it from another device which does, through the network. For instance in our house we only have one laptop with a DVD drive. This is the main and most powerful machine which I use for day and nighttime work. When the children want to watch a DVD upstairs in bed (we don’t allow them have TV in their room) I use VLC to stream from my laptop, instead of playing directly, so I can keep working away.

Before we start, obviously, make sure VLC is installed on both devices either by Ubuntu Software Center, Synaptic or apt-get, whichever takes your fancy. On the machine with the DVD drive, we’ll call this the “server”, you simply type/paste one command in, then at the drive-less end, let’s call this the “client”, you run the VLC GUI and tell it where to listen for the stream. So on the server type/paste:-

Continue reading

Mobile broadband from the command line in Ubuntu

For people who want to use their HSDPA connection from the command line in Ubuntu – Perhaps you have a server you want to use it on, or perhaps you want to do it from the command line for the craic – This is for you.

There are 3 files involved “/etc/ppp/peers/provider”, “/etc/chatscripts/pap” and “/etc/ppp/chap-secrets”.

Continue reading

1 remote desktop client to rule them all – Remmina

One Remote Desktop Client to rule them all, One Remote Desktop Client to find them,

One Remote Desktop Client to bring them all and in the darkness bind them.

Welcome to Remmina. Remmina certainly isn’t unique in the way that it covers all the remote protocol bases (well except for IPMI 2.0, maybe that’s a feature request developers?). The remote desktop viewer bundled as standard with Ubuntu also covers RDP, VNC and SSH, but it doesn’t offer the same level of usability, or the spit and polish that makes a killer app.

Continue reading

Top 5 tips to speed up a slow PC

  1. Make sure you are only running one realtime anti-virus/spyware scanner.
  2. Remove viruses/spyware.
  3. Remove unnecessary bloat.
  4. Check and defrag the disk.
  5. Install extra memory.

Continue reading

Improve response in Ubuntu Desktop

I came across recently, as you do, an option to maximise the performance of my lowly OCZ Core V2 SSD in Ubuntu. Apparently the kernel goes to quite extreme lengths (in terms of using CPU cycles) to avoid doing seeks. With a “standard” hard drive this is desirable because the time it takes the head to move to the correct location is more costly. Seeking is irrelevant as far as an SSD is concerned and using extra CPU time only serves to reduce I/O performance. Happily there is an option to tell the kernel that you are using a non-rotational media for a specific drive designation i.e. sda, sdb, etc. and therefore maximise SSD performance.

Continue reading

Managing amavisd-new quarantine from the command line

Just a quick one today. It seems to be a recurring problem for me that every once in a while I want to go into Amavisd-new’s quarantine and look for false positives (not that there should be any if it’s setup right). There are a number or graphical ways of doing this but most of them aren’t available in the Ubuntu repositories. The 2 that I could find are Horde-sam and Webmin’s Clamav module (which I have used before and is pretty easy to use if you are command-line averse). I didn’t want to add another service in order to keep resource usage as low as possible so I set about finding a way to check each email from the command line. So firstly to cycle through every quarantined email use the following command in the quarantine directory (normally /var/lib/amavis/virusmails in Ubuntu):-

Continue reading

LXC firewall logging and udev upgrade in Ubuntu

Today I’m going to write about a couple of major gotchas with LXC. Now these issues are documented in various places but I wanted to put all the relevant information together in one place to make it easier for people.

Before going any further it’s important to note that I created my LXC container with the official Ubuntu template from the latest “stable” LXC release i.e. I downloaded the tarball and put the template in the correct place as Ubuntu 10.04′s LXC package doesn’t contain said template. This helps minimise all sorts of problems especially ones related to the LXC console crashing and the like.

Firstly you will find when running “apt-get upgrade” (if you have Lucid updates enabled in /etc/apt/sources.list) that you get this error on upgrading udev:-


mknod: `/lib/udev/devices/ppp': Operation not permitted

Continue reading

Converting to GPT in Ubuntu

GPT stands for “GUID Partition Table” and it refers to a relatively new format for disk partition tables. It was designed to get around the limitations of the MBR format, namely that you can have more than 4 primary partitions and partitions can be more than 2.2 terabytes in size. GPT is part of the EFI standard but it can also be used on standard BIOS only machines i.e. most non-MAC PCs. Converting to GPT will allow you to future proof your partitions. 2 TB disks are becoming common and it won’t be long before the 2.2TB limit of MBR will stop people using all their disk space in one partition, so in the name of usability and flexibility GPT is the way forward.

Continue reading