Sunday, March 30, 2008

Shell: Shortcut To Last Command Line Argument

Have you noticed at times that you have been entering same command line parameter over and over again during a certain portion of your shell works?
Have you ever been tired of entering the last command line argument over and over again?

Here's a quick and simple short tip on how to execute shortcut combination keys to make that long-typing parameter words easy to shell redo again.

If you were trying CD into a particular folder like

# cd /home/www/cpanel/com/level2/shared/customers/public_html
bash: cd: /home/www/cpanel/com/level2/shared/customers/public_html: No such file or directory

Now, enter the combination short cut keys for entering the last parameter like so

# mkdir !*
# cd !*
# ls -la !*

The above '!*' would be substituted by /home/www/cpanel/com/level2/shared/customers/public_html when executed by bash.

Wednesday, March 26, 2008

HowTo: Motion Picture Linux Paint and Retouching Tool

Have you been told that Holywood uses Linux tools and software too? Do you know one? Read on.

CinePaint is a painting and retouching tool primarily used for motion picture frame-by-frame retouching and dust-busting. CinePaint was used on THE LAST SAMURAI, HARRY POTTER and many other films. From The Last Samurai movie,CinePaint was used to add flying arrows. It's also being used by pro photographers who need greater color fidelity than is available in other tools.

CinePaint runs on all popular flavors of Linux and on Mac OS X as an X11 application. CinePaint for Windows is still on development as of this writing.

CinePaint is different from other painting tools because it supports deep color depth image formats up to 32 bits per channel deep. For comparison, GIMP is limited 8-bit, and Photoshop to 16-bit.

CinePaint was originally based on GIMP and consequently is a GTK1-based application. A new FLTK-based version of CinePaint, called Glasgow, is nearing alpha. There's also a new image core in development, called img_img, That will enable CinePaint to operate on images from the
command-line and to integrate with other projects such as Blender.

Top Reasons to Use CinePaint

1. Support for 8-bit, 16-bit and 32-bit color channels of deep paint.
2. High fidelity image file types such as DPX, OpenEXR and 16-bit TIFF. These files can't be opened in ordinary 8-bit image applications (e.g., GIMP) without crushing them.
3. High Dynamic Range. HDR images can go brighter than white. Ordinary images can't be brighter than a white sheet of paper (0=black, 1.0=white).
4. Gallery-quality printing. B&W photographs have only one color channel and degrade quickly when manipulated as 8-bit images. CinePaint has higher fidelity and offers a 16-bit printing path to the print-head using GutenPrint.
5. Color Management System. CinePaint uses LittleCMS.
6. Flipbook. Movie playback of short sequences of images in RAM.
7. Innovation. CinePaint offers features that go beyond ordinary painting tools.
8. It's used to make feature films at major studios.
9. Open Source. With various OSS licenses, because it uses code from various sources, including GPL, LGPL, BSD, and MPL.
10. Free.
11. Friendly professional developers. Polite discussion forums.
12. Being a CinePaint developer can be a good career move. CinePaint developers have gotten jobs at companies such as DreamWorks Animation, Sony Pictures Imageworks, and Apple.

Top Reasons Not to Use CinePaint

1. You're content with Adobe Photoshop, Corel Painter X, Corel Paint Shop Pro, GIMP, Krita, or Seashore.
2. No working Windows CinePaint version.
3. We're resolving build and packaging issues with the Mac version.
4. CinePaint originated as a rewrite of the GIMP 8-bit engine in 1998 and still superficially resembles GIMP. (CinePaint reuses code from many projects, not just GIMP.)


Cinema Paint Installation
Fedora Project supports Cinema Paint, and can be installed using yum like so

# yum -y install cinepaint

The above command downloads CinePaint binary installer which is about 5MB.

Binary CinePaint Launch

# cinepaint

At first run, the binary package prompts for installation folder destination, where in it will install itself. Simply supply your destination location.

If you deal on digital images, pictures, and photos on your daily basis, Cinema Paint is a great cool tool for you to start with for a better change. To know more of Cinema Paint and documentation, you can visit their site here.

CinePaint Webshots




Related Articles:
Image Magic with Linux ImageMagick
JPG to MPG and HowTo?
Web Photo Album from your Desktop
Mind-Mapping Labyrinth Linux Tool
GIF to PNG and HowTo?
Paint with Tux - TuxPaint
Website Thumbnail in Linux
Photos and Videos under the Hood

Thursday, March 13, 2008

HowTo: Convert First Letter of Dir Folder to Uppercase

Well, if we can convert the first letter of each lines from a text file, we can use the same approach to convert the first letter of a directory or folder name to its uppercase as well, simply add the linux mv command.

If you have hundreds of directory name in one location that starts their directory folder name with small letters, and you with to rename directory where its first letter is in uppercase form, read on.

With reference to recent post, here is a short entry where you can convert all first letter of all directory folder names into its uppercase form.

How To Convert First Letter of Directory Folder To Its Uppercase Form

Taking a longer approach would be like creating an executable bash shell script like so

# cat rename-folder.sh
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
#!/bin/bash
ls -la | grep dr | grep -v "\." | awk '{print $8}' | while read -r FOLDER
do
newfoldername=`echo $FOLDER | sed -e 's/\(.\)\(.*\)/\u\1\2/'`
echo OLD Name: [$FOLDER] TO NEW Name: [$newfoldername]
# You know what to do from this line -
# Rename the old to new
# using mv linux command
done
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

Enjoy the weekend.

Wednesday, March 12, 2008

HowTo: Lightning Speed Big Claws

Who gets tired of Thunderbird and Evolution mail client software? How about, "You've Got Claws Mail!"

Do you want to try a new GTK+-based lightweight but heavy duty email client for linux?

Let's give Claws a shot.

What is Claws?

Claws Mail is an email client (and news reader), based on GTK+, which offers a lightweight, full featured, with wide array of email plugins for email clients. Claws provides quick interactive response, graceful, and sophisticated email client interface, grandma-type easy configuration, intuitive operation with abundant mail client features, mail extensibility, robustness and stability.

Claws' appearance and GUI interface are designed to be familiar to new users coming from other popular email clients, like Outlook users,Gmail users as well as experienced users. Almost all commands are accessible with the keyboard, just like the now popular GMail.

Email messages are managed in the standard MH format, which features fast access and data security. You'll be able to import your emails from almost any other email client, and export them just as easily how grandma does it.

Want more? Claws has lots of extra functionality, like an RSS aggregator, calendar, or laptop LED handling - these are provided by extra plugins.

Claws on Fedora
Yes, Fedora got it for you. Claws can easily be downloaded from Fedora repos using the old-timer Fedora rpm package installer called yum.

Claws Installation on Fedora

# yum -y install claws

Claws Plugins

Additionally, Claws supports a very wide array of mail client plugins. Some of these Claws plugins can be easily installed using yum and are listed below.

claws-mail-plugins-acpi-notifier.i386 : ACPI notification plugin for claws-mail
claws-mail-plugins-attachwarner.i386 : attachment warner plugin for claws-mail
claws-mail-plugins-att-remover.i386 : Attachments remover plugin for claws-mail
claws-mail-plugins-bogofilter.i386 : Bogofilter plugin for claws-mail
claws-mail-plugins-cachesaver.i386 : A cache saving plugin
claws-mail-plugins-clamav.i386 : Clamav antivirus plugin for claws-mail
claws-mail-plugins-dillo.i386 : Dillo HTML viewer plugin for claws-mail
claws-mail-plugins-fetchinfo.i386 : Inserts headers containing some download information
claws-mail-plugins-gtkhtml2-viewer.i386 : GTK Html Viewer
claws-mail-plugins.i386 : Additional plugins for claws-mail
claws-mail-plugins-mailmbox.i386 : Support for mailboxes in mbox format
claws-mail-plugins-newmail.i386 : Write a msg header summary to a log file
claws-mail-plugins-notification.i386 : New mail notifications
claws-mail-plugins-pdfviewer.i386 : PDF Viewer plugin for claws-mail
claws-mail-plugins-perl.i386 : Extended filtering engine
claws-mail-plugins-pgp.i386 : PGP plugin for signing and encrypting mail
claws-mail-plugins-rssyl.i386 : RSS plugin for claws-mail
claws-mail-plugins-smime.i386 : S/MIME signed and/or encrypted
claws-mail-plugins-spamassassin.i386 : Spamassassin plugin for claws-mail
claws-mail-plugins-spam-report.i386 : Report spam mail to various places
claws-mail-plugins-synce.i386 : Keeping the addressbook of a Windows CE device in sync
claws-mail-plugins-tnef.i386 : Tnef message parsing
claws-mail-plugins-vcalendar.i386 : vCalendar message handling

To install all of the above Claws plugins, simply
# yum -y install claws-mail-plugins*

Claws is fast and is convincing as an alternative linux mail client. You should try it, its pretty neat and very easy to get along with, no to mention a lot of plugins available for mail feature extensibility.

Claws Screenshot


Tuesday, March 11, 2008

HowTo: Convert First Letter of Text Line to Uppercase

Real quick and easy, I just need to drop it here as I was using it most of the times handling tens of thousand keyword text files.

If you need to convert the first letter of the word or first letter of a text line to its uppercase, read on.

Here's how to convert the first letter of a word from text files.

Say, we have thousands of text lines like
# cat testfile.txt
~~~~~~~~~~~~~~~~~~~~~~~~~
linux blog
sysad linux blog
systems admin blog
linux blogs
fedora blog
foss
gnu
...

...
gnome
redhat blog
linux blogging
~~~~~~~~~~~~~~~~~~~~~~~~~

and we wish to convert all first letters of each lines to its uppercase letter or capitalized form.

Am going to approach this using one of the powerful command-line drive linux tool called sed. Here's how it can be simply done.

# cat testfile.txt | sed -e 's/\(.\)\(.*\)/\u\1\2/'

Alternatively,

# sed -e 's/\(.\)\(.*\)/\u\1\2/' testfile.txt

which gives you a similar output like so
~~~~~~~~~~~~~~~~~~~~~~~~~
Linux blog
Sysad linux blog
Systems admin blog
Linux blogs
Fedora blog
Foss
Gnu
Gnome
Redhat blog
Linux blogging
~~~~~~~~~~~~~~~~~~~~~~~~~

Hope this helps, enjoy!

Some Articles

Why Choose Fedora over Ubuntu?
Fedora vs RHEL

Thursday, March 6, 2008

HowTo: Automatically Change your Fedora Desktop Wallpaper

How to selectively change your desktop wallpaper automatically?
How to automatically change your desktop wallpaper every N minutes?
How to add wallpaper management program into your linux desktop?
How to add wallpaper panel into your GNOME panel?

Here's a quick post of how to have a wallpaper tray installed into your GNOME.

What is Wallpaper Tray
Wallpaper Tray is a GNOME applet used for changing your wallpaper. Wallpaper Tray is a utility for the Gnome Desktop Panel. You add the applet to your panel, and use it to manage and display your wallpaper collection.

Wallpaper Tray Program Operation
Wallpaper Tray program offers flexibility and convenience from wallpaper files handling and displaying. Users can customize the number of minutes on changing desktop wallpapers. Wallpaper files specific folders can be added anytime from wallpaper tray preferences and options. Randomly chosen wallpapers by wallpaper tray program can be displayed in a variety of ways.

Wallpapers can be displayed stretched, centered, scaled or as it is wallpaper display basis. Wallpaper selection can be done randomly, sorted by date, or alphabetically depending on user's choice of selection. What more you can ask for your desktop wallpaper management, wallpaper tray also supports changing of desktop wallpaper every time user logons.

Wallpaper Tray, as the name suggests, used to be live in the Notification Area. The Notification Area was never really meant for programs such as this, so the latest release uses the Gnome Panel.
The wallpaper tray applet lets you add directories, wallpapers are then randomly selected at login or at a given interval. You can also search your wallpaper collection, and delete wallpapers you don't like anymore.

Wallpaper Installation
Fedora supports rpm binary package for wallpaper tray. To install, simply

# yum -y install wp_tray

The above wallpaper tray installation downloads around 530K of binary and library dependencies for GNOME. After successful wallpaper tray installation, there is no need to restart your X or GNOME.

Screenshots:



Give wallpaper a shot, you might have fun with it!

Related Posting:
Dock Everything Into Your Linux Desktp System Tray
Monitor your Network Card Send and Receive From Your Desktop System Tray
Internet Connection Speed Applet into your System Tray
WinAmmp-Style Docked Music Applet
Draw What Your Mind Tells You in Linux

Tuesday, March 4, 2008

HowTo: Extremely Powerful Linux Password Sniffer

Password Sniffer on Linux?

Yep, we all need to be informed of passwords being sniffed out! I would not entail those details and cover specific issues of identifying your network securities as that would be large enough to be covered here and case to case basis.

However, those two words are being mentioned here and repeated again, password sniffer, is no different from somebody stealing your identify or bank earnings.

This quick blog entry focuses awareness of the threat on packet sniffing in a switched environment, and briefly explores the effect having a switched network environment. But does not discuss more on packet sniffing operations and usage.

What is DSniff?

DSniff can be defined in two words - password sniffer.

What is NOT DSniff ?

DSniff is not tcpdump, ncap, it is not openssl, nor an exact replica of libpcap or related to ping commands.

More DSniff Network Penetration Testing Intentions

Dsniff was created with a clear intention of network auditing that includes network and host penetration testing from linux platform. DSniff can sniff passwords while packets are traveling on specific type of network. If you don't know what that means, stop here and go check your GMail for funny pictures.

Moreover, DSniff can handle passwords coming and being covered thru and by FTP, Telnet, SMTP, HTTP, POP, poppass, NNTP, IMAP, SNMP, LDAP, Rlogin, RIP, OSPF, PPTP, MS-CHAP, NFS, VRRP, YP/NIS, SOCKS, X11, CVS, IRC, AIM, ICQ, Napster, PostgreSQL, Meeting Maker, Citrix ICA, Symantec
pcAnywhere, NAI Sniffer, Microsoft SMB, Oracle SQL*Net, Sybase and Microsoft SQL auth info.

How DSniff Works?

Simply put, DSniff automatically detects and minimally parses each application protocols, only saving those interesting bits, that means DSniff sniffs out unique authentication login attempts from protocol frames only. Full TCP/IP reassembly is provided by libnids, a dependency requirement by DSniff, which would be installed as well.

THIS PROGRAM SHOULD NOT BE ABUSED, IT IS BEING HERE FOR THE PURPOSE OF NETWORK PENETRATION TESTING ONLY AND NOT FOR ANY ILLEGAL ACTIVITY THAT THIS MIGHT LEAD YOU.

Do not install this, you've been warned.

DSniff Installation on Fedora 8

Yes, Fedora 8 has it. Simply install it using the all time favorite software installer called yum.
DSniff currently supports three platforms OpenBSD (i386), Redhat Linux (i386), and Solaris (sparc). Others have reported success on FreeBSD, Debian Linux, Slackware Linux, AIX, and HP-UX.

# yum -y install dsniff

DSniff, when installed is composed of several binary linux tools for the purpose of further network auditing and security penetration testing. These DSniff tools have different penetration testing functions and are designed to work independently to each other making use of single but powerful libnids linux library.

~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
Here are several binaries included with DSniff.
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

arpspoof

redirect packets from a target host (or all hosts) on the LAN intended for another local host by forging ARP replies. this is an extremely effective way of sniffing traffic on a switch. kernel IP forwarding (or a userland program which accomplishes the same, e.g. fragrouter :-) must be turned on ahead of time.

dnsspoof

forge replies to arbitrary DNS address / pointer queries on the LAN. this is useful in bypassing hostname-based access controls, or in implementing a variety of man-in-the-middle attacks (HTTP, HTTPS, SSH, Kerberos, etc).

filesnarf

saves selected files sniffed from NFS traffic in the current working directory.

macof

flood the local network with random MAC addresses (causing some switches to fail open in repeating mode, facilitating sniffing). a straight C port of the original Perl Net::RawIP macof program.

mailsnarf

a fast and easy way to violate the Electronic Communications Privacy Act of 1986 (18 USC 2701-2711), be careful. outputs selected messages sniffed from SMTP and POP traffic in Berkeley mbox format, suitable for offline browsing with your favorite mail reader (mail -f, pine, etc.).

msgsnarf

record selected messages from sniffed AOL Instant Messenger, ICQ 2000, IRC, and Yahoo! Messenger chat sessions.

sshmitm

SSH monkey-in-the-middle. proxies and sniffs SSH traffic redirected by dnsspoof(8), capturing SSH password logins, and optionally hijacking interactive sessions. only SSH protocol version 1 is (or ever will be) supported - this program is far too evil already.

tcpkill

kills specified in-progress TCP connections (useful for libnids-based applications which require a full TCP 3-whs for TCB creation).

tcpnice

slow down specified TCP connections via "active" traffic shaping. forges tiny TCP window advertisements, and optionally ICMP source quench replies.

urlsnarf

output selected URLs sniffed from HTTP traffic in CLF (Common Log Format, used by almost all web servers), suitable for offline post-processing with your favorite web log analysis tool (analog, wwwstat, etc.).

webmitm

HTTP / HTTPS monkey-in-the-middle. transparently proxies and sniffs web traffic redirected by dnsspoof(8), capturing most "secure" SSL-encrypted webmail logins and form submissions.

webspy

sends URLs sniffed from a client to your local Netscape browser for display, updated in real-time (as the target surfs, your browser surfs along with them, automagically). a fun party trick.

DSniff Binary Usage

Sorry, I cannot go further with DSniff usage. But this might tire your eyes.

Webshots

Webshots for this is dangerous and being avoided.

Goodluck and enjoy.

Saturday, March 1, 2008

HowTo: Recover Missing Portmap on Fedora 8

Are these lines familiar to you?

~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
# service portmap status
portmap: unrecognized service


# service nfs start
Cannot register service: RPC: Unable to receive; errno = Connection refused
rpc.rquotad: unable to register (RQUOTAPROG, RQUOTAVERS, udp).
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

I have been receiving quite a large emails asking me to cover portmap again on Fedora 8. From an old post, I have covered a brief guide on how to install portmap on Fedora 7. As we all know, portmap was still available from earlier release versions of Fedora until Fedora 8 was born.

What makes portmapping service important?

The rpcbind utility is a server that converts RPC program numbers into universal addresses. Portmap or rpcbind must be running on the host to be able to make RPC calls on a server on that machine.

Portmap Installation on Fedora 8

Well, here goes an entry on how to install/recover a missing/lost portmap daemon service on Fedora 8 distro.

# yum -y install rpcbind

Yes, you read it right. Portmap is RPCBind on Fedora 8

Portmap or RPCBind Daemon Service Activation

# service rpcbind start


Now, you can start playing with NFS server.

Non-related Articles:
Have you tried to do yum from your own computer CD/DVD drive on Fedora?
Are you blogging from your-own-PC-based Wordpress on Fedora?
Did you give Plone - Content Management System a shot on Fedora?
Have you tried to do yum from your own computer CD/DVD drive on Fedora?
Are you blogging from your-own-PC-based Wordpress on Fedora?
Did you give Plone - Content Management System a shot on Fedora?

Sign up for PayPal and start accepting credit card payments instantly.
ILoveTux - howtos and news | About | Contact | TOS | Policy