Category Archives: Linux

Oh My ZSH!

I spend a lot of time in front of the terminal and have been using bash ever since I can remember, it’s a fine shell indeed but as I discovered recently, there is a better alternative available. I came across a github project that extends zsh and adds to it, tonnes of features including themes, plugins and configurations Continue reading Oh My ZSH!

MTS Settings for Ubuntu 12.04

I switched to ubuntu after the new LTS release and was having some problems with my MTS Mblaze connection. Sometime’s it’d work and sometimes it wouldn’t. There seems to be a bug in modem-manager which constantly keeps crashing so I decided to use wvdial instead. We need to install the wvdial package

sudo apt-get install wvdial

and then create the file /etc/wvdial.conf

[Dialer mts]
Stupid Mode = 1 
Inherits = Modem0 
Password = mts 
Username = internet@internet.mtsindia.in 
Phone = #777 
[Modem0] 
Init1 = ATZ 
SetVolume = 0 
Modem = /dev/ttyUSB0 
Baud = 115200 
FlowControl = Hardware (CRTSCTS) 
Dial Command = ATDT 

Then we can connect to the internet using

sudo wvdial mts

This is the output that I get when the dialer is run. Occasionally it will have some problems you can just disconnect and try again.

--> WvDial: Internet dialer version 1.61 
--> Initializing modem. 
--> Sending: ATZ OK 
--> Modem initialized. 
--> Sending: ATDT#777 
--> Waiting for carrier. ATDT#777 CONNECT 3100000 
--> Carrier detected.  Starting PPP immediately. 
--> Starting pppd at Sun May  6 18:35:05 2012 
--> Pid of pppd: 7231 
--> Using interface ppp0 
--> local  IP address 116.202.159.156 
--> remote IP address 10.228.138.131 
--> primary   DNS address 10.228.129.114 
--> secondary DNS address 10.228.129.113 

Getting MySQL to work on arch linux

I was setting up the LAMP stack on my arch linux installation, I followed the wonderful arch wiki and had no trouble getting apache and php working but there seems to be a problem with MySQL. It installs just fine but the daemon doesn’t start up.


lovelock# rc.d restart mysqld
:: Stopping MySQL Server [FAIL]
:: Starting MySQL Server  [FAIL]

I tried fixing the ownership and permissions but didn’t have any success. I realized the cause of the problem after running mysqld_safe

lovelock# /etc/rc.d/mysqld
usage: /etc/rc.d/mysqld {start|stop|restart}
lovelock# mysqld_safe
/usr/bin/mysqld_safe: line 531: hostname: command not found
111209 17:06:03 mysqld_safe Logging to '/var/lib/mysql/.err'.
/usr/bin/mysqld_safe: line 608: hostname: command not found
111209 17:06:03 mysqld_safe Starting mysqld daemon with databases from /var/lib/mysql
111209 17:06:03 mysqld_safe mysqld from pid file /var/lib/mysql/.pid ended

I installed hostname


pacman -S inetutils

But that didn’t solve it either and I had to do this to fix it

rm -rf /var/lib/mysql/*
mysql_install_db --user=mysql --basedir=/usr

This removes the databases and creates a new copy. For me it wasn’t an issue as this is a fresh install but you should be careful when upgrading mysql. Its always handy to back up the databases first.

Getting graphics.h to work on Windows and Linux

We have an introductory Computer Graphics course at our university this semester, we will be working with BGI(Borland Graphics Interface) which has its origins in Borland Turbo C. It goes without saying that I’m not a big fan of Turbo C, its a wonder why its so popular in India even though its so out of date. I have mingw set up on windows and also dual boot sabayon linux. I’ll set it up on both and list the steps here. This should work with Bloodshed Dev-Cpp but your mileage might vary. Continue reading Getting graphics.h to work on Windows and Linux

Setting Up Android SDK on Sabayon

Mobile application development seems to be in vogue these days, with the iPhone and Android platforms being the top contenders. iPhone had all of the market to itself sometime back  but now android is making progress at a very fast rate. I’ve decided to get my feet wet and get to know the basics of developing for android. The android sdk can be installed on windows, linux as well as mac osx. The installation instructions on the android developer are perfect for windows, mac and ubuntu (and its derivatives). Its not plain sailing for others, a few hacks are required here and there but it all works eventually. These instructions are tested on sabayon 6 kde x86_64 but should work with other editions too. Continue reading Setting Up Android SDK on Sabayon

Meeting Mr. Tux

One of my friends asked me as to how one should get started with linux. That made me think, “How did it all start for me?”. I didn’t know too much about linux when I started, so let me recollect those memories that adventure and share with you the difficulties that i faced and the mistakes I made. Probably it’ll help someone who is just starting out, in not making the same mistakes that I made. A wise man learns from another mans mistake whereas a fool makes them all himself and then learns, morons just keep repeating them over and over. I fall in the category in the middle and if you’re reading this then you fall in the first category. Continue reading Meeting Mr. Tux

Automatically Mount Partitions at Boot Up

I dual boot windows and linux and what happens is that most of my data resides on an ntfs volume which can be accessed by both the operating systems. It’s really simple to mount this volume, all that needs to be done is that you click it in the file manager and depending on your distro you may or may not be prompted for the administrator password. This system works well but its not very convenient. I generally configure my distro to automatically mount some partitions at boot up, that way i can easily create symbolic links  that span across volumes and make it easier to access files. Continue reading Automatically Mount Partitions at Boot Up

Choosing a Linux Distribution

A lot of people are curious to know about linux, but its hard for a beginner to start. Linux is really easy to use but there are a lot of prevalent myths that surround it, all of which fade away after you get to know it. There’s a popular saying in the open source world :

Linux is user friendly, it’s just picky about who its friends are.

Enough about that I’ll tell you where you should get started. For somebody who is new the best place to start is playing with linux in a virtual machine. The two most popular options for this are VMware Player and VirtualBox. This is a good way to learn about any Operating System (OS) in an isolated environment without any risk. While virtual machines are rather convenient, you’ll soon realise that they are not ideal for nothing can match the actual experience on native hardware. Its best to test drive a distros live cd/dvd before actually installing it. They are a good way to test hardware compatibility, specially for users who use laptops, hardware support for certain manufacturers is still quite shaky in some linux distros. Continue reading Choosing a Linux Distribution