user-avatar
Today is Tuesday
April 30, 2024

Category: tech

September 15, 2010

Keyboard layout changed when connecting through vnc

by viggy — Categories: debian — Tags: , , Leave a comment

I have a desktop in which I have installed Debain. I connected to it using vnc from my laptop and was typing some command when I observed that the complete Keyboard layout had changed to some unknown keyboard layout. I tried re-installing but the problem still existed. So when I googled it, I found this bug report which was luckily resolved and the solution was also shared in it.
Hence all I had to do to solve the problem was to add the following line in $HOME/.vnc/xstartup before the last line /etc/X11/Xsession
'export XKL_XMODMAP_DISABLE=1' x

September 11, 2010

September 8, 2010

To enable Broadcomm wireless driver in Ubuntu 9.10

by viggy — Categories: schoolos, ubuntu — Tags: , , 1 Comment

I was trying SchoolOS on my laptop which is a derivative of Ubuntu 9.10. However my first problem with it was that my wireless driver was not working. I had known from my previous experience that I would have to probably install b43-fwcutter to get it working. However when I tried to install it, I found out that it was already installed. I still removed the package and installed again but still it did not help. So I googled for any help. I found a forum post where in I was suggested to try the packages given in http://www.broadcom.com/support/802.11/linux_sta.php . I downloaded the 32 bit package and followed the Readme.txt given along with the package. Within 2 minutes my network driver detected the wireless device and I was able to surf using my wireless connection.

September 3, 2010

Enter your linux system in single command line mode without knowing the root passwd

by viggy — Categories: linux — Tags: , , , , Leave a comment

So you press ESC before the system boots up, to intercept it, and then you have to “edit the kernel parameters” in that menu there —
* Find the line that looks like:
kernel /boot/vmlinuz-2.6.10-5-386 root=/dev/hda2 ro quiet splash
change it to
kernel /boot/vmlinuz-2.6.10-5-386 root=/dev/hda2 ro quiet splash rw init=/bin/bash
when you set init=/bin/bash, you should get a PURE COMMAND LINE prompt and your fstab should be bypassed completely.
SO THEN, once you get there, your whole disk will be read only, so you have to do:
mount -o remount,rw /
This will give you read/write permission on root.
Now you can do whatever you want, like changing your root passwd.

Found this here when I was trying to find a solution for one of my friend.

August 6, 2010

July 4, 2010

Shell script to search for a type of file in a directory recursively and copy it in a destination

by viggy — Categories: shell — Tags: , , Leave a comment

I had used wget and downloaded all the java videos from the java tutorial site( and also all the other files on the website). There were around 20 of them. The problem was that the lectures were each present in a separate folder and I had to traverse to each of them to watch them. So I thought of writing a script which would search the main directory recursively for the lectures and then copy it in a specific folder. Luckily in my case each of the lecture were named differently and hence I didnt have to rename them and there were no issues of file name getting clashed. Below is my shell program:

#!/bin/sh

list=$`find . -type f | grep ".mp4"`
cp $list ./lectures

This would search all the files which had .mp4 in their name and copy them into the folder lectures.

June 24, 2010

GPG key error while doing apt-get update

by viggy — Categories: ubuntu — Tags: , , , 2 Comments

I had entered a new repository path in my sources.list file and hence I did

sudo apt-get update

However I got the following error:

W: GPG error: http://hudson.gotdns.com binary/ Release: The following signatures couldn’t be verified because the public key is not available: NO_PUBKEY 9B7D32F2D50582E6
W: GPG error: http://ppa.launchpad.net lucid Release: The following signatures couldn’t be verified because the public key is not available: NO_PUBKEY 10975893E549B1AC

When I looked for a solution on internet, I found the following solution to add the gpg key in my system.

NOTE: This can only be done by a root user, hence in Ubuntu, u will have to do sudo su before executing these commands.

root@vignesh-laptop:gpg --keyserver pgpkeys.mit.edu --recv-key 9B7D32F2D50582E6
gpg: requesting key E549B1AC from hkp server pgpkeys.mit.edu
gpg: key E549B1AC: public key "Launchpad yorba" imported
gpg: Total number processed: 1
gpg: imported: 1 (RSA: 1)

This will request key from the server mentioned in –keyserver and display whose public key it is.

After this execute the following command. This will store the the gpg key in your system as a trusted gpg.

root@vignesh-laptop:/home/vignesh# gpg --armor --export 10975893E549B1AC | apt-key add -
OK

Now do
sudo apt-get update
to successfully update from the newly added repositories.

June 17, 2010

recording feature of vim

by viggy — Categories: linux, tech, ubuntu — Tags: , 2 Comments

Good article on recording feature of vim can be found in the link given below.

http://www.thegeekstuff.com/2009/01/vi-and-vim-macro-tutorial-how-to-record-and-play/

May 21, 2010

how to configure proxy for apt-get?

by viggy — Categories: linux, tech, ubuntu — Tags: , , , , , Leave a comment

To configure proxy settings for apt-get or aptitude or synaptic manager, all you have to do is edit the file, /etc/apt/apt.conf .

Here you have to mention the following 3 lines::

vignesh@vignesh-laptop:~$ cat /etc/apt/apt.conf
Acquire::http::proxy “http://username:password@host:port”;
Acquire::ftp::proxy “ftp://username:password@host:port”;
Acquire::https::proxy “https://username:password@host:port”;

Once you have made the above changes in /etc/apt/apt.conf , you will be able to use apt-get, aptitude or your synaptic manager through the proxy.

April 14, 2010

FOSS for budding developers workshop

by viggy — Categories: linux, tech — Tags: , , , , , 1 Comment

Last weekend, CMRIT GLUG along with IBM and FSMK conducted a 2 day workshop, “FOSS for Budding Developers”. This workshop was completely technical in nature and among the many FOSS workshops that I have attended, one of the most useful one for me. The professionalism of IBMers could be seen during the workshop which was also the main reason for the huge success of this workshop.

The workshop covered the following topics,
Day 1

  • Linux Kernel Developement
  • Eclipse IDE and how to develop plugins in it
  • Day 2

  • Linux Test Project
  • Apache web server and developing applications in it.
  • OpenPegasus
  • I was interested in Linux Kernel Developement and the Linux Test Project sessions. I had taken my laptop to make the best use of the workshop.

    I have been using GNU/Linux since last 2 years, but never did I get the courage to compile and build the Linux kernel. Only around 6 months back, I had for the first time with help of Naresh, installed the new linux kernel on my system using apt-get. The main reason for not trying out building my own linux kernel was that I was afraid that I would loose all the data I had in my system. However for the workshop I had decided that I will try it out. So when the Linux Kernel session started, I was very excited.
    In the pre-lunch session, we were introduced to various tools that any Hacker would require while trying to read the source code or build from source code. We were introduced to gcc, gdb, make, makefiles, strace,ltrace and cscope tools. Though I knew little about gcc and gdb, I realized the importance of the other tools. I particularly was marveled by “cscope” and “strace”. Optimized use of cscope will surely decrease the time taken to go through the source code for any developer. I remember it had taken me around 2 months just to go through the Evolution source code. If I had used cscope then, it would hardly take me 2-3 days for the same. We were given a very brief introduction to cscope during the session, but I will learn more about it myself and write about it in the near future.
    The pre-lunch session thus prepared the ground for us to venture in to building the linux kernel.

    Post-lunch we started with Building the Linux Kernel 2.6.33.2 version. I was amazed by the simplicity involved in building the kernel. It is just a 7 step procedure, if you are building the kernel for your own desktop or laptop.

    It took around half an hour to execute. After this I just need to update my grub if it has not been done by the above steps already. Just confirm it by having a look at /boot/grub/grub.cfg. If the new kernel lines are added then you are ready to Reboot and use the new kernel which was just built.
    Thats all.

    After booting into the new kernel, we started writing simple codes for new kernel modules and drivers. Again the simplicity of writing a new module or driver and loading it amazed me. However a lot more has to be explored and I will definitely try them in future.

    On day 2, I attended the Linux Testing Project workshop. It was again wonderfully planned by the IBM team. We were first given a brief introduction to the history and importance of the Linux Testing Project with the team making it very clear that the testing cycle is as important as the development cycle. After this we had a hands on session.

    In the hands on session, we started with building the Linux Testing Project in our systems. Than the IBM team had come with some tasks for us. We were asked to run a test case which was written such that it fails intentionally. This was done so that we could study the test case and come up with a solution as to why that particular test case was failing. I had teamed up with Saket and together we were very close to finding the solution. It was quite fun and really a good Hacker workshop.

    There were many interesting points that we noted while trying the Linux Testing Project. One among them was, I was using Linux Kernel 2.6.31.x where as Saket was using Linux Kernel 2.6.33.2. So when we executed the Containers Testcases on our systems we found that some test passed successfully in my system but failed in Saket’s system. This clearly showed us that Linux Kernel 2.6.33.2 had some bugs. We did not dig into the matter due to lack of time. However I need to check it soon.
    I have skipped lot of technical details here as I will give the technical details later when I try it again myself.