Archive for the ‘Linux Tips’ Category

Where am I standing right now?

Posted: March 29, 2014 in Linux Tips

My programming career has started taking flight and I feel like I have improved quite a lot. I am satisfied with what I have achieved. I have improved my speed in solving programming problems since the last few years. Looking back I have done the following things I am proud of. 

  1. Learned  touch typing (Helps me code fast)
  2. Wrote an MS-paint clone from scratch in DOS based on Object oriented programming principles. (This is what got me hooked into programming)
  3. Wrote a Bash script that organizes files into folders based on the extension. Keeps my system organized and clean. 
  4. Tried out the basics of Javascript calendar. 
  5. Upgraded the menu generation function of a shopping list program for a client? (Had to surf through more than 3000 lines of spaghetti code) and improved the readability and performance of the program in the process (I am proud of this one!!)
  6. Created a custom landing page in Drupal for my company (This was one of my first real life programming projects in Drupal. It took me a month though and management freaked out. I don’t think I will take that long anymore)
  7. Wrote a custom PHP regex based filter for the filtering and automatic tweeting of feed nodes for a client website. This alerted the users of the clients website to be automatically notified of traffic jams.  
  8. Created a custom pager system for the paging of nodes of  certain type in a Drupal website ?
Advertisements

I was trying to take a complete database backup of a server using the command line and I wanted to test it out by checking out the size of the file. Soon I  was pulling my hair out trying to figure how to know the size of a file from the command line.

Finally I landed on this gem.

du -h <file-name>

‘du’ is the name of the program and  -h displays the output in ‘human readable’ format

Its been a long time.

Posted: April 28, 2013 in Linux Tips
Tags:

It is a strange feeling when you come back to your old blog after such a long time and read through it. It shows you how you were back then and how you are today. Like a mix of nostalgia and pride. I quit blogging here because I was in charge of managing http://ubuntumanual.org the blog which got me inspired in blogging about Ubuntu Linux in the first place. I felt that it was unethical to write two blogs about the same topic at the same time. It was good managing it for a while but I quit because I felt that it was going out of my control after a while when we began to delegate the content generation to third parties. But now I feel that I should restart working on my own blog now that I have…how do you put it…Got inspired by my own words!!!

The new version of Ubuntu (Lucid Lynx) is much better than its predecessors in times of eye-candy and desktop effects! However the position of the minimize,maximize and close buttons on the window title bar has been changed to the left. This could be a problem for users who have got used to the default layout of these buttons which is usually on the right. However it is nothing to write worry about as everything in Ubuntu/Linux can be customized the way you like it.

To change the position of the buttons you need to simply follow the following steps

  • Open the terminal.
  • Type gconf-editor on the terminal.
  • You will be presented with the configuration editor for gnome.
  • The gconf-editor   holds all the configuration info on all the installed programs.
  • Go to apps->metacity->general->button layout.
  • Double-Click on the button layout.
  • Change the value to menu:minimize,maximize,close.
  • The colon indicates the position of the buttons-if the text is on the left of the colon it so will the buttons.

I have to give kudos to  the Ubuntu team. They have really done a good job this time, like every time!

Tata Photon in Linux Mint.

Posted: May 26, 2010 in Linux Tips

Recently  my friends laptop which came with Vista pre-installed got corrupted by a Rootkit. Boy was he mad! He didn’t expect it to flunk so easily. He tried to install XP in the lap but as Vista was a higher version than XP it wasn’t possible. He couldn’t reinstall Vista as he didn’t have the original CD as it was an OEM version.

Seeing no other option he asked  me to help. I suggested him to install Linux Mint. I gave him a Linux  Mint. Helena CD. He really wanted XP but since he had no choice Linux was the only option. To be frank I did not expect what happened next.

He installed  Linux by himself. Partitioning was a breeze since it had a graphical installer although there was a few hiccups. So installing Linux was easy.  Well I thought here comes the hard part- ‘Finding the right drivers’.

Turns out the lap had an Intel chipset. So there was no need to install 3D drivers.Bluetooth connectivity was there by default. He was amazed! No more searching for the right drivers and that too in Linux!

However it was too early for rejoicing,The big problem was that he used Tata Photon USB wireless modem for connecting to the internet. On Vista the ISP provided the USB driver. They never accounted for Linux. So he brought it to me. I thought  ‘Oh boy. That’s done for!’ If he couldn’t connect to the web in Linux all effort would be in vain.

Then the amazing thing happened. I knew where the network manger was. I simply doubled clicked on it expecting nothing. Suddenly an option for a CDMA wireless USB connection caught my eye. Clicking on it I was presented with an option for selecting the present country and then to everyone’s amazement  it  showed an option for selecting the ISP with the correct name Tata Photon plus in  plain English. Clicking on it the connection was established in a few seconds. No driver installation or configuration or any other hassle. The ultimate freedom!

Linux has poor driver support. The myth was shattered!

We didn’t need to install 3d drivers, Bluetooth drivers or a USB CDMA modem driver . This was in contrast to the defacto OS.

Needless to say my friend was converted immediately to Linux. He didnt want anything else. And I?  Well, I was humbled that day. It threw my small misconception of Linux out of the Window. Literally.

Moving to Linux from Windows

Posted: May 14, 2010 in Linux Tips

Let me make it clear. I am not  a Linux fanatic. I too use Windows but mostly for playing games. I have successfully run  several windows games in my Linux machine. For those that don’t work I use Windows.I have installed  both XP and Linux on the same harddrive.

I want to advocate the same tactic for other users who want to try out Linux. Don’t remove Windows completely and jump into Linux all of a sudden. I know all people don’t want to follow the open source principle. They just want to get the job done as quickly as possible.

If you are such a user keep using windows for a while.Why should you remove it since it is helping you do your task  quite well?

However just give Linux a try. It will be new territory and it will be unfamiliar. Just assign Linux to a small partition in your harddrive. The rest could be kept for Windows. That way if you become confused you can fallback to another more familiar OS. On starting the system you will be given an option to choose either Windows or Linux.This practice is called Dual booting.

Linux crashing???

Posted: May 4, 2010 in Linux Tips

In all the 3 years that I have used Linux, I have never seen it crash once. Oh yeah I have seen a few programs running on it crash. But those are just programs and not the OS. I can just fire up the system monitor and kill the crashed program and thats it. No need to even restart the system.

Maybe thats why it is used in almost all the servers in the world that serve millions of requests at a time. A crash could be fatal.

Installing Packages in Ubuntu

Posted: December 24, 2009 in Linux Tips

Software is usually known as  packages in Ubuntu. There are two ways to install  packages in Ubuntu

1. The Hard way

2. The Easy way

The hard way is by using the terminal. You have to remember that the definition of hard depends on th user.

Go to Applications->Terminal. Type the name of the package you want. Suppose I want to install VLC media player.I type the name vlc in terminal. This is to check if the name I have typed is correct. If it is then the terminal will give the prompt

The program ‘vlc’ is currently not installed.  You can install it by typing:
sudo apt-get install vlc-nox
Just folow the prompt and type the line and it will install the package for you after typing the root password.
The easy way  is using the Synaptic package  manager.
Go to System->Administration->Synaptic Package manager. It will prompt you for the passsword.
In the quick search bar type the name of the required package. Right click on the check box of the required package and select Mark for installation. Then finally click on Apply and you are done.

Flight simulator for Linux

Posted: December 23, 2009 in Linux Tips

Flight gear is the mother of all Linux games. It is all one of the most expansive and realistic flight simulators around. Just fire up Youtube  Metacafe and search for a video on Flightgear. It is so accurate that it is used for teaching purposes! It is also absolutely free. However it has a high learning curve and so it will take a long time to master.

And don’t expect to shoot down other enemy aircraft. That is the job of a combat flight simulator.

WW2 Submarine Simulator for Linux

Posted: December 23, 2009 in Linux Tips

Danger from the deep is an open source submarine simulator which allows a player to pilot a variety of WW2 era diesel submarine. Its has ultra realistic and allows the player to experience an authentic environment of a real WW2 submarine during wartime and promises loads of fun and hours of gameplay.

WW2 sub simulatorClick on the screenshot to download from the official website.