Showing posts with label ubuntu. Show all posts
Showing posts with label ubuntu. Show all posts

Friday, August 19, 2011

How to install Kernel v3.0 on Ubuntu 11.04

Kernel v3.0 is out there and will be released with Ubuntu 11.10 and yet, there are no kernel updates for Ubuntu 11.04 after Kernel v2.6.38. If you are very eager to install kernel 3.0, then you can build them directly from the source code. Or just use the packages that are used to install Kernel 3.0 on Ubuntu 11.10. Since the latter approach is simple and easy, I will mention step by step instruction to install Kernel v3.0 on your Ubuntu 11.10 Natty Narwhal.

Step 1: Download the debian packages from here.

For 32 bit users -

1. linux-headers-3.0.0-0300rc2_3.0.0-0300rc2.201106081532_all.deb
2. linux-headers-3.0.0-0300rc2-generic_3.0.0-0300rc2.201106081532_i386.deb
3. linux-image-3.0.0-0300rc2-generic_3.0.0-0300rc2.201106081532_i386.deb

For 64 bit users -

1. linux-headers-3.0.0-0300rc2_3.0.0-0300rc2.201106081532_all.deb
2. linux-headers-3.0.0-0300rc2-generic3.0.0-300rc2.201106081532_amd64.deb
3. linux-image-3.0.0-0300rc2-generic_3.0.0-0300rc2.201106081532_amd64.deb


Step 2: Once you have downloaded all the files, place them into a single folder. Browse to that folder from your terminal and then copy paste the following code into the prompt.

sudo dpkg -i linux-*

The execution will continue to install kernel 3.0 on your Ubuntu 11.04. Just in case kernel 3.0 mess up, do not remove previous versions. You can always choose from the previous versions in the grub.

If you have or happen to install this, then please comment on the power consumption and other pros and cons of kernel 3.0. 

Tuesday, August 16, 2011

Sharing files between two ubuntu systems through local router

I have a old desktop running Lubuntu 11.04 and it is connected to internet through a wireless router. While I store lot of information on this computer, I also have a laptop running Ubuntu 11.04 that I most of the times work on and it is also connected to internet through the same router. Transferring files between these two machines is important to me. There are countless ways you could do it, but I preferred ssh to have a safe and reliable connection through the local router. If you are willing to do the same then here's how you do it.

Step 1: Install ssh on both the machines. Run this command in terminals of both the linux machines.

sudo apt-get install ssh

Step 2: Learn the IP address of your desktop. This can be done by right clicking the connection icon on the panel and then on "Connection Information".

Otherwise you can just run the following command and read for "inet addr:" field.

ifconfig

In my case, it is 192.168.1.3.

Step 3: Go to your laptop. Find "Connect to Server" option.

If you are using GNOME then you find this on "Places -> Connect to Server".
If you are using UNITY then you find this option by opening Nautilus. Go to File -> Connect to Server.

You get this window -

Step 4: Fill details into the fields and click Connect.
Service type must be selected to SSH.
Server field takes the address of the computer to which you want to connect to.
Port is 22, which is a TCP standard for SSH Connections.
Folder that you want to share.
Username to access the desktop.
You can add a bookmark and give it a name for you to access it next time.

Step 5: Once you are done, click on "Connect". It prompts for password. Enter it and you are done. You have successfully established file sharing from your desktop machine to your laptop machine. You can do the vice versa by following Step 3, 4 and 5 on your other machine.

PS: I have used terms 'laptop' and 'desktop' everywhere. But this need not be the case and procedure is same for any two machines connected through same router. 

Linux then. Linux now - An Infographic

It was 25th August of 1991 when Linus Trovalds first announced that he has created an OS of his own. Ever since, Linux has gone through a lot to become a successful people OS.

I still remember the first Linux I ever installed on my computer. Ubuntu "Breezy Badger" 5.10 which i tried out of curiosity and I remember erasing all the contents on my computer. But Ubuntu of now is lot more sophisticated and easy to use.

Here is an infographic created by The Linux Foundation which compares Linux of then and Linux of now.




Monday, August 15, 2011

A bit on partitioning

Linus Trovalds created Linux, but ever since its there in the open source world, there have been countless varieties and versions and the list is exponentially growing. Unlike Windows, Linux is a playground where people can tweak around, experiment (and mess it up). Whenever there's a new version or a distribution which makes lot of fuss on the Internet, users tend to move on to the new version. Quite obvious they want to.

Being into Ubuntu evangelism for quite a long time, I often come across people who complain that they lose their home folder contents on installing a different version or a distribution. So how do we not lose home folder contents then?

Rather explaining each individual I thought I write it down. The problem lies in specifying partitions during the installation. Here's my advise. While installing any Linux, it is of best practice to have these three partitions -

swap
Without specifying this partition, you will not be allowed to install any Linux distribution. When you start an application installed on your hard disk, the application's required resources are first brought to RAM before it runs. When your RAM is overloaded, a bit of unused data from RAM is transfered to swap space making room for the application to run. And when its done, the data moved to swap space is brought back to your RAM thus acting like a secondary RAM. If you have a huge capacity of RAM, then a small hard disk partition is enough for swap. It is ideal to keep your swap partition as big as your RAM capacity.

root (/) 
root file system, represented by a forward slash (/) is the top most node of your directory tree. This contains the linux kernel, device drivers and every other files that you install. This is where your actual linux is running from. This is similar to the C drive of your windows where windows and other programs (C:\Program Files) are stored. The size of this partition depends on the size of the linux distribution you are about to install. Minimum requirement will be specified in its documentation but the partition size must have a few extra bytes for you to install extra applications. For starters, 5GB of space is more than enough, but if you have a really huge hard disk space, then you can always keep some room for more applications.

/home
This is the final partition which will hold /home directory. Every user will have his/her own directory under /home. If your username is 'john' then your home folder will be at the path '/home/john'. All the user specific files will be stored in their respective home directories. Every document you create, pictures you download or any files specific to you are stored in your home directory.
Strictly speaking, you can install Linux without specifying partition to /home but in which case, the /home will be mounted under root (/) and is erased next time you reinstall.

Now that you have the idea of these three partitions, you should remember that whatever you install (like GIMP, VLC media player, any application) is stored in your root directory while whatever you download or create (like documents, pictures, music, webpages) is stored in your home directory.

Once you install linux with these three partitions, you can save as much content as you want in your home directory and next time while installing Linux, it is enough to specify your root and swap partitions. This way, your /home partition remains untouched and you don't lose any data. 

Tuesday, August 9, 2011

Resize images in bulk - Ubuntu

People ask me this quite often. How to re-size hundreds of images the easy way?

The answer is quite simple if you are using Linux/Ubuntu. You need to install a package called image magick which could be installed by executing the following instruction in the terminal -

sudo apt-get install imagemagick

Once you have installed it, you can change the width of all the images in the current folder by executing this following instruction in terminal -

mogrify -resize 600 *

This changes the height of all the images in current folder to 600px.

To change the height to 600px, execute

mogrify -resize x600 *

mogrify is a tool present in the imagemagick package. To know more about imagemagick, visit their website

Friday, August 5, 2011

Check which services are enabled/disabled on your Ubuntu

There are various services that an OS provides. If it is Ubuntu then you may at times want to know which one is enabled and which one is not. The best way to know it is chkconfig.

chkconfig provides a simple command-line tool for maintaining the /etc/rc[0-6].d directory heirarchi by relieving system administrators of the task of directly manipulating the numerous symbolic links in those directories. chkconfig has five distinct functions: adding new services for management, removing services from management, listing the current startup information for services, changing the startup information for services, and checking the startup state of a particular service.

When chkconfig is run without any options, it displays usage information.

To install chkconfig on Ubuntu

sudo apt-get install chkconfig

To check which services are enabled, just type chkconfig in the terminal and press return. It will list all the services available.

chkconfig can be used with options. More can be learnt from the man pages or here

Thursday, January 20, 2011

Install Unity Qt (2D) on Ubuntu 10.10 and 11.04 using PPA

As we all know now, the next version of Ubuntu has a major change in its desktop environment from Gnome to Unity. It was only a little time ago when Unity Desktop was released for Ubuntu 10.10 users could've installed Unity Desktop by sudo apt-get install unity-desktop. But users who had poor graphics support had a hard time coping up with it and  most of them returned to GNome. But now there's a solution as Unity Qt has been released which is the 2D version of the Unity Desktop having minimalist animations and 3D Effects. Unity Qt is lot faster than Unity 3D so I'm sure users are going to enjoy this.

Here's a snapshot of it and it doesn't look that different from the actual 3D Unity.

To install Unity-Qt open your terminal and execute the following instructions in the same order.

sudo add-apt-repository ppa:unity-2d-team/uity-2d-daily
sudo apt-get update
sudo apt-get install unity-2d-default-settings
sudo apt-get dist-upgrade

Next time you log in, select Unity-Qt from the options of Environments.

Hope that helps.

Monday, December 27, 2010

Grub customizer - Organise your GRUB

GRUB is the boot loader for your Ubuntu system.

By default, it looks something like this :


Boring and Black & White.

If you want to change the view of this GRUB, then the easiest way that i've found is the Grub Customizer. Grub Customizer is a graphical interface to manage your grub loader.

Here are some of the features of it :

  • Manages various entries to be displayed on the grub
  • Helps you reorder the grub menu entries
  • Allows you to set the timeout duration
  • Allows you to set the default menu selection
  • Can change the appearances of the grub. You can add background to your grub loader and as well change the various color schemes provided. 
The screenshot of Grub Customizer is here :


Whenever you have a kernel update, there will be a new entry in the grub loader and in course of time, your grub gets messy. So you can use grub customizer to completely clean the list, re order it and manage it.



To install Grub Customizer go to your terminal and type the following 

sudo add-apt-repository ppa:danielrichter2007/grub-customizer
sudo apt-get update
sudo apt-get install grub-customizer
If you have any queries then please feel free to comment.
And stay tuned on Racing Infinity for more updates.

Thursday, November 25, 2010

How to add Perl-CGI support to your apache web server in Ubuntu

So I assume you've installed Apache(if not then click here to see how) and now you want to run some CGI scripts written in Perl. What I'm going to describe here is only a simple way of executing CGI Scripts. This has some serious security flaws and a pro may just break it in seconds. So if you're a network administrator trying to implement something for your server then this is definitely not where you should be.

I assume you've installed apache using the command "sudo apt-get install apache2".

Next thing you got to install is  this library module that links your webserver with the perl engine.
sudo apt-get install libapache2-mod-perl2
Now you're ready to go. You must use this in your browser :
http://localhost/cgi-bin/programname.cgi

The CGI file programname.cgi is present in directory /usr/lib/cgi-bin/.

It is convenient to have a symbolic link to the cgi-bin directory from your /var/www/ directory. You can create one using the following command.

ln -s /usr/lib/cgi-bin/
Make sure the program has all the required permission.

Tuesday, November 23, 2010

How to convert .deb packages to .rpm packages and vice versa

Two mostly used Linux distributions are Ubuntu and the other, Fedora. Ubuntu uses .deb packages for installation while Fedora uses packages with .rpm extension. Problem arises when a person using Fedora gets a .deb package or when a person who uses Ubuntu gets a .rpm package. Here's a simple way to convert them between .rpm and .deb. The solution is the 'alien' command. If you don't have it, use

sudo apt-get install alien

will install alien on to your Ubuntu machine.

Now to convert rpm to debian use

alien rpm-package.rpm

where rpm-package.rpm is your rpm file. A .deb file with same name will be created.

And to convert .deb to .rpm use

alien -r deb-package.deb

where deb-package.deb is your .deb file. A .rpm file with the same name but .rpm extension will be generated.

The same command can be used to convert many other formats. To know more just use the man pages of your Ubuntu machine.

Sunday, November 21, 2010

How to convert PDF documents to JPG/PNG files in Ubuntu

PDFs are so famous that every document that we download now from the internet are in pdf formats. PDF readers are omnipresent that even most of the phones now come with. Whenever I have some document to send through mail I just send it as a pdf document. But there are times when you may want to put a pdf document on a website. The simplest way is to convert the pdf file into jpg/png file which can be easily uploaded to a website. Here's a simple way that converts pdf document to jpeg/png image files in less than 2 seconds.
You need to install imagemagick. On ubuntu, you can do it by typing this in your terminal.
sudo apt-get install imagemagick
Then its just a cake's walk. Execute the following in terminal.
To convert it to jpg image -
convert example.pdf example.jpeg
and if you want to convert it to png -
convert example.pdf example.png
If there are multiple pages in your pdf document then the files will automatically renamed to file-0.jpg file-1.jpg file2-jpg and so on.
Hope that comes in handy next time you want to put a pdf file on your website. 

Wednesday, November 10, 2010

Ubuntu Coloured - Wallpaper collection


One thing I love about Ubuntu is the huge support it gets for wallpapers. Open source Wallpapers, I call them. Here's one such a pack of beautiful coloured Wallpapers for Ubuntu.

Ubuntu Coloured

Wednesday, November 3, 2010

How to extend sudo's timeout in Ubuntu

If you're wondering what this is about, then here is the scenario.

You open your terminal and try to execute some privileged commands and you got to add sudo to it. Like, for example, when you have to change permissions you use 'sudo chmod 777 file.txt'. And then it asks for your password. But once you do it, it won't ask you for the password for the 'sudo' commands that you enter in the next 5 minutes. 5 minutes is the default timeout period for which time the terminal is going to remember your password. If you want to extend it then here's how.

You need to edit the sudoers.tmp file. For that, go to your terminal and type this :
gksudo gedit /etc/sudoers
Find the line that says :
Defaults evn_reset
Change it into
Defaults evn_reset , timestamp_timeout=x
where x is the timeout period in minutes.

If you want your terminal to remember your password for as long as you are not logged out or close window, then keep the value of x as -1.

Tuesday, November 2, 2010

Try Unity Desktop on Ubuntu 10.10 and 10.04

Ubuntu has finally announced that it is going to end GNOME as Ubuntu's Default desktop environment and has also said that Ubuntu 11.04 will have Unity Desktop Environment which was default for the Ubuntu Netbook editions. I'm not really happy with this change. Unity is light weight, yes. But still not a good choice for a desktop version. Ubuntu is working on a better Unity version for desktop. Hope that would be better. If you want to try Unity Desktop Environment in your Ubuntu 10.04/10.10, then just log in to terminal and type the following code :

sudo apt-get install ubuntu-netbook

Post your views on this change.

Saturday, September 25, 2010

Accessing Linux Partitions from Windows

It is very common to have dual boot systems with Windows on one side and Ubuntu/Linux being the other one. Just how Windows 7 supports file systems such as NTFS and FAT32, Ubuntu and most linux distributions support ext2, ext3 and ext4 (extended file systems). ext4 being the latest journaling file system. You might have noticed that you cannot access ext2/ext3/ext4 partitions from your Windows. Here's a simple way of doing it. All you need is a simple software ext2Read.

Download ext2Read from here.

Run the application in administrator mode. And then you can see all the disks with ext2/3/4 partitions. You can even copy files and folders(recursively). Here's a snapshot of it.

Snapshot
Comment your queries.

Wednesday, September 15, 2010

How-to: code and run .NET applications on Ubuntu

Solution is very simple.  It is the MonoDevelop.

MonoDevelop is an IDE built to code and run C# and other .NET languages on Linux platforms. MonoDevelop enables developers to quickly write desktop and ASP.NET Web applications on Linux, Windows and Mac OSX. MonoDevelop makes it easy for developers to port .NET applications created with Visual Studio to Linux and to maintain a single code base for all the platforms.


To Install MonoDevelop on Ubuntu 10.04, type the following in the command line.
sudo apt-get install monodevelop
To run monodevelop go to Applications -> Programming -> MonoDevelop

Sunday, September 12, 2010

How-to: Install Nautilus Terminal in Ubuntu

Nautilus Terminal is a cool piece of software that incorporates a small terminal window into your Nautilus. Nautilus is the default file manager on Ubuntu. The following snapshot explains it all.
Nautilus with Nautilus Terminal embedded

Steps to Install
sudo add-apt-repository ppa:flozz/flozz
sudo apt-get update
sudo apt-get install nautilus-terminal
Now restart your computer or the nautilus alone. You must get it.
My view: This is cool and helps semi-pro users of Terminal. Easy to change permissions as and where required.

Source: Ubuntu Geek

Sunday, March 28, 2010

How to code OpenGL programs on Ubuntu?

After searching for a long time, I've finally found a solution on how to use Code::Blocks to work with OpenGL APIs. 

Code::Blocks is an IDE just like Visual Studio on Windows. Install Code::blocks from the Ubuntu Repository by typing this at the terminal.

sudo apt-get install codeblocks

Once you're done, you need to download files that support OpenGL. You need to install the following package for it to work.

freeglut3 & freeglut3-dev - For GLUT Library. It installs some files into your /usr/include/GL/ folder.

libsdl1.2-dev - For SDL Library. It installs some files into your /usr/include/SDL/ folder.

To install these type the following at the terminal.

sudo apt-get install freeglut3
sudo apt-get install freeglut3-dev 
sudo apt-get install libsdl1.2-dev

Once you're done with this library installation, you should tell the Code::Blocks to link to the correct library for it to be able to execute GLUT/SDL programs. This is how you do it.

1. Open Code:Blocks (You can find this in Applications -> Programming -> Code::Blocks or type codeblocks at your terminal)

2. Go to Settings -> Compiler and Debugger.

3. Open Linker Settings tab. And under "Link Libraries" add "glut" for GLUT, "SDL", "GLU" and "GL" for SDL. 

4. Click OK and you're now done with it. Now your CodeBlocks should be able to compile OpenGL - GLUT/SDL code. Compile a running code to check.

If it didn't work then please comment on this post so that i can help you. 

PS: The whole procedure is to install both GLUT and SDL Libraries. But it is always any one, either GLUT or SDL, that is used. So if you want to install any one of them then skip the instructions that are for the other one. 

Friday, February 12, 2010

Bilbo - Best blogging client for Ubuntu

I used Live Writer to compose my blogs for all the time I was on Windows. Now when I'm on Ubuntu, only Client I had was my browser :(. That was because I wasn't very much impressed with Drivel or KBlogger.

But today I came across this client called Bilbo (now been renamed as Blogilo). It did blow me out of the world. It was better than Live Writer.

Currently featured:

  • A full featured WYSIWYG editor + An HTML editor
  • Previewing your post with your blog style! like when you are visiting it at your blog.
  • Support for Blogger1.0, MetaWeblog, MovableType (Wordpress supports All of these!) and Google GData (used on Blogspot.com blogs) APIs!
  • Support for Creating/Modifying/Deleting posts.
  • Support for creating drafts and scheduled posts!
  • Support for uploading media files to your blog (Just on supported APIs e.g. MetaWeblog and MovableType)
  • Support for Fetching your recent blog entries.
  • Support for adding Images to post from your system. It will upload them on Submitting post to blog (Just on supported APIs e.g. MetaWeblog and MovableType)
  • Support for saving local entries before publishing.
  • Saving your writing copy to prevent data loss, at configurable intervals.
  • Internal auto spell checker. (KDE spell checker used so most of languages are supported)


Installation is easy as you can find it in the repositories. You can download from the Ubuntu Software Center by searching for 'Bilbo' or you can also run the following command in your terminal

sudo apt-get install bilbo

Now, my search for a blogging client has ended.

Thursday, February 11, 2010

gtalX - a gtalk for ubuntu

gtalkx

Its still in the version 0.0.5. And its still not something that's very friendly.

What's good?
Its simple.
You can make voice calls. (was a hard thing just a few days back).

What's bad?
You can't log out unless you quit.
You can't change your status message or icon.

What's buggy?
Don't know whether its a bug or a super power - you can see invisible people. They are shown in the list of people who are online. Though you cannot make any contact with them. :)


Download the debian package from the link here: http://sites.google.com/site/jozsefbekes/Home/gtalx

Install it by running the following commands in command line.
sudo dpkg -i gtalx_0.0.5_i386.deb

or if you have 64-bit Ubuntu then

sudo dpkg -i gtalx_0.0.5_amd64.deb

Once it is done, run

sudo apt-get -f install


To remove gtalx just type

sudo apt-get remove gtalx