Saturday, November 21, 2009

Ubuntu & Chromium OS

Share Orkut

After Google recently announced their intention of developing their latest venture, the Chromium OS, as an open source project, it has lead to cheers from all corners. An example of this openness was given at the Ubuntu Developer Summit in Dallas.

Here is an interesting excerpt from the Canonical blog,

In the interest of transparency, we should declare that Canonical is contributing engineering to Google under contract. In our discussions, Sundar Pichai and Linus Upson made it clear that they want , wherever feasible, to build on existing components and tools from the open source community without unnecessary re-invention. This clear focus should benefit a wide variety of existing projects and we welcome it.




Something else that struck me on the issue is from this Chromium site,

Prerequisites
You need to have Linux. We currently support the following:

  • Ubuntu (Hardy 8.04 or newer, Karmic 9.10 recommended)
  • An account with root access (needed to run chroot and modify the mount table)
  • Chromium prerequisites (needed to build a Chromium-based browser as part of building Chromium OS)



So, Google seems to be using a tried & tested platform as a foundation for their Chromium OS. The year 2010, seems to be getting interesting, with Lucid Lynx & Chromium OS. At least, we get to spend some good time; before the Mayans get the better of us, two years later.

Sunday, November 15, 2009

LAMP server on Ubuntu

Share Orkut

If you want to have a LAMP server on your Ubuntu machine, but found if difficult to install the different components seperately, the geeks (developers) at Ubuntu have literally made it as good as spoon-feed. For the un-initiated, LAMP is a software bundle for Linux, consisting of Apache HTTP server, MySQL (database component), PHP (for scripting).

The result of their efforts is the following command,

sudo apt-get install lamp-server^

Note: The carrot is not a typo-error, its part of the command. It refers to the 'Tasksel packages' for different tasks. If you need to see the complete list type "sudo tasksel" in the console.

Follow the onscreen instructions, you will be prompted to confirm all the packages, reply with 'YES'. While the installation is halfway, you will be prompted to chose a password for the root user on the MySQL database. Enter your password and confirm it.

Thats it, the install is done; now for the configuration part.

1] Apache2: Open "http://localhost/" in a browser window, if you see a page with "It Works" written on it; then you apache2 installation has succeeded.

Open a terminal window, and paste the following into it, to open up apache2.conf;
sudo gedit /etc/apache2/apache2.conf

add an entry to the end of the file; ServerName your-domain.com (you will have to replace your-domain.com)

2] PHP: Open a console, and type
sudo gedit /var/www/phptest.php

here, enter the following code in the gedit document,

<? php phpinfo(); ?>


restart apache2 with the following command
sudo /etc/init.d/apache2 restart


Now open your browser to "http://localhost/phptest.php"; if your PHP install was succesful, this page will list out the details of the PHP installation.

3] MySQL
Open the MySQL configuration,
sudo gedit /etc/mysql/my.cnf


Make sure the following setting is proper.
bind-address = 127.0.0.1


(This is an optional step)
Installing phpMyAdmin
sudo apt-get install libapache2-mod-auth-mysql phpmyadmin

Follow the onscreen instructions to complete the install, you can access it at "http://localhost/phpmyadmin/"

Finally restart the apache2 server;
sudo /etc/init.d/apache2 restart


There you go, your machine is up and running

Friday, November 13, 2009

GO - A brand new programming language from Google

Share Orkut

Big news for developers out there: Google has released a new, open source programming language, Go. Go, is currently experimental, and it combines the performance and security benefits associated with using a compiled language like C++ with the speed of a dynamic language like Python. The official mascot of Google Go is a nice little Gopher.

Here’s how Google describes Go in its blog post:

Go attempts to combine the development speed of working in a dynamic language like Python with the performance and safety of a compiled language like C or C++. In our experiments with Go to date, typical builds feel instantaneous; even large binaries compile in just a few seconds. And the compiled code runs close to the speed of C. Go is designed to let you move fast.

We’re hoping Go turns out to be a great language for systems programming with support for multi-processing and a fresh and lightweight take on object-oriented design, with some cool features like true closures and reflection.

For more details check out Golang.org

Here's a sample of the 'Hello, World' program:
package main

import "fmt"

func main() {
fmt.Printf("Hello, 世界\n")
}

Wednesday, November 11, 2009

Fix the Monitor from xorg.conf

Share Orkut

Most Linux distros have some sort of control centres from where we can change display settings and make it optimum for our monitors or graphics cards. Sadly sometimes we come across a distro which doesn't support the resolutions native to our card or monitor, in such cases we can directly modify the 'xorg.conf' file which is responsible for the changes in the display.

Before you proceed, back up your old 'xorg.conf'

$sudo cp /etc/X11/xorg.conf /etc/X11/xorg.conf_backup

Now, open up 'xorg.conf' in any text editor you have, I'll use gedit for this example.

$sudo gedit /etc/X11/xorg.conf

Here's an example xorg.conf file from my machine, only the section corresponding to the monitor is shown


Section "Monitor"
Identifier "0-CRT1"
Option "VendorName" "ATI Proprietary Driver"
Option "ModelName" "Generic Autodetecting Monitor"
Option "DPMS" "true"
Option "PreferredMode" "1280x1024"
Option "TargetRefresh" "60"
Option "Position" "0 0"
Option "Rotate" "normal"
Option "Disable" "false"
EndSection

Take care before you change any value, its very tempting to try a high resolution, but it might damage your monitor permanently, so always get the specs right from the manufacturers before you change any value.

Tuesday, November 10, 2009

FGLRX driver problem in Ubuntu

Share Orkut

After successfully in getting my ATI/AMD FGLRX drivers on Ubuntu 9.10, I'm finally loving the visual effects.

Earlier whenever I tried to install the drivers from, System>>Administration>>Hardware drivers; the installation of the driver would be successful, but my screen would keep flickering, as if it were some CRT screen being disturbed by radio frequencies.

I decided to try and install the FGLRX drivers one last time, I encountered the usual flickering which, not surprising now, vanished when I changed the refresh rate, from the default 75Hz to 50Hz.

So if any of you are facing flickering after you have installed your drivers and rebooted, try fiddlng with the refresh rate.

Another workaround that has worked for a few Nvidia Cards is to disable Compiz, from System>>Prefrences>>Appearence and in the Visual Effects, select the 'None' option. A restart will resolve this problem.

The last solution I have found to this after scourging the net for hours is to edit the 'xorg.conf'in '/etc/X11/xorg.conf'; which I will be posting later.

Tuesday, November 3, 2009

Microsoft Windows user authentication, is it a Joke ?

Share Orkut

A Microsoft Windows computer cannot be called 'secure' in the least bit, at least as far as the user authentication is concerned. I'll tell you how this is true.

  • Boot your computer with any live CD / DVD that supports mounting a NTFS drive (preferably live CDs of any Linux) .
  • Proceed with mounting the Windows root drive from your live CD session and navigate to the "%WINDIR%\System32" folder.
  • Here, create a backup copy of 'utilman.exe' by renaming it as 'utilman.exe.bak' and rename 'cmd.exe' to 'Utilman.exe'.
  • Now restart the computer and boot the Windows OS, when you are at the login screen you have to invoke the Utility manager by pressing 'Ctrl+U'; but instead of the utility manager in this case you are presented with a 'no holds barred' command prompt, with SYSTEM privileges.

And that is how your lil bro can pwn Windows.
Surely a brand of operating systems thats almost getting its seventh version out must do something about this scenario, considering that it is a major player in the business.


EDIT: LOL ... even windows 7 is not secure against this; and this works even if 'cmd.exe' replaces other applications like the onscreen-keyboard(osk.exe), which are accessible from the login screen; you just have to follow the procedure to start whatever 'exe' you replaced with 'cmd.exe', to be able to access the prompt.

I'm trying to come with a workaround to this problem, been tinkering with the registry. I'll post the solution as soon as possible.