feedburner
Enter your email address:

Delivered by FeedBurner

feedburner count

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.