tag:blogger.com,1999:blog-58319215263577065142024-02-08T08:09:11.319-08:00My Tech BlogHelpful Technical Tips.Vksalianhttp://www.blogger.com/profile/02829888974539621549noreply@blogger.comBlogger35125tag:blogger.com,1999:blog-5831921526357706514.post-41422563357911021992015-10-27T05:31:00.001-07:002015-10-27T05:31:12.847-07:00Alternate Site to this is www.vksalian.com<div dir="ltr" style="text-align: left;" trbidi="on">
HI ALL,<br />
<br />
I have moved to www.vksalian.com<br />
<br />
<a href="http://aax-eu.amazon-adsystem.com/x/c/QUzhF1dXPGfeqgptLqiWRKYAAAFQqUBHLAMAAAAAAhPT0g/http://aax-eu.amazon-adsystem.com/dae/c?i=1$AgAAAAAAAAAEAAAAAAAAAAMAAAAA2TZhzHpFm74v3-yM4brIlKRV3d0FzEy-4oa-9MMCIOJ9n-NBXDD.PvATZ-9qyHRRa66yq7fwzUKYTpTrFLCaQXjIO.cWkD7AidRpWuu0kRzD6t9GtMBMOym4tee0KbsQ1O0J3J7M7GvEwv4yOrO19ncG2D5cRj9Aa4UZoOi7EDtKiL7pbxWxO71kvMnnrtg-bsLV72lOolyv466QZ3KHECeYDkoo5O9dBJ9fQ7uuGeeEv7nta1l1ZfD0Hhb0HDigMR8cRF6fd6EJ7CQi8HNgNr3MJLaP7brb.-53xnAOssyuzkovwpgc1xSvjER06HC9grVDfA.bc9XM27Qe1JZoaBBFiogl5gFTYjw8IPgQ-dZcECugDSbVpg3ON-NVTMQl4FScSUuz0.A61hmWZEwd5IOnoS4VuCH2Bil2pgqTvKOUDuKYfr5tX2QY499zhozsEiUXXd95zt18RQeEH8e9FBXr1CDvVkJ6jIyydVCQHJvSs-0kaeFCiS41-aR4QbTccwM7ajoyrMIGzCKNQmY2AcmE2xT10gejed09mJpf5uc22NL6EYuyuNmw-faufnlMkjL-1B1PfLn2Uf9UHzk4otUfVwXcZ4ZhDqPteWVDr00Fu7TfJ3dIF48SE5SjdCK4b8aiAM8TAkFxb3ZuoDWyzeRBjXnJA-HG2jy4nifl-djWyCh5Bb1Vr4YwRZT4k3ns20BbxyvF8KOeWCi9wsTf3dZkpWZsoZaKlnUMhtHDgSoPpW9HTfz9tnGFcYFBvCBs3vGCbA-xlyE-.4T1X5sjggJUfp7kftDs-jSTnRtCrfIBv2XLrUm7L7QAxrdmXzn5xzFiRZ2cA1R9Ja8-TAG1j55z7yAhgf1xoq27V6Z4Dw2vQmMOyMVtsauNE47h28i.ZsOgN43K6Vz.ThXt6QE1veR4r.y2ZYFGEy7fiJqID6N1zHqJgHmjwPAC9HfLUgsQ6Spd0ma3Rj50dDPPjR2FkNuzr09IzIqSfC9ceysI5JNCEYWSs67tskADcA95rYZ-fUvUX-LPadgwAVGMUewMErX8kkC-LrtZ-3TLeYQoNYjUQ9Zvvu4mwrmTcpFlnlT1Oqhw8Iuy4hLo1lLCU.zHIObfU-jCQCNy0nBz3UCmIw-.eVayuV6N6Vky7DZjtV9XRAJvkL4IlnDtvDgXfItKiRnGtm4jm0XLBlirKT8vywG1gu6QAnZobn-hwPZyIN.SgzUQAG1sbC5Px.ORziPzhHqSh.O66zl2jzWUNV79vhjRAauVZTr.uuiefgHWZz8uAxo1cHranrXIL8ZYIiIapxDU5v6vVC0KS1Y2GXRiMTSXZZDY6muk6FRAuHA260Jxj1GMUkrcUO5wUCSAUGCp4.XFQ--8Wfc0rNGxil9W-D4PfzYLU2082fI.CrdE0Ov9rYy-mG22Y8FBZtykqblHjHsBPM2XxS.U84XkHTIsxTxzqQo4ElNQGiJx6nR2XCxt.NurcnR0XErAEet3qA0o4a3xhRcFcdxORxVjY03dGP5.paxCxywI3g0H53ER9NBcTrP5QqzXm.ZZBc4IB-KNfgKJDpKn-noqFrNGIt.pEVFf098O">AMAZON OFFERS</a>
</div>
Vksalianhttp://www.blogger.com/profile/02829888974539621549noreply@blogger.com0tag:blogger.com,1999:blog-5831921526357706514.post-10927762618739691902013-08-26T11:39:00.002-07:002013-08-26T11:56:36.738-07:00ALTERNATE SITE FOR THIS BLOG<div dir="ltr" style="text-align: left;" trbidi="on">
ALL,<br />
<br />
<br />
YOU MAY FOLLOW THIS BLOG ON ALTERNATE SITE AT<br />
<br />
www.vksalian.com/blog<br />
<br />
<br />
--<br />
THANKS,<br />
ADMIN</div>
Vksalianhttp://www.blogger.com/profile/02829888974539621549noreply@blogger.com0tag:blogger.com,1999:blog-5831921526357706514.post-56837392307342121512012-06-14T23:46:00.001-07:002012-06-14T23:46:22.522-07:00EXTRACT Contents of winmail.dat file under UBUNTU.<div dir="ltr" style="text-align: left;" trbidi="on">
Have you got any mail with an attachment file "winmail.dat" containing useful information and you could not open it ?<br />
<br />
Then here is a simple solution to extract the contents.<br />
<br />
1. Install tnef command-line program using command below,<br /><br /><b>sudo apt-get install tnef.</b><br /><br />2. Create a small script "tnef.sh" and save to your "Desktop" folder.<br /><br />Contents :<br /><br /><b>#!/bin/bash<br /><br />LOCATION=~/Desktop/winmail<br /><br />mkdir $LOCATION<br />/usr/bin/tnef -C $LOCATION --save-body -f $1</b><br /><br />3. Change the permission of file "tnef.sh" as, (type in terminal and press enter)<br /><br /><b>chmod +x tnef.sh</b><br /><br />4. Go to thunderbird and click on winmail.dat attachment and,<br />select open with... <br />-----> Browse..... tnef.sh -----> Click "OK".<br /><br />5.This will create a folder "winmail" in your desktop which contains,<br /><br /> a) Mail Body as .rtf format.<br /> b) Attachments.<br /></div>Vksalianhttp://www.blogger.com/profile/02829888974539621549noreply@blogger.com0tag:blogger.com,1999:blog-5831921526357706514.post-43768109920026963532011-12-25T23:39:00.000-08:002011-12-25T23:39:07.966-08:00Create ISO files and mount ISO files a folder.<div dir="ltr" style="text-align: left;" trbidi="on">In Linux (Ubuntu) it is possible to convert a contents of a folder into an "iso" file just using the command given below.<br />
<br />
<code>mkisofs -o /home/linuxlookup/example.iso /source/directory/</code><br />
<br />
Similarly, you can mount an "iso" image as a folder using the coomand below.<br />
<code> </code><br />
<code># mount -o loop disk1.iso /mnt/</code><br />
<br />
Similarly, to mount an "iso" as a drive use the below command,<br />
<code> </code><br />
<code>sudo mount /home/vijays/redhat_4.8.iso /mnt/ -t iso9660 -o loop</code></div>Vksalianhttp://www.blogger.com/profile/02829888974539621549noreply@blogger.com0tag:blogger.com,1999:blog-5831921526357706514.post-73726869452624455642011-11-28T06:05:00.000-08:002011-11-28T06:05:40.153-08:00How to compile a kernel from kernel.org in Ubuntu 10.04 LTS.<div dir="ltr" style="text-align: left;" trbidi="on"><h3 class="post-title entry-title"></h3><div class="post-header"> </div>This quick how-to is based on <a href="http://linuxtweaking.blogspot.com/2010/05/how-to-compile-kernel-on-ubuntu-1004.html">http://linuxtweaking.blogspot.com/2010/05/how-to-compile-kernel-on-ubuntu-1004.html</a><br />
<br />
Open a terminal and work through the following set of <span style="font-family: "Courier New",Courier,monospace;">commands</span>.<br />
<br />
<b>Install these packages</b><br />
<br />
<blockquote style="font-family: "Courier New",Courier,monospace;">sudo apt-get install fakeroot kernel-wedge build-essential makedumpfile kernel-package libncurses5 libncurses5-dev</blockquote><br />
<b>Run this</b><br />
<br />
<blockquote style="font-family: "Courier New",Courier,monospace;">sudo apt-get build-dep --no-install-recommends linux-image-$(uname -r)</blockquote><br />
<b>Create your source directory</b><br />
<br />
<blockquote style="font-family: "Courier New",Courier,monospace;">mkdir ~/src</blockquote><blockquote style="font-family: "Courier New",Courier,monospace;">cd ~/src</blockquote><br />
<b>Download and extract your kernel</b><br />
<br />
<br />
You can browse for kernels at <a href="http://www.kernel.org/pub/linux/kernel/v2.6/">http://www.kernel.org/pub/linux/kernel/v2.6/</a> This guide is using kernel <span style="color: purple;">2.6.37</span>.<br />
<br />
<blockquote style="font-family: "Courier New",Courier,monospace;">wget http://www.kernel.org/pub/linux/kernel/v2.6/linux-<span style="color: purple;">2.6.37</span>.tar.gz</blockquote><blockquote style="font-family: "Courier New",Courier,monospace;">tar xvf linux-<span style="color: purple;">2.6.37</span>.tar.gz</blockquote><blockquote style="font-family: "Courier New",Courier,monospace;">cd linux-<span style="color: purple;">2.6.37</span></blockquote><br />
<b>Configure your Kernel</b><br />
<br />
<blockquote><div style="font-family: "Courier New",Courier,monospace;">make menuconfig</div></blockquote><br />
<b>Build your Kernel</b><br />
<br />
<blockquote style="font-family: "Courier New",Courier,monospace;">export CONCURRENCY_LEVEL=<span style="color: blue;">3</span></blockquote><blockquote style="font-family: "Courier New",Courier,monospace;">make-kpkg clean</blockquote><blockquote style="font-family: "Courier New",Courier,monospace;">time fakeroot make-kpkg --initrd <span style="color: #38761d;"></span>kernel-image kernel-headers</blockquote><br />
<span style="color: blue;">General rule, concurrency level = number of processor cores + 1</span><br />
<br />
<br />
<b>Install your kernel</b><br />
<br />
<blockquote style="font-family: "Courier New",Courier,monospace;">cd ~/src<br />
<br />
dir <span style="font-family: Arial,Helvetica,sans-serif;"> </span></blockquote><blockquote style="font-family: "Courier New",Courier,monospace;">sudo dpkg -i linux-image-<span style="color: purple;">2.6.37</span>_<span style="color: purple;">2.6.37</span>-10.00.Custom_amd64.deb</blockquote><blockquote style="font-family: "Courier New",Courier,monospace;">sudo dpkg -i linux-headers-<span style="color: purple;">2.6.37</span>_<span style="color: purple;">2.6.37<span style="color: #38761d;"></span></span>-10.00.Custom_amd64.deb</blockquote><br />
<b>Create the initramfs image</b><br />
<br />
<blockquote style="font-family: "Courier New",Courier,monospace;">sudo update-initramfs -c -k <span style="color: purple;">2.6.37<span style="color: #38761d;"></span></span></blockquote><br />
<b>Update your grub.cfg</b><br />
<br />
<blockquote><span style="font-family: "Courier New",Courier,monospace;">sudo update-grub</span></blockquote><br />
<b>Reboot your system</b><br />
<br />
<br />
Enjoy your new kernel.</div>Vksalianhttp://www.blogger.com/profile/02829888974539621549noreply@blogger.com2tag:blogger.com,1999:blog-5831921526357706514.post-82060683960612645402011-11-28T05:55:00.000-08:002011-11-28T05:56:07.619-08:00Enable Blocked Wifi connecetion under Ubuntu.<div dir="ltr" style="text-align: left;" trbidi="on">There are cases where you see "Wireless Disabled" under network manager menu. You can not detect / configure the network even if you try hard.<br />
I found a solution, on internet, to fix it.<br />
<br />
<b>Steps:</b><br />
<br />
1. Go to terminal and type<b> </b> "rfkill list all" to list the status.<br />
2. Then type " rfkill unblock wifi" to unblock the device.<br />
3. Reboot / Restart your system.<br />
<br />
You will see that Wifi gets detected.<br />
<br />
<br />
<br />
</div>Vksalianhttp://www.blogger.com/profile/02829888974539621549noreply@blogger.com0tag:blogger.com,1999:blog-5831921526357706514.post-77991488996047251352011-11-16T21:20:00.000-08:002011-11-16T21:20:11.688-08:00Manual Installation of Perl Modules<div dir="ltr" style="text-align: left;" trbidi="on"><h2> <span class="mw-headline" id="Manual_Installation_of_Perl_Modules"></span></h2>Most of the commonly used Perl modules can be downloaded from the CPAN website. The installation steps are straightforward. <br />
1. Browse the CPAN website, identify the module package you need and then download it using a utility such as wget. <br />
<pre>[root@bigboy tmp]# wget <a class="external free" href="http://www.cpan.org/authors/id/M/MA/MARKOV/MailTools-1.74.tar.gz">http://www.cpan.org/authors/id/M/MA/MARKOV/MailTools-1.74.tar.gz</a>
--15:07:36-- <a class="external free" href="http://www.cpan.org/authors/id/M/MA/MARKOV/MailTools-1.74.tar.gz">http://www.cpan.org/authors/id/M/MA/MARKOV/MailTools-1.74.tar.gz</a>
=> `MailTools-1.74.tar.gz'
Resolving www.cpan.org... 66.39.76.93
Connecting to www.cpan.org|66.39.76.93|:80... connected.
HTTP request sent, awaiting response... 200 OK
Length: 47,783 (47K) [application/x-tar]
100%[===================================>] 47,783 100.88K/s
15:07:38 (100.51 KB/s) - `MailTools-1.74.tar.gz' saved [47783/47783]
[root@bigboy tmp]#
</pre>2. Extract the file from the package with the tar command. <br />
<pre>[root@bigboy tmp]# tar -xzvf MailTools-1.74.tar.gz
MailTools-1.74/
MailTools-1.74/t/
...
...
...
MailTools-1.74/ChangeLog
MailTools-1.74/MANIFEST
[root@bigboy tmp]#
</pre>3. Enter the newly created directory with the same name as the TAR file, and install the module with the following commands. <br />
<ul><li> perl Makefile.PL </li>
<li> make </li>
<li> make test </li>
</ul><pre>[root@bigboy tmp]# cd MailTools-1.74
[root@bigboy MailTools-1.74]# perl Makefile.PL
Checking for Net::SMTP...ok
Checking for Net::Domain...ok
Checking for IO::Handle...ok
Checking if your kit is complete...
Looks good
Writing Makefile for Mail
[root@bigboy MailTools-1.74]# make
cp Mail/Cap.pm blib/lib/Mail/Cap.pm
cp Mail/Mailer/rfc822.pm blib/lib/Mail/Mailer/rfc822.pm
...
...
...
Manifying blib/man3/Mail::Util.3pm
Manifying blib/man3/Mail::Address.3pm
[root@bigboy MailTools-1.74]# make test
PERL_DL_NONLAZY=1 /usr/bin/perl "-MExtUtils::Command::MM" "-e" "test_harness(0, 'blib/lib', 'blib/arch')" t/*.t
t/extract.....ok
...
...
...
All tests successful.
Files=7, Tests=95, 2 wallclock secs ( 1.28 cusr + 0.29 csys = 1.57 CPU)
[root@bigboy MailTools-1.74]#
</pre>Your Perl module installation should now be complete. <br />
<b>Note:</b> The output of the perl Makefile.PL command will tell you whether there are any other required modules. You can either install them all manually, running the risk of having to install more prerequisite modules for these prerequisite modules, or you can use automated updates which will be covered next. </div>Vksalianhttp://www.blogger.com/profile/02829888974539621549noreply@blogger.com0tag:blogger.com,1999:blog-5831921526357706514.post-39920045963420595492011-10-23T23:44:00.000-07:002011-10-23T23:44:39.907-07:00FTP Server setup on Ubuntu.<div dir="ltr" style="text-align: left;" trbidi="on"><span style="font-size: small;"> VSFTPD is a FTP deamon available in Ubuntu and it is easy to install, setup and maintain.</span><br />
<div style="color: #351c75;"><br />
</div><div style="color: red;"><span style="font-size: small;">Steps :</span></div><br />
<span style="font-size: small;"> 1. Install vsftpd from Ubuntu repositories by typing the following command in a terminal Window. </span><br />
<pre class="screen"><span style="font-size: small;"><span class="command"><b>sudo apt-get install vsftpd</b></span></span></pre><span style="font-size: small;"> </span><br />
<span style="font-size: small;">2. During installation, user <span style="font-size: x-small;"><b>ftp</b></span> will get generated with default ftp directory as <span style="font-size: x-small;">"<b>/home/ftp</b>"</span>. If you like to change the same to another directory, then type,</span><br />
<br />
<span style="font-size: x-small;"> <span class="command"><b>"sudo usermod -d /srv/ftp ftp" </b></span></span><br />
<br />
<span style="font-size: small;"><span class="command"><b><span style="font-weight: normal;">where /srv/ftp is the new ftp directory and ftp stands for username.</span></b></span></span><br />
<br />
<span style="font-size: small;"><span class="command"><b><span style="font-weight: normal;">3.You can restart the ftp server by typing the following command,</span></b></span></span><br />
<br />
<span style="font-size: small;"><span class="command"><b><span style="font-weight: normal;"> </span><span style="font-weight: normal;"><span style="font-size: x-small;">"/etc/init.d/vsftpd restart".</span> </span></b></span></span><br />
<span style="font-size: small;"><span class="command"><b><span style="font-weight: normal;"> </span></b></span></span><br />
<div style="color: blue;"><span style="font-size: small;"><span class="command"><span style="font-weight: normal;">Configuration :</span></span></span></div><br />
<span style="font-size: small;"><span class="command"><b><span style="font-weight: normal;">The default configuration file for vsftpd is /etc/vsftpd.conf. We can configure the vsftod ftp server by editing this file, as per our requirement.</span></b></span></span><br />
<span style="font-size: small;"><span class="command"><b><span style="font-weight: normal;"> </span></b></span></span><br />
<span style="font-size: small;"><span class="command"><b><span style="font-weight: normal;">1. To enable local users to login and upload files, edit the vsftpd.conf file as,</span></b></span></span><br />
<pre class="programlisting"><span style="font-size: small;">local_enable=YES
write_enable=YES</span></pre><span style="font-size: small;"><span class="command"><b><span style="font-weight: normal;"> 2. To enable anonymous user to upload files, use</span></b></span></span><br />
<pre class="programlisting"><span style="font-size: small;">anon_upload_enable=YES </span></pre><span style="font-size: small;"><span class="command"><b><span style="font-weight: normal;">3. To restrict users only to their home directory, use</span></b></span></span><br />
<pre class="programlisting"><span style="font-size: small;">chroot_local_user=YES</span></pre><span style="font-size: small;"><span class="command"><b><span style="font-weight: normal;">To include a list of users to be able to access their home directories, use</span></b></span></span><br />
<pre class="programlisting"><span style="font-size: small;">chroot_list_file=/etc/vsftpd.chroot_list</span></pre><span style="font-size: small;"><span class="command"><b><span style="font-weight: normal;"> where vsftpd.chroot_list is a file includes list of users (one per line).</span></b></span></span><br />
<span style="font-size: small;"><span class="command"><b><span style="font-weight: normal;"> </span></b></span></span><br />
<span style="font-size: small;"><span class="command"><b><span style="font-weight: normal;">4. Restart vsftpd, </span></b></span><b style="color: #20124d;"><span style="font-family: "Helvetica Neue",Arial,Helvetica,sans-serif;"><span class="command"><b><span style="font-weight: normal;">/etc/init.d/vsftpd restart</span></b></span></span></b></span><br />
<span style="font-size: small;"> </span><br />
<span style="font-size: small;">Access :</span><br />
<span style="font-size: small;"> </span><br />
<span style="font-size: small;">Using a browser type "ftp://ip_address_of_server/". This will prompt for username and Password. On successful login, you can view files that are related to your user account.</span><br />
<span style="font-size: small;"></span><br />
<span style="font-size: small;">Note : </span><br />
<span style="font-size: small;">1. You can also view files remotely, under file-browser, like nautilus, etc.</span><br />
<span style="font-size: small;">2. The FTP server is not encrypted and is unsafe to use unless made secured by using SSL (secure socket layer).</span><br />
<span style="font-size: small;"><br />
</span><br />
<span style="font-size: small;"><br />
</span></div>Vksalianhttp://www.blogger.com/profile/02829888974539621549noreply@blogger.com0tag:blogger.com,1999:blog-5831921526357706514.post-64119564114325513692011-10-07T00:28:00.000-07:002011-10-07T00:28:43.157-07:00Installation of Spreadsheet::WriteExcel module for Perl<div dir="ltr" style="text-align: left;" trbidi="on">
Spreadsheet::WriteExcel module can be used to write/edit excel files. The installation procedure for this module is as given below.<br />
<br />
1. Download http://perlmirror.indialinks.com/authors/id/J/JM/JMCNAMARA/Spreadsheet-WriteExcel-2.37.tar.gz.<br />
<br />
2. Unzip the module as follows, <b>tar -zxvf Spreadsheet-WriteExcel-2.xx.tar.gz</b>.<br />
3. The module can be installed using the standard Perl procedure:<br />
<b>perl Makefile.PL<br /> make<br /> make test<br /> make install</b> # You may need to be root<br />
<b>make clean</b> # or make realclean<br />
<br />
That's all !!!!!. Now you can write Perl programs to edit an Excel.<br />
<br />
<b>Sample program :</b><br />
<br />
<pre> #!/usr/bin/perl -w
use strict;
use Spreadsheet::WriteExcel;
# Create a new Excel workbook
my $workbook = Spreadsheet::WriteExcel->new("regions.xls");
# Add some worksheets
my $north = $workbook->addworksheet("North");
my $south = $workbook->addworksheet("South");
my $east = $workbook->addworksheet("East");
my $west = $workbook->addworksheet("West");
# Add a caption to each worksheet
foreach my $worksheet (@{$workbook->{worksheets}}) {
$worksheet->write(0, 0, "Sales");
}</pre>
<br />
<pre> # Write some data
$north->write(0, 1, 200000);
$south->write(0, 1, 100000);
$east->write (0, 1, 150000);
$west->write (0, 1, 100000);
# Set the active worksheet
$south->activate();</pre>
</div>
Vksalianhttp://www.blogger.com/profile/02829888974539621549noreply@blogger.com0tag:blogger.com,1999:blog-5831921526357706514.post-87130970969770695592011-10-04T04:13:00.000-07:002011-10-04T06:53:22.205-07:00Parse EXCEL tools under Perl.<div dir="ltr" style="text-align: left;" trbidi="on"><div style="font-family: Verdana,sans-serif;"><span style="font-size: x-small;">This is a sample Perl Program to parse/read excel.</span></div><div style="font-family: Verdana,sans-serif;"><span style="font-size: x-small;"><br />
</span></div><div style="font-family: Verdana,sans-serif;"><span style="font-size: x-small;">#!/usr/bin/perl -w<br />
<br />
use strict;<br />
use Spreadsheet::ParseExcel;<br />
<br />
my $oExcel = new Spreadsheet::ParseExcel;<br />
<br />
die "You must provide a filename to $0 to be parsed as an Excel file" unless @ARGV;<br />
<br />
my $oBook = $oExcel->Parse($ARGV[0]);<br />
my($iR, $iC, $oWkS, $oWkC);<br />
print "FILE :", $oBook->{File} , "\n";<br />
print "COUNT :", $oBook->{SheetCount} , "\n";<br />
<br />
print "AUTHOR:", $oBook->{Author} , "\n"<br />
if defined $oBook->{Author};<br />
<br />
for(my $iSheet=0; $iSheet < $oBook->{SheetCount} ; $iSheet++)<br />
{<br />
$oWkS = $oBook->{Worksheet}[$iSheet];<br />
print "--------- SHEET:", $oWkS->{Name}, "\n";<br />
for(my $iR = $oWkS->{MinRow} ;<br />
defined $oWkS->{MaxRow} && $iR <= $oWkS->{MaxRow} ;<br />
$iR++)<br />
{<br />
for(my $iC = $oWkS->{MinCol} ;<br />
defined $oWkS->{MaxCol} && $iC <= $oWkS->{MaxCol} ;<br />
$iC++)<br />
{<br />
$oWkC = $oWkS->{Cells}[$iR][$iC];<br />
print "( $iR , $iC ) =>", $oWkC->Value, "\n" if($oWkC);<br />
}<br />
}<br />
}</span></div><div style="font-family: Verdana,sans-serif;"><span style="font-size: x-small;"><br />
</span></div><div style="font-family: Verdana,sans-serif;"><span style="font-size: x-small;">Usage : Type "<b>Path_to_perlfile</b><abovefilelocation filename.pl=""><b> Excel_filename_that_need_to_be_parsed.xls</b>", in terminal window to read and display contents of an excel file.</abovefilelocation></span><br />
<span style="font-size: x-small;"><abovefilelocation filename.pl=""><br />
</abovefilelocation></span><br />
<span style="font-size: x-small;"><abovefilelocation filename.pl="">Before that you need to ensure that the supporting modules are installed already. Under Ubuntu, the modules can be installed using command "<b>sudo apt-get install libspreadsheet-</b></abovefilelocation></span><span style="font-size: x-small;"><b>parseexcel</b></span><span style="font-size: x-small;"><abovefilelocation filename.pl=""><b>-perl</b>" OR you can download the sources and copy the same to standard location of perl.</abovefilelocation></span><br />
<span style="font-size: x-small;"><abovefilelocation filename.pl=""><br />
</abovefilelocation></span></div></div>Vksalianhttp://www.blogger.com/profile/02829888974539621549noreply@blogger.com0tag:blogger.com,1999:blog-5831921526357706514.post-91043729052863433312011-02-19T01:23:00.000-08:002011-02-19T01:23:20.928-08:00Execute system commands using PHP under Root Priviledges.<div dir="ltr" style="text-align: left;" trbidi="on"><div style="font-family: Verdana,sans-serif;"><br />
Suppose you have set-up a webserver (apache2) with PHP enabled and you need to execute some system commands or your own scripts under super user / root priviledges, then the following method may help you to solve the problem, especially under Ubuntu.</div><div style="font-family: Verdana,sans-serif;"><br />
</div><div style="font-family: Verdana,sans-serif;"><i><b>Step 1:</b></i> Run <b>sudo visudo</b> in a Terminal window.</div><div style="font-family: Verdana,sans-serif;"><br />
</div><div style="font-family: Verdana,sans-serif;"><i><b>Step 2:</b></i> Add the below lines at the end of the file, depending on your requirement.</div><pre style="font-family: Verdana,sans-serif;"> </pre><pre style="font-family: Georgia,"Times New Roman",serif;"><i>www-data ALL=NOPASSWD: /sbin/iptables, /usr/bin/du</i></pre><pre style="font-family: Georgia,"Times New Roman",serif;"><i>OR</i></pre><pre style="font-family: Georgia,"Times New Roman",serif;"><i>www-data ALL=NOPASSWD: ALL</i></pre><div style="font-family: Verdana,sans-serif;"></div><div style="font-family: Verdana,sans-serif;"><br />
</div><div style="font-family: Verdana,sans-serif;"><i><b>Step 3:</b></i> Try an exec command under PHP script to test the settings.</div><div style="font-family: Verdana,sans-serif;"><br />
</div><div style="font-family: Verdana,sans-serif;">e.g : <i><span style="font-family: Georgia,"Times New Roman",serif;">exec ("sudo iptables -P FORWARD ACCEPT");</span></i></div><div style="font-family: Verdana,sans-serif;"><br />
</div><div style="font-family: Verdana,sans-serif;"><br />
</div></div>Vksalianhttp://www.blogger.com/profile/02829888974539621549noreply@blogger.com0tag:blogger.com,1999:blog-5831921526357706514.post-43790596969869690562010-11-26T02:34:00.000-08:002010-11-26T02:34:49.975-08:00Fast Mail Merge - Openoffice.org extension.There is a new extension tool to Openoffice.org called Fast Mail Merge. This will help you to send multiple email messages within a short period of time. In addition to that it provides enhanced features for existing Mail Merge Options.<br />
<br />
If you need to download the extension file from the link given below,<br />
<br />
http://extensions.services.openoffice.org/e-files/1082/7/FastMailMerge-0.8.1.oxt<br />
<br />
To INSTALL, Select <b>Tools-->Extension Manager</b> under Openoffice.org software and <b>add....</b><br />
<br />
To work on the tool, open a Openoffice.Org spreadsheet database and Select the <b>FMM</b> button just under <b>File Menu</b>. This will open a small widow wizard which will ask for some inputs. Proceed with your options.Vksalianhttp://www.blogger.com/profile/02829888974539621549noreply@blogger.com0tag:blogger.com,1999:blog-5831921526357706514.post-77433841221293687122010-11-13T01:48:00.000-08:002010-11-26T02:39:26.748-08:00Boot Multiple Operating Systems (OSs) using a USB Drive.There are some cases where you may need to maintain many number of CDs, DVDs and USB drives written with different Operating Systems for the purpose of installation or booting Live OS. Its really tiresome to create different OS images on different devices. Hence, here is a solution that helps you to maintain a Single device with Large number of OS images installed in it. The method is very easy and you may delete or add any number of OS images (depending on the size of your device) without much efforts.<br />
<br />
In this method, we make use of USB (pen) drives. I prefer Ubuntu Linux to do this and the steps are as explained below.<br />
<br />
Steps:<br />
<br />
1. Get a USB drive with 4GB / 8 GB or higher memory capacity. Format the drive to vfat or ext4 filesystem.<br />
<i><br />
</i><br />
<i>Note : </i><br />
<i> a). In ubuntu you may use <b>gparted</b> command to do this. Or you my use <b>fdisk</b></i> <i>too.</i><br />
<i> b). You need to <b>unmount</b> the drive before partitioning.</i><br />
<br />
2. Now, install <b>grub</b> (which is known as a bootloader) on the drive with following command.<br />
<br />
<b>sudo grub-install --no-floppy --root-directory=/mnt /dev/sdc </b><br />
<br />
<i>Note : </i><br />
<i> a). Where<b> /mnt</b> is the mount location for the drive. <b>/dev/sdc</b> is device ID. </i><br />
<i> b). Please ensure that you have <b>grub2</b> installed in your Ubuntu, in order to get better results.</i><b><br />
</b><br />
<br />
After "<b>grub-install</b>", you will be able to see a folder <b>boot</b> which contains subfolder grub with lots of files in it. <br />
<br />
3. Add menus to your "grub" by editing the file <b>grub.cfg</b>.<br />
<br />
For example : <br />
<br />
<br />
<pre style="color: #cc0000;">menuentry "Ubuntu 10.04 Desktop i386" {
loopback loop /iso/ubuntu-10.04-desktop-i386.iso
linux (loop)/casper/vmlinuz boot=casper iso-scan/filename=/iso/ubuntu-10.04-</pre><pre style="color: #cc0000;">desktop-i386.iso noeject noprompt --
initrd (loop)/casper/initrd.lz
}</pre><pre style="font-family: inherit;"> </pre><pre style="font-family: inherit;">Add menus If your grub.cfg contents are as given above, then this will show </pre><pre style="font-family: inherit;">a Menu "Ubuntu 10.04 Desktop i386" while you boot from the USB Drive.</pre><pre style="font-family: inherit;">You may add sufficient number of menus depending on the number of <b>.iso</b> files.</pre><pre style="font-family: inherit;"></pre><pre style="font-family: inherit;">4. Now create a folder named <b>"iso"</b> in the same location where your boot folder is.</pre><pre style="font-family: inherit;"></pre><pre style="font-family: inherit;">5. Copy iso image, Ubuntu-10.04-desktop-i386.iso into the "iso" folder.</pre><pre style="font-family: inherit;"></pre><pre style="font-family: inherit;">You may copy more ".iso" images of different OSs and add the menu entry into the </pre><pre style="font-family: inherit;">"grub.cfg" file.</pre><pre style="font-family: inherit;"></pre><pre style="font-family: inherit;">6. Restart your computer and select the USB drive as the boot device. This will </pre><pre style="font-family: inherit;">display a menu list of OSs to select and boot.</pre><pre style="font-family: inherit;"></pre><pre style="font-family: inherit;">Thats all folks!!!!!</pre><pre style="font-family: inherit;">grub</pre><pre style="font-family: inherit;"></pre><pre style="font-family: inherit;"> </pre>Vksalianhttp://www.blogger.com/profile/02829888974539621549noreply@blogger.com0tag:blogger.com,1999:blog-5831921526357706514.post-4531087863536736712010-11-02T00:26:00.000-07:002010-11-02T00:30:46.187-07:00Import PDF files into OpenOffice.org and edit.Sometimes, a need may arise to import PDF files and re-edit the file to correct errors in it. There may be a lot solutions available for this, but I prefer the "sun-pdfimport.oxt" Openoffice.org extension to import almost any PDF file into openoffice and edit.<br />
<br />
Steps I used are as given below,<br />
<br />
1. Download "sun-pdfimport.oxt", which is known as PDF import extension file, from the link <a href="http://extensions.services.openoffice.org/project/pdfimport.">http://extensions.services.openoffice.org/project/pdfimport.</a><br />
<br />
2. Open Openoffice.Org Wordprocessor. Goto<b> Tools-->Extension manager....</b> option. <br />
<br />
3. Click on <b>"Add..."</b>. Select the downloaded file (sun-pdfimport.oxt). This will install the Extension file. Restart Openoffice.<br />
<br />
4. Now, you can open a .pdf file using wordprocessor. Another option to open pdf file is to Right Click on PDF file and select "open with...." command. Then select the Application as "wordprocessor".<br />
<br />
I hope this information was useful to you all....Vksalianhttp://www.blogger.com/profile/02829888974539621549noreply@blogger.com0tag:blogger.com,1999:blog-5831921526357706514.post-11163385475565262802010-10-18T03:18:00.000-07:002010-11-03T04:30:33.583-07:00Use Graphical Libray of GTK+ 2.0 in C programs and Complie with GCC / G++.In ubuntu (10.10, Lucid Lynx), you can use GTK+ graphical libraries along with gcc / g++ to write graphical applications. There are 2 ways to install Gtk+ in ubuntu.<br />
<br />
<br />
1. Download Source code and install using <i><b>./configure, make, make install</b></i>. You need to ensure that some dependant packages are already installed (pango, cairo, atk, pixman, glib, gdk-pixbuff, etc).<br />
<br />
<br />
2. Second method is to use the binary (.deb) packages available on Ubuntu repositories.<br />
<br />
<br />
In order to Install GTK+-2.0 package under ubuntu, you need to install all below packages, which will install all libraries needed for GTK+ to work.<br />
<br />
<br />
* gir1.0-gtk-2.0_2.20.1-0ubuntu2_i386.deb (543.7 KiB)<br />
<br />
* gtk2-engines-pixbuf_2.20.1-0ubuntu2_i386.deb (718.8 KiB)<br />
<br />
* gtk2.0-examples_2.20.1-0ubuntu2_i386.deb (977.7 KiB)<br />
<br />
* libgail-common_2.20.1-0ubuntu2_i386.deb (442.7 KiB)<br />
<br />
* libgail-dbg_2.20.1-0ubuntu2_i386.deb (869.5 KiB)<br />
<br />
* libgail-dev_2.20.1-0ubuntu2_i386.deb (333.2 KiB)<br />
<br />
* libgail-doc_2.20.1-0ubuntu2_all.deb (333.1 KiB)<br />
<br />
* libgail18_2.20.1-0ubuntu2_i386.deb (332.6 KiB)<br />
<br />
* libgtk-directfb-2.0-0_2.20.1-0ubuntu2_i386.deb (2.1 MiB)<br />
<br />
* libgtk-directfb-2.0-0-udeb_2.20.1-0ubuntu2_i386.udeb (1.8 MiB)<br />
<br />
* libgtk-directfb-2.0-dev_2.20.1-0ubuntu2_i386.deb (327.3 KiB)<br />
<br />
* libgtk2.0-0_2.20.1-0ubuntu2_i386.deb (2.4 MiB)<br />
<br />
* libgtk2.0-0-dbg_2.20.1-0ubuntu2_i386.deb (10.2 MiB)<br />
<br />
* libgtk2.0-bin_2.20.1-0ubuntu2_all.deb (328.9 KiB)<br />
<br />
* libgtk2.0-common_2.20.1-0ubuntu2_all.deb (706.0 KiB)<br />
<br />
* libgtk2.0-dev_2.20.1-0ubuntu2_i386.deb (3.6 MiB)<br />
<br />
* libgtk2.0-doc_2.20.1-0ubuntu2_all.deb (3.8 MiB)<br />
<br />
<br />
<i>Note : The package libgtk-directfb-2.0-0-udeb_2.20.1-0ubuntu2_i386.udeb may fail to install. You may ignore it.</i><br />
<br />
<br />
3. Write a simple Program in C (sample given below),<br />
<br />
<span style="font-size: x-small;"><span style="font-family: "Courier New",Courier,monospace;">#include<gtk gtk.h=""></gtk></span></span><gtk gtk.h=""><span style="font-size: x-small;"><span style="font-family: "Courier New",Courier,monospace;"><gtk gtk.h=""></gtk></span><br style="font-family: "Courier New",Courier,monospace;" /><br style="font-family: "Courier New",Courier,monospace;" /><span style="font-family: "Courier New",Courier,monospace;"> /* This is a callback function. The data arguments are ignored</span><br style="font-family: "Courier New",Courier,monospace;" /><span style="font-family: "Courier New",Courier,monospace;"> * in this example. More on callbacks below. */</span><br style="font-family: "Courier New",Courier,monospace;" /><br style="font-family: "Courier New",Courier,monospace;" /><span style="font-family: "Courier New",Courier,monospace;"> static void hello( GtkWidget *widget, gpointer data )</span><br style="font-family: "Courier New",Courier,monospace;" /><span style="font-family: "Courier New",Courier,monospace;"> {</span><br style="font-family: "Courier New",Courier,monospace;" /> <span style="font-family: "Courier New",Courier,monospace;">g_print ("Hello World\n");</span><br style="font-family: "Courier New",Courier,monospace;" /><span style="font-family: "Courier New",Courier,monospace;"> }</span><br style="font-family: "Courier New",Courier,monospace;" /><br style="font-family: "Courier New",Courier,monospace;" /><span style="font-family: "Courier New",Courier,monospace;"> static gboolean delete_event( GtkWidget *widget,</span><span style="font-family: "Courier New",Courier,monospace;"> GdkEvent *event,</span><span style="font-family: "Courier New",Courier,monospace;"> gpointer data )</span><br style="font-family: "Courier New",Courier,monospace;" /><span style="font-family: "Courier New",Courier,monospace;"> {</span><br style="font-family: "Courier New",Courier,monospace;" /><span style="font-family: "Courier New",Courier,monospace;"> /* If you return FALSE in the "delete-event" signal handler,</span><br style="font-family: "Courier New",Courier,monospace;" /><span style="font-family: "Courier New",Courier,monospace;"> * GTK will emit the "destroy" signal. Returning TRUE means</span><br style="font-family: "Courier New",Courier,monospace;" /><span style="font-family: "Courier New",Courier,monospace;"> * you don't want the window to be destroyed.</span><br style="font-family: "Courier New",Courier,monospace;" /><span style="font-family: "Courier New",Courier,monospace;"> * This is useful for popping up 'are you sure you want to quit?'</span><br style="font-family: "Courier New",Courier,monospace;" /><span style="font-family: "Courier New",Courier,monospace;"> * type dialogs. */</span><br style="font-family: "Courier New",Courier,monospace;" /><br style="font-family: "Courier New",Courier,monospace;" /><span style="font-family: "Courier New",Courier,monospace;"> g_print ("delete event occurred\n");</span><br style="font-family: "Courier New",Courier,monospace;" /><br style="font-family: "Courier New",Courier,monospace;" /><span style="font-family: "Courier New",Courier,monospace;"> /* Change TRUE to FALSE and the main window will be destroyed with</span><br style="font-family: "Courier New",Courier,monospace;" /><span style="font-family: "Courier New",Courier,monospace;"> * a "delete-event". */</span><br style="font-family: "Courier New",Courier,monospace;" /><span style="font-family: "Courier New",Courier,monospace;"> return TRUE;</span><br style="font-family: "Courier New",Courier,monospace;" /><span style="font-family: "Courier New",Courier,monospace;"> }</span><br style="font-family: "Courier New",Courier,monospace;" /><br style="font-family: "Courier New",Courier,monospace;" /><span style="font-family: "Courier New",Courier,monospace;"> /* Another callback */</span><br style="font-family: "Courier New",Courier,monospace;" /><span style="font-family: "Courier New",Courier,monospace;"> static void destroy( GtkWidget *widget,</span><span style="font-family: "Courier New",Courier,monospace;"> gpointer data )</span><br style="font-family: "Courier New",Courier,monospace;" /><span style="font-family: "Courier New",Courier,monospace;"> {</span><br style="font-family: "Courier New",Courier,monospace;" /><span style="font-family: "Courier New",Courier,monospace;"> gtk_main_quit ();</span><br style="font-family: "Courier New",Courier,monospace;" /><span style="font-family: "Courier New",Courier,monospace;"> }</span><br style="font-family: "Courier New",Courier,monospace;" /><br style="font-family: "Courier New",Courier,monospace;" /><span style="font-family: "Courier New",Courier,monospace;"> int main( int argc,</span><span style="font-family: "Courier New",Courier,monospace;"> char *argv[] )</span><br style="font-family: "Courier New",Courier,monospace;" /><span style="font-family: "Courier New",Courier,monospace;"> {</span><br style="font-family: "Courier New",Courier,monospace;" /><span style="font-family: "Courier New",Courier,monospace;"> /* GtkWidget is the storage type for widgets */</span><br style="font-family: "Courier New",Courier,monospace;" /><span style="font-family: "Courier New",Courier,monospace;"> GtkWidget *window;</span><br style="font-family: "Courier New",Courier,monospace;" /><span style="font-family: "Courier New",Courier,monospace;"> GtkWidget *button;</span><br style="font-family: "Courier New",Courier,monospace;" /><br style="font-family: "Courier New",Courier,monospace;" /><span style="font-family: "Courier New",Courier,monospace;"> /* This is called in all GTK applications. Arguments are parsed</span><br style="font-family: "Courier New",Courier,monospace;" /><span style="font-family: "Courier New",Courier,monospace;"> * from the command line and are returned to the application. */</span><br style="font-family: "Courier New",Courier,monospace;" /><span style="font-family: "Courier New",Courier,monospace;"> gtk_init (&argc, &argv);</span><br style="font-family: "Courier New",Courier,monospace;" /><br style="font-family: "Courier New",Courier,monospace;" /><span style="font-family: "Courier New",Courier,monospace;"> /* create a new window */</span><br style="font-family: "Courier New",Courier,monospace;" /><span style="font-family: "Courier New",Courier,monospace;"> window = gtk_window_new (GTK_WINDOW_TOPLEVEL);</span><br style="font-family: "Courier New",Courier,monospace;" /><br style="font-family: "Courier New",Courier,monospace;" /><span style="font-family: "Courier New",Courier,monospace;"> /* When the window is given the "delete-event" signal (this is given</span><br style="font-family: "Courier New",Courier,monospace;" /><span style="font-family: "Courier New",Courier,monospace;"> * by the window manager, usually by the "close" option, or on the</span><br style="font-family: "Courier New",Courier,monospace;" /><span style="font-family: "Courier New",Courier,monospace;"> * titlebar), we ask it to call the delete_event () function</span><br style="font-family: "Courier New",Courier,monospace;" /><span style="font-family: "Courier New",Courier,monospace;"> * as defined above. The data passed to the callback</span><br style="font-family: "Courier New",Courier,monospace;" /><span style="font-family: "Courier New",Courier,monospace;"> * function is NULL and is ignored in the callback function. */</span><br style="font-family: "Courier New",Courier,monospace;" /><span style="font-family: "Courier New",Courier,monospace;"> g_signal_connect (window, "delete-event",</span><span style="font-family: "Courier New",Courier,monospace;">G_CALLBACK (delete_event), NULL);</span><br style="font-family: "Courier New",Courier,monospace;" /><br style="font-family: "Courier New",Courier,monospace;" /><span style="font-family: "Courier New",Courier,monospace;"> /* Here we connect the "destroy" event to a signal handler. </span><br style="font-family: "Courier New",Courier,monospace;" /><span style="font-family: "Courier New",Courier,monospace;"> * This event occurs when we call gtk_widget_destroy() on the window,</span><br style="font-family: "Courier New",Courier,monospace;" /><span style="font-family: "Courier New",Courier,monospace;"> * or if we return FALSE in the "delete-event" callback. */</span><br style="font-family: "Courier New",Courier,monospace;" /><span style="font-family: "Courier New",Courier,monospace;"> g_signal_connect (window, "destroy",</span><span style="font-family: "Courier New",Courier,monospace;">G_CALLBACK (destroy), NULL);</span><br style="font-family: "Courier New",Courier,monospace;" /><br style="font-family: "Courier New",Courier,monospace;" /><span style="font-family: "Courier New",Courier,monospace;"> /* Sets the border width of the window. */</span><br style="font-family: "Courier New",Courier,monospace;" /><span style="font-family: "Courier New",Courier,monospace;"> gtk_container_set_border_width (GTK_CONTAINER (window), 10);</span><br style="font-family: "Courier New",Courier,monospace;" /><br style="font-family: "Courier New",Courier,monospace;" /><span style="font-family: "Courier New",Courier,monospace;"> /* Creates a new button with the label "Hello World". */</span><br style="font-family: "Courier New",Courier,monospace;" /><span style="font-family: "Courier New",Courier,monospace;"> button = gtk_button_new_with_label ("Hello World");</span><br style="font-family: "Courier New",Courier,monospace;" /><br style="font-family: "Courier New",Courier,monospace;" /><span style="font-family: "Courier New",Courier,monospace;"> /* When the button receives the "clicked" signal, it will call the</span><br style="font-family: "Courier New",Courier,monospace;" /><span style="font-family: "Courier New",Courier,monospace;"> * function hello() passing it NULL as its argument. The hello()</span><br style="font-family: "Courier New",Courier,monospace;" /><span style="font-family: "Courier New",Courier,monospace;"> * function is defined above. */</span><br style="font-family: "Courier New",Courier,monospace;" /><span style="font-family: "Courier New",Courier,monospace;"> g_signal_connect (button, "clicked",</span><span style="font-family: "Courier New",Courier,monospace;">G_CALLBACK (hello), NULL);</span><br style="font-family: "Courier New",Courier,monospace;" /><br style="font-family: "Courier New",Courier,monospace;" /><span style="font-family: "Courier New",Courier,monospace;"> /* This will cause the window to be destroyed by calling</span><br style="font-family: "Courier New",Courier,monospace;" /><span style="font-family: "Courier New",Courier,monospace;"> * gtk_widget_destroy(window) when "clicked". Again, the destroy</span><br style="font-family: "Courier New",Courier,monospace;" /><span style="font-family: "Courier New",Courier,monospace;"> * signal could come from here, or the window manager. */</span><br style="font-family: "Courier New",Courier,monospace;" /><span style="font-family: "Courier New",Courier,monospace;"> g_signal_connect_swapped (button, "clicked",</span><span style="font-family: "Courier New",Courier,monospace;">G_CALLBACK (gtk_widget_destroy),</span><span style="font-family: "Courier New",Courier,monospace;"> window);</span><br style="font-family: "Courier New",Courier,monospace;" /><br style="font-family: "Courier New",Courier,monospace;" /><span style="font-family: "Courier New",Courier,monospace;"> /* This packs the button into the window (a gtk container). */</span><br style="font-family: "Courier New",Courier,monospace;" /><span style="font-family: "Courier New",Courier,monospace;"> gtk_container_add (GTK_CONTAINER (window), button);</span><br style="font-family: "Courier New",Courier,monospace;" /><br style="font-family: "Courier New",Courier,monospace;" /><span style="font-family: "Courier New",Courier,monospace;"> /* The final step is to display this newly created widget. */</span><br style="font-family: "Courier New",Courier,monospace;" /><span style="font-family: "Courier New",Courier,monospace;"> gtk_widget_show (button);</span><br style="font-family: "Courier New",Courier,monospace;" /><br style="font-family: "Courier New",Courier,monospace;" /><span style="font-family: "Courier New",Courier,monospace;"> /* and the window */</span><br style="font-family: "Courier New",Courier,monospace;" /><span style="font-family: "Courier New",Courier,monospace;"> gtk_widget_show (window);</span><br style="font-family: "Courier New",Courier,monospace;" /><br style="font-family: "Courier New",Courier,monospace;" /><span style="font-family: "Courier New",Courier,monospace;"> /* All GTK applications must have a gtk_main(). Control ends here</span><br style="font-family: "Courier New",Courier,monospace;" /><span style="font-family: "Courier New",Courier,monospace;"> * and waits for an event to occur (like a key press or</span><br style="font-family: "Courier New",Courier,monospace;" /><span style="font-family: "Courier New",Courier,monospace;"> * mouse event). */</span><br style="font-family: "Courier New",Courier,monospace;" /><span style="font-family: "Courier New",Courier,monospace;"> gtk_main ();</span><br style="font-family: "Courier New",Courier,monospace;" /><span style="font-family: "Courier New",Courier,monospace;"> return 0;</span><br style="font-family: "Courier New",Courier,monospace;" /><span style="font-family: "Courier New",Courier,monospace;"> }</span><br style="font-family: "Courier New",Courier,monospace;" /></span> <span style="font-family: "Courier New",Courier,monospace;"> </span>4.Compile using below command,<br />
<i><b>gcc -Wall -g HellowWorld.c -o HellowWorld `pkg-config --cflags gtk+-2.0` `pkg-config --libs gtk+-2.0`</b></i></gtk><br />
<gtk gtk.h=""><i><b> </b></i><br />
5.To run the output file, <i><b>./HellowWorld</b></i></gtk><br />
<gtk gtk.h=""><br />
</gtk>Vksalianhttp://www.blogger.com/profile/02829888974539621549noreply@blogger.com0tag:blogger.com,1999:blog-5831921526357706514.post-39082615609702795082010-10-16T06:06:00.000-07:002010-10-16T06:09:55.282-07:00How to Install Graphics Libraries and use under (Linux) gcc/g++ (graphics.h)<meta content="text/html; charset=utf-8" http-equiv="CONTENT-TYPE"></meta> <title></title> <meta content="OpenOffice.org 3.2 (Linux)" name="GENERATOR"></meta> <style type="text/css">
<!--
@page { margin: 2cm }
P { margin-bottom: 0.21cm }
H3 { margin-bottom: 0.21cm }
A:link { so-language: zxx }
-->
</style> <br />
<div style="margin-bottom: 0cm;"><br />
</div><div style="margin-bottom: 0cm;"><b>Here are the steps that I used.</b></div><br />
<ol><li><div style="font-weight: normal; margin-bottom: 0cm;">In order to include graphics.h header file, you need to install libgraph package.</div><div style="font-weight: normal; margin-bottom: 0cm;"></div></li>
<li><div style="font-weight: normal; margin-bottom: 0cm;">Search the source code for “<i><b>libgraph</b></i>”. Install by using commands,</div><div style="margin-bottom: 0cm;"><i><b>./configure</b></i></div><div style="margin-bottom: 0cm;"><i><b>make</b></i></div><div style="margin-bottom: 0cm;"><i><b>make install</b></i></div><div style="margin-bottom: 0cm;"></div></li>
<li><div style="margin-bottom: 0cm;"><span style="font-weight: normal;">Sometimes, you may get error message “</span><i>configure: error: *** SDL version x.x.x not found!</i>”. You can solve this by installing “<i><b>apt-get</b></i><i><span style="text-decoration: none;"><b> install</b></span></i><span style="color: blue;"><span style="font-family: Verdana,Arial,Helvetica,sans-serif;"><span style="font-size: x-small;"><i><span style="text-decoration: none;"><b><span style="background: none repeat scroll 0% 0% transparent;"> </span></b></span></i></span></span></span><i><span style="text-decoration: none;"><b>lib</b></span></i><i><b>sdl1.2-dev</b></i>”.</div><div style="margin-bottom: 0cm;"></div></li>
<li><div style="margin-bottom: 0cm;"><span style="font-weight: normal;">Sometimes, you may get error message “configure: cannot find guile-config; is Guile installed?”. You can solve this by installing “</span><i><b>sudo apt-get install guile guile-dev</b></i><span style="font-weight: normal;">”.</span></div><div style="margin-bottom: 0cm;"></div></li>
<li><div style="margin-bottom: 0cm;"><span style="font-weight: normal;">Sometimes, you may get error message “</span><i><span style="font-weight: normal;">SDL_image-x-xx-x not found</span></i><span style="font-weight: normal;">”. You may install by searching sourcecode “</span><i><span style="font-weight: normal;">SDL_image</span></i><span style="font-weight: normal;">” and following commands “</span><i><span style="font-weight: normal;">./cofigure make make install</span></i><span style="font-weight: normal;">”.</span></div><div style="margin-bottom: 0cm;"></div></li>
<li><div style="margin-bottom: 0cm;"><span style="font-weight: normal;">When I tried to compile a C file, I got error message,</span></div><div style="margin-bottom: 0cm;"><span style="font-family: Courier New,monospace;"><span style="font-size: xx-small;"><span style="font-weight: normal;">vksalian@vksalian-laptop:~/Desktop$ gcc vvv.c -o vvv -lSDL -lSDL_image </span></span></span></div><div style="margin-bottom: 0cm;"><span style="font-family: Courier New,monospace;"><span style="font-size: xx-small;"><span style="font-weight: normal;">In file included from /usr/local/include/grtext.h:26, </span></span></span></div><div style="margin-bottom: 0cm;"><span style="font-family: Courier New,monospace;"><span style="font-size: xx-small;"><span style="font-weight: normal;">from /usr/local/include/graphics.h:116, </span></span></span></div><div style="margin-bottom: 0cm;"><span style="font-family: Courier New,monospace;"><span style="font-size: xx-small;"><span style="font-weight: normal;">from vvv.c:8: </span></span></span></div><div style="margin-bottom: 0cm;"><span style="font-family: Courier New,monospace;"><span style="font-size: xx-small;"><span style="font-weight: normal;">/usr/local/include/SDL/SDL_image.h:28:17: error: SDL.h: No such file or directory </span></span></span></div><div style="margin-bottom: 0cm;"><span style="font-family: Courier New,monospace;"><span style="font-size: xx-small;"><span style="font-weight: normal;">/usr/local/include/SDL/SDL_image.h:29:25: error: SDL_version.h: No such file or directory </span></span></span></div><div style="margin-bottom: 0cm;"><span style="font-family: Courier New,monospace;"><span style="font-size: xx-small;"><span style="font-weight: normal;">/usr/local/include/SDL/SDL_image.h:30:24: error: begin_code.h: No such file or directory </span></span></span></div><div style="margin-bottom: 0cm;"><span style="font-family: Courier New,monospace;"><span style="font-size: xx-small;"><span style="font-weight: normal;">/usr/local/include/SDL/SDL_image.h:134:24: error: close_code.h: No such file or directory </span></span></span></div><div style="margin-bottom: 0cm;"></div></li>
<li><div style="margin-bottom: 0cm;"><span style="font-weight: normal;">sudo apt-get install </span><i><b>libsdl-image1.2-dev freetype, libsdl1.2, libsdl1.2-dev, libsdl-image1.2-dev, and libsdl-image1.2.</b></i></div><div style="margin-bottom: 0cm;"></div></li>
<li><div style="margin-bottom: 0cm;"><span style="font-weight: normal;">Copy header files with command “</span><i><b>sudo cp /usr/local/lib/libgraph.* /usr/lib</b></i><span style="font-weight: normal;">”</span></div><div style="margin-bottom: 0cm;"></div></li>
<li><div style="margin-bottom: 0cm;"><span style="font-weight: normal;">Then changed the arguiments to compile the C Program and the command looks like (all libraries included),</span></div><div style="margin-bottom: 0cm;"></div><div style="margin-bottom: 0cm;"><i><b>gcc -g -Wall -I/usr/include/SDL -I/usr/local/include/SDL -I/usr/local/include -D_GNU_SOURCE=1 -D_REENTRANT -L/usr/lib -lSDL -I/usr/local/include/SDL -lSDL -lSDL_image -I/usr/local/include -lgraph -o vvv vvv.c </b></i></div><div style="margin-bottom: 0cm;"></div></li>
<li><div style="font-weight: normal; margin-bottom: 0cm;">Please note the below point.</div><div style="margin-bottom: 0cm;"><i><b>`sdl-config –cflags` & `sdl-config –libs` can replaced for -I/usr/include/SDL -I/usr/local/include/SDL -I/usr/local/include -D_GNU_SOURCE=1 -D_REENTRANT -L/usr/lib -lSDL -I/usr/local/include/SDL -lSDL -lSDL_image -I/usr/local/include</b></i></div></li>
<li><div style="font-style: normal; font-weight: normal; margin-bottom: 0cm;">Sample C Program I used to test this,</div><div style="font-style: normal; font-weight: normal; margin-bottom: 0cm;"><span style="font-family: Courier New,monospace;"><span style="font-size: x-small;">#include<stdio.h> </stdio.h></span></span></div><div style="font-style: normal; font-weight: normal; margin-bottom: 0cm;"><span style="font-family: Courier New,monospace;"><span style="font-size: x-small;">#include<stdlib.h> </stdlib.h></span></span></div><div style="font-style: normal; font-weight: normal; margin-bottom: 0cm;"><span style="font-family: Courier New,monospace;"><span style="font-size: x-small;">#include<graphics.h> </graphics.h></span></span></div><div style="font-style: normal; font-weight: normal; margin-bottom: 0cm;"><span style="font-family: Courier New,monospace;"><span style="font-size: x-small;"> </span></span></div><div style="font-style: normal; font-weight: normal; margin-bottom: 0cm;"><span style="font-family: Courier New,monospace;"><span style="font-size: x-small;">void main() </span></span></div><div style="font-style: normal; font-weight: normal; margin-bottom: 0cm;"><span style="font-family: Courier New,monospace;"><span style="font-size: x-small;">{ </span></span></div><div style="font-style: normal; font-weight: normal; margin-bottom: 0cm;"><span style="font-family: Courier New,monospace;"><span style="font-size: x-small;">int gd,gm=VGAMAX; </span></span></div><div style="font-style: normal; font-weight: normal; margin-bottom: 0cm;"><span style="font-family: Courier New,monospace;"><span style="font-size: x-small;">int a; </span></span></div><div style="font-style: normal; font-weight: normal; margin-bottom: 0cm;"><span style="font-family: Courier New,monospace;"><span style="font-size: x-small;">gd=DETECT; </span></span></div><div style="font-style: normal; font-weight: normal; margin-bottom: 0cm;"><span style="font-family: Courier New,monospace;"><span style="font-size: x-small;">initgraph(&gd,&gm,NULL); </span></span></div><div style="font-style: normal; font-weight: normal; margin-bottom: 0cm;"><span style="font-family: Courier New,monospace;"><span style="font-size: x-small;">line(200,200,100,100); </span></span></div><div style="font-style: normal; font-weight: normal; margin-bottom: 0cm;"><span style="font-family: Courier New,monospace;"><span style="font-size: x-small;">scanf("%d",&a); </span></span></div><div style="font-style: normal; font-weight: normal; margin-bottom: 0cm;"><span style="font-family: Courier New,monospace;"><span style="font-size: x-small;">return 0; </span></span></div><div style="font-style: normal; font-weight: normal; margin-bottom: 0cm;"><span style="font-family: Courier New,monospace;"><span style="font-size: x-small;">} </span></span></div></li>
</ol><div style="margin-bottom: 0cm;"><br />
</div><ol start="12"><li><div style="margin-bottom: 0cm;"><span style="color: maroon;"><i><span style="font-weight: normal;">You may use the article below (for more details).</span></i></span></div><ol><ol><h3><a href="http://www.rajivnair.in/2007/07/graphicsh-in-gnulinux.html"><span style="font-weight: normal;">Graphics.h in GNU/Linux</span></a><span style="font-weight: normal;"> By <a href="http://www.rajivnair.in/">rajivnair.in</a></span></h3></ol></ol><div style="margin-bottom: 0cm;"><span style="font-size: x-small;">Ive read and pondered upon lots of blogs and posts regarding the topics "20xx is the year of the linux desktop" , "linux is not yet ready for the desktop" etc etc.I guess the answer to all such questions is personal in nature. I mean id say "try and find out". I started using a GNU/Linux distribution about 8 months ago. Since then my aim was to do whatever stuff i was doing on XP, on GNU/Linux and maybe find stuff i couldnt do on XP. Thats how i approached/read about GNU/Linux though i later found out that, that approach isn't exactly right, as i was merely "reducing" GNU/Linux to a windows replacement, while its actually a whole another approach to computing.<br />
Anyways, since i joined engineering if there was one thing i didnt like at all, then it was the "Blue Screen Of Death" or the Turbo C interface. Since s3 i never used Turbo C at home. I've always preferred Visual Studio or Dev C++ over Turbo C. I just didnt like the interface. This dislike of turbo C didnt however hamper my coding functionalities in other IDE's as they always had what i wanted. After moving to GNU/Linux i was able to do the same programs and compile them using G++. But s7 is were the problem starts. Now i gotta "computer graphics" lab which makes extensive use of the "graphics.h" library. I had heard rumours earlier that it wasnt available in all IDE's and to my dismay i found out that it wasnt there in GNU/Linux either. Another problem was that since the functions it included involved direct access to the hardware merely copying the graphics.h header to the library folders wouldnt help. As always google helped. Stumbled upon the blog of a <a href="http://zaher14.blogspot.com/2007/01/graphicsh-in-linux.html">person</a> who was in the same situation as I am and he had found a solution. The answer to my problem was a set of libraries called libgraph which wraps around the <a href="http://en.wikipedia.org/wiki/Simple_DirectMedia_Layer">SDL API.</a><br />
His blog did contain steps to install in debian but it didnt work for me coz of minor hiccups. SO i spent sometime and finally succeeded in getting it to work on my ubuntu feisty install. I just thought i'd post it here so that google drops this in front of another seeker :)<br />
<br />
Step 1: Installing dependencies<br />
<br />
run <b>sudo apt-get install build-essential </b>to make sure you have installed all necessary compiler tools<br />
<br />
Now comes the real achy part. Open synaptic and install the following packages<br />
<br />
libsdl-image1.2<br />
libsdl-image1.2-dev<br />
guile-1.8<br />
guile-1.8-dev<br />
libsdl1.2debian-arts<br />
libartsc0-dev<br />
libaudiofile-dev<br />
libesd0-dev<br />
libdirectfb-dev<br />
libdirectfb-extra<br />
libfreetype6-dev<br />
libxext-dev<br />
x11proto-xext-dev<br />
libfreetype6(upgrade)<br />
libaa1<br />
libaa1-dev<br />
libslang2-dev<br />
libasound2<br />
libasound-dev<br />
<br />
You can install them in a single go by adding all the above package names(separated by a black space) to the end of <b>sudo apt-get install </b>Even if it asks you to uninstall some already installed stuff, tell it to proceed. After all this is over. Download this file onto your home folder: <a href="http://download.savannah.nongnu.org/releases/libgraph/libgraph-1.0.1.tar.gz">libgraph-1.0.1</a><br />
<br />
Right click on the file u just downloaded and click "Extract here"<br />
<br />
open terminal and navigate into the folder u just extracted the file contents into by running <b>cd libgraph-1.0.1<br />
</b>Now run the following commands one after the another. Proceed to the next command only if the preceding command executes without any errors. <b><br />
./configure</b><br />
<b>sudo make</b><br />
<b>make install<br />
</b>If you get any errors during the "sudo make" step, paste it in the comments section of this post.<br />
<br />
Now technically install is over. Try writing a simple program including graphics.h. Declare the values of gd and gm and call initgraph as follows<br />
<br />
<b>int gd,gm=VGAMAX;</b> <b>gd=DETECT;</b><b>initgraph(&gd,&amp;amp;amp;gm,NULL);</b><b><br />
</b><br />
and when compiling using g++ add an extra paramter <b>-lgraph<br />
</b>i.e if you are compiling a program dda.cpp in the terminal u type in<br />
<br />
<b>g++ dda.cpp -o dda.o -lgraph<br />
</b>And execute the program by runnung ./dda.o<br />
<br />
If on compile it gives u an error that says "could not load shared libraries" or something like that just run the following command and it should fix it<br />
<br />
<b>sudo cp /usr/local/lib/libgraph.* /usr/lib<br />
</b>I also read somewhere that graphics.h dosen't have ANY practical use in today's world and that its only "use" now is to help students learn to apply different algorithm's they have to study in a paper called "Computer Graphics"</span> </div></li>
</ol>Vksalianhttp://www.blogger.com/profile/02829888974539621549noreply@blogger.com15tag:blogger.com,1999:blog-5831921526357706514.post-10895761705990246532010-10-13T04:27:00.000-07:002010-10-14T08:26:26.211-07:00Vruksham Software Core Developers.<div style="text-align: justify;"> </div><div style="text-align: justify;">An enthusiastic team situated in Hanchinal, Kundgol Taluk, Dist. Dharwad have started a Software Development Group for development of customised software solutions for both RPM and DEBIAN linux Operating Systems. The team is known as Vruksham Software Core Developers.</div><div style="text-align: justify;"><br />
</div><div style="text-align: justify;">Scope : The main target of the team is to customize the softwares used for VLSI DESIGN and SIMULATION. With the solutions provided at VSCD, one can automate most of the design related stuffs and there by reducing sufficient time and money spent on works.</div><div style="text-align: justify;">For example, there is a software (development version) that is capable of automating Magic Layout generation as per the given input data. The layout of any size can be regenerated automatically, several times with no much effort. You can download the package at below links,</div><div style="text-align: justify;"><br />
</div><div style="text-align: justify;"> 1. <a href="http://groups.google.com/group/salianvk/web/magic-auto-tambur-0.0.2-1.i386.rpm">Magic Automation Version 1.0 - RPM Package.</a></div><div style="text-align: justify;"> 2. <a href="http://groups.google.com/group/salianvk/web/magic-auto-final-0.1.4-1.all.deb">Magic Automation Version 1.0 - Debian Package.</a></div><div style="text-align: justify;"><br />
</div><div style="text-align: justify;">The team is headed by Mr. Basavaraj Tambur, with plenty of knowledge in Python, Perl, TK/TCL, Java, C/C++ scripting.</div><div style="text-align: justify;"><br />
</div><div style="text-align: justify;">One more person named Mr. VKSALIAN has knowledge on RPM and DEBIAN packages and basic script knowledge is assisting the team in creating Installer packages for Linux. Presently he is concentrating on Package creation methods and customization of packages.</div><div style="text-align: justify;"><br />
</div><div style="text-align: justify;">Basically, the idea for software development came into mind when they found some scope for customization and automation of softwares. Then, with little knowledge they started creating small packages and found success, surprisingly. They continued the work as an entertainment which resulted in technical knowledge development. Soon, they thought of forming a group to develop such softwares, and the result is VSCD.</div><div style="text-align: justify;"><br />
</div><div style="text-align: justify;"><br />
</div><div style="text-align: justify;">The present Projects being handled at VSCD are,</div><div style="text-align: justify;"><br />
</div><div style="text-align: justify;">1. File converter from .rm to mp3 (all formats) for Linux.</div><div style="text-align: justify;">2. Automation for Magic Layouts (VLSI).</div><div style="text-align: justify;"><br />
</div><div style="text-align: justify;">Future projects we planned,</div><div style="text-align: justify;"><br />
</div><div style="text-align: justify;">1. Decoder package for all formats in single package. (Linux).</div><div style="text-align: justify;">2. Karaoke Maker software for Linux (High quality).</div><div style="text-align: justify;">3. Simulation program for VLSI designs with flexibility (replacement for ngspice).</div><div style="text-align: justify;">4. Mini Linux OS (VSCD Linux).</div><div style="text-align: justify;"><br />
</div><div style="text-align: justify;">You may download trial base sample development packages here, below,</div><div style="text-align: justify;"><br />
</div><div style="text-align: justify;">1. <a href="http://groups.google.com/group/salianvk/web/rm2mp3-tk-final-0.1.4-1.noarch.rpm">RPM rm2mp3 converter.</a></div><div style="text-align: justify;"><br />
</div><div style="text-align: justify;">2.<a href="http://groups.google.com/group/salianvk/web/rm2mp3-tk-final-0.1.4-1.all.deb"> Debian rm2mp3 Converter.</a></div><div style="text-align: justify;"> </div>Vksalianhttp://www.blogger.com/profile/02829888974539621549noreply@blogger.com0tag:blogger.com,1999:blog-5831921526357706514.post-90378034378910591672010-10-07T04:05:00.000-07:002010-10-07T04:05:52.431-07:00Cheapest Mic-Set, using Ubuntu Linux OS, for conducting seminars and functions.If you are using a laptop (ASUS LAPTOP in my case) with UBUNTU 9.04 Linux, then you can use the computer to setup a Cheapest MIC-SET that you may need to conduct functions, meetings etc.<br />
<br />
What are the things needed ?<br />
<br />
1. A small MIC from a Mobile Head Phone..<br />
<br />
2. 3mm Audio Jack with paired wires of sufficient length.<br />
<br />
3. Any cheap Amplifier / FM set that is available in market for Rs. 300/-.<br />
<br />
4. Old PC speakers- 2 Nos.<br />
<br />
HOW TO ?<br />
<br />
1. Solder MIC to the cable that connects to the Audio Jack.<br />
<br />
2. Insert the audio jack into ASUS eeePc Laptop.<br />
<br />
3. Swith on the Laptop.<br />
<br />
4. Use Volume Control Panel to switch the MIC ON. Make Volume level high.<br />
<br />
5. Connect the audio output to Amplifier.<br />
<br />
6. Talk at the MIC and correspondingly adjust the MIC volume.<br />
<br />
YOUR SIMPLE MIC-SET is ready.<br />
<br />
<br />
Advantages :<br />
<br />
1. You can save upto Rs. 1000 / day. Because the rented MIC_SET costs around Rs. 1000/ day at our place.<br />
<br />
<br />
Note : This article is to just show that how differently we can think.Vksalianhttp://www.blogger.com/profile/02829888974539621549noreply@blogger.com0tag:blogger.com,1999:blog-5831921526357706514.post-29307943208556924522010-07-02T03:14:00.000-07:002010-07-02T03:14:09.382-07:00Winff - Video Converter for Ubuntu Linux. I found a software on net that is capable of converting almost any video from one type to another. It makes use of <b>ffmpeg</b> package and related plugins for video conversion.<br />
<br />
The program winff can be installed as,<br />
<br />
<b>sudo apt-get install winff</b><br />
<br />
Please make sure that ffmpeg is already installed. To run the program, just type in <i><b>winff</b></i> in a console window.<br />
<br />
The winff makes use of GUI and very easy to use.<br />
<br />
The softwares are readily available under Ubuntu. I have tested the software in both Ubuntu 9.10 and 10.04 and worked fine for me.Vksalianhttp://www.blogger.com/profile/02829888974539621549noreply@blogger.com0tag:blogger.com,1999:blog-5831921526357706514.post-12637444956923004382010-05-18T02:17:00.000-07:002010-05-18T02:17:22.244-07:00Screen Video Capture using kx11grab & ffmpeg in Ubuntu 10.04. Suppose, you need to teach someone on how to use a particular software etc. In such cases it will be useful if you capture the video display and send to one who needs it. There are some tools that can capture the screen and save in different video formats such as avi, mpeg etc.<br />
<br />
In Ubuntu, there are two tools that work together to capture screen. They are<br />
1. ffmpeg<br />
2. kx11grab<br />
<br />
These can be installed as,<br />
<br />
<b><i>sudo apt-get install ffmpeg</i></b><br />
<b><i>sudo apt-get install kx11grab</i></b><br />
<br />
Usage :<br />
<br />
Use the below sample command to capture screen,<br />
<br />
<b><i>ffmpeg -f x11grab -s 1024x768 -r 75 -i :0.0 /tmp/out.avi</i></b>Vksalianhttp://www.blogger.com/profile/02829888974539621549noreply@blogger.com0tag:blogger.com,1999:blog-5831921526357706514.post-3441491249776621892010-03-29T07:55:00.000-07:002010-03-29T07:55:20.020-07:00Ubuntu 10.04 Linux will be released on 27th April 2010. The next version of Ubuntu will be Lucid Lynx and will be known as 10.04 version. The date for release of final version is on 27th April 2010. The version will be a LTS i.e. long term support.Vksalianhttp://www.blogger.com/profile/02829888974539621549noreply@blogger.com0tag:blogger.com,1999:blog-5831921526357706514.post-86345316224417261792010-02-08T02:09:00.000-08:002010-02-21T08:07:37.172-08:00A Solution to BUG in Desktop-switcher of Ubuntu 9.04 Netbook Remix. (Bug #370133)<div style="text-align: justify;"><b>Introduction:</b></div><div style="text-align: justify;"><b> </b> In NBR Ubuntu 9.04 version, there are 2 modes of Desktops. </div><div style="text-align: justify;"><br />
</div><div style="text-align: justify;"><i>1. Ubuntu Netbook Desktop.</i></div><div style="text-align: justify;"><i>2. Classic Desktop.</i></div><div style="text-align: justify;"><br />
</div><div style="text-align: justify;"> Switching between these 2 modes can be done by running a command "<b>desktop-switcher</b>" in Terminal Window Or By selecting it from </div><div style="text-align: justify;">"<b>Menu</b></div><div style="text-align: justify;"><b>->System->Preferences->Switch Desktop Mode</b>". </div><div style="text-align: justify;"><i><b><br />
</b></i></div><div style="text-align: justify;"><i><b>Problem:</b></i> There is a BUG in the desktop-switcher package that comes as a default package of Ubuntu NBR 9.04. The bug will affect the Desktop Modes as a result of which the "Classic desktop" will lose its panels, Menu, etc. You will see only a Background Image + any Icons on Desktop. No Keys will work at that stage. But you can add a Terminal LAUNCHER to Desktop and run some commands.</div><div style="text-align: justify;"><br />
Note : You need a Terminal window to go for below steps. If you are in "Classic desktop" mode, you can Right Click on Desktop area and select "Create a Launcher......" from the menu. Use command "gnome-terminal".<br />
<br />
</div><div style="text-align: justify;"><i><b>Solution:</b></i></div><div style="text-align: justify;"><br />
</div><div style="text-align: justify;">Steps are,</div><div style="text-align: justify;"><br />
</div><div style="text-align: justify;">1. Remove old desktop Switcher package.</div><div style="text-align: justify;"><b>sudo dpkg -r --force-all desktop-switcher</b><br />
2. Remove Configeration data of desktop switcher.</div><div style="text-align: justify;"><b>rm -rf ~/.config/desktop-switcher</b><br />
3. Install desktop-switcher_0.4.6_i386.deb from the link : <a href="http://swiss.ubuntuforums.org/attachment.php?attachmentid=111829&d=1241109082"><b>http://swiss.ubuntuforums.org/attachment.php?attachmentid=111829&d=1241109082</b></a></div><div style="text-align: justify;"><br />
4. Try switching between Desktop Modes and finally Restart the computer if needed.</div><div style="text-align: justify;"><i><br />
</i></div><i>Reference : My practical Testing + Information from the site http://swiss.ubuntuforums.org/attachment.php?attachmentid=111829&d=1241109082</i>Vksalianhttp://www.blogger.com/profile/02829888974539621549noreply@blogger.com0tag:blogger.com,1999:blog-5831921526357706514.post-86567649472153558652009-11-07T22:23:00.000-08:002009-11-07T22:23:55.743-08:00Recover EXT3 Partitions and Data - Ubuntu Linux.<i>Note : Please use this option only as final option for recovering data from Corrupted <b>ext3 </b>partitions. In my case, I recovered all files and folders from a corrupted ext3 partition, in which Madriva 2007 was installed. I used my ASUS eeePC with Ubuntu 9.10 (Karmic Koala) version, for this. The Hard disk was connected to eeePC through USB cable.</i><br />
<br />
<br />
Steps :<br />
<br />
1. Connect the corrupted HardDisk to your Laptop using USB cable.<br />
2. Boot your computer with UBUNTU (preferably).<br />
3. Make sure that Harddisk is unmounted (usually you can not mount a corrupted partitioned Harddisk).<br />
4. Open a "Terminal" type the following command and press ENTER.<br />
<br />
<i><b>/sbin/fsck.ext3 -b 57345 /dev/sdc7</b></i><br />
<br />
<i>Where /dev/sdc7 was the partition to be recovered. Use "Sudo" as prefix for the above command if you get messages such as " Permission denied".</i><br />
<i><b> <br />
</b></i><br />
5. The above command will recover partition and will prompt for "yes". (<i>In my case, I gave "y" to all prompts).<b> </b>After the execution of this command, e2fsck starts automatically.</i><br />
<br />
6. Finally you will find that all files and directories are recoverd in the partition. You may check by mounting the partition and browsing.<br />
<i> </i><b><br />
</b><br />
<i>Note : When I was usig the command I recovered A-Z files and folders as it was. But due to my mistake, I run the command once again on the recoverd partition. Finally I left with only single folder named "lost+found".<b> </b>I browsed the folder to see my lost files and folders and it was stored in several sub-folders. One example is, My Desktop folder was found in ""#76511</i><b>" </b><i>folder. When I tried to copy the folder to other folder, I could not copy the files / folders and I was getting error message that the "file or folder" does not exist. Then I used "kget" command to copy the files and folders to other folders. (i.e. Right click on files and goto "Download with kget" option and then chose the Destination folder, wher the files and folders to be copied). Please note that "kget" can be used only for files and not for folders. Hence you need to create folders manually, wherever needed.</i> <br />
<br />
Reference : An article on Net + My effort.Vksalianhttp://www.blogger.com/profile/02829888974539621549noreply@blogger.com0tag:blogger.com,1999:blog-5831921526357706514.post-72645335636331643622009-11-05T03:13:00.000-08:002010-02-21T08:03:30.603-08:00A Solution - Broken Downloads in Ubuntu Linux. <br />
<br />
Suppose you are downloading a file from Internet using your web browser (Mozilla Firefox). Suddenly, Internet gets disconnected. At that moment you have no choice but to re-download, usually. Because, if you select "retry" option, download starts from the beginning and you will lose all the partial data that you have downloaded. I found a solution for this, which helps to continue the downloads from the point where it got disconnected previously.<br />
<br />
1. Open a "Terminal" window / "Konsole" window.<br />
2. Change directory to the Download directory. e.g. If you are downloading to a folder "/home/v", then type the command <i><b>cd /home/v</b></i>.<br />
3. Then type the following command to continue downloading,<br />
<br />
<i><b>wget -c http://www.downloadpack.com/main/example.deb</b></i><br />
<br />
Where,<br />
<i>http://www.downloadpack.com/main/example.deb</i> is the Download link for the file example.deb which need to be downloaded.<br />
<i>-c</i> option enables you to continue downloads.<br />
<br />
Please note that you can get Download Link of the file in Downloads section of your browser, you can just right click on the broken download file and copy the link location. <br />
<br />
(Note :<br />
1. Another option is to use <b>wget</b> command alone in order to download bigger files.<br />
2. Usually broken download creats a file named "example.deb.part".<br />
3. I took help from Nanda N, KarMic for this, thanks to her.Vksalianhttp://www.blogger.com/profile/02829888974539621549noreply@blogger.com0tag:blogger.com,1999:blog-5831921526357706514.post-5648814699460923102009-11-05T01:12:00.000-08:002009-11-05T01:12:24.513-08:00Install NGSPICE & MAGIC - VLSI Tools for Ubuntu OS. Installation of VLSI design tools such as "ngspice" and "magic" is fairely easy in Ubuntu Linux OS. The simple steps are given below. Please note that Ubuntu uses "debian" packages.<br />
<br />
<b>Steps :</b><br />
<br />
1. Go to the below sites and download the packages. <br />
<br />
MAGIC: <br />
<a href="http://tuxmaniac.com/work/packages/magic/magic_7.5.129-1_i386.deb" target="_blank">http://tuxmaniac.com/work/<wbr></wbr>packages/magic/magic_7.5.129-<wbr></wbr>1_i386.deb</a><br />
<br />
NGSPICE:<br />
<a href="http://nchc.dl.sourceforge.net/sourceforge/ngspice/ngspice_17.0.0-1_i386.deb" target="_blank">http://nchc.dl.sourceforge.<wbr></wbr>net/sourceforge/ngspice/<wbr></wbr>ngspice_17.0.0-1_i386.deb</a><br />
<br />
XSPICE: <br />
<a href="http://nchc.dl.sourceforge.net/sourceforge/ngspice/xspice_17.0.0-1_i386.deb" target="_blank">http://nchc.dl.sourceforge.<wbr></wbr>net/sourceforge/ngspice/<wbr></wbr>xspice_17.0.0-1_i386.deb</a><br />
<br />
<i>Note : XSPICE is a dependent package for NGSPICE.</i><br />
<br />
2. Install packages using following command.<br />
<br />
MAGIC:<br />
$ <b><i>dpkg -i <a href="" target="_blank">magic_7.5.129-<wbr></wbr>1_i386.deb</a></i></b><br />
<br />
<br />
NGSPICE: <br />
$ <i><b>dpkg -i xspice_17.0.0-1_i386.deb </b></i><i><b>ngspice_17.0.0-1_i386.deb</b></i><br />
<br />
<br />
<i>Note: You can not install "xspice" & "ngspice" independently. You need to install both at a time.</i><br />
<br />
<br />
Happy Designing....<br />
<br />
<br />
<i>Note : I took help from Mr. Prassana Kalyan, KarMic for this. Thanks to him.</i>Vksalianhttp://www.blogger.com/profile/02829888974539621549noreply@blogger.com3