Showing posts with label Linux. Show all posts
Showing posts with label Linux. Show all posts

Sunday, October 07, 2012

Linux Commands - Tree View

Came across a very useful file-structure-view script from this website for a tree view of the directory.

Just replicating here in case the site disappears :-)

#!/bin/sh
#######################################################
#  UNIX TREE                                          #
#  Version: 2.3                                       #
#  File: ~/apps/tree/tree.sh                          #
#                                                     #
#  Displays Structure of Directory Hierarchy          #
#  -------------------------------------------------  #
#  This tiny script uses "ls", "grep", and "sed"      #
#  in a single command to show the nesting of         #
#  sub-directories.  The setup command for PATH       #
#  works with the Bash shell (the Mac OS X default).  #
#                                                     #
#  Setup:                                             #
#     $ cd ~/apps/tree                                #
#     $ chmod u+x tree.sh                             #
#     $ ln -s ~/apps/tree/tree.sh ~/bin/tree          #
#     $ echo "PATH=~/bin:\${PATH}" >> ~/.profile      #
#                                                     #
#  Usage:                                             #
#     $ tree [directory]                              #
#                                                     #
#  Examples:                                          #
#     $ tree                                          #
#     $ tree /etc/opt                                 #
#     $ tree ..                                       #
#                                                     #
#  Public Domain Software -- Free to Use as You Like  #
#  http://www.centerkey.com/tree  -  By Dem Pilafian  #
#######################################################

echo
if [ "$1" != "" ]  #if parameter exists, use as base folder
   then cd "$1"
   fi
pwd
ls -R | grep ":$" |   \
   sed -e 's/:$//' -e 's/[^-][^\/]*\//--/g' -e 's/^/   /' -e 's/-/|/'
# 1st sed: remove colons
# 2nd sed: replace higher level folder names with dashes
# 3rd sed: indent graph three spaces
# 4th sed: replace first dash with a vertical bar
if [ `ls -F -1 | grep "/" | wc -l` = 0 ]   # check if no folders
   then echo "   -> no sub-directories"
   fi
echo
exit

Saturday, September 24, 2011

Software Protection Initiative

Food for thought for our Defence Forces whose IT Security awareness/implementation needs a big overhaul considering the massive dependence on IT today!!
Check out the US Air Force 'Software Protection Initiative' and specifically the 'Lightweight Portable Security' Linux OS - which is the need of the hour. This one (LPS) has made it to my CD utility box!!!


Extract from the Software Protection Initiative Site of the US Air Force:

"Lightweight Portable Security (LPS) creates a secure end node from trusted media on almost any Intel-based computer (PC or Mac). LPS boots a thin Linux operating system from a CD or USB flash stick without mounting a local hard drive. Administrator privileges are not required; nothing is installed. The ATSPI Technology Office created the LPS family to address particular use cases. LPS-Public is a safer, general-purpose solution for using web-based applications. The accredited LPS-Remote Access is only for accessing your organization's private network.

LPS-Public allows general web browsing and connecting to remote networks. It includes a smart card-enabled Firefox browser supporting CAC and PIV cards, a PDF and text viewer, Java, and Encryption Wizard - Public. LPS-Public turns an untrusted system (such as a home computer) into a trusted network client. No trace of work activity (or malware) can be written to the local computer. Simply plug in your USB smart card reader to access CAC- and PIV-restricted US government websites.

LPS differs from traditional operating systems in that it isn't continually patched. LPS is designed to run from read-only media and without any persistent storage. Any malware that might infect a computer can only run within that session. A user can improve security by rebooting between sessions, or when about to undertake a sensitive transaction. For example, boot LPS immediately before performing any online banking transactions. LPS should also be rebooted immediately after visiting any risky web sites, or when the user has reason to suspect malware might have been loaded. In any event, rebooting when idle is an effective strategy to ensure a clean computing session. LPS is updated on a regular basis (at least quarterly patch and maintenance releases). Update to the latest versions to have the latest protection. "

Sunday, September 18, 2011

Debian is the champ - 2011

Great post on Linux distros at Tuxradar

Of course Debian is the champ :)

Where is the doubt??????????




Wednesday, July 27, 2011

Unix/Linux mastering source - great compilation

Came across one of the most comprehensive Unix/Linux command site - an easy to follow/try listing that would definitely make even a new user a master of Linux (of course - you have to spend time in the exciting command line :)
Those interested, do try! And bet even if you learn 10% of the commands - you would be a Linux Zen master!! :)

Thursday, July 07, 2011

Easiest Linux Distro for N?ewbie

A nice discussion on 'easiest Linux distro' at Slashdot - some of the comments are must read. Check it out.
Good to know my favourite for newbie 'Linux Mint' has quite a lot of support!

Thursday, April 07, 2011

Stitch PDF files togather

Many a times I had to face the issue of sending multiple PDF files for official/personal reasons - either by email or for backing up. What bugged me was I had to multiple attachments or references - specially when one had to send a multi-paged invoice or bills - which has been scanned as PDF (each page).

Linux provided a simple solution - using the inbuilt 'Ghostscript' program. Just run it in the command line and presto, we have an output PDF combined file. (ofcourse - you have to have pdfwrite installed - by a simple apt-get install command)


gs -dBATCH -dNOPAUSE -q -sDEVICE=pdfwrite -sOutputFile=finished.pdf file1.pdf file2.pdf
where:
  • gs -- starts the Ghostscript program
  • -dBATCH -- once Ghostscript processes the PDF files, it should exit. If you don't include this option, Ghostscript will just keep running
  • -dNOPAUSE -- forces Ghostscript to process each page without pausing for user interaction
  • -q -- stops Ghostscript from displaying messages while it works
  • -sDEVICE=pdfwrite -- tells Ghostscript to use its built-in PDF writer to process the files
  • -sOutputFile=finished.pdf -- tells Ghostscript to save the combined PDF file with the name that you specified

Sunday, March 06, 2011

Open Source and Linux Economics


The usual question that many ask and suspect - 'How come Linux is given away free? And how do these companies - like Ubuntu - survive?'

I always have a difficult time answering that - and most of the time can make out that the audience is not convinced. Those in the government and decision making chain instead of being thankful that we have a great software available free of cost - do tend to feel there is some ulterior motives (who gives away things for free now-a-days??) or just don't believe it!

Came across a great blog by Mark Shuttleworth - the Owner/Creator of Ubuntu (his company is called Canonical) - wherein he explains some of the free and Open Source Economics. Check it out here
(of course - make it a point to check out the fair comments at the blog site too! Pretty interesting debate!!)

Mark is a 'billionaire' by the way, and the second 'self-funded' space tourist - check his Wikipedia site here

Extract from his blog:
The bulk of the direct cost in creating the audience of Ubuntu users is carried by Canonical. There are many, many indirect costs and contributions that are carried by others, both inside the Ubuntu community and in other communities, without which Ubuntu would not be possible. But that doesn’t diminish the substantial investment made by Canonical in a product that is in turn made available free of charge to millions of users and developers.
The business model which justifies this investment, and which we hope will ultimately sustain that effort for the desktop without dependence on me, is that fee-generating services which are optional for users provide revenue to Canonical. This enables us to make the desktop available in a high quality, fully maintained form, without any royalties or license fees. By contrast, every other commercial Linux desktop is a licensed product – you can’t legally use it for free, the terms for binaries are similar to those for Windows or the MacOS. They’re entitled to do it their way, we think it’s good in the world that we choose to do it our way too.

Wednesday, January 26, 2011

Office suite freedom with LibreOffice 3.3 release this Republic Day

A special gift this 62nd Republic Day 26 Jan 2011 for all those who value their 'Freedom' - the release of 'LibreOffice 3.3' - a solid replacement for MS-Office Suites and OpenOffice (bought over by Oracle) on 25 Jan 2011.

Check out: http://bit.ly/eNnh09

Though MS-Office is indeed a great software with loads of features, it is mired in licensing requirements and proprietary formats! More so when such a great 'can do nearly all our office work' suite like 'LibreOffice' is available for free, why bother with MS-Office? Moreover, MS-Office is not available for Linux (you can install MS-Office using Windows emulators like Crossover etc! but why bother?)

Just try out LibreOffice - and checkout what you can do with it. ITs FREE after all!!! And yess, LibreOffice can open all your doc, ppt etc formats of MS-Office - so no sweat there.

Download LibreOffice for Windows/Mac/Linux from: http://www.libreoffice.org/download/

For Linux users those who are using Ubuntu or Mint, its pretty easy to install. Follow this steps:-


(a) Start a terminal window and issue these commands (you’ll be asked for your password):
                sudo add-apt-repository ppa:libreoffice/ppa 

        sudo apt-get update && sudo apt-get install libreoffice

(b) To complete the integration to Ubuntu (Gnome) or Kubuntu (KDE), you will also need to either
      sudo apt-get install libreoffice-gnome
                or
      sudo apt-get install libreoffice-kde

Thats it - as easy as that !!
If you are adventurous enough and want to add on more features, get the 'extensions' for LibreOffice available from the OpenOffice extensions repository at : http://libreplanet.org/wiki/Group:OpenOfficeExtensions/List

Enjoy!!

Monday, September 06, 2010

Managing results without fat pay cheque - the Open Source Way

Came across this excellent animation video from M.I.T - which seems to clear some of the fuzziness and mystic of why Open Source is so successful. Of course there is reference to Linux. And credibility of the research can be gauged from the fact that it is from M.I.T (not the Chennai one - but the real M.I.T :-] and believe it or not - has references to India (Madurai in particular!)) .

Though a bit longish - about 11 minutes, it is pretty interesting - a must for top level managers - who are under the impression fat pay cheque can achieve results!! This is a real eye opener. And for Open Source fans like me - well, we always knew that there was something right about the Open Source philosophy!!

Enjoy the video!!!


Thursday, September 02, 2010

New kid in town - Pinguy OS

Wanna try out Pinguy OS at the earliest
Check out: http://pinguy-os.sourceforge.net/

From the web-site:

Pinguy OS is an optimise build of Ubuntu 10.04 LTS Minimal CD with added repositories, tweaks and enhancements that can run as a Live DVD or be installed. It has all the added packages needed for video, music and web content e.g. flash and java, plus a few fixes as well. Like fixing the wireless problems, gwibber’s Facebook problem and flash videos in full-screen.

Everything is set-up for samba, all you need to do is right click a folder you want to share and add a password in samba using system-config-samba.
It also has a UPnP/DLNA server (pms-linux) so you can share your music, video’s etc. With a PS3, XBOX 360, Smart Phones or any other UPnP/DLNA media reader.

Friday, August 13, 2010

Linux Power - cross country config

This was a first one for me - and showed the amazing power of Linux - configuring Tata Photon+ of a Linux machine cross country - of a machine in Kochi and me at Mumbai (of course - on the Internet, distance doesn't matter - I could have been in Australia for that matter!).

No names - thats for later :-) - but a senior officer at SNC (much senior than me of course) - who has been bowled over by Linux wanted to badly use Tata Photon+ for portability reasons. I did pass on info for configuring it, and realised he may be not too confident on the command line.

The first challenge was to somehow get him connected to the Internet (landline Internet connectivity would have been easiest - but was not available immediately!!). Got him easily connect up to the Internet using his CoolPad Reliance Mobile (yess, it was a single shot install without much ado), than had his dymanic IP found, and had him install 'ssh' (wanted to use VNC for remote desktop - realised speeds of mobile connectivity not much), then remote logged in his machine, found out the Tata Photon+ plugged in details, configured wvdial and the 'usbserial' module - and bingo - he was connected through his Tata Photon+

Hmmmm... you bet he was surprised and impressed, not much with me, but with the Linux versatility thing!! Though I have done lots of cross country configs for few other apps, Tata Photon+ was a first cross country for me

Tuesday, July 20, 2010

Configure Tata Photon+ on Ubuntu/Linux Mint

Refer to my blog of Wednesday, February 24, 2010 regarding configuring USB Dongles for Internet (Reliance NetConnect, Photon+ etc) on Linux.


Well, today I was configuring the latest Tata Photon+ (model: EC 1261, Huawei Chip) on Linux Mint 9 which required some additional steps to the ones mentioned in my referred blog. Thought would share it!


Though followed every step as mentioned in my referred blog, the Internet connect was of no success. The dongle just wont be recognized as a modem - but just as a 'USB generic converter'. 

Post addition of 'usbserial' module as mentioned in my blog, the USB dongle was no more recognised as  storage device. Did a bit of Googling and visited various forums - and finally came up with the solution (In Linux, there is always a solution :-) - and learnt something called the 'ZeroCD' feature!!!


Steps as follows:-

1. Did the 'lsusb' to find the vendor and product id after inserting the Tata Photon+ dongle in the system

2. Did the 'sudo modeprobe usbserial vendor=0x12d1 product=0x1446' thing.

3. Removed the dongle and reinserted it.


4. Checked the 'lsmod' command to ensure that usbserial module is available and usb-storage module is not available (else usb-storage makes the dongle to be seen as a storage device), If usb-storage would have been there, would have done a 'rmmod' for it.


5. Cheked 'dmesg' and found that the dongle is being seen on ttyUSB0.


6. On running 'wvdialconf' - it could not find the dongle at ttyUSB0


7. checked 'dmesg' and found that the dongle is being recognised as 'USB Generic Converter' and not as a modem


8. Based on googling/forum inputs, downloaded 'usb-modeswitch-data' and 'usb-modeswitch' debian packages from the Debian repository.
Why use this? Explained in the repository:

mode switching data for usb-modeswitch

Several new USB devices have their proprietary Windows drivers onboard, especially WAN dongles. When plugged in for the first time, they act like a flash storage and start installing the driver from there. If the driver is already installed, the storage device vanishes and a new device, such as an USB modem, shows up. This is called the "ZeroCD" feature.
On Debian, this is not needed, since the driver is included as a Linux kernel module, such as "usbserial". However, the device still shows up as "usb-storage" by default. usb-modeswitch solves that issue by sending the command which actually performs the switching of the device from "usb-storage" to "usbserial".
This package contains the commands data needed for usb-modeswitch.


9. Installed them using 'dpkg' - 'sudo dpkg -i '


10. Re-inserted the dongle - and Viola! - it was recognised as a GSM modem!!

11. did the 'wvdialconf' (can also use 'gnome-ppp' ) and the system was swinging on the Internet!!!


STEPS 8 AND 9 WERE CRITICAL FOR SWITCHING THE USB!!



Tuesday, June 22, 2010

Dell Plugs for Open Source Ubuntu Linux

Well Well well... finally Dell too! As they say... "you cannot keep a good man down"!!

Here's Dell's plug for Open Source Ubuntu/Linux
http://www.dell.com/content/topics/segtopic.aspx/ubuntu?c=us&cs=19&l=en&s=dhs&~ck=anavml

Best part - check out Sl (4) - for Anti-Virus/Anti-Spyware - it says "UNWARRANTED"  !!! :-)

Read and enjoy!!!


===========Extract===============

First and foremost, Ubuntu is an Operating System. Just like Microsoft®  Windows®  or Apple MacOS, you can use Ubuntu to surf the web, check email, or just about anything you might want to do. Here’s a "Top Ten" list of things you should know about Ubuntu.
10) Ubuntu is simple and elegant
If you’re the kind of person who likes your computer to simply work, Ubuntu is right for you. It’s based on stable, secure, easy-to-use software that’s been around for a long time.
9) Ubuntu is designed for the Internet
Do you spend most of your time on the Internet? Ubuntu connects you to the Internet in seconds. Firefox is a very popular browser and works well with practically every website you’ll run across, e.g. news sites, social media sites, etc. It also works great with web-based e-mail sites like Yahoo or Gmail.
8) Ubuntu is "social from the start"
The people who make Ubuntu designed it to be very social-media centric. Do you use Facebook, Twitter, MySpace, or any of the other dozens of popular social networking sites? Ubuntu 9.10 works very well with these websites. And beginning with Ubuntu 10.04, these websites will be integrated into the Ubuntu OS itself for your convenience.
7) Ubuntu plays videos, songs, and movies easily
Do you like to watch videos on YouTube, buy songs from Amazon, pop in DVD’s from the local video store? No problem! Dell bundles a multimedia player with Ubuntu to deliver a great entertainment experience.(DRM protected music not supported.)
6) Ubuntu is secure
According to industry reports, Ubuntu is unaffected by the vast majority of viruses and spyware.
5) Ubuntu boots up fast
Beginning with Ubuntu 10.04, available on Dell systems this summer, boot times have improved dramatically over Ubuntu 9.10. Depending upon the Dell computer your purchase, boot times can be around 30 seconds!
4) With Ubuntu, you have access to 1,000’s of free software programs
What do you like to do?
Ubuntu
3) Ubuntu with OpenOffice is compatible with Microsoft®  Office and Adobe®  Acrobat® 
Do you need to open Microsoft Office documents? What about Adobe Acrobat? Ubuntu comes with the award-winning OpenOffice software. With it, not only can you create word processing documents, spreadsheets, presentations, and even drawings, but it can also open and save documents in Microsoft Office format. Do you ever get .pdf files emailed to you—no problem!
2) Ubuntu is based on Linux® 
Linux has been around for nearly 20 years. The software itself is not only stable and reliable, but also pervasive. Linux is used on computers of all sizes ranging from the biggest to the smallest.
1) Ubuntu comes pre-loaded with select Dell desktop, notebook, and netbook computers
Beginning in 2007, Dell began shipping computers with Ubuntu. Since then, Dell has shipped more computers pre-loaded and pre-tested with Ubuntu than any other computer maker in the world. Every computer we ship with Ubuntu has been fully tested to ensure the best possible Internet and multimedia experience Linux has to offer. Two high-tech leaders—ensuring Ubuntu on Dell "just works."

Tuesday, April 06, 2010

Linux Cheat Sheets compilation

1. Linux Command Line

2. Linux Security

3. Linux Administration

4. Gnome/KDE

5. sed/awk/vim and other tools

6. Distro Specific

7. Everything Else

  • Online Man Pages – The ultimate cheat sheet repository. Also use the ‘man‘ command.

Monday, March 08, 2010

Women and Linux

Happy Women's Day!! 


http://www.linuxchix.org/
LinuxChix is a community for women who like Linux and Free Software, and for women and men who want to support women in computing. The membership ranges from novices to experienced users, and includes professional and amateur programmers, system administrators and technical writers.
http://ubuntu-women.org/
Ubuntu-Women is a team functioning under Ubuntu to provide a platform and encouragement for women to contribute to Ubuntu-Linux, a Debian based free and open-source GNU/Linux software. Our main role will be along the lines of supplementing and being the stepping stone toward the larger Ubuntu-Linux world. Membership is open to all

http://www.faqs.org/docs/Linux-HOWTO/Encourage-Women-Linux-HOWTO.html
This article explains some of the difficulties and biases women face in the Linux community and examines various strategies for addressing those difficulties in order to encourage more participation by women.
http://women.debian.org/home/
This is the homepage of the Debian Women Project, a subproject of the Debian Project.
http://fedoraproject.org/wiki/Women
GNOME Women is a group dedicated to providing encouragement for women to contribute to GNOME, a free and open-source GNU/Linux and Unix desktop suite.
http://community.kde.org/KDE_Women
KDE Women is a group of women in the KDE community. We are here to help increase the number of women in Open Source and to support each other.
http://groups.fsf.org/wiki/LibrePlanet2010/Schedule/Sunday
This years LibrePlanet Conference of the 'Free Software Foundation' which is to be held from March 19th-21st in Cambridge, Massachusetts, at the Harvard University Science Center has a special session for Women - check out the 1030 Hrs presentation on 21st Mar.

Wednesday, February 24, 2010

Configure Reliance TATA USB modems on Linux

Many have been querying on configuring Reliance/ TATA USB Modems on Linux machines (for both Laptops and Desktops).

The USB Modems available in India today use either Huawei or ZTE chips (check the USB Modem - must be mentioned on it!!). Follow the undermentioned procedure to configure your Linux system for using these modems.
1. Connect your USB modem to the USB port

2. On a terminal window, run 'lsusb'

3. Check for output like this:
Bus 005 Device 009: ID 12d1:140b Huawei Technologies Co., Ltd.

(for ZTE chips, lookout for ZTE in the out put and note the ID)

4. In the output, the 4 characters after ID is the Vendor ID, and post the next column, the 4 characters is the Product ID.
(you can also find these IDs  by reading the 'devices' file cat /proc/bus/usb/devices)


5. Now use 'sudo' to load the usbserial modules

$sudo modprobe usbserial vendor=0×12d1 product=0×140b
6. On the terminal type 'dmesg' - and check for which ttyUSB port has been allotted  for the modem - maybe ttyUSB0 or ttyUSB1 or ttyUSB2 (if required, remove and reconnect the USB Modem to check for the ttyUSB)

7. Then configure 'wvdial' by modifying the 'wvdial.conf' file using any editor"
$ sudo vim /etc/wvdial.conf

[Modem0]
Modem = /dev/ttyUSB0
Baud = 115200
SetVolume = 0
Dial Command = ATDT
Init1 = ATZ
Username = You Phone Number Here
Password = Your Password ... usually same as your phone number
Phone = #777
Stupid Mode = 1

8. Now run 'sudo wvdial' - post some brief message, you would be connected to the net!
Get in touch for any queries!!

Monday, January 04, 2010

Moving to Ubuntu - a first hand account

There was discussion earlier that for office use, Windows rules and transition to Linux for office use would be difficult. One of the logical reasons and rather correctly is that Windows OS is heavily entrenched in our training curriculums with the reasoning that 'we all use it for Office use' - and Linux is not used in Offices with the excuse that 'no one knows it or is comfy with it' (if you don't train people, how can they be comfy - logic isn't is :-). So we have the classic Chicken-and-egg story here, ironically!! (it is rather amusing how many miss this simple logic!!)

Anyway, with my views that every educated IT user (that means nearly all of us!!) should be comfy in at least two OS, and maybe two different word processing software (yess, later very important :-), its time many of us usher in 20Ten getting multi-IT-skilled!!!

Can we do it? Well, came across an interesting blog (http://bit.ly/8nXtYc) of Mrs. Amber Graner, (an ex-US Army veteran) who moved from Mac to Ubuntu and doing an yeoman service to the Open Source Community.

Why I am sharing this is that for all those who feel that changeover to Ubuntu for Office use would be difficult, this blog just shows that it is not at all difficult. Of course here we are talking individuals instead of Organisation, but than every individual can make a difference!! And maybe change the system.

=====Extract from the blog http://bit.ly/8nXtYc===============


I decided that I finally wanted to make the transition from Mac to Linux. What fueled the change - and intrepid CD and an Ubuntu T-shirt that read, "Linux for Human Beings". I sorta laughed when my husband came home from a Sprint in the UK and said. "I have something for you." I looked at the CD and the Shirt and said, "yeah right". However, I had wanted to use Linux for years, but *always* without fail had to turn to my husband to fix things and help me, so I tended to always fall back to the Operating System I was the most familiar with. While my husband was busy working on various Linux distributions , I was moving slowly from DOS to Windows to Mac, then in Feb 2009 landed pretty smoothly into a Linux distro I could feel comfortable with - Ubuntu. I haven't looked back, every once in a while I brush off the Mac, and use it for something. I don't dislike Mac, I just like using Ubuntu better.

Sunday, December 20, 2009

Linux means Liberty

A picture is worth a thousand words.. 

(From http://www.tuxradar.com/content/linux-means-liberty)

Linux means Liberty


Wednesday, December 09, 2009

Google Chrome Official release for Linux

Google has finally 'Officially' released Google Chrome for Linux (on 08 Dec 09). It is available at http://www.google.com/chrome/intl/en/w00t.html

Definitely the Linux fans are cheering!!


Also check out the loads of extensions/addons for the Google Chrome, a la 'Firefox'. Get it from here. Hope these extensions don't make Chrome as bloated as Firefox has become!!
Enjoy the web experience with Chrome - though for me, for the time being 'Firefox' would be my primary browser!! For the time being at least!!