Linux as home desktop, why not?

Linux is a free stable and resourcefull operating system yet to prove it’s full potential as a desktop operating system. While the greater part of the market is still Windows based the introduction of the UMPC (Ultra Mobile PC) have turned things upside down for Microsoft. Instead of buying very expensive hardware and install Vista many choose to buy less hardware and get either a Linux distribution or (even worse?) a several years old Windows XP system.  Microsoft was not prepared for this turn of events and have been forced to extend the lifespan of their XP-series which they where planning to phase out in favour of Vista.

This change in consumer behaviour to “not buy the best” anymore, have favoured Linux who with their versatile distributions have a stable modern operating system for just about any new or old hardware out there. My five year old laptop which where being exhausted by running Windows XP in combination with a virus tool runs perfectly smooth with the Ubuntu distribution (well I could theoritically run XP without a virus tool but seeing I travel alot with it that would just be beging for it to crash with all the unsecure networks I connect to).

With the UMPC Linux have gained a small part of the desktop market, but what is holding it back to take an even larger part? Is it the hardware support? Well granted some hardware vendors only supply drivers for Windows systems, but most hardware have at least decent support in Linux. Is it Internet related software? Hardly, Firefox is arguably better than the current version of Internet Explorer (granted Firefox is available on both systems) and also e-mail clients like Thunderbird are just as easy as Outlook Express to setup. Are the office tools sub standard? Open Office and GIMP make a very good competition for their commercial counterparts Microsoft Office and Adobe Photoshop, so except for prior experience in one system there really is no major difference for the home desktop user there. Is it the ease of use? Again, trying out Vista will be just as confusing for a XP user as it would be switching to Ubuntu. Most things have changed places anyway. Also the update feature in Ubuntu is much better than Windows update in my opinion. The ability to upgrade all installed applications through a common interface is very easy to handle for an inexperienced user.

There is one single left over reason that I see quoted time and time again: “I use Windows XP becuase I want to play games”.

Is there any major reason to hold back? Well… I have to say yes. There is one single left over reason that I see quoted time and time again: “I use Windows XP becuase I want to play games”. Almost no PC game whatsoever have Linux-support. There are, often technical, HOWTOs on how to get this or that game running under Linux but it usually involves pages of instructions. If we have everything else, surely games can’t make a major difference for a desktop operating system? Again, I’d have to say yes it does. Why? Simple, the kid in the family who usually is the computer wiz is the one who helps all his family and friends install their computers. If this kid runs XP back home to play computer games on he will install XP on all other machines, because this operating system he knows and can “support”. Furthermore if all else being equal, if there is one major drawback in a single area, whoever wins that will probably win the battle.

Windows XP have DirectX which is supported and used by I would dare say every game manufacturer for the PC market. Linux have no equivalent interface. Linux have “emulated” Windows and even tried to port games individually but the major all-supported interface is not there. Game companys can’t make a release for every distribution out there (since many are so different it would be required), but if a common interface for all distributions could be established that would increase the chances of Linux game releases.

In my opinion, this is one of the major reasons Linux is still held back as a desktop operating system. Far from the only reason, but a major one.

Virtual Ubuntu 8.04 JeOS LAMP Server

I’ve found the perfect portable development environment for me! First of all I wanted a virtual environment in VMWare since I have access to that software at several locations. Secondly since I would be using it on laptops I wanted the virtual machine to use as little memory and disc space as possible.

Requirements for this tutorial:

First I create a new virtual hardware for the Ubuntu distribution. Standard options straight through except I choose to have a virtual harddrive split into 2 Gb files and only created when needed (to save space, since this is kind of one of the main points of JeOS). Next I choose the ISO-image of the downloaded JeOS distribution as an imported CD-ROM drive for the virtual machine and boot it up.

Throughout the installation I just make the default choices (with only a few exceptions for country and keyboard layout). The installation is fast and the system is up and running, but no graphics of course! Just a waste on a server machine anyway. The first thing I want is the comfort of continueing from my main computer and therefore I install OpenSSH server.

sudo apt-get install openssh-server

After the installation I can freely connect from any other machine on my network which in my case is much more confortable than sitting peeking into a virtual machine on my serverbox.

To logon remotely I need to know the current IP-adress of the JeOS virutal system, to easily get it I write:

ifconfig | grep -w inet

This will show me the current available IP-adresses on the machine, one of them is the loopback (127.0.0.1) and if there are others (there should be only one with the current installation) those are the public IP-addresses. In my case it’s 192.168.0.16. If you are running IPv6 change “inet” to “inet6” to get the public IPv6 IP address.

After I logon (in my case using PuTTY from a Windows machine) I start the process of making it a LAMP server (Linux Apache MySQL PHP5). To make things easy Ubuntu provides a command called “tasksel” that packages an installation togheter into one command:

sudo tasksel install lamp-server

This is suprisingly easy, just wait and the only thing the installation asked me about was what root password I wanted for MySQL.

I use nano to edit text files, you might use something else, either way I need to install it since it’s not included in the standard JeOS distribution.

sudo apt-get install nano

Now we need to make MySQL accessible from remote computers (default setting is to only allow localhost). To do this we need to edit the file /etc/mysql/my.cnf

sudo nano /etc/mysql/my.cnf

Please not that this can be considred unsafe since it exposes the MySQL interface to the whole network! This is only done since I want a development machine that I need to administrate remotely (might be from the same computer but with the server running virtually in the background). To change the bind address you have several options, but first off all find this line within my.cnf:

bind-address = localhost

Instead of localhost you can enter the IP you want it to bind to, if you comment out the line MySQL will by default bind to you’re current IP (which is recommended if you have a dynamic IP-address).

Now we need to create a database and give remote access to it. We need to start MySQL on the command line, so we run:

mysql -u root -p

MySQL will now prompt for your password (the one you supplied earlier in the installation) and then you are in. First I create a new database, the purpose of which is to develop WWW-services so I aptly name it “www”.

create database www;

Next I want to grant myself remote access to this database so I run:

grant all privileges on *.* to ‘magnus’@’%’ identified by ‘passwordgoeshere’ with grant option;

Again, this is UNSAFE for production environment, the above command grants limitless access to the database to any host that identifies itself as me with my password. Consult the MySQL documentation for better limited access and also (if you know which host(s) you will need access from) change the wildcard to a specific IP-number.

I can now access and administrate the MySQL database using whichever tools one favours, I recommend the GUI tools from MySQL.

Another handy tool is phpmyadmin, with this php-based GUI you can administrate the MySQL database through the web browser:

sudo apt-get install phpmyadmin

After the installation simply point the web browser to the /phpmyadmin folder on the webserver of the virtual machine. For example if you’re virtual machine have the IP 192.168.0.50 then the address would be http://192.168.0.50/phpmyadmin

Done! You can now run the virtual server with Apache2, MySQL and PHP5 remotely from any computer in your network and administrate it through SSH. At the end of the installation my virtual machine used 720 Mb discspace which should be compared with the several gigabyte discspace used by a standard Ubuntu installation. Also with the absense of graphical interface the memory consumption is very low and the virtual machine can run on as low as 128 Mb of RAM if needed.

I can add as a bonus that when I later installed a SAMBA server and WordPress 2.6 on the virtual machine the size grew in total to just below 800 Mb and memory set at 256 Mb of RAM. This will have to be a topic for another post though.

Updated 2008-08-02
* added instruction of how to obtain the IP-address of the JeOS virtual machine.
* fixed typo in grant statement

OpenSolaris 2008.05 – interesting but not yet for me.

I downloaded and tried OpenSolaris 2008.05. I had high hopes this would be “as easy as Ubuntu” but with the stability I rememberd from my days at the University or the few Unix boxes I’ve come across during my work. I downloaded the CD to try out on a virtual VMWare machine (latest version 1.0.6).

Downloading and burning a live CD posed no problem and booting it up was as easy as any other LiveCD. A slight dissapointment was the text-interface for choosing keyboard layout and locale, even for being a text-layout which I could accept it was a very boring text-layout.

After bootup the problems began. First thing I noticed was that I had no network. Apparently the Network Auto-Magic (NWAM) wasn’t magic enough to understand my network card. After some digging on the Internet I found the reason was not the network card but rather some other drivers in VMWare that OpenSolaris had problems with. This issue will most likely be gone in a future patch of either VMWare or OpenSolaris.

The first thing that struck me, before the network errors above, was how Linux-like the installation was with Gnome as desktop manager. I of course expected it to be very similar but not to this degree. Much of the “standard” Linux software was included. I was a bit dissapointed that Gnome was the only window manager found on the system, I had hoped to see the “old” look and feel from my University days (allthough I quickly switched to Gnome at the University when that was opened up as an option on the UltraSparcs we where using).

Next I tried to install the distribution to my virtual machine, and not run it as a live CD anymore. This was a very easy procedure, just add all the information needed and then start the installation. Having asked all questions first the installation then completed on it’s own but to me it felt quite slow.

Overall the impressions was mixed. While not impressed by the “first try” I am impressed about what I’ve read about OpenSolaris. The Zetabyte File System (ZFS) available and the support for high end machines with high availability (or so they claim but they are Sun so I take their word for it!). However since it has current legal problems with full integration with the Linux world (OpenSolaris is released under the CDDL license while most of the Linux world are distributed under the currently non-compatible GPL license). I hope in future versions this operating system will bring about a stable open source platform generally available.