Deb packages are the Debian / Ubuntu equivalent of a Windows MSI file. They package up the required files for a application and provide a convenient way to distribute and install it.

However some more generic applications that work across many distributions, especially Red Hat Linux, come in a RPM file. RPM files are not natively able to run under a Debian version of Linux like Ubuntu. These means that you need some way of running it under Ubuntu. Enter Alien!

Alien is a piece of free open source software that allows you to convert RPM, SLP, TGZ, and PKG file formats to Deb (and also to one another but if you’re using Ubuntu then you want *.deb).

To install Alien you have (as you do most of the time) two choices. Either use the Synaptic Package Manager (SPM) or the Command Line Interface (CLI). At the time of posting the latest version in the repositories is 8.73.

To install via SPM search for the term alien and it should be the third option. Right click alien and select Mark for installation and then click Apply

To install via CLI, fire up the terminal and use the command sudo apt-get install alien type in your root password when prompted and let Ubuntu sort out the rest.

Once it’s installed fire up the Terminal (if you haven’t already to install Alien) and enter the command sudo alien -d name_of_package.rpm This will convert the RPM file to a Deb file. If you use the -i switch so sudo alient -d -i name_of_package.rpm it will generate and install the Deb package.

There other options that can be activated using other switches, these can be found using
alien --help

Tags: , , , , , , ,

This is a HOW TO guide to installing LAMP (Linux Apache MySQL PHP). This consists of Apache web server, MySQL database (as well as a DB tool), and PHP. Together these can be used to run as a local web server on your computer, using Ubuntu distribution of Linux. This is similar to WAMP, which is the Windows version.

The idea of this HOW TO is to explain how to get these working together, with little to no use of the Terminal Command Line, but I will give the command line interface (from now on I will call this CLI) as well as they do make life a little faster. For this we will be using the “Synaptic Package Manager” (from now on I will call this SPM) which can be found on Ubuntu in System -> Administration -> Synaptic Package Manager.

So first up we need to install the Apache Web Server. Type the following into the SPM Quick Search box:

apache2

If you add a space after it will be the first result returned, without and it will be the third. For all SPM options make sure you mark them for The command line alternative is (it assumes that you are running as a sudo user, this is the same for all CLI alternatives written here):

sudo apt-get install apache2

To check if this works, click http://localhost, which points to your new local web server. If the words “It works!” appear then everything is on track!

With Apache installed, we now want to install PHP. For this use either SPM and search for:

php5 and libapache2-mod-php5

Or using the CLI: sudo apt-get install php 5 libapache2-mod-php5

Next we need to restart the Apache server so it loads PHP. To do this without the CLI you need to use “Run Application…”, this can be found by right clicking one of the task-bars and and adding the “Run Application..” to the task bar panel. Once this is done type the following command:

gksudo /etc/init.d/apache2 restart Note: This will prompt for your password

Or using the CLI: sudo /etc/init.d/apache2 restart

Now you need to check that PHP is installed correctly. We need to create a small PHP file in the Web Servers directory that displays the PHP info. To do this we are going to run the following command under “Run Application…”:

gksudo gedit /var/www/testphp.php

Or using the CLI: sudo gedit /var/www/testphp.php

Once GEdit is open add the following line and save the file: phpinfo(); inside opening and closing PHP tags

Now check that this has worked by clicking : http://localhost/testphp.php

This should display all the information about the PHP configuration that’s just been installed. Now we move on to the last part which is to install the MySQL server. Using the SPM find and install:

mysql-server

Or using the CLI: sudo apt-get install mysql-server

This will run the MySQL set-up which will at some point prompt you for a root password. This is for root login to your MySQL server, and you’ll need to enter it twice.

After MySQL has been set-up there are two more packages that you need, the first is MySQL libraries for PHP 5, and the second is for Apache to use MySQL.

php5-mysql and libapache2-mod-auth-mysql

Or using the CLI: sudo apt-get install libapache2-mod-auth-mysql php5-mysql

Once these have been installed you need to tell PHP about the MySQL extension by editing the php configuration file. This can be done using “Run Application..” using:

gksudo gedit /etc/php5/apache2/php.ini

In this file you need to find the line that says ; extension=msql.so, remove the ; from the begining of the line, save and close the file.

That’s it, Apache, PHP & MySQL are all installed and set-up. However there is one more stage that might be of use. That is to install Navicat, which allows easy administration to a MySQL Database. First head to the Navicat Download Page and get the appropriate version. I use the Lite (non-commercial) version.

Once your downloaded the tar ball, extract it to where ever you want Navicat to be installed. To run it create a shortcut to the start_navicat file.

Tags: , , , , , , , , , ,

19
Jan

Windows 7 Beta crashing when installing software

   Posted by: Jonny   in Windows 7

A fair number of people have reported that Windows 7 Beta has been crashing when trying to install software using a MSI (Microsoft Installer) based installer. This seems to be happening alot when using Windows Update function.

The culprit has been discovered & it is Microsoft’s Customer Experience Improvement Program (CEIP). There is a fix available and it is discribed below. However the only issue with this fix is that it will disable the CEIP which Beta testers use to report bugs to MS. If you do use this fix I suggest you keep a eye out for mMS update that fixes it.

The fix involves changing your registry on your Windows 7 machine. As I write this I am going through the steps.

  • This all needs to run under Administrator rights so log into the Admin account
  • Open up the start menu and type run into the search, and click “Run”
  • Type regedit into the command, this will run registry editor
  • Go to HKEY_LOCAL_MACHINE/SOFTWARE/MICROSOFT/SQMClient/Windows/DisabledSessions
  • You then need to delete all values in here EXCEPT the default one
  • Go to the “Run” command again
  • Type gpedit.msc into the command, this will run the Group Policy editor
  • Go into Computer Configuration/Administrative Templates/System/Internet Communication Management/Internet Communication settings
  • Double click “Turn off Windows Customer Experience Improvement Program
  • In the new window click “Enabled”, and “Apply”, and “OK”

This will disable the data that you send to MS, but if it is stopping you from installing software its advisable to do it. I would follow these steps. Then insall what you need to & then re-enable the CEIP. Hopefully MS will produce a fix for this, but in the time being this is the only way round it.

This is a more in depth step through that was provided by chris123nt.

Tags: , , , , , ,

There is a new phishing attack that is hitting hitting the web and its a pretty clever one!!

Most phishing attacks up until now have been in the form of a e-mail sent to a potential victim saying, for example, that your bank needs you to verify some information. It provides you with a link to a dummy page that looks exactly like your bank log in but when you enter your details it sends them off to someone who will put them to good use…for them….

Most people having become aware of these & know to just delete them, most end up in your Spam / Junk folder anyway. So this new attack has taken phishing to a cunning new level, again praying on peoples bad web habits.

This is how the attack works:

  • You log on to your banks website & do whatever your need to
  • When you’re done you visit another website without logging out
  • However this website has been compromised with malware
  • This malware causes a pop up box to appear asking you to log in
  • You haven’t logged out so you think its your bank website
  • You enter your log in details, and then its bye bye money!!

What makes this attack really effective is the way that it determines when to trigger the pop up. There is a flaw in the JavaScript engine of all of the major web browsers (this is probably already being / been fixed so update your browser now) that means when you visit sites that use a particular JavaScript function it leaves a digital footprint behind for that site when your logged in.

The malware on a compromised site can then ask the browser what sites the user is currently logged into. If it is logged into a site that it is interested in then it can inject a pop up message that looks like it is from the original site and the user is none the wiser as they enter their details.

So there are several things that you can do to avoid this sort of problem. The most important is to log out of sites that hold sensitive information about you (e.g. Banking websites) as soon as you are finished with them. Also be very wary of pop up messages. No banking website will do this, it will simply time out and you will have to log in again through their main page.

Something else to bear in mind is that as of May 2008 68% of malware invested sites were legitimate. There is a common misconception that you can only pick up malware from visiting Warez, Porn, or through Peer 2 Peer software. This is not the case! Yes these are places you want to avoid, but legit sites are also vulnerable so keep your firewall & anti-virus up to date.

Thanks to ZDNet for this information…

Tags: , , , , , , , ,

10
Jan

UK E-Mail details to be stored

   Posted by: Jonny   in Technology News

From 15th March 2009 all details of all emails sent or received in the UK will be stored….

This is being facilitated by the ISPs (Internet Service Providers) in the UK, who from 15th March will be legally bound to store this information. The ISPs are going to be considering well paid for setting up & providing this server. What is being stored is unclear at the moment but apparently the content of the email is not being kept. So looks like it will be the sender, the receiver, time, and other details being kept for 1 year before its discarded (apparently). But in case they are going to be storing email content I would suggest Pretty Good Privacy encryption (HOW TO coming soon) but you can just Google it as well.

The information being kept will then be available for over 600 public bodies when they make a valid request for it. What exactly is a valid request for information on your private emails? Will these be sold for advertising? Who knows!!

This whole scheme is because the UK has been told to do so by a European Commission directive. Brussels says violate your citizens privacy, so we have our privacy violated.

There have been quite a few a complaints against this new initiative including the Human Rights group “Liberty” & the Earl of Northesk who has a seat in the House of Lords on the Science & Technology Committee.

“Under Article 8 of the European Convention on Human Rights, privacy is a fundamental right… it is important to protect the principle of privacy because once you’ve lost it, it’s very difficult to recover.”

More details & the source of my information can be found on the BBC News site in the Technology section. The views expressed in this article are my own.

Tags: , , , ,

10
Jan

Ubuntu How To: Eclipse 3.2 running slowly

   Posted by: Jonny   in Ubuntu, Ubuntu - How to

This is an issue that I ran into when first using Ubuntu & Eclipse 3.2…

Eclipse 3.2 (Europa) can be found in the the Ubuntu repositories, using the package manager. Once it’s installed fire it up.

What I noticed was that Eclipse booted really slowly, and when using it some operations like opening a file to edit it lagged a fair bit. I did a little research and it turns out that this happens when Eclipse is using a non-Sun JRE.

So I needed to install the latest Sun JRE (currently Java 6 update 10). This can also be found in the Ubuntu repositories under “sun-java6-jre”. Once thats also installed you can change the default JRE used by Eclipse.

First of all we need to tell Ubuntu to use the Sun JRE so you will need to run the following command from the console

sudo update-alternatives --config java

This will display a list of installed JREs. You want to select (by entering the corresponding number) the JRE labeled:

/usr/lib/jvm/java-6-sun/jre/bin/java

Now you need to tell Eclipse to use the Sun JRE as well. So we need to edit the Eclipse java_home file by entering the following command into the console:

sudo gedit /etc/eclipse/java_home

This will open up a text editor, into which you need to add the following line at the top:

java-6-sun-1.6.0.10

Save the file & viola, your done! Fire up Eclipse and you should notice it is running a lot smoother. The same process applies for Eclipse 3.4 (Ganymede), but if your on a lower end system I would stick using Eclipse 3.2 unless you need plugins that only run on 3.4 (e.g. Scala plugin).

This information was found by searching the Ubuntu Forums

Tags: , , , ,

9
Jan

Installing Ubuntu on IBM X40

   Posted by: Jonny   in Ubuntu, Ubuntu - How to

Last year I was looking for a new small, lightweight laptop that I could use for coding when I was traveling around & didn’t want to carry a big powerful workhorse.

After looking at the new Netbooks that were around for a couple of hundred pounds I decided they might be a bit under powered for what I wanted to use it for. Despite having the small form factor that I needed.

In the end I settled for a IBM Thinkpad X40. I was already given one of these for work and liked the size of the keyboard & screen.

Specs for the X40 are:

  • 1.2 GHz Intel Centrino processor
  • 256 MB RAM (1 x Expansion Slot, so I have 1.25 GB)
  • 12.1″ Screen
  • 40 GB HDD

OK so the processor is slower than the Intel Atom you get in Netbooks, but this takes the edge with much more RAM. When you have a browser, IDE, etc all running a a low RAM system will begin to grind to a halt.

I found one of these on eBay for £150, BARGAIN!! It came pre-installed with Windows XP Pro. However even XP starts to lag when running on a 1.2gig processor & 512mb RAM (this was how i bought it). I had been reading more & more about this magic Linux distribution called Ubuntu which runs fast even if your computer is powered by a hamster in a wheel, and that requires little to no setting up once installed.

I went over to the Ubuntu site here and downloaded the CD ISO, popped it into my drive and fired up my laptop.

Then I just followed the on screen instructions of the installer until it was completed and Ubuntu was ready to use!

You may have noticed that at no time did I say that I formated my hard drive. This is because I didn’t & if you want to use your existing operating system as well Ubuntu then the installer will help you partition your hard drive for each OS without any loss of data. Installing Ubuntu is easier & faster than installing Windows XP.

A lot of applications come pre-installed with Ubuntu, more than enough to do all your normal tasks. I will write some more blogs on other applications that are useful for Ubuntu that aren’t defaultly installed.

Tags: , , , , , , ,

With Microsoft looking to release IE8 over their automatic updates in the not too distant future they have released a blocking tool that will stop it being downloaded automatically and allows you to keep using IE7 for as long as you want.

The toolkit can be found on Microsofts website here.

Tags: , ,

7
Jan

Scala – New alternative to Java!

   Posted by: Jonny   in Programming, Scala

SCALA to quote the scala website found here:

“Scala is a general purpose programming language designed to express common programming patterns in a concise, elegant, and type-safe way. It smoothly integrates features of object-oriented and functional languages. It is also fully interoperable with Java.”

In other words if you are a Java programmer like myself & you find yourself looking at your code and saying “I wonder if I could make that smaller” then Scala is the language for you!

The Scala syntax has several “shortcuts” that allow very clean & simple code that still greatly resembles Java syntax. So if you are a Java programmer you should be able read Scala code without looking much up. Anyway the best way to demonstrate this is by showing some actual Java & Scala code side by side.

So here is the code example for a very simple & boring “Hello World” style program!:

JAVA
public static void main (String [] args) {
    System.out.println("Welcome to My Small Corner Of The Web!");
}

SCALA
object HelloWorld extends Application {
    println(”Welcome to My Small Corner Of The Web!”)
}

So here we can see that even for just a simple program that the Scala syntax is a lot simpler. A better example to show the Scala power is shown below:

JAVA
public class Name {
    private String firstName, lastName;

    public Name (String firstName, String lastName) {
        this.firstName = firstName;
        this.lastName = lastName;
    }

    public String getFirstName(){
        return firstName;
    }

    public void setFirstName (String firstName){
    this.firstName = firstName;
    }

    public String getSecondName(){
        return secondName;
    }

    public void setSecondName (String secondName){
        this.secondName = secondName;
    }
}

public static void main (String [] args){
    Name n = new Name ("Joe", "");
    name.setLastName("Bloggs");
    System.out.println("Name: " + n.getFirstName() + " "         + n.getLasName());
}

So here we have a Java class that takes two parameters and holds two variables. There are also getter & setter methods for both variables. This is quite a lot of code for very little function, so in Scala we:

SCALA
class Name(var firstName:String, var lastName:String)

val n = new Name("Joe", "")

n.lastName = "Bloggs"

println("Name: " + n.firstName + " " + n.lastName)

So these two code snippets do exactly the same thing! That is a demonstration of how Scala can be used to write simple, clean, & elegant code.

This is only a very brief example of why Scala is a very possible alternative to Java or addition to Java (you can use Java & Scala code in the same project). However for a much more in depth look at Scala & a decent tutorial to start you off I would visit Daniel Spiewak’s Scala for Java Refugees. This is where I have taken these code snippets from, and where I learnt the basics of Scala.

Tags: , , ,