Archive

Posts Tagged ‘GNU’

Why I started loving Archlinux

We like simplicity. We like everything new.

It’s been some years since I switched completely to GNU/Linux. I always wondered at its stability, security, features, community and at the people who use it. GNU/Linux helped me to have exciting computing experience all the time filled with wonders and fun. I forgot about the existence of Antivirus software. Forgot the time I feared autorun.inf and weird executable files. Forgot BSOD and EULA. Now, everything is open. Met many new people, similar interests bonded us. People who use GNU/Linux have always been very helpful. They share knowledge instead of pirated software. They teach us to fish. A kind of special relationship rooted between us, in a world connected by computer networks and its underlying complex abstractions. At this moment, I would like to thank everyone who made lives of people like me colourful.

I had been using Debian Squeeze for a while and was happy with that. Had its complete repo offline which helped me to install any package in spite of the very slow internet connection I had then. Though the things went smooth, I faced some issues during that time with the compilation of new software from source. Fixing dependency issues were pain. The new source of package requires new version of dependencies which were not available in repo. Compiling them from source always created new pains. Updating software/repo was not possible because of the slow speed of internet. Taking laptop to college and updating from there also didn’t work due to various technical and non-technical reasons. I felt like I was completely forbidden from trying new versions of software. I was in a kind of lock then. Suddenly, one fine day, I got a broadband internet connection!

I don’t have words to express how much happiness I felt. Now the scenario has completely changed. I can now change the Debian repo to testing or sid, try new packages, configure backports or update what ever I want. But, I thought it was time for a change. Changes are the spices of life, indeed.

I wanted to install another distro from the mainstream. First, I thought of Fedora 15 which is a very good OS and hacks by Rajeeshettan in it always inspired me. Also I had used Fedora 14 for several months. But in Fedora too, I missed an element of simplicity and playfulness. The point with these type of operating system is that it comes with all basic packages preconfigured and giving us less opportunities to play with those.

Next choice was obviously Archlinux. I have been hearing about it since I met my another GNU/Linux guru – Ashikettan. He blogs about Arch much and talks about it often. Also, I had tried it once months before when I had speedy internet connection. The best thing about Archlinx is that it is a rolling distro, and new packages are always readily available!

To install, I got the 64bit iso image from Arch website and made thumb bootable with abock. The installation went smooth and had a nice time configuring various things along with my favourite desktop environment – KDE. I was not really able to use KDE since the version in Debian Squeeze was a bit buggy and it crashed often. I was using Gnome 2.x then. Now, I’m really happy with KDE 4.7.0 with a distro which can be updated easily using its sweet package manager – pacman. Arch also has a wonderful knowledge base – The ArchWiki. ArchWiki has many tutorials to play with for beginners and for expert users.

To talk about packages in Archlinux, I don’t have words! I remember trying to install new version of Ipython in debian which comes with a new tool called qtconsole. Qtconsole can show the outputs of matplotlib embedded inside the window instead of showing as a pop-up. It was a bit pain fixing various python modules that depended upon on other packages in debian. But in Archlinux, a simple ‘pacman -S ipython’ after a system upgrade with ‘pacman -Syu’ solved the issue. (Please note that though ‘pacman -Sy ipython’ alone installs new version of Ipython, it may lead to dependency issues sometimes. Always install with ‘-S’ and have an system upgrade with ‘-Syu’ often). Upgrading the system obviously updates kernel, now Arch has kernel 3.0 in repo!

Please do not have a feeling that I’m saying other distro/package managers are bad or less useful than Arch/pacman, I was simply having a comparison under special conditions – Indeed, every GNU/Linux thing is great and well developed!

Another great feature I found in Archlinux is the rc.conf file. We can easily configure various system wide things in /etc/rc.conf file, like which all kernel modules to load, which all daemons to run at start, hostname, timezone, network interfaces, gateways and so on. There’s also an application called ‘rc.d’ which is similar to ‘service’ in debian/ubuntu using which we can start various services like sshd, etc. Also, the support in IRC channel (#archlinux @ irc.freenode.net) and in Arch forums are very helpful.

Finally, as a student, I find Archlinux very useful and informative, Also it’s so much of fun using it. I humbly recommend this sweet GNU/Linux distro to everyone who likes to add more spice to their GNU/Linux computing. I just started with Archlinux and hope I could post more about it in future. Thank you so much for reading. Greetings!

Advertisements

How to download .deb packages for offline installation

Some of my friends always complain that they are not able download packages due to Internet availability issues or usage limit. Most of them are using different Ubuntu versions, hence I cannot use APTonCD to download the packages for them. Here’s a small solution for this, Thanks to ilug-tvm and Rajeesh ettan.

Step 1: Get the download URLs in a file :

Execute the following command replacing package-names with required ones, separating by a space.

$apt-get -y install --print-uris package-name | cut -d\' -f2 | grep http:// > apturls

Step 2: Copy this file (apturls) to a machine which has high-speed Internet access, and execute the following command to download the packages:

$wget -i path-to-apturls-file

Step 3: Now get those downloaded packages to your machine, and install them using :

$cd path-to-the-downloaded-packages-directory

$sudo dpkg -i *.deb

Done!

Thank you, Good Luck 🙂

Salt Analysis Simulator V1.0 – Released!

January 16, 2010 7 comments

For the past few weeks, I have been coding to bring out a program to do salt analysis lab work virtually. We have salt Analysis as a part of plus two academics and it is a process of finding the anion and cation which the salt contain through a systematic procedure. We add many reagents / acids throughout the labwork and analyse the result to identify the anion and cation. I hope this program would help students to practice salt analysis at their home and would feel confident!

The program is completely written in C++ and is intended to work on M$ DO$ platform, becuase more students are using M$ Platform including Biology-science group students. Another techincal reason is that, I have used clrscr(), gotoxy() and getchar() many times which is a troublesome work to implement in ANSI standard.

The program works based on a new algorithm which I name it as “IntMatchReact” since the reaction process is done through a matching of integer values. While developing this software, I had a notion to implement anti-piracy for fun which was left on the way. The software is licensed under GPL and I would like you to go through the code and help in improving.

Please post your valuable comments and improvement tips. Thank you 🙂

Get SAS V1.0 (here)

Bug: i forgot to add exit function for ‘e’ key stroke, have exams now – will upload SAS with minor corrections soon 🙂

Categories: C++ Tags: , , , ,

C++ Program to tweet

September 20, 2009 16 comments

It’s very interesting to play with C++ and if it is in GNU/Linux, lots of tools like ‘wget’, ‘grep’,etc. are there to help us in time. Here is a simple C++ snippet which tweets directly to your time line. Feel free to add more features and would be great if you could share it with me too 🙂

/*
 *      shell-tweet.cpp
 *
 *      Copyright 2009 Ershad K  ershad92@gmail.com
 *      Licensed under GPL Version 3
 *
 *      Please change USERNAME, PASSWORD and compile with g++
 *      To compile - g++ shell-tweet.cpp
 *      To execute - ./a.out
 */

#include <iostream>
#include <string.h>
#include <stdlib.h>

using namespace std;

int main()
{
char name[] = “username”, password[] = “password”, status[500], cmd[500];

char sym[] = {char(34),”};

again: cout << “\n Status: “;
fgets (status,140,stdin);

cout << “\n Length = ” << strlen(status);

if (strlen(status) > 139)
{
cout << ” Exceeds 140 character limit, Type again \n”;
goto again;
}
else
{

strcpy(cmd,”wget -nv –keep-session-cookies –http-user=”);

strcat(cmd,name);
strcat(cmd,” –http-password=”);
strcat(cmd,password);
strcat(cmd,” –post-data=”);
strcat(cmd,sym);
strcat(cmd,”status=”);
strcat(cmd,status);
strcat(cmd,sym);
strcat(cmd,” http://twitter.com:80/statuses/update.xml&#8221;);

system(cmd);

cout << “\n Done”;
}
return 0;
}

Easy Clarity – Connect Easily!

September 5, 2009 2 comments

‘Disconnection’ is a routine process in dial up internet. Here is an C++ snippet which dials BSNL WLL Clarity without asking for password again and again. It automatically closes on disconnection with a beep sound.

/*
 *      easyclarity.cpp
 *
 *      Copyright 2009 Ershad K  ershad92@gmail.com
 *      Licensed under GPL Version 3
 *
 *      Please change USERNAME, PASSWORD and compile with g++
 *      To compile - g++ easyclarity.cpp
 *      To execute - ./a.out
 */

#include <iostream>
#include <stdlib.h>
#include <stdio.h>

using namespace std;

int main ()
{
	char username[] = "USERNAME";
	char password[] = "PASSWORD";
	puts("\n EasyClarity - Connect wisely!  www.ershadk.wordpress.com\n\n");
	ofstream myfile;
	system("sudo wvdialconf");
	myfile.open ("/etc/widial.conf");
        myfile << "[Dialer Defaults]\nInit1 = ATZ\nInit2 = ATQ0 V1 E1 S0=0 "
               << "&C1 &D2 +FCLASS=0\nInit3 = at+crm=1;+cmux=1;+cps=33;+cta=0"
               << "\nModem Type = Analog Modem\nISDN = 0\nPhone = #777\nModem"
               << " = /dev/ttyUSB0\nUsername = "<<username<<"\nPassword = "
               <<password<<"\nBaud = 460800\nStupid Mode = 1\nAuto DNS\nCheck"
                <<" Def Route";
	myfile.close();
	system("sudo wvdial");
	cout << "\a";
	return 0;
}

Setting up Malayalam and installing swanalekha in sabayon 4

Though the Sabayon 4 DVD release comes with SCIM , it’s not possible read Malayalam or write using swanalekha by the usual methods. Let’s see how to do it.

Type in terminal:

$sudo bash

#wget http://ershad.freehostia.com/download/AnjaliOldLipi.ttf

#cp AnjaliOldLipi.ttf /user/share/fonts/

Now you can read Malayalam :), To type using swanalekha, do the following :

#wget http://ershad.freehostia.com/download/install-swanalekha.tar.gz

#tar -xvf install-swanalekha.tar.gz

It’s done, Right click the text box, select “SCIM input method” and start typing !!

Select SCIM from right click menu

Unfortunately this is not working in firefox. Please inform me if there is any mistake or bug. Thanks to SMC 🙂

Categories: Uncategorized Tags: , , ,