Adding a windows partition to a Ubuntu only system

It’s now about 7 months since I got rid of winXP from my laptop and I thought I’d never need windows again.

I have just brought a new scanner, the Epson 4490 which is supposed to be Ubuntu compatible, but setting it up has proved to be less than straightforward so I have decided to add a small windows partition to my laptop which will get used for the sole purpose of scanning my negatives.

According to gparted my system looks like this:

parted

There is a very helpful guide which I used to enable this at:

http://knowledge76.com/index.php/Windows_-_Add_MS_Windows_to_Your_System76_Machine

I was a bit worried that it would stop me getting back into Ubuntu as what Windows does is to kill off the master boot record so this means that once windows has been added it’s then necessary to install GRUB.

Once windows is installed on my newly created 15mb partition I then booted from the ubuntu live CD and opened the terminal and typed:

sudo grub

root (hd0,0)

setup (hd0)

quit

I then rebooted and to my relief ubuntu loaded instead of windows!

The final step is to edit the grub file so that it will allow windows to be selected.

I typed:

sudo gedit /boot/grub/menu.lst

and then added the following 3 lines to the end of the file:

title windows

root (hd0,1)

chainloader +1

then saved the file and rebooted.

when I saw grub load I pressed ESC and the menu will come up allowing windows to be selected.

Sky box is slowing down my broadband!

photo-0001

Behind the friendly facade lurks a hidden menace

Yesterday the friendly sky installer turned up to install a Sky HD box which has a lot of benefits such as HD (obviously!) and being able to record one channel whilst watching another one.

What he did not mention however was the effect that it would have on my broadband connection (ADSL).

When the box was ordered I found out from other websites that people had been having some problems with Sky boxes interfering with ADSL so I told the order clerk that I did not have a land line so they would not be able to connect the box in this way.

The result of this was that the charge was inflated by £25 to a whopping £105!

They are already charging £30 for installation plus £50 for the box itself, so there was no way I was going to pay another £25 on top of this so I said that I did have a landline, but that it was only being used for ADSL and “not as a BT line”.    There is an element of truth in this as the line is supplied by my ISP specifically for ADSL and not for voice calls, although it will allow outgoing 0800 & emergency calls as well as inbound calls.

I said that it could be used by the engineer to set up the box, but that I would not be leaving it connected as it inteferes with my ADSL.   The order clerk did not seem to want to argue over this point and even said that I did not have to leave the box connected.    The “smallprint” on the sky website however said that the line needs to be left connected for 12 months.

Anyway, once the engineer had finished installing the box I thought I’d check out my connection speed and sure enough it had dropped from 7616 to 7104.    Not much you might think, but more sinister was the fact that the signal to noise ratio had dropped from a healthy 10db to just 4db!

Up until now I have had a 6500 “bras rate” on my ADSL line which means that although I have a “line speed” on 7616, the actual maximum data download rate is 6.5 MB/s.

As soon as the engineer left at about 6pm I had already been robbed of half a meg per second, a speed reduction of almost 10%:

Note BRAS rate 6000000/-000, Auto, 2009-03-14 18:00:24

Unfortunately this was not the end of the matter, as later in the evening I noticed that my ADSL lost connectivity for a couple of minutes and the reason for this was that the BRAS rate had again been cut but a further half meg to just 5.5mb/s

Note BRAS rate 5500000/-000, Auto, 2009-03-14 22:47:33

I suspect the reason for this further cut was that the DSLAM equipment at the exchange had deemed my line “unstable” due to the very low s/n ratio of just 4db.

The end result is that having the Sky box connected to my phone line has cost me a speed reduction of over 15%.

I think that Sky should have a duty to make customers aware of this fact.    I’m sure that if a car accessory were to reduce the performance of a car by over 15% then the manufacturers of the device would be in hot water if they did not advise potential customers of this fact, so how do Sky get away with this so easily?

I suspect that the problem is sometimes “masked” by the fact that a lot of the mass market consumer ISPs like BT, Orange, Tiscali etc often overload and throttle connections anyway so a 15% speed drop might go unnoticed.

Anyway, the Sky box has now been disconnected from the phone line and my line speed has returned to 7616  (at a healthy 10db s/n ratio), but the BRAS rate is “stuck” at 5.5MB/s as BT are very quick to drop the BRAS rate, but take much longer to restore the BRAS rate again.

Turf Locks Sculpture

photo-0019

A Swan Sculpture next to the Turf Hotel

This is quite an intresting “Swan” sculpture that seems to have recently appeared at the Turf Locks, just next to the Turf Hotel.

This hotel is really a pub, but a very good pub which has the advantage of only allowing access via foot or bicycle.   The nearest main car park is about 2 miles walk from the pub, although there is a very small car park about a mile away.

I can recommend the steak & kidney pudding and a good pint of Otter Ale.

There is a nice view out over the Exe estuary as you sit drinking your well earnt pint.

Twinkle VOIP Client

From my previous post you will see that I have tried using Skype for VOIP phone calls but I got a bit fed up with Skype for a number of reasons so I have now unsubscribed from it.

Skype is probabaly one of the best known names that people associate with VOIP but I’m not so keen on being locked into a “closed” system where you have to use Skype software rather than a normal VOIP client.    Also I don’t like the way that Skype force you to pay for calls before you have actually made them!    They also charge quite a lot for the for an inbound phone number to receive voip calls on (about £3 per month).

Luckily my own ISP have a VOIP service http://call.me.uk/ which only charge £1 per month for a phone number which is quite a bit less than Skype and I then just pay for calls actually made at the end of each month.   I have now got an 03333 STD code rather than a “boring” 01823 Taunton STD code – an advantage with an 03 prefix is that it is not linked to any specific geographic UK location, and costs exactly the same amount to call as a regular 01 or 02 landline number.

They also sell “voip hardware phones” like the Snom 300, but I’m not really a “power user” of phones so I thought I’d go for a software VOIP solution rather than a hardware phone for the time being.

There a a number of software phones (”Softphones”) and I tried out a few of them.   First I tried Ekiga, but this did not seem to run at all on Ubuntu Intrepid so I gave up on it and tried Linphone, which I got working but it seemed very basic.   By far the best VOIP software I have tried so far has been Twinkle which has loads of handy features and will run nicely minimised on the task bar.  Installing it is very simple via the “add/remove” menu.

Once you have filled in your SIP account details (username, domain password & realm) you are pretty much set to make and recieve VOIP calls.

screenshot-1

These setting seem to give good sound quality

It took a bit of trial & error to get my audio settings just right, and at first the sound did not sound very good, but I have now got it so that its just as good as using any regular non-voip phone.

This shows how I have entered the “Sound Card”  settings.  I tried some of the other settings first but I seemed to get poor sound quality. Read More »

Disabling touchpad tapping in Xubuntu Intrepid

I have reinstalled Xubuntu from the Xubuntu iso and it seems to be working fine.

The thing that bugged me the most though was that the touchpad on my vaio laptop was set up for “tapping” by default.

Tapping is something that people either love or hate, and I am in the latter category.

Gnome seems to have the ability to control the touchpad installed by default but Xubuntu uses Xfce rather than Gnome so there are a few tweaks needed to control the touchpad.

A good link is at https://help.ubuntu.com/community/SynapticsTouchpad

I followed the instructions to enable SHMConfig by typing:

gksudo mousepad /etc/hal/fdi/policy/shmconfig.fdi

I then pasted the following text into the file:

<?xml version="1.0" encoding="ISO-8859-1"?>
<deviceinfo version="0.2">
 <device>
  <match key="input.x11_driver" string="synaptics">
   <merge key="input.x11_options.SHMConfig" type="string">True</merge>
  </match>
 </device>
</deviceinfo>

Then I installed the qsynaptics package using the following command:

sudo aptitude install qsynaptics

After doing this I got a new icon showing in the xfce settings manager that gave me control of the touchpad settings.

Using Skype in Ubuntu Intrepid

I have been trying to get Skype set up on my Vaio Laptop running Ubuntu 8.10 and I thought it would be straightforward. I was a bit worried that the Skype download page offered Ubuntu 7.04-8.04 as I’m on 8.10!

Luckily this did not seem to matter as the “.deb” file seemed to install fine by double clicking it. The tricky bit was getting the microphone to work.

In the skype “audio settings” I used: Sound In:  HDA Intel (hw:Intel,0) Sound Out:  Pulse Ringing:  Pulse

I then ran gnome-volume-control and set it like this

screenshot-volume-control-hda-intel-alsa-mixer screenshot-volume-control-hda-intel-alsa-mixer-1 screenshot-volume-control-hda-intel-alsa-mixer-2 One thing I did notice was the input source dropdown list acted a bit odd as it would say “Mic” but that setting might not have registered properly so changing it to something else then changing it back to “Mic” again seemed to make it register.

Also the settings don’t seem to “stick” so that when I reboot I have to reselect “Mic” again!

H264 codec for web video

I have been trying to find out what is the best way to get a video clip onto the web and I have looked at the H264 codec. This seems to give much better video quality for a given bit rate compared with the older Sorenson codec I had tried.

I have used DVGrab to get the video from my camcorder to my pc and I have used DV Type 2 format as this will used with Avidemux to convert to H264 video format:

sudo dvgrab -format dv2 outputfilename

I will then open the dv2 file with Avidemux and select x264 video codec and AAC audio codec. AAC seems to be commonly used with H264 although I assume that MP3 could still be used, but AAC is I think more “advanced” as audio codecs go.

The “format” will be MP4 as this will make it compatible with the latest version of flash.

To actually embed the video in a page I have used Flowplayer which is an open source flash player and seems to work well. I have talked about Flowplayer in my previous blog post a few days ago.

One “glitch” I discovered with H264 in MP4 was that the video would not “stream” which means that the whole video had to download before it would start playing!

Luckily I discovered that there was a program called MP4Box which would tweak the file so that it would start playing while the file was downloading.  What this does is to move the “moov atom” (or “moov box”) from the end of the file to the start of the file.  I’m not sure if there is a way to get Avidemux to do this but MP4Box seems to do the trick!

The command I used to install MP4Box was:

sudo apt-get install gpac

and then the command to run MP4Box was:

MP4Box -add ‘filename.mp4′ ‘newfilename.mp4′

I think you need to add the file path unless you have the file in the current directory. I had my mp4 file in my home directory so I did not need to add a path. Remember that the MP4Box command is case sensitive so “mp4box” will not work as I discovered!

screenshot-7

Test Video done with X264 Codec

Click this link to view the test video done in X264 codec.

H264 playback is quite processor demanding so anyone with a very old PC might not get decent playback, but this seems to work fine with my laptop which I purchased over 3 years ago and uses about 70% CPU with no other tasks running. Also H264 only works with recent versions of flash, so if you are running an old version of flash it might be worth updating it.

Getting DV video from Camcorder to the Web

screenshot-4

This shows the files that need to be uploaded to your webspace in order to make the embedded video work

I have acquired a “legacy” camcorder (a 5 year old Panasonic NV-DS65B) which shoots basic standard definition video (720×576) so it seemed like a good idea to figure out how to get “embedded” in a website.

I have used Youtube and Vimeo, but getting material online this way has its drawbacks.

One very annoying thing is that they insist on re-processing files once they have been uploaded and I’m not convinced this is always a good thing as each time a file is re processed there is bound to be an extra level of deterioration in quality. The quality from a basic consumer camcorder will never be particularly good but I’d rather not make it any worse than it need be!

Another drawback is that Vimeo will shrink my video down to 512×416 which is presumably so that it will fit conveniently in their player. They give the option to download the original 720×576 file I uploaded but this is extra hassle.

screenshot-5

This shows the HTML code needed to make the flowplayer files work

Youtube is even worse in respect of shrinking my video as they reduce it to a tiny 450×360! It gets worse…..If I select “normal quality” in Youtube the file is reduced to a postage stamp sized 300×240.

An alternative to using a video hosting site is to use a free embedded player such as Flowplayer and to use the free webspace that often comes with a broadband package.  Flowplayer is open source rather than freeware which which to me at least is an added bonus.

Originally I thought that you could “embed” a video file in a webpage simply by linking to it, but I then realised that the player needs to be embedded in the page in order to play the video in the page “youtube style”.

When you download flowplayer it will give you an example HTML page which you can then edit as you wish.
I have a added a screenshot of my html file. Please note that I have had to change the bit of HTLM which defines the size of the embedded player so that it displays at the correct size:

style=”display:block;width:720px;height:600px”

My camcorder file is 720×576 but I have had to allow an extra 24 pixels to allow for the Flowplayer control bar. Originally I used 576px in the HTML code but this had the effect of squashing my video by 24 pixels.

I was initially worried that I would need to install something on my ISP’s webserver, but luckily this is not required and you can just upload the flowplayer files to a folder and they will work fine.

What I have not yet figured out is how to embed the file in wordpress so here is a screenshot that links to the webpage:

screenshot-6

Example embedded video - click to go to web page

The only bit that I have not yet described is converting the DV file from the camcorder to a format that will play on flowplayer. Flash video seems to be the “standard” for embedded video and a good program that will convert DV to FLV (flash video) is Avidemux. Please note that I used Kino to capture the DV file from my camcorder and I am running Ubuntu Intrepid.

One thing to note when using Kino is that it will need to be run as root to capture as normal users will not have access to the firewire port so hit Alt F2 and run gksudo kino. Also note that Kino will try and save the capture file in root’s home folder so choose a save location to somewhere else otherwise you will not be able to find the file as a normal user once you run avidemux!

Avidemux does not like “raw dv” or “type 1 dv” so choose “type 2″ dv in the capture settings. Once you have opened the captured AVI file in Avidemux you can save it using the AUTO > FLV settings, but it is well worth adding a deinterlace filter to remove those nasty horizontal lines that can spoil the look of the finished file. The “yadif” filter seems to work well.

Xubuntu session problem

Just had a blank screen after starting an xfce session which is a bit annoying. Luckily I could still Alt-F2 to start firefox from terminal.

This handy hint by xerodeth seemed to solve it:

” Re: Xfce Session won’t start
so not sure if anyone still needs help with this… but this is what works for me. in your home dir there should be a folder called .cache, go into that folder and delete the sessions folder and the xfce4. i removed both these folders and the desktop came back as well as wallpaper.”

Xubuntu

screenshot-1
I have been trying out the xubuntu-desktop package today, and I’m actually pretty impressed with it.

To install it in Ubuntu Intrepid the command is:
sudo apt-get install xubuntu-desktop

As I have got quite an old laptop I thought I’d give Xubuntu a go as it’s supposedly a good choice for running on “legacy” hardware such as my Sony Vaio FS-215Z laptop.

Yesterday I was looking at some HD videos on Vimeo http://vimeo.com/hd and while 1280×720 resolution is very impressive for video it takes its toll on system resources and would often max out my processor under Gnome. A normal DVD movie seems to be only 1024×576 in comparison.

Xubuntu uses xfce rather than gnome as it desktop manager and it’s a much “leaner” system as a result.
Sites like vimeo and youtube use flash video (flv) files and these get cached in the /tmp directory, and once the file has downloaded it can then be copied from /tmp to avoid being deleted and placed elsewhere.

My favourite player at the moment seems to be mplayer and it will now play these HD flash video files with cpu at only about 60% rather than 80-100% and the result is that there are much fewer dropped frames!

The only “annoyance” I have encountered so far has been that “tapping” on my touchpad cannot easily be disabled which was very frustrating! A temp workaround seems to be to set a startup command of gnome-mouse-properties which loads the gnome mouse manager which has the ability to disable tapping.