Hey reader of my blog…
I know i have been getting quite a bit of traffic; though not phenomenal as gmail or orkut or something.
I however would like all to do something; more than just read my blog; tell me who you are.
Surely the people who i know and who read this blog is just a small percentage of the whole traffic. So if you dont mind, do introduce yourselves to me. Send a comment or something: i can always delete your comment if you have privacy issues (yeah right; who’s gonna spam ya? Me? I dont even know how email’s work; how can i spam ya huh?).
So what do you say reader? Will you introduce yourselves to me? Or no? You be the judge.
The return trip home: an eye-opener
Today, I was reading the newspaper when I came across this interesting article “Sir we pay for selling cigarettes in the train”. I didn’t understand what the title means but well the article did shock me at the audacity of the smokers described in the article.
Here’s the link to the article in today’s newspaper. It’s in today’s Hindu page 14(at least in the Coimbatore edition that we get but well I think the editorials and international page are same all across).
This reminded me of two incident that I had recently: one while coming back home after third semester(well it’s been a while since I got home but well yeah I got reminded and thought of putting it here) and the other was when returning from foss.in.
I was waiting in the train station and a drunk person came and sat next to me. He was blabbering about his ungrateful wife and son blah blah blah. I’d my iPod plugged into my ears but felt pity for the third person who was with me listening to him all alone and switched it off.
The guy was literally cursing his wife in a very disgusting language(read the guy with me thought so; staying in college I thought it was alright. But that’s when I got my first shock – I don’t know how to be a civil person. But now I’ve changed no more very very foul language.)
The guy went on and on and on but well I was conversing with the third person. He said he was waiting for his nephew(I think nephew) to come from Trivandrum: he was studying there. I asked him “Isn’t he old enough to come home on his own?”; to which he replied “He used to do so. But, recently someone attacked him in the dead of the night. Nothing was there to be stolen. I don’t want to risk him getting attacked again and left in the tracks.” I was shocked at the fact that the world was still a dangerous place, even with so much advancement and the call for humanity. Truly that was when I knew that I’ve got no idea what is out there. We went on for some more time about how the world was and how’s it’s changed now. I was amazed to get several eye-opening view-points from him.
But, the real eye-opener was just coming. Some time later, an RPF officer was walking by and he casually walked up to us. I thought he was going to apprehend me for some reason(remember the drunk guy blabbering away? Well I didn’t!). And he started talking to the drunk guy asking him why was he smoking. I noticed the smoker had in fact tried to hide away the cigarette and was trying to prove his innocence(he in fact also tried to hide the empty liquor bottle that he had dropped earlier). The policeman was talking quite calmly and then wrote something on a notepad and handed it over to the man saying “Please come to Kasargode tomorrow at 9am and you can prove your innocence to the Judicial Magistrate”. Now some one was shocked and it was not the man: it was me! I was shocked that I didn’t know smoking is banned in public places in India. I thought it was just in places like Malaysia, Singapore, France, Germany and other such places. I was shocked not at the fact that he was smoking but the fact that I didn’t know this rule.
They police man went on talking but the other person said “Let the police man handle this. Let’s go.” I didn’t want to go: wanted to further listen to the conversation and learn more rules that a person should be aware of. But I left the place fully regretting not knowing that I didn’t know the rules while also happy that I had learnt one rule.
The second was when we were coming back from bangalore after foss.in. While my friends bought a general ticket, I had a reserved ticket upto thrissur. So in the early morning cold(brrr! I was shivering even with my jacket on – that cold!), we had to stand in an extremely long queue in the Bangalore city station(another eye-opener – only people in Kerala are lazy and hopeless; in all other states life begins as early as 4am). As I was waiting next to Rahul as he stood in the line, policemen was walking up and down trying to prevent people from getting in the middle of the line. I was technically out of the line too and so he asked me to go away. While I was walking away, he asked me casually where was I going. I stated Ernakulam. He said, “You are running late for the train. Want me to get you tickets?” I was happy to run into the samaritan and was thinking about ask Rahul about it when he continued undeterred “Give me 50 rupees for each ticket and I’ll go inside and get you the tickets.” I didn’t really register what he said last and walked on to tell Rahul this. As I was about to say the last sentence to Rahul, it hit me that he was actually asking for a bribe! I told Rahul fully what he said(I don’t remember if I said I nearly fell for it; but it should be obvious I nearly did).
The worst part: he went on and asked few more passengers the same thing! I felt furious! But then we approached the counter and so got distracted since Rahul said he might need some extra money just in case. On my way to the train, I wanted to complain somewhere about this. But, well I didn’t want to miss the train and was also a bit apprehensive: it seemed to me that everyone in the station was like this. So, I just shut up and focussed on getting to the platform and finding out the compartment.
I now am shocked that in spite of full knowledge of rules, the people continue bending rules. This is as bad as not knowing the rules. I do hope that you will try to catch erring people and also spread the knowledge of the rules to all those who don’t know. Else India’s hope of becoming a model country will never happen.
The ls command: Know what’s beneath you
So we’ve done one command that’s the pwd. Next up ls.
ls is used for listing the contents of the present directory. Go ahead and type ls in the shell. You’ll get a list of file and folders in the present directory.
The best part of ls is that there are various options that let you do many things. For example, if I’ve got a folder with large amount of contents in it. And I need to find out if a file, say foo, is there in the folder, all I have to do is type in the command ls foo in the shell. If there’s file called foo, ls will return the filename to us. Else it’ll return an error similar to this ls: cannot access foo: No such file or directory.
Now hidden files and stuff. Hidden in the home folder of each user are various configuration files from .bashrc file which controls all the environment variables in my shell(go read up on this in wikipedia if you want) to the various configuration of my various applications that I’ve installed. These can be viewed from the shell using the commands ls -a or ls -A. The difference between the two is that, the former will list . and ..(remember . And .. the present working directory and it’s parent?) while latter does not do so.
Another useful option is the the -l and it’s similar sister -g. ls -l will list all files(excluding the hidden ones) and complete details about them such as owner, group to which owner belongs to, date of last modification, time of last modification and file/folder name. ls -g works similar to ls -l except that the owner name and owner group are not displayed.
ls -R is another useful option. It lists all files and folders in the present directory as well as in it’s sub-directories, their sub-directories and so on(R=Recusive).
Also you can list multiple directories at the same time. Eg: ls /home /usr/share. The contents of both the directories will be listed.
There are several such options for ls command. To know about these, read the man pages. Invoke it for ls using the command man ls.
The difference between ‘.’ and pwd
As promised, I’ll illustrate the difference between ‘.’ and pwd. As stated earlier, pwd is a command that returns the present working directory and ‘.’ is an alias for the present working directory.
Try both commands ls . and ls pwd. You will see that former works as intended but latter does not. Try to figure out why.
Till next time when another entry on another command comes.
The pwd command: Find out where you are
Before we begin, here are a few important things:
1.I use bash(bourne-again shell) to demonstrate the functionality of these commands. So, if you use a different shell, check the documentation of that respective shell.
2.Also, I use ubuntu. So some commands may not necessarily be available across all distros. For example, apt-get is used to install applications in Ubuntu but Fedora uses yum I believe. So, this may not necessarily universal to all shells across all distros.
So let’s start this journey into the command line. First up open up your shell. If you use GNOME, then I think it’s called gnome-terminal(in ubuntu anyway it is so) and if you use KDE, I believe it’s called konsole(a vague memory this is the command in KDE someone confirm this). Just check the Applications -> Accessories you should find it there.
Once you run it, you’ll get something like
@<computer_name:~$
The and should be pretty obvious. What comes after the ‘:’ denotes the present working directory. And $ indicates shell I believe(someone please confirm this).
So the first command that we are going to look at is pwd. It stands for Present Working Directory. As the name suggests, it tells you which directory you are currently working on. Type in at the prompt “pwd” and press enter. The output should be something like
/home/
If you did get a similar output, there you go: you just executed your first Linux command! Congratulations!
A brief description of Linux directory structure
Unlike in windows, Linux does not have concept of drives. There are only directories(equivalent to folders in windows and sometimes alternatively referred to as folders in linux too) an files. Everything in linux falls under the directory root(denoted by /).
Few common folders in Linux(common to all Linux distros)
/usr – This is where all applications that are to be shared by all users of the system. It is similar to the public shared folder in windows.
/boot – This contains the boot-loader of Ubuntu GRUB(GRand Unified Boot-loader)
/home – This is the folder where each user gets his space to store necessary documents, files etc(similar to My Documents in windows). Also in addition, configuration files of the user is stored in this folder.
/media – This is where all drives(hard drives, USB disks, disk drives etc) will be displayed.(Note: You need to “mount” them in order that they be displayed in this folder).
/tmp – This is where all temporary files are stored. (Similar to TEMP folder in Windows)
A note on the various symbols in Linux shell
Various symbols are used in the linux to denote something so as to allow ease of command line usage.I’ll add more when we deal with more commands. Right now we are going to look at 3 symbols.
1. ‘.’ (Fullstop): This denotes the present working directory(that’s right what pwd returns). But the difference is that while pwd is like a function that returns the present working directory, ‘.’ is an alias can be used to refer to the present working directory in expressions. I’ll clear this soon once we deal with “ls” command.
2. “..”(2 fullstops): This is an alias that’s used to refer to the parent of the present working directory.
3. ‘~’: This is used to refer to the home directory(/home/ for ). That is why you see a ‘~’ when you start the shell; the present working directory is /home/ denoted in shell as ‘~’.
And the curtains fall on FOSS.IN(from NIMHANS Convention Centre, Bangalore)…
So the curtain falls on the 2009 edition of FOSS.IN. It’s been a 5 day journey that I thought might not make.
It’s been boring here. Sure I feel as if now I know I’m an even smaller speck in the FOSS world; that too only in the national level. But well, the speck never grew up. I’m still the same. I made no progress: ILUG-C refuses to answer my question(wonder why). And so no progress in the sudo bug fixing. Perhaps I should just start reading the code and find out where the bug is and just fix it rather than finding out how sudo works. But, I’m sure some system library calls outside the sudo source will play a central role and should know which is that(based on what Zubin said).
But, the more important thing is the precise feeling that I knew I’ll feel when here: lonely and bored. It’s materialised. It’s been boring here: go to foss.in, go hang out somewhere later in the day and then return back. Perhaps it’s cos I’ve seen most of Bangalore and the presence of friends makes no difference: museum, Lal Bagh, Forum and so on. Or perhaps it’s because of the monotonous routine that I had I don’t know. But, as I sit here in auditorium 1 of the centre, I feel that it’s been a waste coming here except that I got a nudge in a different direction.
It’s been a great experience to know the fact that I can go a long way in open source and it requires hard work. Hopefully I’ll focus a bit more and work faster while having fun on the way. Yes it’s true that I do this except that it’s more focussed on the latter than the former. I wish I’d focus a bit more and progress.
Next up is the SciPy conference in Trivandrum December 12 and 13. Hopefully I’ll learn python properly perhaps in the conference and it won’t be wasted like foss.in. Perhaps I’ll split stay a day more and check out trivandrum perhaps. Will have to wait and see.
Live in the command line
Well I’ve been thinking about this for a long time “Won’t it be cool to write on the various linux commands that I know? Won’t it be useful for some newbie who wants to learn more on this? Plus terminal is something I like a lot. So why not?”
So, in adherence to this thought, here is a new section in my blog “Live in the command line” – all about Linux commands which will eliminate the need for the GUI(hopefully)! Of course this will need you to remember a whole host of commands and the various options that come with each. And most of all, you’ll need to get used to the “only-keyboard” console – that’s right no mousey mousey.
So, for starters, I suggest you make the terminal look better so that you feel at home. Mine looks something like this

This setup of nice comfortable colours (and the background yes, the famous linux security distro) is just what I need to make sure that my eyes don’t get strained by the long hours spent in front of the terminal(which by default has black font and white background – not at all eye-friendly).
So, go ahead and experiment with colours and find out what is it that suits your eyes and causes less strain to it.
I welcome you to “Live In The Command Line” and hope you’ll enjoy it as much as I do writing it.
Connecting to DSL Internet and LAN at same time in Ubuntu
So, I was stunned by the fact that you cannot connect to LAN and internet at the same time in Ubuntu(a feature that’s default in windoze). So, I used to find it irritating when I wanted to transfer my files to my laptop, while surfing the internet. Of course, that was a long time ago and I was new to Ubuntu(read knew nothing about it) and had installed 9.04 for first time.
Today I came back from hostel. Yaay I was excited 24×7 unrestricted internet – proxy let me download no more that 6MB(really pissing). And I was in for a real shock: DSL not working in Ubuntu!!! NO!!!!!!!!!!!!!!!!
Of course, when in doubt, call the experts. So, I called up Mr. Avinash Joshi and asked him if he knew about this. To my surprise, he said it worked fine for him!! I was like “Ok. What the hell is wrong with mine then?”
So, I boot up windoze on my desktop(yeah I did go to sleep waiting for it to boot) and start surfing the net for info. I find out that the entire world, except a select lucky few like Avinash, had problems connecting to DSL from Karmic. Someone was right, Ubuntu manages to run few stuff well in a version and break in the next: Intrepid to Jaunty sound was out, Jaunty to Karmic DSL doesn’t work.
But, then all hope was not lost. Some guy reminded me again of pppoeconf and then here I am again on the net in ubuntu. It seems DSL doesn’t work with Network Manager.
To configure DSL in ubuntu without using Network Manager, run the following command in the terminal
sudo pppoeconf
It’ll ask you for a whole bunch of details. Just make sure all network interfaces are detected by it and you give in the correct authentication details. You are now connected to the internet without Network Manager.
But how do you connect to LAN? Simple. Just connect to a LAN connection. If it’s DHCP, run
sudo dhclient
else just assign an IP Address using ifconfig in case of ad-hoc networks.
Now, you are connected to LAN and internet at the same time. No need for network manager at all. Neat eh?
After connecting to LAN, just put a route entry or set iptables to route the input from ethernet interface to ppp interface and guess the internet should be shared. Thus I think internet sharing should also be possible; have not tried it yet.
The all new “Karmic” experience: it’s just a result of “Karma”.
Well, the new version of Ubuntu, christenend “Karmic Koala” was released on Oct 29. I’d been eagerly waiting for this version since I was pretty disappointed with the earlier version 9.04 codenamed “Jaunty Jackalope”.
Of course, the end semester exams are approaching and so I decided to focus on them in order to boost my GPA and hence my chances in getting a good college for higher education (if it’s possible; maybe later it’s another long story). And so I decided to study throughout the weekend and stay away from the laptop except in the night for some counterstrike gaming. But fate had something else in store that would put me focussed only on installing Karmic throughout the weekend.
Read more »
Customising your ubuntu screensaver
Sure Ubuntu and other FOSS softwares do talk about contributing to open source. But how many of us can actually do something with the box in front of us?
Many at my college actually are too lazy to customize the looks, add applications or themes or looks to their ubuntu. So they just install a customized version of ubuntu and there we go they have got everything they need. I don’t do that: i get a basic install and install everything as and when necessary. That’s why I don’t have a fancy laptop with super slick and super cool looks thanks to my virtue of laziness and the philosophy of trying to do things myself.
So, I was searching for Ubuntu screensavers and didn’t manage to find any(one site gave me windows screensavers saying they were for ubuntu; Ha! I’m not that dumb). So i find this interesting site that tells me how to customize my screensaver and I say why not give this a shot and I do so. Few moments later, I’m sitting in front of a screen with my picture floating around the screen.
Here’s what to do.
STEP 1:
Open a command line terminal(yes no other GUI altrenative; you need to use the CLI)
STEP 2:
Type in the command “cd /usr/share/applications/screensavers” without the quotes.
STEP 3:
Copy the ubuntu_theme.desktop to any file of desired name say me.desktop.
cp ubuntu_theme.desktop me.desktop
STEP 4:
Open the file me.desktop using your favourite text editor as root user.
I used gedit to edit the file.
gksudo gedit me.desktop
STEP 5:
Change the name(i used the name “me”), comment as required and change the line
Exec=floaters /usr/share/pixmaps/ubuntu-screensaver.svg
to Exec=floaters <path>
where <path> is the path of the file you want to display.
STEP 6:
Go to System -> Preferences -> Screensavers and in the list search for entry in the list with name “me”. Once you select it, you’ll see your screensaver just like what the floating ubuntu was except the picture that’s floating is what you specified and not ubuntu logo!!! There you go; you’ve created your own screensaver for ubuntu!! And to share this, just give everyone the .desktop file and the photo to the correct path.(Maybe you could create an archive with the image, the .desktop file and script to copy the image and .desktop file to the correct location adn there’s you go, you’ve even automated it!! The possibilities are endless!!!)
Have fun creating your own screensaver for ubuntu!!!
A two weeks at home that went by like a Shinkansen
Shinkansen(http://en.wikipedia.org/wiki/Shinkansen) is the train that holds the world speed record of 581kph. Literally, that’s how fast the past two weeks have sped by.
I reached home quite by surprise actually: no one expected the college to close this all of a sudden a week early. And then came the rumours of swine flu, H1N1. And, after that, as usual, people started wondering if college is really opening on 7th or not(quite a lot of people asked me about this; sorry to burst you bubble
).
A rocking two weeks that saw a flurry of activity online for me(I was so long in front of the computer and rarely did anything else that mom started saying “You go back to college this instant. Then at least you’ll talk somewhat to me
), including the ubuntu developer week(I scarcely understood what they were talking about; where they talking english I wondered throughout
; but made some sense thanks to my common sense I’d say), GCJ, those chat room jaunts(that often results in me IMing a bot
) and mainly the tweeting (man it is so addictive! Initially, I used to tweet like IM but now I IM like tweet!).
But, now all that has come to an end and I must pursue with new hope(seems CS engineers have best chances of getting a job post-recession: http://www.infoworld.com/d/networking/career-advice-high-tech-healthcare-best-choices-college-students-013) and i must head back to college and listen to the interesting stuff made to sound like useless drivel.
I’m really going to miss home. Perhaps it’s due to my complacency I don’t know: I don’t like change I guess. But that has to change(kind of ironic don’t you think? But well it is the right thing: I have to change:) ).
This two weeks has been the best time of my life so far I’d say. Learning PHP was so much fun, I’d like to get back to it soon. But, Varrun and Zubin are correct: I need grade points and I need to improve on algorithm too. Will now try to focus on these.
These two weeks has impacted me well and changed me a lot I believe. For the better or worse, I’m yet to see.
Ciao. Catch ya sometime I come to blog. Else, follow me on twitter; but no updates will occur when I’m at college
. Take care and have fun.
Finally a non-CS from my year checks out ubuntu
Today, I saw that one of my friends, Vineeth Mohan(http://bujrox.wordpress.com), of Electronics And Communication Engineering, in my year, went ahead and did something: checking out Ubuntu(http://bujirox.wordpress.com/2009/09/01/ubuntulinuxvlc/).
This is an encouraging thing I must say. Most people are of the opinion that Ubuntu (or Linux in general) is meant only for computer science and information technology students. Hello?! If that’s so, I say stop using computers at home, stay away from the labs, the cafe in the campus and from any place that has anything even remotely connected to computer(that of course includes mobiles with internet in them since internet was originally available on computers)
I’m happy(no exalted) that he did so. He even went straight to the command line and started installing applications(hell even I don’t do that; that’s way cool Vineeth). People have no problem using Windows at home. But, when asked about it, they say, “Oh! It’s just to play games, surf the net, chat etc”. Hello?! You can surf the net in ubuntu too?! Plus it’s more secure(compared to Windows; thank to unix’s superuser concept). And chatting, well what’s pidgin for then hmm?? It even let’s you IM multiple friends (Yahoo, GTalk, MSN and 15 other protocols) all from within the same window. Plus you can have multiple accounts at the same time like 2 Gtalk or 3 Yahoo! accounts at the same time.
Oh don’t get me started on games. There are 17 games installed by default in Ubuntu(all with a superb AI I must say; not like windows where the computer lets you win sometimes. Try playing GNU chess: not your average chess app. I lose sorely in this. I’m not a good player I agree. Still, I don’t lose this bad! If that’s not enough, there are Linux versions of Windows I believe. Also, any game on Windows can be played on Ubuntu thanks to Play On Linux I believe. Have not tried out: don’t have any high end games to test it out with.
So, with so much in, and that too for free, wont you feel ashamed when asked “Have you tried Ubuntu?” and you say know? I agree you cant try Mac: you have to be filthy rich for that. Windows every Tom, Dick and Harry would’ve tried out and know. You don’t have to pay for Ubuntu. How come you haven’t even tried it out huh? But, hey it’s never too late.
-
Archives
- December 2009 (4)
- November 2009 (3)
- October 2009 (1)
- September 2009 (2)
- August 2009 (10)
- July 2009 (2)
- June 2009 (18)
- May 2009 (29)
- April 2009 (9)
-
Categories
-
RSS
Entries RSS
Comments RSS
