Archive

Archive for the ‘Ubuntu’ Category

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.

Setting up an Ubuntu-based ASP.NET Server with Mono

November 21st, 2010 4 comments

Introduction:

In my day job, I work as an infrastructure developer for a small company. While I wouldn’t call us a Microsoft shop by any stretch (we actually make web design tools), we do maintain a large code base in C#, which includes our website and a number of web-based administrative tools. In planning for a future project, I recently spent some time figuring out how to host our existing ASP.NET-based web site on a Linux server. After a great deal of research, and just a bit of trial and error, I came up with the following steps:

VirtualBox Setup:

The server is going to run in a virtual machine, primarily because I don’t have any available hardware to throw at the problem right now. This has the added benefit of being easily expandable, and our web hosting company will actually accept *.vdi files, which allows us to easily pick up the finished machine and put it live with no added hassle. In our case, the host machine was a Windows Server 2008 machine, but these steps would work just as well on a Linux host.

I started off with VirtualBox 3.2.10 r66523, although like I said, grabbing the OSE edition from your repositories will work just as well. The host machine that we’re using is a bit underpowered, so I only gave the virtual machine 512MB of RAM and 10GB of dynamically expanding storage. One important thing – because I’ll want this server to live on our LAN and interact with our other machines, I was careful to change the network card settings to Bridged Adapter and to make sure that the Ethernet adapter of the host machine is selected in the hardware drop down. This is important because we want the virtual machine to ask our office router for an IP address instead of using the host machine as a private subnet.

Installing the Operating System:

For the initial install, I went with the Ubuntu 10.10 Maverick Meerkat 32-bit Desktop Edition. Any server admins reading this will probably pull out their hair over the fact, but in our office, we have administrators who are very used to using Windows’ Remote Desktop utility to log into remote machines, and I don’t feel like training everybody on the intricacies of PuTTy and SSH. If you want to, you can install the Server version instead, and forgo all of the additional overhead of a windowing system on your server. Since all of my installation was done from the terminal, these instructions will work just as well with or without a GUI.

From VirtualBox, you’ll want to mount the Ubuntu ISO in the IDE CD-ROM drive, and start the machine. When prompted, click your way through Ubuntu’s slick new installer, and tell it to erase and use entire disk, since we don’t need any fancy partitioning for this setup. When I went through these steps, I opted to encrypt the home folder of the vm, mostly out of habit, but that’s up to you. Once you make it to a desktop, install VirtualBox Guest Additions.

From Terminal, type sudo apt-get upgrade to apply any patches that might be available.

Setting up a Static IP Address:

From a terminal, type ifconfig and find the HWaddr entry for your ethernet card, usually eth0. It will probably look something like 08:00:27:1c:17:6c. Next, you’ll need to log in to your router and set it up so that any device with this hardware address (also called a MAC address) is always given the same IP address. In my case, I chose to assign the virtual server an IP address of 192.168.1.10 because it was easy to remember. There are other ways that you can go about setting up a static IP, but I find this to be the easiest.

Getting Remote Desktop support up and running:

As I mentioned above, the guys in our office are used to administering remote machines by logging in via Windows’ remote desktop client. In order to provide this functionality, I chose to set up the xrdp project on my little server. Installing this is as easy as typing sudo apt-get install xrdp in your terminal. The installation process will also require the vnc4server and xbase-clients packages.

When the installation has completed, the xrdp service will run on startup and will provide an encrypted remote desktop server that runs on port 3389. From Windows, you can now connect to 192.168.1.10 with the standard rdp client. When prompted for login, make sure that sesman-Xvnc is selected as the protocol, and you should be able to log in with the username and password combination that you chose above.

Installing a Graphical Firewall Utility:

Ubuntu ships with a firewall baked into the kernel that can be accessed from the terminal with the ufw tool. Because some of our administrators are afraid of the command line, I also chose to install a graphical firewall manager. In the terminal, type sudo apt-get install gufw to install an easy to use gui for the firewall. Once complete, it will show up in the standard Gnome menu system under System > Administration > Firewall Configuration.
Let’s do a bit of setup. Open up the Firewall Configuration utility, and check off the box to enable the firewall. Below that box, make sure that all incoming traffic is automatically denied while all outgoing is allowed. These rules can be tightened up later, but are a good starting point for now. To allow incoming remote desktop connections, you’ll need to create a new rule to allow all TCP connections on port 3389. If this server is to be used on the live Internet, you may also consider limiting the IP addresses that these connections can come from so that not just anybody can log in to your server. Remember, defense in depth is your best friend.

Adding SSH Support:

Unlike my coworkers, I prefer to manage my server machines via command line. As such, an SSH server is necessary. Later, the SSH connection can be used for SFTP or a secure tunnel over which we can communicate with our source control and database servers. In terminal, type sudo apt-get install openssh-server to start the OpenSSH installation process. Once it’s done, you’ll want to back up its default configuration file with the command cp /etc/ssh/sshd_config /etc/ssh/sshd_config_old. Next, open up the config file your text editor of choice (mine is nano) and change a couple of the default options:

  • Change the Port to 5000, or some other easy to remember port. Running an SSH server on port 22 can lead to high discoverability, and is regarded by some as a security no-no.
  • Change PermitRootLogin to no. This will ensure that only normal user accounts can log in.
  • At the end of the file, add the line AllowUsers <your-username> to limit the user accounts that can log in to the machine. It is good practice to create a user account with limited privileges and only allow it to log in via SSH. This way, if an attacker does get in, they are limited in the amount of damage that they can do.

Back in your terminal, type sudo /etc/init.d/ssh restart to load the new settings. Using the instructions above, open up your firewall utility and create a new rule to allow all TCP connections on port 5000. Once again, if this server is to be used on the live Internet, it’s a good idea to limit the IP addresses that this traffic can originate from.

With this done, you can log in to the server from any other Linux-based machine using the ssh command in your terminal. From Windows, you’ll need a third-party utility like PuTTy.

Installing Apache and ModMono:

For simplicity’s sake, we’ll install both Apache (the web server) and mod_mono (a module responsible for processing ASP.NET requests) from Ubuntu’s repositories. The downside is that the code base is a bit older, but the upside is that everything should just work, and the code is stable. These instructions are a modified version of the ones found on the HBY Consultancy blog. Credit where credit is due, after all. From your terminal, enter the following:

$ sudo apt-get install monodevelop mono-devel monodevelop-database mono-debugger mono-xsp2 libapache2-mod-mono mono-apache-server2 apache2

$ sudo a2dismod mod_mono

$ sudo a2enmod mod_mono_auto

With this done, Apache and mod_mono are installed. WE’ll need to do a bit of configuration before they’re ready to go. Open up mod_mono’s configuration file in your text editor of choice with something like sudo nano /etc/apache2/mods-available/mod_mono_auto.conf. Scroll down to the bottom and append the following text to the file:

MonoPath default “/usr/lib/mono/3.5″

MonoServerPath default /usr/bin/mod-mono-server2

AddMonoApplications default “/:/var/www”

Finally, restart the Apache web server so that the changes take effect with the command sudo /etc/init.d/apache2 restart. This configuration will allow us to run aspx files out of our /var/www/ directory, just like html or php files that you may have seen hosted in the past.

Having a Beer:

That was a fair bit of work, but I think that it was worth it. If everything went well, you’ve now got a fully functional Apache web server that’s reasonably secure, and can run any ASP.NET code that you throw at it.

The one hiccup that I encountered with this setup was that Mono doesn’t yet have support for .NET’s Entity Framework, which is the object-relational mapping framework that we use as a part of our database stack on the application that we wanted to host. This means that if I want to host the existing code on Linux, I’ll have to modify it so that it uses a different database back end. Its kind of a pain, but not the end of the world, and certainly a situation that can be avoided if you’re coding up a website from scratch. You can read more about the status of Mono’s ASP.NET implementation on their website.

Hopefully this helped somebody. Let me know in the comments if there’s anything that isn’t quite clear or if you encounter any snags with the process.




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.

VOIP with Linode, Ubuntu, Asterisk and FreePBX

October 29th, 2010 1 comment

Overview and Introduction

I’ve been dabbling with managing a VOIP server for the past year or so, using CentOS, Asterisk and FreePBX on a co-located server. Recently Dave and I needed to move to our own machine, and decided to use TEH CLOUD to reduce management and get a fresh start. There are hundreds of hosts out there offering virtual private servers (VPS’s). We’ve standardized on Linode for our small business for a few reasons. While I don’t want to sound like a complete advertisement, I’ve been incredibly impressed with them:

  • Performance. The host systems at Linode run at least 4-way 2GHz Xeon dual-core CPUs (I’ve seen higher as well) and you’re guaranteed the RAM you pay for. Pricing is generally based on how much memory you need.
  • Pricing. For a 512MB Linode, you pay $19.95 US per month. Slicehost (a part of Rackspace, and a Linode competitor) charges the same amount for a 256MB slice. Generally you want at least 512MB RAM for a Linux machine that’s not a test/development box.
  • Features. If you have multiple VMs in the same datacenter, you can assign them private IPs and internal traffic doesn’t count toward your bandwidth allowance. Likewise, bandwidth is pooled among all your VMs; so buying two VMs with 200GB bandwidth each gives 400GB for all your systems.

With full root access and the Linux distribution of your choice, it’s very easy to set up and tear down VMs.

Why VOIP?
When people hear VOIP, they generally assume either a flaky enterprise system with echoing calls or something like Skype. Properly configured, a VOIP system offers a number of really interesting features:

  • Low-cost long distance and international calling. The provider we use, voip.ms, offers outgoing calls for $0.0052 per minute to Canada and $0.0105/minute to the US on their value route.
  • Cheap phone numbers – direct inward dialing – are available for $0.99 per month in your region. These phone numbers are virtual and can be configured to do nearly anything you want. Incoming calls are $0.01/minute, and calls between voip.ms numbers are free.
  • Want to take advantage of cheap long distance from your cell phone? Set up a Direct Inward System Access path, which gives you a dial tone for making outgoing calls when you call a local number. Put your DID number on your My5 list, and you’re set to reduce bill overages.
  • Voicemail becomes much more useful when the VOIP server sends you an email with a WAV attachment and caller ID information.
  • Want to set up an interactive voice response menu, time conditions, blacklist telemarketers, manage group conferences or have witty hold music? All available with FreePBX and Asterisk.

Continue reading for server setup details and security best practices…

Read more…




I am currently running various *BSD variants for this Experiment.
I currently run a mix of Windows, OS X and Linux systems for both work and personal use.
For Linux, I prefer Ubuntu LTS releases without Unity and still keep Windows 7 around for gaming.
Check out my profile for more information.
Categories: Asterisk, FreePBX, Jake B, Ubuntu Tags:

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 Debian Edition.
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.

One week, three distributions (Day 4: Ubuntu 10.10)

October 20th, 2010 3 comments

Continuing where we left off I am now ready to report my first impressions of Ubuntu 10.10. I should start by apologizing a little bit, this post is going up one day late (even though I had already finished writing most of it). With that out of the way let’s begin.

Install

The install, as one would expect, is exactly the same as the one featured in Kubuntu. As noted before I have nothing but praise for this installer and still think it is one of the best, if not the best, installer on any Linux distribution.

‘New’ Theme

The new theme found in this release of Ubuntu is beautiful. It’s hard to place exactly what makes this theme so nice but Canonical has done a wonderful job iterating the old theme from 10.04 and making some subtle changes that have an incredible overall effect.

This level of polish even extends to the new sound menu. Canonical has implemented new sound APIs which allow media players to integrated natively with the sound menu in a way that is just awesome.

Image Shamelessly Stolen Last Minute from Another Website

Heck even the calculator looks better with the new theme!

Software

As with my previous post, I decided to take a look through the default installed software and see how it presents Ubuntu as an all-in-one desktop experience.

Empathy (2.32.0)

The instant messaging client of champions… or at least those who thought Pidgin was too complicated. My understanding for why this client replaced Pidgin was that it was set to offer features (like audio and video calling) that Pidgin was simply too slow at incorporating. Up until this release that reasoning has been nothing more than a pipe dream in my experience. Yes some people have had better luck than others but I have never had it really work all that well. This time however I did get it to work and, after installing the Ubuntu Restricted Extras package, also got it to successfully negotiate a full video call with the proper Windows Live Messenger client.

Evolution (2.30.3)

First off I have to just say “wow”. The first time I used Evolution was back on Ubuntu 8.04 and I absolutely hated it. Now however I’m starting to sing a different tune. Evolution not only looks better but also performs better as well. It includes many features, like calendar and PGP integration, that my favourite e-mail client Thunderbird requires add ons to accomplish.

Furthermore it integrates completely into the Ubuntu message centre which is a nice touch. I can’t even get Thunderbird to minimize to the system tray on Linux. All told I must say that I’m very impressed with with this version of Evolution.

Gwibber (2.32.0.1)

Gwibber is Ubuntu’s answer to all of your social media sources. It has the ability to combine all of your feeds, from Twitter to Facebook, in one convenient location. From there you can easily catch up on what your friends are doing and interact with them, all from one easy to use centralized location.

Unfortunately this universal nature is exactly where the Gwibber experience starts to fail. Because it works with everything it often fails to excel at anything in particular. Because of that I just don’t see myself using this application all that often. It is nice that it integrates into the Ubuntu message centre though.

Firefox (3.6.10)

Ubuntu’s default web browser is Firefox which, let’s be honest, I’m sure you know all about. I will say one thing about this browser though; I hope Firefox 4 improves the speed significantly or I think it will continue to lose users to Chrome.

Transmission (2.04)

For downloading torrents Ubuntu 10.10 continues to ship with the Transmission BitTorrent client. It is a more or less unremarkable client that places a large emphasis on simplicity. It is also the only BitTorrent client I know that warns you not to pirate things.

It also might just be me but for some reason this version of Transmission seems to have more features than I remember.

Rhythmbox (0.13.1)

This version of Rhythmbox contains the Ubuntu One music store which I decided to poke around in for a bit. It seems to be a full capable store with many popular artists.

Unfortunately I did manage to make it crash in a rather hilarious way…

Yes that’s right, the Ubuntu One music store is being run off of a Microsoft IIS web server.

Rythmbox the program also suffers from some annoying issues which were well covered by Jon on one of his previous post. One that particularly annoys me is the encoding options. As long as you stick to the defaults the application is very easy to use, but the second you want to adjust the settings you get stuck trying to decipher GStreamer command line options.

Totem Movie Player (2.32.0)

For video playback we get stuck with Totem. Its not that I think it’s the worst video player in the world, it’s just that it doesn’t do anything particularly well. Back when I was using Kubuntu’s Dragon Player I felt the same way but at least Dragon Player was able to provide video playback devoid of various vsync issues. To be fair though this might be an issue with Compiz vs KWin and not directly related to the video software.

PiTiVi (0.14.5)

PiTiVi, besides having a horrible name, is actually a very good piece of software. It is essentially a Windows Movie Maker clone and makes no excuses for it, which in this case is probably a good thing. Within just a couple of minutes of never using the program before I was able to import the two free clips that come with Ubuntu, one movie and one song, strip the audio from the movie clip and replace it with the song’s audio. One button click later my movie was rendered in glorious 1080p. That’s a lot of p’s!

For those wanting a bit more power, the software also seems capable of rendering to any (logical) combination of containers and codecs you might have installed on your system.

Ubuntu Software Centre (3.0.4)

And finally the big one. This release brings with it the first paid application to the new app store. This has already  been written about quite a lot, and while I think its a good thing, I do have some issues with it. The biggest issue that I have is that with only one application in the store people will probably never check it out again, even if new applications are added later. In my opinion what they should have done was created a beta program that people could opt into and test the store out. That would have given Canonical the feedback they need while still not spoiling the store for potential future users.

Conclusion

This release of Ubuntu is a solid one and deserves much praise. While I could give or take on some of the default included software, but then again who couldn’t, I do think that this release has an overall polish that simply hasn’t been as strong in previous releases. This is what Ubuntu 10.04 should have been from the start and makes me look forward to what is still yet to come.

Pros:

  • An unparalleled polish and sheen that no other distribution has
  • An updated software roster that is showcases some of the best Linux application-desktop integration I have ever seen

Cons:

  • While the polish is nice there really isn’t that much difference from 10.04
  • The Ubuntu Software Centre store release may have been a bit premature



I am currently running a variety of distributions, primarily Linux Mint Debian Edition.
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: GNOME, Tyler B, Ubuntu Tags: ,

One week, three distributions (Day 0)

October 15th, 2010 No comments

With the recent releases of Linux Mint Debian Edition, Ubuntu and Kubuntu 10.10 I am once again starting to feel that need to hop around and try something new out. That’s not to say that my current distribution of choice (Linux Mint 9) is a bad one, quite the opposite in fact. I am however curious to see what these new releases do, well, new. That being said I’ve set myself up a little experiment of sorts: try each distribution for two days each and on the 7th day choose the best from among the three. Now obviously this isn’t a very fair test, 48 hours is hardly enough to definitely test which of these distributions is truly the best. What it will, hopefully, show though is which distribution gives off the best first impression.

So buckle up and stay tuned, this week should hopefully be an interesting one.




I am currently running a variety of distributions, primarily Linux Mint Debian Edition.
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.

Compile Windows programs on Linux

September 26th, 2010 No comments

Windows?? *GASP!*

Sometimes you just have to compile Windows programs from the comfort of your Linux install. This is a relatively simple process that basically requires you to only install the following (Ubuntu) packages:

To compile 32-bit programs

  • mingw32 (swap out for gcc-mingw32 if you need 64-bit support)
  • mingw32-binutils
  • mingw32-runtime

Additionally for 64-bit programs (*PLEASE SEE NOTE)

  • mingw-w64
  • gcc-mingw32

Once you have those packages you just need to swap out “gcc” in your normal compile commands with either “i586-mingw32msvc-gcc” (for 32-bit) or “amd64-mingw32msvc-gcc” (for 64-bit). So for example if we take the following hello world program in C

#include <stdio.h>
int main(int argc, char** argv)
{
printf(“Hello world!\n”);
return 0;
}

we can compile it to a 32-bit Windows program by using something similar to the following command (assuming the code is contained within a file called main.c)

i586-mingw32msvc-gcc -Wall “main.c” -o “Program.exe”

You can even compile Win32 GUI programs as well. Take the following code as an example

#include <windows.h>
int WINAPI WinMain(HINSTANCE hInstance, HINSTANCE hPrevInstance, LPSTR lpCmdLine, int nCmdShow)
{
char *msg = “The message box’s message!”;
MessageBox(NULL, msg, “MsgBox Title”, MB_OK | MB_ICONINFORMATION);

return 0;
}

this time I’ll compile it into a 64-bit Windows application using

amd64-mingw32msvc-gcc -Wall -mwindows “main.c” -o “Program.exe”

You can even test to make sure it worked properly by running the program through wine like

wine Program.exe

You might need to install some extra packages to get Wine to run 64-bit applications but in general this will work.

That’s pretty much it. You might have a couple of other issues (like linking against Windows libraries instead of the Linux ones) but overall this is a very simple drop-in replacement for your regular gcc command.

*NOTE: There is currently a problem with the Lucid packages for the 64-bit compilers. As a work around you can get the packages from this PPA instead.

Originally posted on my personal website here.




I am currently running a variety of distributions, primarily Linux Mint Debian Edition.
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: , , , ,

10 reasons why Mint might not fail in India

July 7th, 2010 14 comments

Last evening while reading the SA forums, I encountered a thread about Linux and what was required to bring it to the general public. One of the goons mentioned a post that indicated ten reasons why Ubuntu wasn’t ready for the desktop in India. I kid you not – the most ridiculous reason was because users couldn’t perform the important ritual of right click/Refreshing on the desktop five or more times before getting down to work.

Here are Bharat’s reasons why Ubuntu fails, followed by why I think Mint might succeed instead in its place (while still employing his dubious logic.) When I refer to Indian users, of course, I’m taking his word for it – he’s obviously the authority here.

GRUB Boot Loader does not have an Aesthetic Appeal.

Bharat complains about the visual appearance of Grub – how it does not create a good first impression. This is, of course, in spite of Windows’ horrible boot menu when there’s more than one operating system or boot option to select. Apparently Indian users all have full-color splash screens with aesthetic appeal for BIOS, video card and PCI add-in initialization as well; this is just the icing on the cake that makes them go “eurrrgh” and completely discount Ubuntu.

To improve relations with India and eliminate this eyesore, Mint has added a background image during this phase of boot. My good friend Tyler also informs me that there’s a simple option in the Mint Control Center called “Start-Up Manager” that alllows easy configuration of grub to match a system’s native resolution and color depth.

Login Screen-Users are required to type in their username.

Again, another seemingly impenetrable barrier. Has nobody in India worked in an environment where typing in usernames AND passwords is required – like, for example, posting a blog entry on WordPress or signing into Gmail? In any event, Mint’s GNOME installation definitely gives a clickable list for this awfully onerous task.

Desktop-The Refresh option is missing!

I’m just going to directly lift this description as to the burning need for right click / Refresh:

What does an average Indian user do when the desktop loads in Windows?He rights clicks on the desktop and refreshes the desktop about 5-6 times or until he is satisfied.This is a ritual performed by most Indian Users after switching on the computer and just before shutting down the computer.
When this average user tries to perform his ‘Refresh’ ritual in Ubuntu,he is in for a rude shock.The Ubuntu Desktop does not have a Refresh Option or any other simliar option like Reload in the Right Click Menu.
So I advice Ubuntu Developers to include to a Refresh or a Reload option in the right click menu on the Desktop and in the Nautilus File Manager.The option should be equivalent of pressing Ctrl+R.As of now ,pressing Ctrl+R refreshes the Desktop in Ubuntu.

Mint’s developers have unfortunately not come around to this clearly superior way of thinking by default yet.

Read more…




I am currently running various *BSD variants for this Experiment.
I currently run a mix of Windows, OS X and Linux systems for both work and personal use.
For Linux, I prefer Ubuntu LTS releases without Unity and still keep Windows 7 around for gaming.
Check out my profile for more information.

Accessing Windows 7 Shares from Ubuntu is a Pain

June 28th, 2010 16 comments

This blog post is about my experiences. If you hit this page from a search engine looking to fix this issue click here to skip to the solution.

Recently, I’ve been reorganizing my computers based on their usage. My old HTPC, has resumed its duties as my primary desktop/server, my Mac Mini has been attached to the my desktop through Synergy, my server was given to my brother for personal use, and his old computer – a nettop – is now being used as our new HTPC.

After a painful decision making process – a topic for another time, and another post – I decided that this nettop, named Apollo after the Greek god of many things including “music, poetry, and the arts” [as close as I could get to entertainment],  should run Ubuntu 10.4 with XBMC as the media center app. After testing it’s media playback capabilities from a local file, I was rather impressed. I set out to add a SMB share from within XBMC, and was prompted to add a username and password.

I wasn’t really expecting this, because Leviathan – my desktop/sever running Windows 7 – has public sharing turned on, as well as a guest account. I entered in my credentials, and was asked yet again for a username and password. After trying multiple times, I decided to quit XBMC and see if I could get Ubuntu to connect to the share. Here too, I was prompted for a username and password, again and again.

Next I headed to the terminal to run smbclient. This didn’t work either, as I was shown a message saying smbclient failed with “SUCCESS – 0″. I guess success shouldn’t be zero, so my next move was to attempt mounting the network share using CIFS. Again, I was met with repeated defeat.

Begrudgingly I took to the internet with my problem, only to find that there were many people unable to connect to their Windows 7 from Ubuntu. The suggestions ranged from registry hacks to group policy administration, none of which worked. One repeated suggestion however, was to un-install the Windows Live Sign-in Assistant. However, as a user of the Windows Live Essentials (Wave 4) Beta that was recently released – I had no such program. I did however have a similar application called the Windows Live Messenger Companion, which I chose to uninstall – again, to no avail.

However, I soon reasoned that perhaps whatever was blocking people using the Windows Live Sign-in Assistant was now being used within the actual Windows Live Messenger client or the other Windows Live Essentials apps that I’d recently installed. I started by uninstalling everything but Windows Live Messenger – because I really, really like the beta version. Alas, this did not help. Next I uninstalled the actual Windows Live Messenger client and voila – I was able to connect with no prompting for passwords at all. Because that makes -any- sense.

As a matter of interest, I installed the regular WLM non-beta client and made sure that the Windows Live Sign-in Assistant was installed, and tried to connect again. Not surprisingly, I was no longer able to connect to my Windows 7 shares. After un-installing the Windows Live Sign-in Assistant my shares were back up and I was mostly happy. Except that I couldn’t use the new Windows Live Messenger beta.

I can’t be sure if the other tinkering I did also helped clear up my problems, but as a recap here are the steps I recommend to access your Windows 7 shares from Ubuntu:

1) If you have the Windows Live Essentials (Wave 4) beta installed, you’ll have to uninstall all of the applications that come with this. For now, you can install the current version of Windows Live Messenger and the other Windows Live Essentials.

2) If you have Windows Live Messenger installed, or ANY of the Windows Live Essentials programs installed check to see if you have the Windows Live Sign-in Assistant installed. If so, uninstall it.

3) Hopefully, now you can enjoy your Windows 7 shares in Ubuntu

Important Note:

Beta software has this nasty habit of leaving beta status sooner or later. If this issue is not resolved when the newest version of Windows Live Messenger is officially released, you may not be able to use the Window Live Messenger client if you need your Windows 7 shares from Ubuntu. I would suggest using an application like Pidgin as your instant messenger, as it can also connect to the Windows Live Messenger service. Other options include Digsby, Miranda, and Trillian.

Originally posted on my personal website here.

Fixing gnustep-devel in Ubuntu 10.04

May 17th, 2010 No comments

When Ubuntu 10.04 was released it represented the most modern incarnation of Canonical’s premier Linux desktop distribution. However not all things were better in this release. For myself I immediately noticed a problem while trying to install the gnustep-devel development libraries for GNUstep and Objective-C. I was greeted with this oh so lovely error message:

Some packages could not be installed. This may mean that you have requested an impossible situation or if you are using the unstable distribution that some required packages have not yet been created or been moved out of Incoming.
The following information may help resolve the situation:

The following packages have unmet dependencies:
gnustep-devel: Depends: gorm.app but it is not installable
E: Broken packages

So essentially I was left with the following choice: install the missing Gorm.app package from the repository (which wasn’t there) or don’t install gnustep-devel. Thankfully it was pointed out to me that I could perhaps see if the package still existed in the Debian repository instead. So off to http://www.debian.org/distrib/packages I went and after a quick search I found what I was looking for! I recalled reading somewhere that Ubuntu synchronizes with Debian testing (A.K.A. squeeze) at the start of every round of development, so I figured that would be the best package to grab. A short download and install later Gorm.app was finally on my system. With the dependencies now met it was a breeze to install the rest of the development files using a simple

sudo apt-get install gnustep-devel

And there you have it. By installing a single package from the Debian repository you too can get around the problem. For reference I have also filed a bug report with Ubuntu at Launchpad here.

Originally posted on my personal website here.




I am currently running a variety of distributions, primarily Linux Mint Debian Edition.
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.