Sunday, 27 February 2011

MP3 files in Debian

A lot of new users move from Ubuntu to another Debian based distro to limit the ammount of change they experience. But often can be a bit daunted by the challenges that Ubuntu made easy for them. One such is music files in MP3 format.

Whilst I personally use Ogg Vorbis and would encourage all others to, I am realistic that a lot of people still want to use their MP3 files and even build up their collection.

*If you are unsure what the term "as root" means then simply add sudo before each command that requires root privileges, you will be required to enter your password as sudo is a powerful tool*

Playing MP3 files

For playing MP3 files, the quickest method is to download VLC player. This is available from the software repositories from the majority of distros. This can be installed very easily:

1. Open the terminal

2. As root type: apt-get install vlc

This now gives you a player.

Ripping CDs to MP3 format

Should you want to rip your CDs to MP3 format then we still have another few steps to take.

1. Open the terminal

2. As root type: apt-get install sound-juicer

This gives a program that will rip the music from a CD and save it onto the computer. We can load it up from the main menu (usually listed under the multimedia or sound and video), called Audio CD Extractor.





















If we open this up and click on edit and preferences we should be greeted by a window as shown below:





















Down near the bottom of the window we should see Output Format, this by default is set to CD Qua;ity, Lossy (.ogg type). At this point if we click on this it will not give us the option of MP3. We still have a few more things to do.

The package we need is not available in the Debian repos due to Debian's commitment to free software. But we can add this. We need to go back to our terminal.

3. As root type: nano /etc/apt/sources.list (if you are met with the message unknown command nano, then you can retype the command replacing nano with gedit)

4. Decide what repos you would like to add:

Stable: deb ftp://ftp.debian-multimedia.org stable main non-free
Testing: deb ftp://ftp.debian-multimedia.org testing main non-free
Unstable: deb ftp://ftp.debian-multimedia.org sid main non-free

Add only one of the above choices, just type the part in bold to the end of document.

5. Exit the file by pressing Ctrl + X, it will then ask you if you wish to save press y and then hit return twice.

This will add the repos to our system, but we also need to have the keyring before the repos will work.

6. Download the Debian Multimedia keyring from here.

7. Navigate to the directory and, as root, type: dpkg -i debian-multimedia-keyring*.deb

8. as root, type: apt-get update

9. as root, type: apt-get install gstreamer0.10-lame gstreamer0.10-plugins-ugly

That's it.

To check it has worked open up Audio CD Extractor again, click on edit and preferences. This time when we click on Output Format, MP3 should be an option.

Enjoy your music.

Saturday, 26 February 2011

Formatting a USB pen drive with the Command Line

The vast majority of users today are probably wandering why I would even consider writing a 'how to' for formatting anything from the command line. The vast majority of distros come with gparted installed and that is an easier option to format any drive with the added convenience of a nice graphical front end.

However for those users who like to test out new distros on a regular basis, a USB pen drive is now the preferred option to boot into a live environment. Why? Well for starters programs like Unetbootin make it very easy to put a live distro onto a pen drive. This can be run, booted straight from the stick, without ever having the need to burn a CD. After testing and/or installing the distro the drive can be reused, unlike the CD which may be used as a coaster before ending up in the bin.

Some programs, when they put the distro onto the pen drive, trick the computer into thinking that the pen drive is a CD. It works fine for testing the distro, but when it comes to wiping it you are unable to do it from the file manager (CDs are read only) and gparted will not format it (it does drives not CDs). So your left with a pen drive that behaves like it can't be altered, but this is where the command line is a useful tool.

This will wipe all the data off the pen stick, for safety reasons I would strongly advise disconnecting any other external USB hard drives or pen sticks at this point.

First of all you need to find out the stick is listed as
1. open up the terminal

2. type: fdisk -l

This will tell you the location of your USB drive, in the case below it is located at /dev/sdd so I'll use that for the rest of the tutorial. Please remember to substitute in the actual location of the drive when you are doing this.
kevie@kev-pc:~$ fdisk -l

Disk /dev/sdd: 4009 MB, 4009754624 bytes
124 heads, 62 sectors/track, 1018 cylinders
Units = cylinders of 7688 * 512 = 3936256 bytes
Sector size (logical/physical): 512 bytes / 512 bytes
I/O size (minimum/optimal): 512 bytes / 512 bytes
Disk identifier: 0x00000000

Device Boot Start End Blocks Id System
3. unmount the drive with the command: umount /dev/sdd

4. I'm going to assume that your wanting the pen drive formatted to FAT32 to allow you to use it on any system. Type: mkdosfs -F 32 -I /dev/sdd

That's it, your done.

Saturday, 19 February 2011

NoS-LUG Shirts Update

A while back I spoke about the North of Scotland Linux User Group printing a t-shirt with a view to wearing it at an upcoming open source event such as Oggcamp. Well after a lengthy wait the t-shirts are now available online at Zazzle.co.uk in the UK or Zazzle.com for international orders. Two t-shirts have been created, although these can be customised to any colour the buyer wishes, the default colouring is light blue and navy blue (shown below). A NoS-LUG coffee mug is also available. These items can be viewed here at the store, hopefully there shall be more items to follow.
















Please leave any feedback of the items in the comment boxes below.

Friday, 21 January 2011

Blocking an email address in Gmail

I, like almost everybody else I know, use GMail as a primary or secondary email account. But there is one design feature that I don't like: it's not obvious how to block email from a specific user. Yes Gmail has a fantastic spam filter, but your always going to get that annoying person that is going to send 15 jokes, virus warning, government conspiracies and anything else they receive themselves.


To block a specific email address in Gmail isn't difficult, but it's not very obvious to the casual user. This really could have been a lot simpler, Gmail could easily have added a 'block sender' button, but have chosen not to.


Step 1: Open your Gmail account, at the top of the page, beside the search bar, select the option Create a filter



Step 2: In the From box enter the email address you wish to block. Then select Next Step.






Step 3: Place a tick in the box beside Delete It and then select Create Filter.










That's it, you will not receive any more emails from the blocked address.


Wednesday, 19 January 2011

Push your free Yahoo mail to K-9








One of the constant problems that keeps on arising in forum after forum post is that users are simply unable to manage their messages from the Yahoo free mail through K-9 the Android open source email client. This annoyed me as I have an old Yahoo account that I still use and I was desperate to get this to work.

A lot of posts simply conclude that it is not possible to do without paying for Yahoo plus, however there is a workaround.

Before we start make sure that you have the computer switched on and it is online.

1. On your Android smartphone, open up the K9 mail application, then press menu and select add account.

2. Enter your yahoo email address and password as instructed and then select Manual setup.

3. Then on the next screen it asks for the type of account, select IMAP.

4. The next screen will be headed Incoming server settings, configure them as shown below:

Username: {your full email address}

password: {your password}

IMAP Server: imap.mail.yahoo.com

Security type: none

Authentication type: PLAIN

Port: 143

If you click on next at this point you will be given an error message about a wrong username and password combination, if you see this simply click on Edit details to return to the previous screen. This is where the majority of users have a problem.

5. At this point return to your PC and go to the Yahoo website, log into your free mail, then immediately log back out.

6. Back to your Android phone, assuming your still at the page we setup in step 4, select next and this time the server check should complete without any errors. This can be a bit temperamental so if this didn't work select Edit details, re-enter your email and password and repeat steps 5 & 6.

7. Now setup the Outgoing server settings as shown below:

SMTP Server: android.smtp.mail.yahoo.com

Security type: SSL (if available)

Port: 465

ensure their is a tick beside Require sign in.

Authentication type: PLAIN

Username: {your full email address}

password: {your password}

But don't click on next just now.

8. Repeat step 5: return to your PC and go to the Yahoo website, log into your free mail, then immediately log back out.

9. Back to your Android phone, assuming your still at the page we setup in step 7, select next, the server check should complete without any errors. Again this part can be a bit temperamental so if this didn't work select Edit details, re-enter your email and password and repeat steps 8 & 9.

10. You are then greeted with a variety of Account options, make sure that there is a tick beside Enable push mail for this account. The other options you can set as you wish. When your happy with your settings select next.

11. Give the mail account a name, although this is optional it is very useful if you plan on running multiple email accounts. Type the name you want others to see when they receive an email from you.

12. Click Done and that is you finished.

You should now have the ability to send and receive emails from your Yahoo account, without the added expense of Yahoo Plus.

This issue gave me a lot of grief, but I hope that this post will save others a lot of time. It's not perfect but it's a workaround.

Friday, 14 January 2011

Ubuntu One music store - without Ubuntu

Purchasing online digital music for me personally is always a bit of a pain. I actively seek to support free formats like Ogg Vorbis, but at the same time I want to listen to a wide variety of music, which often means that I'm restricted to MP3s.

In the past I've purchased a few songs from Amazon, along with a variety of other companies. When Canonical announced that it was launching a music store I thought: great, at least I can support an open source company. I was very disappointed initially when I found out that you had to be an Ubuntu user to benefit from this.

Having used Ubuntu some 4 years ago when I started using Linux, I have worked my way through a variety of distros (and still do to this day) before settling with Gentoo. However the music store is not owned by Canonical, instead it is using 7digital's music store with an Ubuntu front. Ubuntu get a part of the sale, but it is actually 7digital's business, Ubuntu is the agent.

In order to get to the Ubuntu One music store we need only two things:
1) an Ubuntu One account
2) an internet connection

If you are reading this then I'm assuming that you have an internet connection, to sign up to Ubuntu One simply go to http://one.ubuntu.com to get your free 2GB account. Notice that there is no Ubuntu operating system on that list.

Once you have an account simply go to http://stores.7digital.com/stores/default.aspx?shop=34&partner=983 and your in the Ubuntu One music store. You can now purchase music and support an open source company. To prove this is not an Ubuntu screenshot take a look at the kernel.
















The files are sent to your Ubuntu One cloud account where you can move them to your PC very easily. The only issue is that their progress never appears to move, don't worry: they're being downloaded to your Ubuntu One cloud server as you wait. I'm not quite sure why Canonical have tried to limit the music store to Ubuntu users, I am always happy to support open source companies and this view is shared by a lot of other Linux users I know.
















Happy musical purchases and please keep supporting open source whenever possible.

Wednesday, 12 January 2011

UK Anti-Terrorism poster

The UK has had it's fair share of official muck ups, in fact we almost seem to be famous for it. A while ago a poster was made about our modern day terrorist. This has been passed around a lot of users' email accounts, the poster in question is shown below:























Now myself, along with most of the people that read this had a good laugh, but it did get me thinking: how are the not so "tech savy" people around us reading this?

Well I started looking at what I had in my van, yes that is the start: I drive a van. Terrorist no, I am just a practical minded guy who was sick of ripping up the back seats when I was transporting wood around in my car. I carry a ruck sack all the time with my gym gear in it, it is certainly well packed and bulky. I have two digital cameras, I like to take pictures, but I do not even class myself as an amateur photographer. Anybody that knows me is aware that I have my mobile phone in my hand almost twenty four hours a day, I'm constantly using it to post messages on identi.ca. The final piece of information is a computer, that is the key to tell if somebody is performing illegal activities. Well I do not only have a computer I am well down the geek line, I do not simply use it to play solitaire and write the occasional letter. I am most definitely a power user, and as a result spend a considerable amount of time at my PC.

Do I hit every target that is on the poster telling people to watch out? Yes. Does this mean that I should be treated with suspicion by those around me? I think that a severe lack of common sense was despatched in the design and distribution of the poster. They have chosen everyday objects that many of us own and use without a second thought. A much more realistic alternative was created to put our minds at ease:























I'm sorry that I have to take a serious issue like this in jest, however I think a severe lack of thought went into this part of the campaign. My concern is that geeks in general may be looked at with a lot more suspicion. Will the geek carrying the netbook become the new target for automatic searches at airports? Will the techno-fobs among us actually believe the poster and call the number, legitimately believing that they're doing the right thing? I already feel like we are interrogated enough whenever we travel without adding to it.

I seriously hope that this poster campaign is taken down permanently, if it has not been already.