Archive

Posts Tagged ‘Ubuntu’

Test driving the new Ubuntu (12.10)

August 26th, 2012 No comments

Call it crazy but I’ve decided to actually install an Ubuntu Alpha release, specifically Ubuntu 12.10 Alpha 3. Why would anyone in their right mind install an operating system that is bound to be full of bugs and likely destroy all of my data? My reasons are twofold:

  1. I regularly use Ubuntu or Ubuntu derivatives and would like to help in the process of making them better
  2. There are still a few quirks with my particular laptop that I would like to help iron out once and for all, hopefully correcting them in a more universal sense for Linux as a whole

So join me over the next few posts as I relate my most recent experiences running… shall we say, less than production code.

 




I am currently running a variety of distributions, primarily Linux Mint 17.
Previously I was running KDE 4.3.3 on top of Fedora 11 (for the first experiment) and KDE 4.6.5 on top of Gentoo (for the second experiment).
Check out my profile for more information.
Categories: Tyler B, Ubuntu Tags: ,

Big distributions, little RAM 4

April 9th, 2012 No comments

It’s that time again. Like before I’ve decided to re-run my previous tests this time using the following distributions:

  • Debian 6.0 (GNOME)
  • Kubuntu 11.10 (KDE)
  • Linux Mint 12 (GNOME)
  • Linux Mint 201109 LXDE (GNOME)
  • Mandriva 2011 (KDE)
  • OpenSUSE 12.1 (GNOME)
  • OpenSUSE 12.1 (KDE)
  • Sabayon 8 (GNOME)
  • Sabayon 8 (KDE)
  • Sabayon 8 (Xfce)
  • Ubuntu 11.10 (Unity)
  • Ubuntu 12.04 Beta 2 (Unity)
  • Xubuntu 11.10 (Xfce)

I will be testing all of this within VirtualBox on ‘machines’ with the following specifications:

  • Total RAM: 512MB
  • Hard drive: 8GB
  • CPU type: x86 with PAE/NX
  • Graphics: 3D Acceleration enabled

The tests were all done using VirtualBox 4.1.0 on Windows 7, and I did not install VirtualBox tools (although some distributions may have shipped with them). I also left the screen resolution at the default (whatever the distribution chose) and accepted the installation defaults. All tests were run between April 2nd, 2012 and April 9th, 2012 so your results may not be identical.

Results

Following in the tradition of my previous posts I have once again gone through the effort to bring you nothing but the most state of the art in picture graphs for your enjoyment.

Things to know before looking at the graphs

First off if your distribution of choice didn’t appear in the list above its probably not reasonably possible to installed (i.e. Fedora 16 which requires 768MB of RAM) or I didn’t feel it was mainstream enough (pretty much anything with LXDE). Secondly there may be some distributions that don’t appear on all of the graphs, for example Mandriva. In the case of Mandriva the distribution would not allow me to successfully install the updates and so I only have its first boot RAM usage available. Finally when I tested Debian I was unable to test before / after applying updates because it seemed to have applied the updates during install. As always feel free to run your own tests.

First boot memory (RAM) usage

This test was measured on the first startup after finishing a fresh install.

Memory (RAM) usage after updates

This test was performed after all updates were installed and a reboot was performed.

Memory (RAM) usage change after updates

The net growth or decline in RAM usage after applying all of the updates.

Install size after updates

The hard drive space used by the distribution after applying all of the updates.

Conclusion

As before I’m going to leave you to drawing your own conclusions.




I am currently running a variety of distributions, primarily Linux Mint 17.
Previously I was running KDE 4.3.3 on top of Fedora 11 (for the first experiment) and KDE 4.6.5 on top of Gentoo (for the second experiment).
Check out my profile for more information.

Ubuntu 11.10′s WiFi crashes my router

October 19th, 2011 9 comments

No seriously, it does. Whenever it makes a connection to the router it causes it to enter some bad state wherein it refuses to allow any connections to occur. This also has the effect of booting all other machines from the network. Apparently I’m not the only one to have this problem either.

I did manage to find a bit of a work around though:

  1. Set your wireless router to Mixed B/G mode only (yes I know, you lose out on N by doing this…)
  2. Enter the following into a terminal:
    echo "options iwlagn 11n_disable=1" | tee /etc/modprobe.d/iwlagn.confg
    sudo modprobe -rf iwlagn
    sudo modprobe -v iwlagn
    sudo service network-manager restart
  3. Maybe reboot?

I’ve also heard of some people getting it to work by enabling this instead of disabling it. To do so simply change the 11n_disable=1 line above to 11n_disable=0.

Hopefully they will have this annoying bug fixed soon.




I am currently running a variety of distributions, primarily Linux Mint 17.
Previously I was running KDE 4.3.3 on top of Fedora 11 (for the first experiment) and KDE 4.6.5 on top of Gentoo (for the second experiment).
Check out my profile for more information.
Categories: Tyler B, Ubuntu Tags: , , , ,

How to install sun-java6-jdk and Netbeans in Ubuntu 11.10

October 14th, 2011 9 comments

If you’ve recently upgraded to Ubuntu 11.10 and are a developer you may notice some things missing. For one there is no longer an option to install the sun-java6-jdk or JRE from the repositories. Worse they also removed the Netbeans IDE. Apparently this had something to do with licenses but if you’re going to offer MP3 support the least you could do is make software like this available for those who are willing to look for it.

Anyway with that rant out of the way I did manage to find a way to install both.

Install sun-java6-jdk

Following the instructions on this excellent post I was able to successfully install sun-java6-jdk using the following commands:

sudo add-apt-repository ppa:ferramroberto/java
sudo apt-get update
sudo apt-get install sun-java6-jdk sun-java6-plugin

There are alternative instructions for installing Java 7 as well.

Install Netbeans

My first attempt at installing both was to head to the official Oracle Java website and download the Netbeans + JDK installer. Unfortunately the installer seems to crash in this version of Ubuntu. However since the above process had installed the JRE I was able to simply grab the Netbeans only installer from Oracle which ended up working surprisingly well. Just remember to run it using sudo if you want other users to be able to use it as well.




I am currently running a variety of distributions, primarily Linux Mint 17.
Previously I was running KDE 4.3.3 on top of Fedora 11 (for the first experiment) and KDE 4.6.5 on top of Gentoo (for the second experiment).
Check out my profile for more information.
Categories: Tyler B, Ubuntu Tags: , ,

Ubuntu 11.04 Installer Fail

August 24th, 2011 3 comments

So I decided to take a go at Ubuntu 11.04 in a virtual machine before taking the leap and installing it for real. As I understand it, the new Unity desktop is a pretty major departure from the Gnome 2.x desktop that I’m used to, and I want to see if it’s as bad as it looks in the screenshots.

Unfortunately, I’ve yet to make it to the desktop, as Ubuntu has decided that it will take 42 minutes to download some language packs that I neither want or need.

Didn’t I tell it what language I speak as the first step of the install process? Surely this can be done later.




On my Laptop, I am running Linux Mint 12.
On my home media server, I am running Ubuntu 12.04
Check out my profile for more information.
Categories: God Damnit Linux, Jon F, Ubuntu Tags:

Big distributions, little RAM 3

August 14th, 2011 2 comments

Once again I’ve decided to re-run my previous tests this time using the following distributions:

  • Debian 6.0.2 (GNOME)
  • Fedora 15 (GNOME 3 Fallback Mode)
  • Fedora 15 (KDE)
  • Kubuntu 11.04 (KDE)
  • Linux Mint 11 (GNOME)
  • Linux Mint 10 (KDE)
  • Linux Mint 10 (LXDE)
  • Linux Mint 11 (Xfce)
  • Lubuntu 11.04 (LXDE)
  • Mandriva One (GNOME)
  • Mandriva One (KDE)
  • OpenSUSE 11.4 (GNOME)
  • OpenSUSE 11.4 (KDE)
  • Ubuntu 11.04 (GNOME Unity Fallback Mode)
  • Xubuntu 11.04 (Xfce)

I will be testing all of this within VirtualBox on ‘machines’ with the following specifications:

  • Total RAM: 512MB
  • Hard drive: 8GB
  • CPU type: x86

The tests were all done using VirtualBox 4.0.6 on Linux Mint 11, and I did not install VirtualBox tools (although some distributions may have shipped with them). I also left the screen resolution at the default 800×600 and accepted the installation defaults. All tests were run on August 14th, 2011 so your results may not be identical.

Results

Following in the tradition of my previous posts I have once again gone through the effort to bring you nothing but the most state of the art in picture graphs for your enjoyment.

Things to know before looking at the graphs

First off none of the Fedora 15 versions would install in 512MB of RAM. They both required a minimum of 640MB and therefore are disqualified from this little experiment. I did however run them in VirtualBox with 640MB of RAM just for comparison purposes. Secondly the Linux Mint 10 KDE distro would not even install in either 512MB or 640MB of RAM, the installer just kept crashing. I was unable to actually get it to work so it was not included in these tests. Finally when I tested Debian I was unable to test before / after applying updates because it seemed to have applied the updates during install.

First boot memory (RAM) usage

This test was measured on the first startup after finishing a fresh install.

Memory (RAM) usage after updates

This test was performed after all updates were installed and a reboot was performed.

Memory (RAM) usage change after updates

The net growth or decline in RAM usage after applying all of the updates.

Install size after updates

The hard drive space used by the distribution after applying all of the updates.

Conclusion

As before I’m going to leave you to drawing your own conclusions.




I am currently running a variety of distributions, primarily Linux Mint 17.
Previously I was running KDE 4.3.3 on top of Fedora 11 (for the first experiment) and KDE 4.6.5 on top of Gentoo (for the second experiment).
Check out my profile for more information.

How to Compile Banshee 1.9.0 on Ubuntu 10.04

December 9th, 2010 1 comment

Regular readers of this site will know that I’m no fan of Rhythmbox. When I recently installed Ubuntu 10.04 on my desktop PC, I decided to give Gnome’s default media player a few days to win back my affection. Unfortunately, while Novell’s Banshee project appears to be moving ahead with lots of great new features, Rythmbox still suffers from the issues that I outlined in my now infamous lambasting of it, nearly 8 months ago. To be fair, the pre-installed version of Rythmbox is only 0.12.8 on Ubuntu 10.04 (the same one that I reviewed previously), while the project has forged ahead to version 0.13.2.

Regardless, I prefer to listen to my music with Banshee, and I’m itching to try the latest version. On November 10th, the project released Banshee 1.9.0, and it looks positively excellent. I decided to give it a go, and downloaded the source tarball from the project’s website. Following are the steps that were necessary to install it:

  1. Head over to a terminal and install intltool, libgtk2.0-dev, libgtk2.0-cil-dev, libmono-dev, mono-gmcs, libmono-addins-cil-dev, monodoc-base, boo, libboo-cil-dev, libmono-addins-gui-cil-dev, libndesk-dbus-glib1.0-cil-dev, libgdata-dev, libgdata-cil-dev, libtag1-dev, libtaglib-cil-dev, sqlite3, libsqlite3-dev, libgconf2.0-cil-dev, libmtp-dev, libmono-zeroconf1.0-cil, libmono-zeroconf1.0-cil-dev, libwebkit-dev, libwebkit-cil-dev, and libsoup-gnome2.4-dev with the following command:

    sudo apt-get install intltool libgtk2.0-dev libgtk2.0-cil-dev libmono-dev mono-gmcs libmono-addins-cil-dev libmono-addins-gui-cil-dev monodoc-base boo libboo-cil-dev libndesk-dbus-glib1.0-cil-dev libgdata-dev libgdata-cil-dev libtag1-dev libtaglib-cil-dev sqlite3 libsqlite3-dev libgconf2.0-cil-dev libmtp-dev libmono-zeroconf1.0-cil libmono-zeroconf1.0-cil-dev libwebkit-dev libwebkit-cil-dev libsoup-gnome2.4-dev

  2. Next, you’ll need GStreamer and a few of its base plugins package: libgstreamer0.10-dev and libgstreamer-plugins-base0.10-dev

    sudo apt-get install libgstreamer0.10-dev libgstreamer-plugins-base0.10-dev

  3. If you want to play music encoded in non-free formats like mp3, you’ll also need a few restricted GStreamer libraries like gstreamer-plugins-good, gstreamer-plugins-bad, gstreamer-plugins-bad-multiverse, gstreamer-plugins-ugly, and gstreamer-plugins-ugly-multiverse.

    sudo apt-get install gstreamer-plugins-good gstreamer-plugins-bad gstreamer-plugins-bad-multiverse gstreamer-plugins-ugly gstreamer-plugins-ugly-multiverse

  4. Since I don’t have an iPod or similar Apple device, I’ve configured my installation to disable Apple device support. If you have an iPod, you can lose the –disable-apple-device and –disable-ipod flags after the configure command, but you’ll also need to add a couple of extra libraries to your system. To compile and install Banshee, navigate to the folder where you unzipped the tarball, and type the following in your terminal:

    ./configure –disable-appledevice –disable-ipod
    sudo make
    sudo make install

Banshee should now be installed. From your terminal, type

banshee-1

as a sanity check. Once the application launches, select Help > About and ensure that the version number is 1.9.0. If so, you should be good to go.

I’ll try to post a full review of this latest version of Banshee within a couple of days. In the mean time, happy listening!




On my Laptop, I am running Linux Mint 12.
On my home media server, I am running Ubuntu 12.04
Check out my profile for more information.

Create a GTK+ application on Linux with Objective-C

December 8th, 2010 8 comments

As sort of follow-up-in-spirit to my older post I decided to share a really straight forward way to use Objective-C to build GTK+ applications.

Objective-what?

Objective-C is an improvement to the iconic C programming language that remains backwards compatible while adding many new and interesting features. Chief among these additions is syntax for real objects (and thus object-oriented programming). Popularized by NeXT and eventually Apple, Objective-C is most commonly seen in development for Apple OSX and iOS based platforms. It ships with or without a large standard library (sometimes referred to as the Foundation Kit library) that makes it very easy for developers to quickly create fast and efficient programs. The result is a language that compiles down to binary, requires no virtual machines (just a runtime library), and achieves performance comparable to C and C++.

Marrying Objective-C with GTK+

Normally when writing a GTK+ application the language (or a library) will supply you with bindings that let you create GUIs in a way native to that language. So for instance in C++ you would create GTK+ objects, whereas in C you would create structures or ask functions for pointers back to the objects. Unfortunately while there used to exist a couple of different Objective-C bindings for GTK+, all of them are quite out of date. So instead we are going to rely on the fact that Objective-C is backwards compatible with C to get our program to work.

What you need to start

I’m going to assume that Ubuntu will be our operating system for development. To ensure that we have what we need to compile the programs, just install the following packages:

  1. gnustep-core-devel
  2. libgtk2.0-dev

As you can see from the list above we will be using GNUstep as our Objective-C library of choice.

Setting it all up

In order to make this work we will be creating two Objective-C classes, one that will house our GTK+ window and another that will actually start our program. I’m going to call my GTK+ object MainWindow and create the two necessary files: MainWindow.h and MainWindow.m. Finally I will create a main.m that will start the program and clean it up after it is done.

Let me apologize here for the poor code formatting; apparently WordPress likes to destroy whatever I try and do to make it better. If you want properly indented code please see the download link below.

MainWindow.h

In the MainWindow.h file put the following code:

#import <gtk/gtk.h>
#import <Foundation/NSObject.h>
#import <Foundation/NSString.h>

//A pointer to this object (set on init) so C functions can call
//Objective-C functions
id myMainWindow;

/*
* This class is responsible for initializing the GTK render loop
* as well as setting up the GUI for the user. It also handles all GTK
* callbacks for the winMain GtkWindow.
*/
@interface MainWindow : NSObject
{
//The main GtkWindow
GtkWidget *winMain;
GtkWidget *button;
}

/*
* Constructs the object and initializes GTK and the GUI for the
* application.
*
* *********************************************************************
* Input
* *********************************************************************
* argc (int *): A pointer to the arg count variable that was passed
* in at the application start. It will be returned
* with the count of the modified argv array.
* argv (char *[]): A pointer to the argument array that was passed in
* at the application start. It will be returned with
* the GTK arguments removed.
*
* *********************************************************************
* Returns
* *********************************************************************
* MainWindow (id): The constructed object or nil
* arc (int *): The modified input int as described above
* argv (char *[]): The modified input array modified as described above
*/
-(id)initWithArgCount:(int *)argc andArgVals:(char *[])argv;

/*
* Frees the Gtk widgets that we have control over
*/
-(void)destroyWidget;

/*
* Starts and hands off execution to the GTK main loop
*/
-(void)startGtkMainLoop;

/*
* Example Objective-C function that prints some output
*/
-(void)printSomething;

/*
********************************************************
* C callback functions
********************************************************
*/

/*
* Called when the user closes the window
*/
void on_MainWindow_destroy(GtkObject *object, gpointer user_data);

/*
* Called when the user presses the button
*/
void on_btnPushMe_clicked(GtkObject *object, gpointer user_data);

@end

MainWindow.m

For the class’ actual code file fill it in as show below. This class will create a GTK+ window with a single button and will react to both the user pressing the button, and closing the window.

#import “MainWindow.h”

/*
* For documentation see MainWindow.h
*/

@implementation MainWindow

-(id)initWithArgCount:(int *)argc andArgVals:(char *[])argv
{
//call parent class’ init
if (self = [super init]) {

//setup the window
winMain = gtk_window_new (GTK_WINDOW_TOPLEVEL);

gtk_window_set_title (GTK_WINDOW (winMain), “Hello World”);
gtk_window_set_default_size(GTK_WINDOW(winMain), 230, 150);

//setup the button
button = gtk_button_new_with_label (“Push me!”);

gtk_container_add (GTK_CONTAINER (winMain), button);

//connect the signals
g_signal_connect (winMain, “destroy”, G_CALLBACK (on_MainWindow_destroy), NULL);
g_signal_connect (button, “clicked”, G_CALLBACK (on_btnPushMe_clicked), NULL);

//force show all
gtk_widget_show_all(winMain);
}

//assign C-compatible pointer
myMainWindow = self;

//return pointer to this object
return self;
}

-(void)startGtkMainLoop
{
//start gtk loop
gtk_main();
}

-(void)printSomething{
NSLog(@”Printed from Objective-C’s NSLog function.”);
printf(“Also printed from standard printf function.\n”);
}

-(void)destroyWidget{

myMainWindow = NULL;

if(GTK_IS_WIDGET (button))
{
//clean up the button
gtk_widget_destroy(button);
}

if(GTK_IS_WIDGET (winMain))
{
//clean up the main window
gtk_widget_destroy(winMain);
}
}

-(void)dealloc{
[self destroyWidget];

[super dealloc];
}

void on_MainWindow_destroy(GtkObject *object, gpointer user_data)
{
//exit the main loop
gtk_main_quit();
}

void on_btnPushMe_clicked(GtkObject *object, gpointer user_data)
{
printf(“Button was clicked\n”);

//call Objective-C function from C function using global object pointer
[myMainWindow printSomething];
}

@end

main.m

To finish I will write a main file and function that creates the MainWindow object and eventually cleans it up. Objective-C (1.0) does not support automatic garbage collection so it is important that we don’t forget to clean up after ourselves.

#import “MainWindow.h”
#import <Foundation/NSAutoreleasePool.h>

int main(int argc, char *argv[]) {

//create an AutoreleasePool
NSAutoreleasePool * pool = [[NSAutoreleasePool alloc] init];

//init gtk engine
gtk_init(&argc, &argv);

//set up GUI
MainWindow *mainWindow = [[MainWindow alloc] initWithArgCount:&argc andArgVals:argv];

//begin the GTK loop
[mainWindow startGtkMainLoop];

//free the GUI
[mainWindow release];

//drain the pool
[pool release];

//exit application
return 0;
}

Compiling it all together

Use the following command to compile the program. This will automatically include all .m files in the current directory so be careful when and where you run this.

gcc `pkg-config –cflags –libs gtk+-2.0` -lgnustep-base -fconstant-string-class=NSConstantString -o “./myprogram” $(find . -name ‘*.m’) -I /usr/include/GNUstep/ -L /usr/lib/GNUstep/ -std=c99 -O3

Once complete you will notice a new executable in the directory called myprogram. Start this program and you will see our GTK+ window in action.

If you run it from the command line you can see the output that we coded when the button is pushed.

Wrapping it up

There you have it. We now have a program that is written in Objective-C, using C’s native GTK+ ‘bindings’ for the GUI, that can call both regular C and Objective-C functions and code. In addition, thanks to the porting of both GTK+ and GNUstep to Windows, this same code will also produce a cross-platform application that works on both Mac OSX and Windows.

Source Code Downloads

Source Only Package
File name: objective_c_gtk_source.zip
File hashes: Download Here
File size: 2.4KB
File download: Download Here

Originally posted on my personal website here.




I am currently running a variety of distributions, primarily Linux Mint 17.
Previously I was running KDE 4.3.3 on top of Fedora 11 (for the first experiment) and KDE 4.6.5 on top of Gentoo (for the second experiment).
Check out my profile for more information.

Django Development on Ubuntu 10.04

December 8th, 2010 2 comments

When I’m not rocking out my ninja-like linux skillz here at The Linux Experiment, I like to spend my spare time working on SlightlySauced, a weekly round table podcast. When we started the show, we chose to host it on a simple Tumblr blog, because it offered a fast setup experience and didn’t require much additional configuration to work well enough for our purposes. In light of this week’s Tumblr outages, we’ve decided to move the show off of the cloud and onto the same hosting provider that this site resides on.

Since I find myself with a little bit of spare time recently, I’ve also decided to write a custom site for the show using Django, my new favourite web framework. If you’re interested in trying your hand at Django development (and honestly, if you’re doing web development of any kind, why haven’t you tried it yet?), you can follow along with my progress here.

Step 1: Installing MySql

Because Django is a Python-based web framework, it includes SQLite out of the box. My web host of choice provides solid MySQL support, so I’ve decided to swap out SQLite for MySql. This requires that I install a local MySQL server for development purposes. Ubuntu has posted some handy documentation that I followed loosely. I’ll repeat the relevant steps here for posterity and ease of use.

From your terminal, type:

sudo apt-get install mysql-server

During the installation process, you’ll be prompted to enter a password for MySql’s root user account. If your server is going to be public-facing, it’s a good idea to enter a strong password. If it’s just for development purposes, you can probably use something weaker and easier to type.

Once the installation has finished, check that your server is running by typing:

sudo netstat -tap | grep mysql

This command should output something like the following:

tcp     0     0     localhost:mysql     *:*     LISTEN 2556/mysqld

Note: This command didn’t actually work for me. I had to remove the pipe and type just

sudo netstat -tap

and then search the resulting list for the MySql entry. I found it easily enough, and was convinced that the daemon was running and waiting for clients.

Step 2: MySQL Workbench (Optional)

Once your MySql daemon is up and running, you could edit the /etc/mysql/my.cnf file to alter its configuration. Instead, I opted to use MySQL Workbench, a decent graphical management tool that is distributed by Oracle (the same folks who make MySql). I’ve used it extensively at work, so I’m familiar with it and comfortable with its quirks. If you care to use it, you’ll have to grab it from Oracle’s website, as it’s not in the Ubuntu repositories. Luckily, Oracle provides a Ubuntu 10.04 64-bit *.deb that can be easily installed with GDebi. For those who care about such things, MySQL Workbench is a fully OSS GPL-licensed product, so there’s no funny stuff going on with regards to licensing.

With MySQL Workbench up and running, you’ll be presented with a screen like this one:

Click on New Connection under the SQL Development column in the bottom left of the screen, and enter the connection details of your local MySql server. It should be available via the loopback IP 127.0.0.1 on port 3306. The default username is root, and the password is whatever you set during the installation process. Once you get access, you can create a new schema and fire a few commands at it to test your setup.

Head back over to the Home tab and click on New Server Instance under the Server Administration column at the bottom right of the screen. In the dialog that pops up, select Take Parameters from Existing Database Connection and hit Next a bunch of times. The resulting window is a full MySQL daemon monitoring window that details traffic, the number of connections to the server, etc. More importantly, it allows you to set up user accounts and change configuration variables from a handy graphical front end instead of wading through MySQL’s extensive configuration files.

I headed over to the Accounts tab and created a user account for Django. At this stage of development, you’ll want to give this account full root access to the database, as Django will automatically create and drop schemas and tables as you code your website. Once development is done, you can pare these down to only those that are necessary.

Step 3: Installing Django

Holy crap, that was a lot of work, and we haven’t even gotten our framework of choice installed yet! Let’s get on with that. The project has some excellent documentation on this issue. I’ll repeat the basic steps here for your convenience, but strongly suggest that you read through the full instruction set if you encounter any issues or want to perform a customized installation.

Since Django is a python-based framework, you’ll need to make sure that you have a compatible version of Python installed on your system. At the time of writing, Ubuntu 10.04 ships with Python version 2.6.5. Django only works with Python versions 2.4 through 2.7. If you’re not running Ubuntu 10.04, you can check which version you have installed by typing

python –version

in your terminal. Once you’ve ensured that you have a compatible Python version installed, type

sudo apt-get install python-django

in your terminal to install version 1.1.1 of the framework from your repositories. Once the installation has finished, you should check the installed version. Since Django lives inside of python, you’ll need to start a python terminal by typing

python

in your terminal. Once started, type

import django
print django.get_version()

If you don’t see any horrendous-looking error messages, you’re good to go. As a side note, if you type

apt-cache search django

you’ll see that the Ubuntu repositories include quite a few handy Django plugins and applications that you might want to use in your projects, including a URL shortener, a user-registration module, and a contact form. Each of these can be installed on your system and included in any Django project quite easily. I’ll probably end up using one or more in my project to save me some time.

Finally, you’ll need to install an extra database connector for python in order to use MySql from within Django. In Ubuntu 10.04, this package is called python-mysqldb.

Step 4: Write Some Code!

So you’re up and running. If you’re not familiar with Django, I suggest that you run through their online tutorial. It’s well-written and provides a great introduction to some of the stuff that the framework can do.

Whatever you do, have fun! In my experience, Django makes web development a pleasure because it takes care of a lot of the nitty-gritty crap for you and lets you get on with solving harder problems.

Let me know what you think in the comments.

Edit: Added an extra database connector package that’s necessary if you want to use MySql with Django.




On my Laptop, I am running Linux Mint 12.
On my home media server, I am running Ubuntu 12.04
Check out my profile for more information.

One week, three distributions (Day 7: Conclusions)

October 24th, 2010 No comments

Well it’s been an interesting week. I’ve gotten to try out three new distributions and share my thoughts with everyone here. My original goal was to see which one of these distributions offered the best first impression and declare that one as the ‘winner’. However in actually working my way through these great releases I have changed my mind somewhat.

What makes a great distribution great?

This is a very interesting question that I’m sure would generate a wide array of unique and passionate responses. Some prefer ease of use, while others demand nothing less than complete control over what they can tweak. There are people who swear by using nothing but open source solutions, while others are happy to add proprietary code into the mix as well. This is the great thing about Linux, we get so many choices which means we get to decided what we want.

Unfortunately this has also resulted in a bit of distribution zealotry; like choosing Ubuntu over Fedora, or Arch over OpenSUSE is somehow taking a side in some giant war. Instead of all of the infighting we should be celebrating the fact that when Ubuntu comes out with a new piece of user-friendly software, or Fedora introduces a new awesome technology, we can share and integrate it right into all distributions.

So what makes a great distribution great? A distribution is great because it works for you, it suites your needs, fits your personality and lets you do what you want to do. At the end of the day isn’t that what open source is about?

Final thoughts

OK enough of the preachy writing. I think that all of the distributions I have tested this week were very good. They each embody the spirit of open source in their own little ways.

Kubuntu 10.10

Awards: The most improved release. Most likely to recover lost KDE fans.

I was extremely impressed with this release. The folks over at the Kubuntu project deserve a huge round of applause for their continued work on this often forgotten Ubuntu sibling. This release is unlike any other that I’ve tried from Kubuntu, and I hope it marks a turning point in the distribution’s history. If the next release sees anywhere close to the improvement that this release did it may even unseat Ubuntu as the go to Linux release. If you haven’t tried out this release I urge you to give it a shot.

Ubuntu 10.0

Awards: The most refined. Most likely to be installed on a new Linux user’s computer.

Ubuntu makes a return from its last long-term support (LTS) release with this stellar offering. For a release that is meant to experiment with changes, which might eventually be incorporated into a future LTS release, this version feels as polished as ever. The new theme, font, store and integration features make this an absolutely solid release. If you’re an Ubuntu user I’m sure you have already upgraded. If you develop for a different distribution, this might still be worth looking into if only to steal the good parts for your release of choice. Either way I think this release of Ubuntu marks a whole new level of application integration on the Linux desktop and I am excited to see where they go next with it.

Linux Mint Debian Edition

Awards: The most advanced. Most likely to see the fastest improvement.

For people who have been using Debian for a while now this release will feel right at home. It combines the best parts of Debian testing, modern software, stability and thousands of packages, with the Linux Mint team’s renown ability to iron out the kinks in any Linux distribution. I think that this release will see so much improvement in the next couple of months that it has the potential to steal users away from other rolling release distributions with its easy to use desktop. While this current iteration does have some issues I hardly think that they are anything to run away from. For technical users looking for the newest stuff, while hoping avoiding the vast majority of headaches other distributions can cause, this one is for you.

My Choice

For me personally I have been very happy with Linux Mint 9 and look forward to version 10 when it ships later this year. Until then however I think I will be sticking with the one that most closely resembles my current set up. No not Linux Mint Debian Edition, but Ubuntu 10.10. That being said I do look forward to giving Fedora 14 and Linux Mint 10 a ride soon.




I am currently running a variety of distributions, primarily Linux Mint 17.
Previously I was running KDE 4.3.3 on top of Fedora 11 (for the first experiment) and KDE 4.6.5 on top of Gentoo (for the second experiment).
Check out my profile for more information.