Skip navigation.

Sudheer's blog

7 Easy Steps To Play Music And Video In Fedora 8

How to play music and video(MP3, MPEG, AVI, FLV and other multimedia files) in Fedora 8?

Due to patent encumbrance codecs required to play some proprietary file formats are not shipped with Fedora 8. Codecs are the programs that encode and decode digital data. These codecs are available in the livna repository for Fedora 8. You will be able to play mpeg, mp3, avi, flv and other commonly used file formats for music and video. You will require an Internet connection to download and install these packages on your computer.

If you are using Fedora 7 proceed to this blog post.

Let us get started. Are you ready?

How To Create A Password Protected Zip Archive

In my previous post we discussed how to create and extract ZIP archives. This post will teach you how to password protect your ZIP archives. While creating a ZIP archive, optionally, you can encrypt its contents using a password. Take advantage of this option to secure your ZIP archives. This tutorial is short and easy to learn.

How to password protect ZIP archives?

Let us assume we have two text files - abc.txt and xyz.txt in the present working directory.

[sudheer@localhost zip]$ ls
abc.txt  xyz.txt

Let us now create newarchive.zip and encrypt its contents with a password. The syntax is:

zip archivefilename file1, file2, ... -e

where

  • zip is the command
  • archivefilename is the name of the ZIP archive to be created
  • file, file2, ... are list of files to be included in the archive
  • -e is the option that tells ZIP to encrypt the contents using a password typed in the terminal in response to a prompt

Creating and Extracting ZIP Archives With Zip and Unzip

In this article you will learn how to create ZIP archives, list, test and extract them. After reading this article you will know how to manipulate ZIP archives on GNU/Linux systems. We already know that zip works well with tar from the Using TAR Command post. Let us discuss how to work with zip and unzip.

How to create a ZIP archive?

I believe learning by example is the easiest way. Let me walk you through an example straightaway. Let us assume we have two files - abc.txt and xyz.txt in the current working directory.

Using TAR Command

So, you've got a tarball and want to know how to extract it, huh?

tar archiveSome background info about tar: In the olden days, people primarily used tape devices to store and retrieve data. Tape drives still exist and folks use them to archive data. The name tar is derived from from tape archive. The name of the program that creates and extracts tar files also has the same name - tar. Tarball refers to the archive file. They usually have the extension filename.tar.gz.

Extracting tar files with extension .tar.gz: To extract a tar.gz file use the below command. Assuming you have a tarball by name archived-file.tar.gz:

tar -zxvf archived-file.tar.gz

In the above command the options have the following meaning.

  • z - filter the archive through gzip. gzip aka GNU Zip is a program used to compress files. When you use -z option, gzip will be used in tandem with tar.
  • x - extract files from an archive. Pretty self explanatory, huh?
  • v - verbosely list files processed. The -v option prints information on the screen when the files are being extracted from the archive. If you do not use this option, tar still extracts files silently.
  • f - use archive file. This option tells tar to extract from a file. The -f switch is required.

Things To Do After Installing Fedora

Everybody has their own personal preferences in all walks of life. Desktop computer is no different. Every time I install Fedora, I immediately change few settings. The default settings in some applications may not appeal to every body. They certainly don't, for me at least. I will not discuss configuring network, Internet, printer, audio and video drivers in this post because they are more of necessity than personal preferences. Here goes the list.

Nautilus: The first time you open nautilus(aka File Manager), you will notice each folder opening in different windows. Click on your home folder icon on the desktop and click on few other folders. Your desktop looks clumsy with a whole slew of unwanted windows. The fix:

1. Open File Management Preferences. Click System>Preferences>Personal>File Management. You can also open it by launching a nautilus window and then clicking on Edit and then Preferences.
2. Click the Behavior tab on the File Management Preferences window.
3. Select "Single click to open items"
4. Select "Always open in browser windows"
5. Click close

This solves one major headache.

Two Commands To Move Your MySQL Database To A Different Computer

Many popular web applications are written in PHP and use MySQL database. In this post I will describe, how you can move your database to a different computer. Almost all web applications store database and files system information in configuration files. You can actually move your web application to a different server without much hassle by editing few lines in these configuration files. I will write more about the configuration files of web applications in a different post. In this post I will walk you through the steps to move your MySQL database to a different server. The commands will help you move both data and schema.

What do you need to know before moving a database? On both the computers you will require the

  • MySQL database name
  • MySQL username that has access to the database
  • Password for the username that has access to database

You can take a backup of your database in the form of SQL dump and restore it on another server quickly from the Shell. Later in the post we will discuss how you can import and export MySQL databases using a graphical tool.

Launch the terminal. If the server is accessible remotely using SSH you can execute these commands on the secure shell.

Command 1 to generate the backup

mysqldump -u mydatabaseuser -p mydatabase > backup.sql

How To Install LAMP

how to install LAMPLAMP is an acronym which stands for Linux, Apache, MySQL and PHP. The letter P also stands for Perl and Python programming languages. LAMP is a free software stack which powers, primarily, web servers. Most GNU/Linux distributions bundle these packages in the install media and repositories. Let us take a look at how to install LAMP using Fedora. I will restrict the P in LAMP to PHP only for this article. Perl and Python fans, bear with me.

While installing Fedora you can choose to install "Web Sever" which contains these packages. You can install them later also. Let me walk you through the actual steps to get LAMP working on your computer. I assume you are running Fedora 8 on your computer.

1. Launch the terminal by clicking

Applications>System Tools>Terminal

Welcome Thunderbird, Goodbye Evolution

Disclaimer: What you will find mostly in this post is - RANT.

I have been using Evolution email client for more than three years from now. I have moved my mails stored in the .evolution folder from computer to computer. Evolution has handled literally millions of emails for me in these years. On the flip side, I have suffered many agonies with Evolution. After every few days Evolution would download all the messages in my POP account again and mark them as unread. The re-downloading thingy has strained my bandwidth several times. Sometimes the password prompt for the email accounts would appear for no reason I could ever imagine. Any password I typed in those prompts would always return an error message followed by another two prompts to type in the password. I swear I had typed the correct password. Oh my, Evolution was supposed to remember my passwords as per my saved preferences. The "summary mismatch" error message is another frequent troublemaker. After restarting the application few times it seemed to correct itself somehow.

3D Support For NVIDIA Graphic Cards On Linux

You've got an NVIDIA display adapter. You have installed Fedora on your computer. You have now discovered that you can't get 3D working on your computer. What to do?

Fedora or any GNU/Linux distribution does not fully support the 3D functionalities of your display adapter out of the box. To get them working you have install the propitiatory blob. Installing them is quite easy. Here's how you would do it.

Click Applications on the gnome-panel, select System Tools, click Terminal. On the terminal type the below commands
Switch user to root:

su -
Type the root password and hit enter

Enable the livna repository and install the NVIDIA blob.

rpm -ivh http://rpm.livna.org/livna-release-8.rpm
yum install kmod-nvidia

Reboot your computer. Just in case your mouse does not show up or you can't get the right screen resolutions, you will end up editing /etc/X11/xorg.conf file. If you are using a GNU/Linux distribution other than Fedora, you will have to obtain the NVIDIA blob from the repositories that have it. You could also download it from the NVIDIA website.

Wait, we are not done yet. Yum may refuse to update your kernel next time because of the NVIDIA kernel module. To solve this problem you can remove kmod-nvidia by typing yum remove kmod-nvidia in the terminal as root. After removing kmod-nvidia you can update your kernel. Once done, reinstall kmod-nvidia to get back the 3D support. Another scenario that requires you to uninstall kmod-nvidia is when people acknowledge your kernel pedantries. To prove that kmod-nvidia isn't the actual culprit you will be asked to remove kmod-nvidia and reproduce the problem.

Installing, Removing And Updating Packages Using Yum

If you want to quickly learn how to install, remove or update software packages on Fedora or CentOS, here is the short and sweet guide. To use yum you will require an Internet connection and the root password of your system.

Yum stands for Yellow dog Updater, Modified. Yum is currently maintained as part of Duke University's Linux@DUKE project. Using yum you can easily install, remove or update the software packages on your RPM based system. Fedora, CentOS and many other GNU/Linux distributions are based on RPM.

Yum is a command line utility. You will need to open the terminal and become root to use yum. On Fedora 8, click Applications on the gnone-panel, select System Tools and click on Terminal from the drop down menu. On the terminal, ie command line, type

su -
Type the root password

If you see the # symbol on the command line you are ready to go.

Updating software packages: The first thing I do after installing Fedora is update the system. Free and open source software projects are updated rapidly. To keep your system current you have to update packages installed on your computer from time to time. Fedora maintains many software repositories and their mirrors. Whenever software packages are developed or updated, they would be stored on these repositories. When you update your system using yum, you download the latest packages from these repositories and install them on your computer. To perform a full update of your system type the below command in the terminal:

yum update

Yes, it's just a two word command. Isn't it easy to remember? After you type yum update and hit enter in the terminal, yum checks how many packages needs to be updated. Once it gathers the required information, it displays the name, architecture, version and size of the package. Yum also tells you the name of the repository in which the updates are available. It also gives you the transaction summary and the total download size. After promptly displaying all the above information, yum asks for your approval. If everything is ok, you type y and hit enter. Yum updates all the packages on your computer.

Syndicate content