Showing posts with label Linux. Show all posts
Showing posts with label Linux. Show all posts

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

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.

Sunday, October 18, 2009

VI Improved - Tutorial

Share Orkut

How many people using unix like system do you think, have atleast a basic knowledge of using one of the most powerful editors of the platform? There are many who don't like to use VIM, purely due to its 'UN-GUI'ishness; they tend to go in for other simple to use and comparatively less geeky alternatives like 'nano'. What will you do when you are faced with a scnerio where there are no options other than using it ?

This tutorial aims to let you understand the extremely basic stuff you should know about VIM; bewarned that this is not even worthy of being mentioned as the 'Tip of the Iceberg'. VIM is an extensive tool which might take months to master.

To start VIM & open a file, say 'new.txt'; we type the following at the terminal,

'vim new.txt'

now you will see the contents of the file new.txt on your screen, at the last line will be written, "new.txt" 9L, 45C; this means that the filename is "new.txt" having 9 lines of data & size 45bytes (1 char {C}= 1 byte). This mode is called normal mode or command mode.

Now you want to edit the file, go to the character from where you would like to 'insert' text and press either 'a' or 'i'. If you press 'a' the cursor will advance 1 character forward and start inserting and if you type 'i' the cursor will start inserting at the current position. This mode when you insert data or text is called as 'insert' mode, to come out of the insert mode to the command mode, press 'Esc' key.

If you wish to delete some text then follow the same steps for editing to enter the 'insert' mode and use 'Backspace' key to delete charecters, again using 'Esc' key to exit the 'insert' mode and enter the 'command' mode.

Now that you have edited the file, you have to options; either save the changes done to the file or discard the changes and quit VIM.

To save a file type ':wq' in the 'command mode', (Note: - ':wq' will not work in the insert mode), if you want to save the file with another name use ':W FILENAME' in the 'command' mode, but in this option VIM will save the file with the name you specified and continue to edit the old file, and another command is ':saveas FILENAME' which is the same as ':w FILENAME' but it will now edit the new file after saving.

To quit the VIM editor use the command ':q', which is only allowed if the file has not been modified. If you wish to discard the changes and quit type ':q!'.

These are just 'dirt basic' that you need to know if you are going to use a Unix machine, VIM is too extensive to be covered in a few blog posts. Hope it helps even if its a bit. If you have any queries, feel free to post them as comments and I will surely try to clarify them.