feedburner
Enter your email address:

Delivered by FeedBurner

feedburner count

How to Create & Extract tar.gz and tar.bz2 Files in Linux

Labels: ,

The most common compressed archive file format in Linux is the tar.gz format. Tar file is an archive file format. Tar.gz is a compressed tar file.

How to create a compressed tar.gz file from a folder or file in Linux?

In order to create a compressed tar.gz archive from a folder/file we need to run the following tar command:

tar czf new-tar-file-name.tar.gz file-or-folder-to-archive

Here is the command explanation:
  • tar - the tar command.
  • c - create new archive.
  • z - compress the archive using gzip.
  • f - use archive file.
  • new-tar-file-name.tar.gz - the name of the tar.gz to create.
  • file-or-folder-to-archive - the name of the folder we want to archive.

How to create a compressed tar.gz file from multiple files and folders in Linux?

In order to create a compressed tar.gz file from multiple files or/and folders we need to run the same tar command we used when we archived a single file/folder and to append the rest of the files/folders' names to it.

tar -czf new-tar-file-name.tar.gz file1 file2 folder1 folder2

How to extract a compressed tar.gz file in Linux?

tar -xzf tar-file-name.tar.gz

Here is the command explanation:
  • tar - the tar command.
  • x - extract the archive.
  • z - uncompress the archive using gzip.
  • f - use archive file.
  • tar-file-name.tar.gz - the name of the tar.gz to create.
The tar command will extract all the files/folders in the archive to the current directory.

How to extract a compressed tar.bz2 file in Linux?


Extracting tar.bz2 (bzip2 file) is very similar to the way you extract tar.gz file. Instead of using the -z flag you need to use the -j flag for the bzip2 format
tar -xjf tar-file-name.tar.gz

Here is the command explanation:
  • tar - the tar command.
  • x - extract the archive.
  • j - filter the archive through bzip2
  • f - use archive file.
  • tar-file-name.tar.gz - the name of the tar.gz to create.
The tar command will extract all the files/folders in the archive to the current directory.

How to solve the Flash sound problem in Ubuntu Linux

Labels: , , ,

How to solve the Flash sound problem in Ubuntu Linux
Update: I had the same Flash sound problem with Ubuntu 9.04.

When I upgraded my Ubuntu Linux from Ubuntu 7.10 to Ubuntu 8.04 Hardy Heron I had a problem with sounds on my Linux. This audio problem was related to Flash libraries and I was able to solve it by installing the libflashsupport package.

Yesterday I upgraded my Ubuntu Linux from Ubuntu 8.04 to Ubuntu 8.10 Intrepid Ibex. The first thing I noticed was that I am no longer able to hear sound from Flash movies on my new Ubuntu 8.10 .

Trying to solve the Flash sound problem with Ubuntu libflashsupport package
The first thing I did was to try playing audio files (mp3, ogg...) using amarok. As opposed to my last Ubuntu sound problem, this time I was able to play and hear audio files. Since my sound problem was related to Flash, I decided to try the same solution that solved my sound problem the last time, to install the libflashsupport package by running the following command:

$ sudo apt-get install libflashsupport

When I run the command I discovered that the package libflashsupport is not available and it was replaced by the flashplugin-nonfree-extrasound package on Ubuntu 8.10.

$ sudo apt-get install libflashsupport
Reading package lists... Done
Building dependency tree
Reading state information... Done
Package libflashsupport is not available, but is referred to by another package.
This may mean that the package is missing, has been obsoleted, or
is only available from another source
However the following packages replace it:
flashplugin-nonfree-extrasound
E: Package libflashsupport has no installation candidate


Solving the Flash sound problem using Ubuntu flashplugin-nonfree-extrasound package
Here is the flashplugin-nonfree-extrasound package description:

This is an open Source extension library for the Adobe Flash Player
that enables support for otherwise unsupported sound systems. It
provides the libflashsupport.so plugin. The sound system to use is
automatically detected:
* It first tries to detect Esound,
* Next, it checks for OSS.

If all of the above failed, it falls back to the ALSA driver that's
built directly into FlashPlayer 9.

I decided to try to install this flashplugin-nonfree-extrasound package, hopefully this will do the same job the libflashsupport package did the last time and will restore the audio to my Flash player.

$ sudo apt-get install flashplugin-nonfree-extrasound

After the flashplugin-nonfree-extrasound was installed I restarted my Firefox, opened a YouTube page and played the video. I no longer had sound problems in my Ubuntu Flash player

Ubuntu Linux Toolbox: 1000+ Commands for Ubuntu and Debian Power Users

How to Accept MS Outlook Invitation in Evolution

Labels: , ,

By default Evolution doesn't recognize MS Outlook invitation formats although it does have this feature. The reason why it doesn't recognize Outlook invitations is because Evolution comes with a "Prefer plain-text" plug-in which is enabled by default. In order to enable Evolution to recognize Outlook invitation and to add an appointment in the Calendar we need to disable this plug-in.

How to enable Evolution to recognize Outlook invitations:

  1. Open the Evolution Plugin Manager window by selecting the "Edit" entry in the Evolution file menu and then choosing Plugins.
  2. Scroll down to the "Prefer plain-text" entry and disable it by removing the mark from the check box near it. Press the Close button.
Now Evolution should display Outlook invitation in a special format that will let you add the appointment to your calendar and send a response to the sender.

Howto Restart Gnome Panel

Labels: ,

It doesn't happen a lot but it does sometimes when the Gnome Panel freeze. If you are a former windows user you might be used to restart the computer when something in you desktop stuck. This is not the way with Linux. We can fix the problem by restarting the desktop session (restarting the X server) pressing the Ctrl+Alt+BackSpace but this will destroy everything we worked on so far. A more elegant way will be to restart only the Gnome Panel.

Getting access to the Linux command line shell


In order to restart the Gnome Panel we will need to execute the Linux kill command. Once the Gnome Panel process is killed Gnome will restart it automatically so the only thing left for us is to kill the Gnome Panel process. In order to execute the Linux kill command we will need to get access to the Linux shell. This can be done by one of the following:
  1. Pressing Alt+F2
  2. Using an opened console window using the Alt+Tab buttons to navigate to it.
  3. Using a console session by pressing Ctrl+Alt+F1


Killing the Gnome Panel


In each of these options we will need to execute the Linux kill command in order to kill the Gnome Panel process. There are two ways to use the kill command:
  1. Using the application name will kill all the applications with the same name
  2. Using the process id (pid) will kill only the process with the specified id.
Back to our case with the Gnome Panel, we can use both of the options.

Getting the Gnome Panel Process Id


First we will need to find the process id of the Gnome Panel. We can do it by listing the running processes on the system and filtering the ones with the word panel.

$ ps -ef | grep panel
shimik 19301 6584 0 09:13 ? 00:00:04 gnome-panel
shimik 20367 19254 0 09:35 pts/7 00:00:00 grep panel

We can see that there are two processes which were started by the user shimik, the first one is the gnome-panel process with the 19301 process id and the second is the grep command which we used to filter out the processes.

Restarting the Gnome Panel using the kill command


Now that we know the process id of the Gnome Panel we can kill it by using the following command

$ kill -9 19301


Restarting the Gnome Panel using the killall command


In order to use the killall command, we need to know the Gnome Panel process name. Looking back at the process list

$ ps -ef | grep gnome-panel
shimik 19301 6584 0 09:13 ? 00:00:04 gnome-panel
shimik 20367 19254 0 09:35 pts/7 00:00:00 grep panel

We can see that the Gnome Panel process name is gnome-panel.
Now we can use the killall command to kill the Gnome Panel process.

$ killall gnome-panel


After killing the gnome panel process gnome will restart the panels and we can continue our work without loosing the things we have done so far.

Although this explanation is about Gnome Panel restart in fact it describes the ways to restart, any Linux process so you can use it whenever you need to close/terminate a process.

How to Display Network Open Ports in Linux with Netstat

Labels: ,

Have you ever had a problem when you tried to start a process and you got an error that a port which the process needs is already used by another process?

How to display open network ports in Linux


With netstat, the network statistics command line tool, you can list all the open ports on your Linux with the process id of the process which opened them.

$ netstat -lp


The -l option, display listening server sockets.
The -p option, display PID/Program name for socket.

If you want to see which process uses port 80 all you need to do is to combine the netstat command with grep.

$ netstat -lp | grep 80

Problem Writing to USB Flash Drive in Linux

Labels: ,

A friend of mine decided to install Linux on his home computer. One of the problems he encountered when he began using his new Linux desktop was writing to USB flash drive.

Using different mount options in order to write to USB Flash Drive in Linux


He tried mounting the USB flash drive with every possible mount option (uid, gid, rw...) but it didn't help. He tried changing the permissions using super user but he still couldn't write to the USB flash drive.

Writing to USB Flash Drive in Linux - The solution


He did notice that when he mounted his external USB IDE drive he didn't have any problems writing to it. A close examination of the two different devices showed that the file system on the USB flash drive was FAT32 where as the file system on the external USB IDE drive was NTFS. As a last resort he decided to format his USB flash drive as NTFS file system. After he changed the file system of the USB flash drive from FAT32 to NTFS he did manage to write to it from his new Linux.

Although I believe there has to be a better way to solve this problem of writing to USB flash drive on Linux, this is still a possible solution.

How to Configure PPTP VPN Connection in Ubuntu Linux

Labels: , , ,

How to configure a PPTP VPN connection in Ubuntu Linux 8.04?

This Linux tutorial describes how to configure and set up a PPTP VPN connection in Ubuntu Linux 8.04 using the network manager. If you are using Ubuntu 9.04 or 8.10 then take a look at how to set up and configure a PPTP VPN connection in Ubuntu Linux 8.10 and 9.04.

How to install Ubuntu PPTP VPN package:

One way is to install the Ubuntu network-manager-pptp package using synaptic:
  1. Open synaptic (System -> Administration -> Synaptic Package Manager).
  2. Search for vpn.
  3. Mark for installation the network-manager-pptp package.
  4. Press the apply button.

Another way is to install the Ubuntu network-manager-pptp package using the command line:
$ sudo apt-get install network-manager-pptp

Now, in order for the installation to take affect, you need to restart the dbus service. You can do that by either restarting your Ubuntu, or a better way is by the following command line
sudo /etc/init.d/dbus restart

How to configure the PPTP VPN connection in Ubuntu Linux:

  1. Click on the Network-Manager icon on your desktop bar "Notification Area" (also called system tray on windows). This icon can be in the shape of 2 computer screens in the case of wired connection or the signal strength of the wireless connection in case of wireless connection.
  2. Choose "VPN Connections" -> "Configure VPN".
  3. Press "Add" to add a new connection configuration.
  4. On the new "Create VPN Connection" window click the forward button, choose "PPTP tunnel" as the VPN connection type and click on the forward button again.
  5. Fill in a name for that connection. The name can be office, work or anything else. It is there to distinguish between this connection and others which you might want to create in the future. The Type option should be left as "Windows VPN (PPTP)" and in the Gateway you should insert your VPN server IP. If you don't know the IP address you should ask for it from the system administration of the network that you are trying to connect to.
  6. On the "Authentication" tab, make sure that "Authenticate Peer", "Refuse EAP" and "Refuse CHAP" are marked.
  7. On the "PPP Options" tab make sure that "Use Peer DNS" is unmarked.
  8. On the "Routing" tab, make sure that "Peer DNS through tunnel" is unmarked.
  9. If you don't want to route all the traffic through the VPN connection and you know what is the range of the IP address of the network that you are trying to connect to, you should mark "Use only VPN connection for these addresses" together with the range of the address.
  10. Click on the "Forward"button and then on the "Apply" button.

How to connect to PPTP VPN server using the VPN connection in Ubuntu Linux:

  1. Click on the Network-Manager icon on your desktop bar "Notification Area".
  2. Choose "VPN Connections" and then choose the VPN connection that you just created.
While ubuntu tries to connect to the VPN server you will see yellow circles around the Network-Manager icon. If the connection will be established you will see a lock sign on the Network-Manager icon. This sign indicates that you are connected to the server. Now all you have to do is to try to connect to any machine on the connected network.

How to disconnect the PPTP VPN connection in Ubuntu Linux:

  1. Click on the Network-Manager icon on your desktop bar "Notification Area".
  2. Choose "VPN Connections" and then choose "Disconnect VPN".

Visual Effects with Compiz Fusion on Ubuntu Linux

Labels: , ,

Linux Desktop Visual Effects with Compiz Fusion


Did you see these beautiful Linux desktop effects?
.
These Linux desktop effect are done by using Compiz Fusion. Compiz Fusion aims to provide an easy and fun-to-use Linux windowed environment, allowing use of the graphics hardware to render each individual window and the entire screen, to provide some impressive effects, speed and usefulness. Compiz Fusion can be used with Gnome and KDE.

How can I enable the desktop effects in my Ubuntu Linux?


In order to enable Compiz Fusion in your Ubuntu Linux you need to click on the "Appearance" entry on the System preferences menu. Go to the "Visual Effects" tab and choose the "Normal" or "Extra" options. This will enable the default effects of the option you choose. In fact it will replace your default windows manager with Compiz Fusion.

How can I disable the Compiz Fusion desktop effects in my Ubuntu Linux?


In order to disable Compiz Fusion in your Ubuntu Linux you need to click on the "Appearance" entry on the System preferences menu. Go to the "Visual Effects" tab and choose the "None" option. This will disable all the effects and restore your default windows manager.

How can I add/remove visual effects in Compiz Fusion?


In order to add/remove visual effects on your Ubuntu Linux you need to click on the "Advanced Desktop Effects" entry on the System preferences menu. The CompizFusion Setting Manager will be open. Using the CompizFusion Setting Manager you can add, remove or change the behavior of the visual effects.

What is the Super key in Compiz Fusion?


A common key which is used to active the different effects in Compiz Fusion is the "Super" key. The Super key is the key between the left Ctrl and left Alt on the keyboard.

How To Resize Partitions in Linux Using GParted

Labels:

Looking for a way to delete, create or resize partitions on your Linux? Do you have a windows partition on your hard disk that you want to resize or delete from Linux?

Creating, destroying, resizing, and moving partitions in Linux

On windows you might have used the commercial Partition Magic to edit partitions. On Linux there is no need for a commercial program. In Linux there is GParted, a free software for creating, destroying, resizing, moving, checking and copying partitions, and the file systems on them. GParted support many file system including the windows FAT and NTFS file systems. There is no need to worry, with GParted you can resize partitions without loosing your data (although, like in any other program that changes things in your partitions, you should backup your data before you do anything).

Installing GParted in Ubuntu Linux

Installing GParted in Ubuntu Linux is very simple. One way will be using synaptic:
  1. Open synaptic (System -> Administration -> Synaptic Package Manager).
  2. Search for gparted.
  3. Mark for installation the gparted package.
  4. Press the apply button.

Another way is to install the Ubuntu gparted package using the command line:
$ sudo apt-get install gparted

Starting GParted in Ubuntu Linux

After the installation you will have a new entry by the name "Parttion Editor" in your Ubuntu Linux System Administration menu. You can start GParted by clicking on the new entry or you can start it by typing the gparted command in the console.

$ sudo gparted


Deleting Windows partitions using GParted in Ubuntu Linux

If you installed Ubuntu and you still have a partition with windows that you left (in case things won't go well with Linux), you can use gparted to delete it or resize it (if you still want to use it).

In order to make changes to your partitions, you must unmount the partitions that you want to change and start GParted as a superuser (sudo).

BE CARFULL WHEN YOU USE GPARTED OR ANY OTHER PARTITION EDITOR. CHANGING THE PARTITION CAN BE DANGEROUS, DO IT ON YOUR OWN RISK. BACKUP YOUR DATA BEFORE YOU START. YOU MIGHT LOSE ALL THE DATA IN THE DISK. IF YOU DON'T KNOW WHAT YOU ARE DOING DON'T DO IT.

Sound Problem in Ubuntu Linux

Labels: , , , , , ,

This post describes Flash sound problems when upgrading from Ubuntu 7.10 to Ubuntu 8.04. A similar sound problem exist when upgrading from Ubuntu 8.04 to Ubuntu 8.10 .

After I upgraded from Ubuntu 7.10 to Ubuntu 8.04 Hardy Heron I noticed that I can no longer hear music. I tried playing audio files using amarok, rythembox or totem. I tried playing different kinds of audio and video files but there was no sound. Actually there was no sound in my Ubuntu, not even system sounds. The only thing that did work was listening to audio streams using firefox. After a few days I noticed that if I start playing my amarok play list before I start firefox I can listen to music as long as it is running. Another thing I noticed is that although I can listen to audio streams using firefox, I can't hear any sound when I play flash with firefox. After playing around I found the solution. Installing libflashsupport solved the problem. After I installed it I no longer had sound problems.

libflashsupport can be installed using synaptic or using apt-get

$ sudo apt-get install libflashsupport

How To Change The Date and Time on Linux

Labels:

Changing the date and time from the Linux Desktop is very easy. Usually all you need to do is right click on the Desktop clock and choose Adjust Date & Time. In case we are using a non GUI environment like Ububtu server we need to use the command line for that.

Using the Linux date command to display the current date and time


If we want to view the current date and time using a command line all we need to do is to execute the Linux date command:

$ date
Thu Jul 10 08:37:02 BST 2008

We can see that the date is the 10th of July 2008 ,the time is 8:37 and the time zone is the British summer time.
We can view the universal time using the -u option

$ date -u
Thu Jul 10 07:37:02 UTC 2008


Changing the date and time in Linux using the date command


If we want to change the date and time we can use the same command with the addition of the new date and/or time

$ date 071009372008.00

In this example I added another hour to the time.

The date format is MMDDhhmmYYYY.ss
  • MM - Two digits for the month
  • DD - Two digits for the day
  • hh - Two digits for the hour
  • mm - Two digits for the minute
  • YYYY - Four digits for the year
  • .ss - Two digits for the seconds
The new time is according to the system time zone.

Changing the time zone in Ubuntu Linux is very easy and can be done with another command.

How To Change The Time Zone in Ubuntu Linux

Labels: ,

Changing The time zone in Ubuntu Linux using dpkg-reconfigure


In order to change the time zone on Ubuntu Linux we need to run the command dpkg-reconfigure tzdata in the console.

$ sudo dpkg-reconfigure tzdata

Selecting the time zone geographic area


The Ubuntu time zone configuration screen will ask us to select the geographic area we live in.
Using the up and down keys we can choose between different geographic areas on the globe.

Setting the time zone according to a city


After we choose the geographic area we will see a new screen with a list of cities and places in the selected area.
If, for example, I will choose Asia as the geographic area and Hong Kong as the city the time zone of my Ubuntu Linux will change to HKT (Hong Kong Time). The output will be:

Current default timezone: 'Asia/Hong_Kong'
Local time is now: Wed Jul 9 15:09:52 HKT 2008.
Universal Time is now: Wed Jul 9 07:09:52 UTC 2008.

If, for example, I will choose Asia as the geographic area and Jerusalem as the city the time zone of my Ubuntu Linux will change to IDT (Israeli Daylight Time). The out put will be:

Current default timezone: 'Asia/Jerusalem'
Local time is now: Wed Jul 9 10:10:37 IDT 2008.
Universal Time is now: Wed Jul 9 07:10:37 UTC 2008.