Saturday, March 15, 2008

Folder and File sharing between Linux and Windows

My fists choice to share files between my Linux and Windows machines was file transfer through messengers .. isn't funny?

Yea.. it is funny, but this due to my laziness to Google it

But now every thing is okay and I can freely share files between my 2 PCs

So to summarize:

To share files between Linux(Ubuntu) and Windows(Vista) you can use Samba

Samba is a free software re-implementation of SMB/CIFS networking protocol. Samba is released under the GNU General Public License. Samba provides file and print services for various Microsoft Windows clients and can integrate with a Windows Server domain, either as a Primary Domain Controller (PDC) or as a Domain Member. It can also be part of an Active Directory domain. Samba runs on most Unix and Unix-like systems, such as Linux, Solaris, and the BSD variants, including Apple's Mac OS X Server (which was added to the Mac OS X client in version 10.2). Samba is standard on nearly all distributions of Linux and is commonly included as a basic system service on other Unix-based operating systems as well.

For how to step by step of using Samba kindly check this Wiki page

Wednesday, March 12, 2008

Installing ns2.32 on Ubuntu7.10

This article works fine for Installing ns2.31 on Ubuntu 7.04 but for ns2.32 it needs some minor changes so I will repeat the commands with these changes so that ohters may save time repeating this work

Download ns-allinone-2.32 and Install

$ wget http://nchc.dl.sourceforge.net/sourceforge/nsnam/ns-allinone-2.32.tar.gz

$ tar -xzvf ns-allinone-2.32.tar.gz
$ cd ns-allinone-2.32
$ sudo apt-get install build-essential autoconf automake libxmu-dev

If an error raising Package autoconf is not available or something similar then this post may help you for fixing that

(If previous command still generate some errors, and if it does, restart your computer and try the following step :)

$ sudo apt-get install -f build-essential libxt-dev libxt6 \

libsm-dev libsm6 libice-dev libice6 libxmu-dev

If an error raising Package autoconf is not available or something similar then this post may help you for fixing that

Now run this command

$./install

Set environment variables

$ gedit ~/.bashrc 

Add the following lines to the end of it. Remember replace "/your/path" by something like "/home/purple"



# LD_LIBRARY_PATH

OTCL_LIB=/your/path/ns-allinone-2.32/otcl-1.13

NS2_LIB=/your/path/ns-allinone-2.32/lib

X11_LIB=/usr/X11R6/lib

USR_LOCAL_LIB=/usr/local/lib

export LD_LIBRARY_PATH=$LD_LIBRARY_PATH:$OTCL_LIB:$NS2_LIB:$X11_LIB:$USR_LOCAL_LIB

# TCL_LIBRARY

TCL_LIB=/your/path/ns-allinone-2.32/tcl8.4.15/library

USR_LIB=/usr/lib

export TCL_LIBRARY=$TCL_LIB:$USR_LIB

# PATH

XGRAPH=/your/path/ns-allinone-2.32/bin:/your/path/ns-allinone-2.32/tcl8.4.15/unix:/your/path/ns-allinone-2.32/tk8.4.14/unix

NS=/your/path/ns-allinone-2.32/ns-2.32/

NAM=/your/path/ns-allinone-2.32/nam-1.13/

PATH=$PATH:$XGRAPH:$NS:$NAM

Let it take effect immediately:

$ source ~/.bashrc

Note: the step described above is important;otherwise, you cannot run ns successfully.

(or you can restart your X windows,i.e. logout and then login, or reboot your system, to make it work.)

Now,the installation has been completed.If you try:

$ ns

Then a "%" will appear on the screen.type "exit" to quit the mode and back to "$"


Validation

After these steps, you can now run the ns validation suite with

$ cd ns-2.32 $ ./validate



Able to install automake and autoconf

After upgrading to the latest Ubuntu and trying to set up a development environment,  the command "sudo apt-get install automake autoconf" returns the following:

Reading package lists... Done
Building dependency tree... Done
Package autoconf 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
E: Package autoconf has no installation candidate

To solve the problem I had to hack the /etc/apt/sources.list which had incorrect entries for the package info (it first points to the install CD). I uncommented the internet sources and fixed each one individually by checking the proper paths to the repositories.

Some hints:

Back up the sources.list you got from this tutorial with this command: sudo cp /etc/apt/sources.list /etc/apt/sources.list_backup

Then edit the sources.list by typing sudo gedit /etc/apt/sources.list

Get your updates using the command sudo apt-get update

Source