Sunday, August 26, 2007

grep multiple character from string or file

This entry focus on filtering sets of character from string or from text file using grep.

Here's a quick usage of parsing and filtering multiple character using grep.

Say we have a sample testfile.txt that contains the following text data.

# cat testfile.txt
~~~~~~~~~~~~~~~~~~~~~~~~~
1 linux command line
2###########
3$$$$$$$$$$$
this is number 4
5 terminal
~~~~~~~~~~~~~~~~~~~~~~~~~

And we want to grep those lines that contain these three characters #4$

Here's how to quick do the task.

# grep '[:#4$]' testfile.txt

would give you a resulting lines of
~~~~~~~~~~~~~~~~~~~~~~
2###########
3$$$$$$$$$$$
this is number 4
~~~~~~~~~~~~~~~~~~~~~~

As you can see from above results, each lines containta one of the following chatacters:

#
4
$


This is applicable when you need to search for specific set of characters from string or file.

If you wish to grep for multiple set of strings using grep, you read it here.

enable and disable of telnet service

Telnet - user interface to the TELNET protocol

The telnet command is used to communicate with another host using the TELNET protocol. If telnet is invoked without the host argument, it enters command mode, indicated by its prompt ( telnet>). In this mode, it accepts and executes the commands listed below. If it is invoked with arguments, it performs an open command with those arguments.


Here's how to disable telnet from Fedora inet services.

Verify that your telnet service is currently running like so:

# telnet localhost 23

If the above command prompts your for username or password, yout telnet service is currently active.

Alternative ways to check for telnet service are as follow

# ss -a | grep telnet
# netstat -l | grep telnet

How to stop telnet service in Fedora?

# cd /etc/xinetd.d

Edit krb5-telnet and modify the below line

disable = no

TO
disable = yes

and restart INET service like so

# service xinetd restart


Verify that telnet service is not running anymore.

# ss -a | grep telnet

Done.

Saturday, August 25, 2007

grep multiple strings from a file

Supposed you need to filter different search filter words from a large text file.

Here's a quick entry that covers parsing and filtering multiple strings using grep in a command line.

Grep Multiple Strings From a File

My sample text looks like this

# cat testfile.txt
~~~~~~~~~~~~~~~~~~~~~~~~
apple1
The quick brown fox
apple2
asd
The quick brown fox
apple3
asd
apple4
The quick brown fox
asd
~~~~~~~~~~~~~~~~~~~~~~~~


Here's how to grep multiple search string from a file?

Assuming that we need to filter out the below words from the above file.

apple1
apple2
apple3
apple4


Here's a quick way to filter multiple words from a string or file.

# cat testfile.txt | grep "apple1\|apple2\|apple3"


This gives you all lines with words apple1, apple2 and apple3.

If you wish to grep multiple strings for an exact match from string or file, follow through:

# cat testfile.txt | grep -w "apple1\|apple2\|apple3"


All is done.

remove spaces from filenames

Let us assume that we have a situation where in your boss wants you to remove all spaces from his MP3/OGG/WMV/MPG filenames and replace them with underscore character. To accomplish this task of replacing space character with underscore character is real easy for a common linux task and can be easily done using linux renaming tool command mv.

Now, picture that renaming and removing spaces from 100,000 MP3 filenames or any other multimedia file names?

How to rename multiple files?
How to rename multiple thousand files?
How to convert all lowercase alpha characters to uppercase from thousand filenames?

Ding! Here's how to accomplish these task.


Basically, replacing space character with underscore from the filename of a file is simple and would be done like so

# mv "file with space.mp3" file_with_space.mp3



Now, the next command assumes that you have thousands of hundred of thousands MP3 files with spaces between its filenames. And you want to remove space character and replace them with underscores. Just make sure you are currently inside the working folder of these MP3 files and issue

# for files in *.mp3; do mv "$files" `echo $files | tr ' ' '_'`; done

Wonderful linux.

Now, here's another one shot command to convert all lowercase filenames into uppercase filenames using the above approach plus tr linux command. tr is a string manipulation linux command and discussed here.


How to convert lower case filenames to uppercase filenames of hundred thousand files in one shot?

# for files in *.mp3; do mv "$files" `echo $files | tr '[:lower:]' '[:upper:]'`; done


You can replace *.mp3 with any other filename identifier or file glob.

Have a nice weekend with clicks to all! :)

ISO creation and CD/DVD burning from terminal

How to create ISO images from terminal?
How to create CD/DVD ISO image of files/folder from terminal?
How to create CD/DVD ISO image of CD/DVD disk from terminal?
How to burn ISO image file into floppy or CD/DVD disk from terminal?
How to burn ISO image file into floppy or CD/DVD disk from Gnome F7?
How to burn DVD .IMG file to DVD disk from terminal?
How to blank fast and erase files from CD-RW/DVD-RW disk from terminal?
How to mount/unmount ISO image from terminal?
How to create MD5 checksum of ISO image file from terminal?
How to verify MD5 checksum of ISO image file from terminal?

This blog entry assumes these below topics:

a. creation and verification of ISO image files
b. CD/DVD burning of ISO/IMG image files
c. mounting and unmounting of ISO image files

Here you go, straight questions and answers.

How to create ISO images from terminal?

Creating ISO images from terminal begins with the mkisofs and/or dd linux commands.

How to create MD5 checksum of ISO image file from terminal?

# md5sum myISOfile.iso > myISOfile.iso.md5


How to verify MD5 checksum of ISO image file from terminal?

# md5sum -c myISOfile.iso.md5

How to create CD/DVD ISO image of files and/or folder from terminal?

For creating ISO image from folder
# mkisofs -r -o myisofile.ISO myfolder

For creating ISO image from file

# dd if=mybigfile of=myisofile.ISO

or

# mkisofs -r -o myisofile.ISO mybigfile
# mkisofs -r -o myisofile.ISO *.mp3


How to create CD/DVD ISO image of CD/DVD disk from terminal?
How to create an ISO copy CD/DVD disk from terminal?

For non-bootable and data ISO image file, just mount the CD/DVD disk first like so
# mount /dev/cdrom /mnt/myCDdrive
# mount /dev/dvd /mnt/myDVDdrive


And create the ISO image file from CD disk like so
# mkisofs -o myCDiso.ISO /dev/cdrom

And from DVD disk
# mkisofs -o myDVDiso.ISO /dev/dvd

An alternative would be done with the below command and without the need of mounting the disk as shown below.
This is also preferrable for creaing bootable CD disk.
# dd if=/dev/cdrom of=myCDiso.ISO

And for DVD disk
# dd if=/dev/dvd of=myCDiso.ISO

How to burn ISO image file into floppy or CD/DVD disk from terminal?

For floppy
# dd if=myfloppyISOfile.ISO of=/dev/floppy

For CD/DVD
# dd if=myCDISOfile.ISO of=/dev/cdrom

or

# dd if=myCDISOfile.ISO of=/dev/cdrom-sr0


and for DVD

# dd if=myCDISOfile.ISO of=/dev/dvd

How to burn ISO image file into floppy or CD/DVD disk from Gnome F7?

Go to Gnome > Places > CD/DVD creator. Copy and paster files and folder and click Write to Disc

How to burn DVD .IMG file to DVD disk from terminal?

# growisofs -Z /dev/dvd=myDVDimagefile.IMG

How to blank fast and erase files from CD-RW/DVD-RW disk from terminal?
This was also mentioned here.

CD-RW
# cdrecord dev=/dev/cdrom blank=fast

DVD-RW
# cdrecord dev=/dev/dvd blank=fast

How to mount/unmount ISO image from terminal?

To mount CD
# mkdir /mnt/cdrom
# mount -t iso9660 -o loop /dev/cdrom /mnt/cdrom


To unmount
# umount /mnt/cdrom

You might be interested on using the right click mouse button to open a link in background in a new browser window or separate tab with the below boxes in black.

That's it for now. Thanks!

Related Posts:

Linux CD/DVD Burnind Software - Brasero

Nero Burning Software in Linux

K9Copy - CD/DVD Disk Copier and Burner

send a message to user's terminal

Here's another alternative on sending messages to specific and currently logged in remote terminal user.

Write allows you to communicate with other users, by copying lines from your terminal to theirs.

This blog entry shows how to send message to specific and currently logged in user via terminal using write linux command. This approach comes handy during a non-X terminal communication exchanges between two currently logged in local box users from separate remote locations.

Here's the dirty and quick way to send messages to specific and currently logged in user.

If the other remote user 'vertito1' is currently logged in from tty2 of the remote box, you can send a message to that specific and currently logged in remote user. Do from local box as follows:

# write vertito1 tty2
Dude, no need to reboot this box.
Hit Control C when done

The above command is assuming that the other receiving user is not denying any terminal messages from his terminal setup. Denial of any messages can be done using mesg linux command.

If you wish the other user to see a portion of your remote screen as well, you can make use of copy and paste from your terminal. Any further lines you enter will be copied to the specified user’s terminal. If the other user wants to reply, they must run write as well.

To finish terminal converstaion, you simply type an end-of-file or interrupt character. The other user will see the message EOF indicating that the conversation is over.

Write blog entry done.

Friday, August 24, 2007

retrieve GMail emails via terminal using fetchmail

This entry will cover a one shot linux fetchmail command of retrieving GMail email messages using terminal without any further fetchmail configuration setup. Read on.

Fetchmail is one good linux tool for fetching and retrieving remote emails. Fetchmail works and retrieves emails from remote email servers and downloads them locally into your local linux box.

I agree that there are a lot of MUAs or email retrieval softwares available both from windows and linux world. If you wish to configure other mail retrieval softwares to retrieve emails from your GMail account, you can visit and read more from here.

Make sure your GMail account to allow POP3 retrieval from external source. If not, this can be with the below instructions.

Login into your GMail account. From there, click Settings from the right corner of your screen. Click Forwarding and POP from one of the tabbed menus and select Enable POP for all mail. From here, you have an option to keep a local copy of emails retrieved or delete the original copy when retrieved by external mail user agent. Click Save to make your changes permanent.

This entry would be accomplished without launching fetchmail in daemon service mode and/or without further configuration to fetchmail default .fetchmailrc configuration file. This entry also assumes that

1. fetchmail package is currently installed from current local box. If not, simply install fetchmail as follows:

# yum -y install fetchmail

2. sendmail, exim, qmail, postfix or any mail transfer agent (MTA) is currently installed and currently running from local box. If not, any mail delivery agent (MDA) like procmail, maildrop or deliver is currently available from local box. Proper configuration of these mentioned package would not be covered here though.

How to retrieve emails from GMail account using fetchmail via terminal?

If you issue the below command as root, the retrieved emails would automatically be dropped or delivered to root mail box. Also prepare your GMail password upon executing the below command.

# fetchmail -v -k -u YOU@gmail.com --ssl -P 995 pop.gmail.com -m "/usr/sbin/sendmail -i -f %F -- %T"

LEGEND:
-v for more verbose fetchmail settings
-k keeps and retains email copies from GMail
-P followed by GMail POP3s port number and POP host server
-m mail would be delivered by sendmail

Any non-zero returned exit status means failure.

You've Got Mail!

Fetchmail can do this GMail mail retrieval steps in various ways. The above is only one way to do it.

Here's another one-shot alternative way to retrieve GMail using fetchmail from terminal.

This time around, it is assumed that any mail transfer agent (MTA) like sendmail, exim or postfix is currently NOT installed. Fetchmail can deliver mails using other MDAs like procmail as an example.

Again, this is possible in one shot fetcmail command without further fetchmail configuration setup and procmail setup.

Here's how to fetch Gmail email using fetchmail and procmail. Simply do as follows:

# fetchmail -v -k -u YOU@gmail.com --ssl -P 995 pop.gmail.com -m "/usr/bin/procmail $h $g"

You've got mail again!

more of activating and deactivating network card

With my recent entry on doing start and stop with network card, which can be found here, here's another alternative on activating and deactivating your ethernet card.

This entry covers another alternative way of stopping and starting your ethernet interfaces using
neat-control. This simple linux command neat-control is available both in terminal and X mode.

USAGE
===========

GUI VERSION:

Simply launch neat-control from X by hitting Ctrl+F2 and entering neat-control. A sample screen shot below would appear from your screen giving you another approach to activate and deactivate ethernet card(s) from X.



TERMINAL VERSION:

The terminal version of neat-control from terminal is called neat-tui. Just issue

# neat-tui

Sample screenshot:

Thursday, August 23, 2007

set new mysql password

Appreciate your email.

Here's another email request on setting up a new password for a newly installed mysql.

How to set a new password for a newly setup MySQL server?

# mysql -u mysql

At the prompt

Finally, at the "mysql>" prompt, type:

set password = password("yournewpassword");

then type:

quit

Login with your new set mysql password like so

# mysql -u mysql -p

I hope I can answer them all! :)

TIP: enable thumbnail display images from apache

As an email request, here's how to enable your apache web server to enable display of thumbnail images from your personal web-based photo, image and gallery management using your photo management, php and apache.

This blog entry assumes that your apache serve is running without any problems and you have installed your photo management package with no problems too.

If you happen to have difficulty of displaying thumbnail images from your php-based web photo gallery, continue reading this entry.

What is php-gd?
The php-gd package contains a dynamic shared object that will add support for using the gd graphics library to PHP.

How to install php-gd package for fedora to enable display of thumbnail images from web photo management?

# yum -y install php-gd

This would install other image library modules for apache and php.

Here's a my own test screenshot after successful installation:


It works!

monitor large mailbox users

Monitoring mailbox users can be done in many serveral ways via web interface or via terminal or via bash scripts.

With the usual mbox type emails, incoming new email messages are automatically redirected to each users' own spool file. This spool mail is by default located and stored in /var/spool/mail. From there, the spool file just waits for its owner to pull or pop it out for retrieval via any mail retrieving software agents (MUAs) like Thunderbird, Outlook, Eudora, The Bat and the like.

Linux has been equipped with thousand usable tools that when combined creates another function from these combined set of linux tools. This document entry would cover how to monitor large mailbox (mbox) users using different linux commands and sends out mail notification.

This can be achieved with the following steps.

First, listing the file size of all spool mails listed under /var/spool/mail would be the first step in order to determine your top or large mailbox users. Listing file usage of /var/spool/mail can be done as follows:

# du -h /var/spool/mail/*

From the above, we are appending -h parameter for a more human-readable output form. Here's a sample result from issuing the above command:

~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
0 /var/spool/mail/vertita
20K /var/spool/mail/vertito
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

Secondly, the next thing to do is to sort these spool size in order. Sorting can be done from highest to lowest or vice versa. This is possible using sort linux command.

Sorting data gives us way to have the top and last list of data. From here, we just need to pipe out the resulting result from disk usage as an input value to sort linux command. Hence, we can now have a numerically sorted list of mailbox users as shown below:

# du -h /var/spool/mail/* | sort -rn

From the above, -r parameter is for reversal sorting. A sample output would be

~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
832M /var/spool/mail/vertito1
.
.
0K /var/spool/mail/vertito100
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

Finally, all we need is to have fetch only first or top 20 or 10 of them. Top 20 large mailbox users can be done by using the head linux command. Dumping the first two results from du and sort and redirecting it to head linux command would be done like so

# du /var/spool/mail/* | sort -rn | head -10
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
879768 /var/spool/mail/vertito1
879572 /var/spool/mail/vertito2
846540 /var/spool/mail/vertito3
768680 /var/spool/mail/vertito4
695664 /var/spool/mail/vertito5
684264 /var/spool/mail/vertito6
577660 /var/spool/mail/vertito7
553740 /var/spool/mail/vertito8
520856 /var/spool/mail/vertito9
506880 /var/spool/mail/vertito10
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

Hola amigos! Now, you have the top 10 large mailbox users from your screen.

Now, remember this can be sent as an email on daily basis too by using linux mail command combined with crontab utility.

Linux job scheduling can be found here while sending mail from terminal sample can be found here and here.

Wednesday, August 22, 2007

using the linux yes command

One quick way of sending set of character to standard output repeatedly is using the linux command yes.


Here's how to print string of words repeatedly from your screen.


Prints words 10 times

# yes VeRTITO | head -10
~~~~~~~~~~~~~~~~
VeRTiTO
VeRTiTO
VeRTiTO
VeRTiTO
VeRTiTO
VeRTiTO
VeRTiTO
VeRTiTO
VeRTiTO
VeRTiTO
~~~~~~~~~~~~~~~~

Prints 999 times.

# yes 999 Too many | head -999
~~~~~~~~~~~~~~~~
Too many
Too many
Too many
Too many
....
~~~~~~~~~~~~~~~~


To print words forever would be

# yes This is forever

'This is forever' would be printed repeatedly until terminated.

string manipulation using tr linux command


tr a linux command that translate, squeeze, and/or delete characters from standard input, writing to standard output.


tr is one linux string manipulation tool that is installed by default installation with fedora boxes. tr currently focuses on deleting, squeezing, or translating string on a character per character basis or single byte characters.

USAGE
=======

tr set1 set2

set1 is any single byte character to be translated, squeezed, or deleted. set1 can be a set of CLASS blob characters.
set2 is the resulting translated single byte character

blob characters are:

[CHAR*REPEAT] REPEAT copies of CHAR, REPEAT octal if starting with 0
[:alnum:] all letters and digits
[:alpha:] all letters
[:blank:] all horizontal whitespace
[:cntrl:] all control characters
[:digit:] all digits
[:graph:] all printable characters, not including space
[:lower:] all lower case letters
[:print:] all printable characters, including space
[:punct:] all punctuation characters
[:space:] all horizontal or vertical whitespace
[:upper:] all upper case letters
[:xdigit:] all hexadecimal digits
[=CHAR=] all characters which are equivalent to CHAR
\\ backslash
\a audible BEL
\b backspace
\f form feed
\n new line
\r return
\t horizontal tab
\v vertical tab

Character translation occurs if -d is not passed as a parameter. -d parameter tells tr to delete the search blob character.



MORE USAGE
==========

How to convert all lowercase to uppercase letters of text file?

Assuming we have testfile.txt that contains the following text data

# cat testfile.txt
~~~~~~~~~~~~~~~~~~~~~~~~~~~
i am vertito
this IS a text file
~~~~~~~~~~~~~~~~~~~~~~~~~~~

To convert small letters to upper letters, this can be done as follows

# cat testfile.txt | tr "a-z" "A-Z"
or
# cat testfile.txt | tr [:lower:] [:upper:]

which gives a resulting output of
~~~~~~~~~~~~~~~~~~~~
I AM VERTITO
THIS IS A TEXT FILE
~~~~~~~~~~~~~~~~~~~~

and of course, converting upper letters to small letters would be like so

# cat testfile.txt | tr [:upper:] [:lower:]


How to replace a single character with a different character?

# cat testfile.txt | tr a @
~~~~~~~~~~~~~~~~~~~~
i @m vertito
this IS @ text file
~~~~~~~~~~~~~~~~~~~~


How to delete specified character from text files?

# cat testfile.txt | tr -d e
~~~~~~~~~~~~~~~~~~~~
i am vrtito
this IS a txt fil
~~~~~~~~~~~~~~~~~~~~


How to squeeze and delete repeated single byte character from text file?

Assuming we have a test.txt with the below data contents:

Sample test.txt file

# cat test.txt
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
I amm testing this mmessage
I ammm testing this mmmessage
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

Squeezing and deleting repeated letters would be done with the next command.

For the above sample, we need to squeeze repeated character 'm'

# cat test.txt | tr -s m
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
I am testing this message
I am testing this message
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~


Done.

install and play 2D chess game in linux


Xboard is an X Window System based graphical chessboard which can be used with the GNU chess and Crafty chess programs, with Internet Chess Servers (ICSs), with chess via email, or with your own saved games.


More info of playing X based chess board game can be found here.

2D Chess Linux Game

Here's a quick way of how to install a 3D Chess board game in Fedora and Centos using yum.

# yum -y install xboard

This would install xboard including gnuchess as dependency.

Here's a snapshot:


My game screen shot


More FAQs, chess rules, settings, play level can be found here.

more firefox tips and tricks

One good thing about firefox settings aka firefox registry, is that you can edit them at your own will to suit your needs without having to dig down deeper from source code level.

Here are several firefox tips and tricks that makes your browsing faster, easier and more convenient, atleast to a larger number of firefox end users.

Make proper backups. To backup current firefox settings, you can issue

# updatedb
# locate prefs.js

and copy it to a different filename like prefs.js.old

If the below changes crashes your firefox, just copy your backup setting overwriting the other one then restart firefox. Do this at your own will, you've been warned. It worked with my box type, yours might be a different story.

However, if all things fail, just remove and re install firefox like so:

# yum -y remove firefox
# mv /root/.mozilla /root/.mozilla-old
# mv ~your-user-name/.mozilla ~your-user-name/.mozilla-old
# yum -y install firefox

without any consideration to previously installed firefox addons, plugins, cached sites or download history.

Firefox plugins are usually located to the below locations

/root/.mozilla/plugins
~your-username/.mozilla/plugins

You can create a backup copy of these folders and copy it back after your firefox reinstallation just incase.


However, IF you wish to continue, read on and goodluck.

To edit these firefox registry configuration values, simply launch firefox and go to address bar. Type

about:config

and hit Enter key.

To edit or change any registry values, simply type the configuration line from the filter bar address and firefox would interactively bring you to nearest match of your search.


How to disable IPv6 with firefox?

From filter box, type

network.dns.disableIPv6.

Hit Enter. The default value for this is false. From the preference window, just double click the line to change and toggle it to true value.


How to enable memory caching with firefox?
browser.cache.memory should be true

How to increase pipelining request in firefox?
network.http.pipelining.maxrequests preferably doubling the current value from 4 to 8. The value can be changed by double clicking on it.

How to enable HTTP pipelining with firefox?
network.http.pipelining preferably setting it to true

How to increase pipelining maximum request with firefox?
network.http.pipelining.maxrequests preferably 8 would be fine

How to enable network http proxy pipelining with firefox?
network.http.proxy.pipelining preferably set it to true

How to disable resizing of firefox window by websites?
dom.disable_window_move_resize should be true

How to automatically saved sessions and returning back to them between system restarts?
Click Edit > Preferences > Main Tab > Startup > Show my Windows and Tabs from Last Time

How to increase disk cache and memory cache with firefox?
browser.cache.disk.capacity preferably doubling the size would be better, say 80000
browser.cache.disk.enable should be enabled
browser.cache.memory.enable should be enabled
network.http.use-cache should be enabled
security.xpconnect.plugin.unrestricted preferably false

How to notify user for extenstion update
extensions.update.notifyUser preferably should be true

How to enable cookie only for current session with firefox?
network.cookie.enableForCurrentSessionOnly preferably should be true

How to expand live browsing connections?
network.http.max-connections preferably increasing it to 36 ot 48 if you browse to ofteb with lots of firefox tab pages

How to increase connection per site?
network.http.max-connections-per-server preferably increasing it to 15

How to update firefox?

# yum -y update firefox

Restart firefox and you're done.

HTH

recover root password on linux

Finally, the well known root password recovery is here to stay.

This old time favorite superuser root password recovery in linux comes as handy as a toolbox. Recovering root password in linux is as handy as newbie users during the very first linux installations.

The simplest way to recover root password before kernel can be accomplished with the following steps.

A. If you are sure you do not have any grub or lilo password set, basically you do not need to boot from boot CD or DVD. Without grub or lilo password set, recovering linux root password is as easy as booting the linux kernel into its linux single mode.

This linux single mode basically loads up minimal boot up sequence and drops you to a root shell. One way to boot from linux single mode is by passing an kernel arguments before kernel boot up.

How to make kernel boot into linux single?
How to pass kernel arguments before bootup?

During bootup, by default installation, Fedora, CentOS, and RedHat prompts for a few seconds before booting its linux kernel. This is a chance for the user to edit any needed kernel arguments before the normal kernel boot up process.

You must hit any key from this prompt. Then select the line that starts with kernel. From this line, press the letter 'e' for editing and appending additional kernel parameters. Our intention here is to pass additional kernel parameter called 'linux single'. You will be taken to boot menu list from where you can now append the below line:

linux single

This parameter boots the kernel in linux single mode. As an example
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
title Fedora 7 (2.6.21-1.3194.fc7)
root (hd0,0)
kernel /vmlinuz-2.6.1.3194.fc7 ro root=/dev/VolGroup00/LogVol00 rhgb quiet linux single
initrd /initrd-2.6.1.3194.fc7.img
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

Noticed the a bold emphasis from the kernel line with 'linux single' or 'single' kernel parameter. After passing the linux single word, hit 'b' or Enter key to normally resume kernel boot up process. You will dropped into normal shell prompt. At this point, you are the superuser root. Issue

# passwd

to set a new root password like so

~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
Changing password for user root.
New UNIX password:
BAD PASSWORD: it is WAY too short
Retype new UNIX password:
passwd: all authentication tokens updated successfully.
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

After succesfully changing root password, reboot properly by issuing

# reboot

This would reboot your system. You can now use your new root password


B. If you happen to have a grub or lilo password, a boot CD/DVD or disk 1 of your linux installation is required to achieve the same steps of changing your root password. Alternatively, you can boot from other linux OS like Knoppix or any LIVE CD / LIVE DVD, as long as it matches your box architecture.

All you need to do is insert your bootup CD or DVD from your CD/DVD drive and boot from the CD/DVD drive. Any attempt to boot from this first installation CD would take you to a startup menu wherein you can also pass additional kernel parameters.

From there, pass the required 'linux single' kernel parameter. This would also take you to normal shell prompt wherein you can issue the linux command passwd to change your root password. After this, simply issue the linux command reboot.

The above approach works all the time.

You are now back with your newly changed root password after booting up normally.

Tuesday, August 21, 2007

establish ssh connection from different port

We all know that starting ssh daemon server listens by default to port number 22. Normally, any user connecting to port 22 would launch ssh client without any port number specification considering that ssh server was launched with default port 22 as its binded or listening ssh port number. Changing ssh default port number is one good practice of securing ssh.

Now, with the situation of having a non-default ssh port number, here is how to establish ssh connection to any ssh server with a different ssh port number or with non-default ssh port number.

How to connect to ssh server with a non-default port 22?

Assuming ssh server was started to listen from port 2221.

# ssh user@ssh.server.IP.address -p 2221

Done.

uniq linux command

Linux is full of powerful terminal tools that are designed to do separate functions. These linux tools are so great, they are like individual lego blocks. When you fit these set if lego blocks together, it creates a new set of linux tool providing a new way to achieve your goal without going deeper on coding and programming to do the same similar job.

Here's another linux tool called uniq. Uniq linux command function to omit or report repeated lines.

Shown below are the different usage for uniq commands.

Supposed we have a testfile.txt that contains the following text data.

# cat testfile.txt
~~~~~~~~~~~~~~~~
abc
abc
abc
efg
xyz
xyz
~~~~~~~~~~~~~~~~

Here is how to print unique lines of text file.

# uniq testfile.txt
~~~~~~~~~~~~~~~~~~~~~~
abc
efg
xyz
~~~~~~~~~~~~~~~~~~~~~~


How to print and count the number of occurrence of each line from text file?

# uniq -c testfile.txt
~~~~~~~~~~~~~~~~~~~~~~
3 abc
1 efg
2 xyz
~~~~~~~~~~~~~~~~~~~~~~


How to print all repeated or duplicated occurrence of each line from text file?

# uniq -d testfile.txt
~~~~~~~~~~~~~~~~~~~~~~
abc
xyz
~~~~~~~~~~~~~~~~~~~~~~


How to print all unique occurrence of each line from text file?

# uniq -u testfile.txt
~~~~~~~~~~~~~~~~~~~~~~
efg
~~~~~~~~~~~~~~~~~~~~~~

Now, let modify testfile.txt to look like so
~~~~~~~~~~
abcd
abc
abc
efg
xyz
xyz
~~~~~~~~~~

Now, here's how to print uniq occurrences found on the first N characters of line from text file?
Assuming we would only compare the first 2 characters of each line and print unique occurrences.

# uniq -w 2 -u testfile.txt
~~~~~~~~~~
efg
~~~~~~~~~~


How to compare the first 2 characters of each line and print only the duplicated occurrences.

# uniq -w 2 -d testfile.txt
~~~~~~~~~~
abcd
xyz
~~~~~~~~~~


How to avoid comparing the N character of each line from text file using uniq linux command?

Assuming we want to avoid comparison of the first 2 characters of each line from text file and print only the unique occurrences with its corresponding number of occurrences.

# uniq -s 2 -u -c testfile.txt
~~~~~~~~~~~~~~~~~~
1 abcd
1 efg
~~~~~~~~~~~~~~~~~~


And another more, here is how to print only the duplicated lines of occurrences with comparison point starting after the 2nd character of a each lines using uniq linux command?

# uniq -s 2 -d -c testfile.txt
~~~~~~~~~~~~~~~~~~
2 abc
2 xyz
~~~~~~~~~~~~~~~~~~

Redirection of standard output is always possible with these linux commands.

Finished!

remove blank lines using grep or sed

Here's a quick rundown on how to remove blank lines between contents from text files using linux command sed and grep.

Suppose we have a text file named testfile.txt . With the below content samples.

# cat testfile.txt
~~~~~~~~~~~~~~~~~~~~~~~~~~~~
1
2
3



5
6
7
~~~~~~~~~~~~~~~~~~~~~~~~~~~~

As you can see from above content, there are multiple blank lines. Our objective here is to eliminate those blank lines lines, thus suppressing the text file.

This entry covers how to remove blank lines of text files using sed and grep. As follow

# grep -v '^$' testfile.txt

# sed -e '/^$/d' testfile.txt


You can redirect the output from your screen into a file using linux redirection approach. As follows:

# grep -v '^$' testfile.txt > testfile1.txt

# sed -e '/^$/d' testfile.txt > testfile2.txt


Verify that we have achieved our objective of removing blank lines from a file.

# cat testfile.txt
~~~~~~~~~~~~~~~~~~~~
1
2
3
5
6
7
~~~~~~~~~~~~~~~~~~~~

Done!

date and time sync via NTP server howto

Syncronizing your current date and time is as important as making database backups. Without proper accurate stamped date and time, any backup file with any stamped date on it would be meaningless. Without correct time and date, those scripts that depend on date and time schedule would be executed inaccurately and would give you result on a wrong date and time stamp.

There are many ways to adjust, correct and synchronize your system date and time via terminal. Changing and syncing hardware and system clock has been covered from recent entry which can be found here.

If you happen not to have any local NTP server from your network, here's an entry to update, set and adjust your system date and time from external NTP servers around the globe using ntpdate and rdate.

How to synchronize system date and time from NTP pool servers around the web. Do as follows.

Assuming we would like to sync our system date and time with 2.fedora.pool.ntp.org NTP time pool server. This blog entry covers doing it using ntpdate linux command via terminal.

Ntpdate man says:
ntpdate sets the local date and time by polling the Network Time Protocol (NTP) server(s) given as the server arguments to determine the correct time. It must be run as root on the local host. A number of samples are obtained from each of the servers specified and a subset of the NTP clock filter and selection algorithms are applied to select the best of these. Note that the accuracy and reliability of ntpdate depends on the number of servers, the number of polls each time it is run and the interval between runs. Makes use IPv4 and IPv6 on adjusting system date and time.

Getting the current system date and time is needed for comparison values.

# date

Now let us proceed.

SYNCING WITH NTP SERVER MANUALLY
================================

How to synchronize system date and time with NTP time server using ntpdate?

# ntpdate 2.fedora.pool.ntp.org

Alternative time pool servers are:

~~~~~~~~~~~~~~~~~~~~~~~~
0.fedora.pool.ntp.org
1.fedora.pool.ntp.org
time.nist.gov
~~~~~~~~~~~~~~~~~~~~~~~~

If you wish to query date and time only, this would be done like so

# ntpdate -q 2.fedora.pool.ntp.org

If you have a local time server near to your network, this would be

# ntpdate yourlocal.timeserver.host

If the above command failed, and you are more likely behind the firewall. This is how to update date and time behind the firewall

# ntpdate -u yourlocal.timeserver.host

Sync date and time using IP address is also possible like so

# ntpdate 216.194.70.2

SYNCING TIME LOCALLY USING RDATE
=======================================

Rdate linux command gets and update time via network.

Again, initially get your current date and time system values for comparison.

# date

To print current date and time values from local NTP server using rdate, this could be done like so:

# rdate -p local.NTP.IP.address

To sync date and time locally from your NTP server or from the network using rdate would be:

# rdate -s local.NTP.IP.address

To sync date and time locally using rdate via UDP instead of TCP as its transport, this could be done like so:

# rdate -u local.NTP.IP.address

SYNCING DATE/TIME PERMANENTLY AND AUTOMATICALLY USING NTP DAEMON
================================================================

How to sync date between or after reboot?
How to synchronize date and time automatically in linux?
How to install NTP daemon service in linux?

If your server has never been rebooted, there should be a lot of difference and time skipped by the server during high load processes. Because of this, unattended syncing of date and time is needed to be checked, monitored and synced automatically. This approach calls for making NTP act as a NTP daemon service.

How to install NTP daemon service to automatically check and update date/time values from NTP server?

NTP daemon can be installed by doing so:

# yum -y install ntp

With default installation, NTP daemon service could be started and run faily well as follows

# service ntpd start

NTP daemon service makes use of /etc/ntp.conf . Watch the date/time differences from the result of issuing date command and after starting NTP daemon service.

To check for NTP daemon service status would be

# service ntpd status

Making NTP daemon service permanent between reboots would normally be like so

# chkconfig --levels 35 ntpd on

Note:
3 represent runlevel 3, that is bootup to command line with no GUI and 5 represents with X.

Further ntp.conf customization would not be included here, I am going to create a separate entry for creating a NTP server out of Fedora box. Changing timezone via terminal would also not be covered and created here. They would be covered on a separate entry too sooner or later.

If you wish to sync your hardware clock from your system clock or vice versa, there is howto that can be easily viewed here.

who am I

As linux users, we make use of who as one linux tool command. Most of the time, who linux command functions on determining currently logged on box users. There are times those simple linux commands are taken for granted or unconsciously skipped out for far more linux terminal command studies. Many of them. One is who.

Here are more usage of who linux commands.

Who am I ?

# who am i


How to know the last time of system reboot?

# who -b


How to know last change of system clock?

# who -t


How to print system login processes?

# who -l


How to know and print dead system processes?

# who -d


How to print number of logged on users ?

# who -q


How to print, same as without argument, but with PIDs, currently logged in users?

# who -u


How to print and know current running runlevel?

# who -r


How to know which currently logged in users are currently denying, deflecting or avoiding any future system wide messages?

# who -T


Who are you?

# who are you

:)

delete spam email and folder regularly howto

Fighting spam email is a worldwide daily combat challenge. Email spam fight is just another daily server wide monitoring function of any sysad administering those email servers. Global spam email attacks and happens everyday regardless of country, server setup, domains, geolocation and public IP address you might have. Take a look of the top country source of spam emails from here.

This entry covers how to delete bulk or spam folder of mbox/maildir/mdir type emails on regular monthly basis. This would be done using linux find command, delete command, and crontab utility statements via terminal.

Assuming the script would be created by root. Launch your fave editor and create a sample script delete_spam.sh with similar contents like so:

delete_spam.sh

~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
#!/bin/bash
find /home -name Spam -exec rm -f {} \;
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~


INTERPRETATION:
The 'find' linux command attempts to locate mbox file type named 'Spam'. Locating the file started from /home folder and done recursively. If a file type named Spam is found, rm -rf forcefully deletes the file and proceed with the next search result until all directory folders have been traversed.

Why home? This blog entry has assumptions that all spam mail files or folders are all stored under each user's home folders located under /home.

Why search for mbox type file only?

If you wish to delete IMAP folders, or any user folder, replace the find command with

~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
# find /home -name myimapfolder -type d -exec rm -f {} \;
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

Make them root executable like so.

# chmod 700 delete_spam.sh

Now, have a crontab schedule with crontab utility. The script would be executed on regular monthly basis, for example like so:

~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
33 01 28 * * /root/scripts/delete_spam.sh > /dev/null 2>&1
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

INTERPRETATION:
delete_spam.sh is executed once every 1:33AM every 28th of the month without any history logs.

Why not 30th of the month? Because of February month.

Some servers use IMAP folders or maildir type of emails. On those ones, you just need to fine tune and adjust file name search criteria. This can be done by specifying a folder instead of a filename as a search criteria. Here are more samples.

~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
find /home -name Spam -exec rm -f {} \;
find /home -name Bulk -exec rm -f {} \;
find /home -name Virus -exec rm -f {} \;
find /home -name Spam.db -exec rm -f {} \;
find /home -name Spam.cache -exec rm -f {} \;
find /home -name spam-mail -exec rm -f {} \;
find /tmp -name att* -exec rm -rf {} \;
find /tmp -name *.tmp -exec rm -rf {} \;
find /home -name mymaildir -type d -exec rm -rf {} \;
find /home -name myfoldername -type d -exec rm -rf {} \;
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

Take note that, it is advisable that all email users must be well informed that these spam emails and/or spam folders are deleted regularly on a monthly basis as shown with above script examples.

That is all folks.

hello world bash and perl script

I remember my very first hello world program when I was at younger age. I was 13. I created a hello world program using Basic programming language. Basic language at that time was capable of creating 2D games already which can be played from your TV screen via Atari game console. A cassette tape was the technology back then before and I used it on saving my hello world program as a storage devices. River Raider was a very well known 2D war plane strategy game before that time.

Now, this entry is very simple. Covering a hello world script using bash and perl.

Creating Hello world bash script. Yes, launch your fave CLI editor and save hello.sh with the following contents:

Hello.sh
~~~~~~~~~~~~~~~~~~~~~~~~~~
#!/bin/bash
echo Hello World!
~~~~~~~~~~~~~~~~~~~~~~~~~~

Alternatively, a hello world perl script.

Hello.pl
~~~~~~~~~~~~~~~~~~~~~~~~~~
#!/usr/bin/perl
print "Hello World\n"
~~~~~~~~~~~~~~~~~~~~~~~~~~

Make them root executable like so.

# chmod 755 hello.sh hello.pl

Very basic. That is all.

passwordless rdesktop session with XP howto

This blog entry simply covers how to connect to XP clients remotely using rdesktop with supplied login name and password as argument and avoid putting username and password over and over again when remotely connecting to XP machines.

This entry also assumes the following:

a. that XP clients have a properly configured firewall for allowing remote connections.
b. that XP clients have enabled RTP request session
c. that XP clients are within the broadcast network of connecting remote host

Here are two approach on how to connect to XP machines remotely using rdesktop with supplied username and password as command line arguments.

# rdesktop windows.machine.IP.address -u XP-username -p XP-password

You can create a desktop shortcut and place it over your X panel. This can be done using Custom Application Launcher. Simply right click from the panel > Add to Panel > Custom Application Launcher and enter rdeskop details from there.

VERIFICATION:
Click on the desktop or panel shortcut, now you have a virtual passwordless rdesktop session with a XP machine.

Done.

force VGA screen resolution and screen mode

As included from previous blog entry of changing VGA setting or VGA screen resolution using Gnome system-config-display, which can be found here, here's another entry on how to force VGA screen resolution into your X settings directly via terminal.

As you know, X uses default configuration files, one of them is /etc/X11/xorg.conf. X reads this file during the process of launching and logging into X via runlevel 5. Settings for mouse, keyboard, VGA card, display resolution, regional language, screen types, VGA drivers and other modules used by X are basically declared and can be found from this X conf file.

If you want to change your VGA settings directly via terminal or force screen VGA resolution changes due to some *unknown driver issues, you can edit this file directly. Remember to do proper backups when editing linux configuration files.


1. Backing up xorg.conf

# cp /etc/X11/xorg.conf /etc/X11/xorg.conf.good


2. Launch your favorite terminal editor and edit xorg.conf

3. Inside xorg.conf, find the "Section Screen" which declares supported screen resolution for your currently detected VGA card. A sample of screen section layout is shown below:

~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
Section "Screen"
Identifier "Screen0"
Device "Videocard0"
Monitor "Monitor0"
DefaultDepth 16
SubSection "Display"
Viewport 0 0
Depth 16
Modes "800x600" "640x480"
EndSubSection
EndSection
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

NOTE:
If you strongly believe and have proof that your VGA card supports a non-declared screen resolution besides from the above shown modes or if your VGA card driver manuals or websites showed that your VGA card supports the screen resolution you wish to achieve, proceed with the following with caution.

4. Here, assuming that we are going to force a VGA screen resolution mode of 1024x768 into xorg.conf and you are done with xorg.conf backup file. Edit the xorg.conf lines that says 'Modes' under Screen Section like shown below

From
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
Modes "800x600" "640x480"
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

To
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
Modes "1024x768" "800x600" "640x480"
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

and save xorg.conf.

5. Close all opened applications. Restart X by hitting Ctrl+Alt+Backspace key combinations and see the effects of xorg.conf changes.

Success?

If X hangs after giving it some time like 60 seconds or more, and you wish to revert back recent changes from your xorg.conf, simply press Ctrl+F1 and login as root via TTYs. Then copy your backup xorg.conf.good file overwriting the non-working xorg.conf. Go back to X mode by hitting Ctrl+F7 and from there, try to hit Ctrl+Alt+Backspace for another X restart attempt.

Success?

If X does not restart again, try to go back to currently logged in root user via Ctrl+F1. As root, issue one of the following to stop a malfunctioning X or restart a new process from one of the below X commands.

To stop X
# gdm-stop

To restart X
# gdm-restart

To have a safe mode restart of X
# gdm-safe-restart

To launch a new X
# startx

There are times you need to kill an existing non-functioning Gnome X process by using kill.

Gnome X has a feature of detecting non-responsive and redundant failed launchng of Gnome X. If any attempts to launch X failed for several consecutive times, Gnome X automatically prompts you to have a new X setup and launches a new X setup. This is the same like launching it during a fresh linux installation.

This works for me during my old laptop, I hope it works for you too with your Fedora boxes as well.

Monday, August 20, 2007

RealPlayer 10 for linux install howto

Now, everybody can enjoy playing MP3s, Ogg Vorbis, Theora, RealAudio, RealVideo, H263, AAC in Fedora Linux. Sequel to recent RealPlayer installation via RPM, this blog entry would be done and tested using self-extracting BIN file from RealPlayer. The RealPlayer installation steps are almost identical with minor installation differences and more RealPlayer installation screenshots.

For RealPlayer fanatics, here's an entry that covers installation procedures of RealPlayer for Fedora Linux .

RealPlayer@ 10 supports RealAudio, RealVideo 10, MP3, Ogg Vorbis and Theora, H263, AAC and more. Get ready for accelerated video, full screen playback, and a lot more to play. You can now watch and listen to embedded video right in your Web browser without opening RealPlayer. Enjoy media from your favorite music and news sites with just one click. RealPlayer 10 for Linux is based on the open source Helix player.



INSTALLATION:
=============

1. Issue the following commands as root

# yum -y install compat-libstdc++-33.i386


2. After succesful yum installation, you can now proceed to download RealPlayer 10 for Linux from this site.

3. Go to downloaded file location and make the self-extracting binary file as file executable like so

# chmod 755 RealPlayer10GOLD.bin

4. And execute

# ./RealPlayer10GOLD.bin


You are going to see similar screen displays like the one below.
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
Extracting files for RealPlayer installation........................

Welcome to the RealPlayer (10.0.9.809) Setup for UNIX
Setup will help you get RealPlayer running on your computer.
Press [Enter] to continue...

Enter the complete path to the directory where you want
RealPlayer to be installed. You must specify the full
pathname of the directory and have write privileges to
the chosen directory.
Directory: [/usr/local/bin]:

You have selected the following RealPlayer configuration:
Destination: /usr/local/bin

Enter [F]inish to begin copying files, or [P]revious to go
back to the previous prompts: [F]:

Copying RealPlayer files...configure system-wide symbolic links? [Y/n]: ....
Enter the prefix for symbolic links [/usr]: .........

RealPlayer installation is complete.
Cleaning up installation files...
Done.
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~


LAUNCH: Ctrl+F2, realplay

Below are the initial series of RealPlayer 10 for Linux program execution. You just simply click Forward from here.



Followed by RealPlayer 10 license agreements and release notes.






RealPlayer 10 default installation options for updates.



And finally ready to launch RealPlayer 10 for Linux application.



Here are my screenshots, playing one of great songs by Josh Groban.



It works in Fedora!

RealPlayer website can be found here.
All trademarks and products mentioned here are managed and owned by respective companies.

Saturday, August 18, 2007

Grip - CD ripper install howto

As a complete and powerful Fedora desktop, Fedora 7 also provides CD ripping softwares. One of them is Grip.

Grip is a GTK+ based front-end for CD rippers (such as cdparanoia and cdda2wav) and Ogg Vorbis encoders. Grip allows you to rip entire tracks or just a section of a track. Grip supports the CDDB protocol for accessing track information on disc database servers. In other words, Grip lets you grip and encode existing WAV files to another media formats like MP3, FLAC or OGG.

Here are some nice things about Grip features:

* Full-featured CD player with a small screen footprint in "condensed" mode
* Database lookup/submission to share track information over the net
* HTTP proxy support for those behind firewalls
* Loop, shuffle, and playlist modes
* Ripping of single, multiple, or partial tracks
* Encoding of ripped .wav files into MP3 files (as well support for OGG and FLAC)
* Simultaneous rip and encode
* Support for multiple encode processes on SMP machines
* Adding ID3v1/v2 tags to MP3 files
* Cooperating with DigitalDJ, my SQL-based MP3 jukebox

Like most known CD ripper, Grip interactively checks for ID tags, names, and more details of current media file beings rip for optional submission and database addition to freedb.freedb.org. More info can be found here.


INSTALLATION:

Here is how to convert, rip, and encode WAV files to MP3, FLAC and OGG.

# yum -y install grip


EXECUTION:

Ctrl+F2, grip


Screenshot in action:

Friday, August 17, 2007

Banshee - music management and playback

What? An alternative music player again? But hey, its free opensourced linux world anyway.

Alternatively, here's another multimedia player around the linux application arena.

Banshee.

Banshee allows you to import CDs, sync your music collection to an iPod, play music directly from an iPod, create playlists with songs from your library, and create audio and MP3 CDs from subsets of your library. Check out their dazzling website from here.

Banshee easily import, manage, and play selections from your music collections in general. Easily sort and filter your library in Banshee. The "Recommendation" plugin shows related artists and other information as you listen to music.

With banshee, you have flexibility and total control of your music management and selection over your music files from your harddisk or from your IPod, integrated with music voting features via stars, music tags by words, location and year and more!!! You should try it, it's one of my personal favorites!

INSTALLATION:
==============

Available from Fedora repo. Yum can download a 10MB rpm package for you and install it automatically by doing so, as root:

# yum -y install banshee


LAUNCH
=========

Ctrl+F2, banshee


Screen shot during banshee application launch.



A running Gnome banshee in action:



If your installation and attempt to play music files failed, you may try to visit Banshee FAQs here.

Very cool way of managing music files from your Fedora box.

I am giving thie Banshee 4.5 stars **** !!!!

gnome music applet install howto

Gnome Music Applet is a small, simple GNOME panel applet that lets you control a variety of different music players from the panel. Music Applet provides easy access to information about the current song and the most important playback controls.

Gnome Music Applet is the successor to the Rhythmbox Applet and currently supports the following music players:
* Banshee
* Exaile
* MPD
* Muine
* Rhythmbox
* Quod Libet
* XMMS1 and XMMS2
* Quod Libet

You can view more info from their website here. Gnome-music-applet is available from fedora repo can be installed once again by using yum as follows:

INSTALLATION:
=============


# yum -y install gnome-applet-music


GNOME USAGE:
=============

Right click to a vacant postion from your panel, select 'Add to Panel' and you will be prompted with similar window as shown below. Scroll down until you are seeing "Music Panel" and hit 'Add'.



After adding the gnome music applet, you would notice that your panel has a new icon similar to a jukebox. Now simply double click on this panel icon, the panel player would immediately appear from an expanded panel. A similar mini button would appear from your current gnome panel as shown below.




Moreover, your current gnome music player default plugin would also be launched prompting you for further music selections. Alterantively, you can change your preferred player by choosing Plugin menu after right-clicking the gnome music applet.



You can also right click on the gnome music player and further customize its panel appearance and other options like shown above. Try to minimize your default music player and a new popoup notification appears like so




Great, now you have a music playing from the background and an iconized gnome music applet with accessible and convenient music control relocated away from your screen work areas.

Have a happy linux weekend!

Cool applet! I gave it 3.5 stars ***.5 !!!

Pirut and yum-updatesd - software management

This blog entry covers how to managed currently installed or missing packages from Fedora using Gnome.

The closest term most people calls this is the Add/Remove software of Fedora Linux.

Pirut (pronounced "pirate") provides a set of graphical tools for managing Fedora Linux softwares.

Pirut tool makes use of GUI presenting packages to be added, removed, and updated to your current Fedora box. Pirut is actually the graphical front end for yum that does this add, remove and update software packages. Pirut also comes with Search, View, and Install menu facility that helps a lot on searching particular 'unknown' package.


INSTALLATION:
================

Installation is very simple. As root, issue this command

# yum -y install pirut


LAUCH:

Ctrl+F2, pirut



I would also recommend for most Fedora desktops that want to stay up-to-date , to install an update notification utility.


Yum-UpdatesD
============

yum-updatesd provides notification of updates which are available to be applied to your system. This notification can be done either via syslog, email or over dbus.


INSTALLATION:
=============

Use the champ, yum as follows

# yum -y install yum-updatesd


LAUNCH
=======

# service yum-updatesd start
# service yum-updatesd status

If you wish to make this permanent, you can modify your startup program like so

# chkconfig --levels 5 updatesd on

When yum-updatesd detected from yum repos that your box needs immediate updates, you will be notified about this by a popup message box. Cool.

Automatically, upon bootup, yum-updatesd checks for immediate updates that needs to be automatically downloaded and installed into your Fedora box. This is quite recommended on Fedora box that has fast web connections.

However, if you have a slow dialup connection, doing the update via yum CLI on a important-package at a time on daily basis would be fine but tedious.

See screenshot in action




That's is all.

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