Showing posts with label Ubuntu. Show all posts
Showing posts with label Ubuntu. Show all posts

Saturday, July 11, 2009

Another bug in GNS3 + Running in Windows Vista

Another bug, I found, occured when I have connect line(fastethernet or serial) to cloud (NIO_UDP) which connect to virtual PC on Ubuntu Jaunty. The GN3 says that it cannot connect to NIO_UDP.

Then I decided to work with GNS3 as Root by invoking GNS3 in commandline in with user root. Everthing is going well until I save the project, the problems which occured to me are
1. GNS3 cannot save the workspace outside root directory (it just process as it saved the project, but actually it is not!!)
2. I cannot open project file (*.net) by double click it (open with default application), I have to open it from commandline (but my friend, same os version, has not!!??).

At last, I decided to work with GNS3 in Windows Vista. But the problem mostly occured in Windows Vista is that it does not provide telnet client at first installation. So I have to install telnet client in Control Panel > Program and Features > (on left pane) Turn windows feature on and off and activate telnet client.

Working with Windows telnet is not a comfortavle way for me, then I install the PuTTY for telnet client. The command that we have to config in Edit > Preferences > General > Terminal command is "start C:\progra~1\PuTTY\putty.exe -telnet 127.0.0.1 %p"

Note
---[ For Windows Vista ]---
1. We have to use address 127.0.0.1 instead of localhost (%h) and %p is the router port number for telnet (console connection)
2. We have to change the path to PuTTY from C:\Program Files\PuTTY\putty.exe to C:\progra~1\PuTTY\putty.exe since it will error (Windows thainks that "C:\Program" is telnet program, ToT)
3. the word "start" is to invoke the commandline application

---[ For Both, Windows Vista and Ubuntu Jaunty ]---
1. The path specifies (both workspace and IOS path) in the project file (*.net) cannot use relative path, we have to enter the absolute path only!!

Friday, July 3, 2009

Bug in GNS3

There is little bug in GNS3 running on Ubuntu Jaunty (9.04). The GNS3 cannot display the workspace which has been configured in *.net file. The GNS3 team said that it is the problem of new vesion of qt library.

To solve the problem, you have to right click on project file *.net and select menu "Open with other application" and browse to gns3 application (If you install through synaptic, it would locate at /usr/bin/gns3) the saved project will show in the workspace.

Thank you to
http://www.gns3.net/phpBB/topic813.html

Thursday, July 2, 2009

Cross platform printer sharing with password protection

After googling many sites, large number of people can setup a share folders,files or printers between Windows and Linux Platform, specifically Ubuntu, without password protection. To limit the access of share folder, pinters, the administrator setups the password for some user account.

In my environment, the Host computer which connect to printers is Windows XP platform and client computer is Ubuntu Jaunty Jackalope (9.04) with samba installed. To access shared printer with password protected, the clients have to follow these step
1. Open printer configuration in Administrator>Printing
2. click on New>Printer
3. On left menu, click on Windows printer via SAMBA
4. click browse to browse to target printer
5. activate Set authentication details now and insert username and password given by administrator (you can test that the printer and password match by click on button verify)
6. click forward
7. browse for target printer's brand and click forward
8. Select model then forward (it would load driver for target printer)
9. activate some options that you'd love to
10. In the last step, it would prompt you to print test page
11. Finish!!

Note :
- you can see the status of printing by clicking on properties of target printer, the status is shown in Printer state : field
- printer sharing works on same subnet only

Playing Warcraft III : Dot A in Ubuntu (9.04) Jaunty

There are several steps for configuration of Wine to make it run Warcraft III
1. Get the latest Wine, here
2. Run command in shell
$ wine "path_tp_warcraft/war3.exe" -opengl
3. to set resolution manually in regedit, you should run command
$ wine regedit
4. In HKEY_CURRENT_USER/Software/Blizzard Entertainment/Warcraft III/video, set reswidth and resheight to your resolution.

Thursday, June 11, 2009

Doxygen in Ubuntu 9.04

Doxygen is a documentation system for C++, C, Java, Objective-C, Python, IDL (Corba and Microsoft flavors), Fortran, VHDL, PHP, C#, and to some extent D.

It can help you in three ways:

  1. It can generate an on-line documentation browser (in HTML) and/or an off-line reference manual (in $\mbox{\LaTeX}$) from a set of documented source files. There is also support for generating output in RTF (MS-Word), PostScript, hyperlinked PDF, compressed HTML, and Unix man pages. The documentation is extracted directly from the sources, which makes it much easier to keep the documentation consistent with the source code.
  2. You can configure doxygen to extract the code structure from undocumented source files. This is very useful to quickly find your way in large source distributions. You can also visualize the relations between the various elements by means of include dependency graphs, inheritance diagrams, and collaboration diagrams, which are all generated automatically.
  3. You can even `abuse' doxygen for creating normal documentation (as I did for this manual).

Doxygen is developed under Linux and Mac OS X, but is set-up to be highly portable. As a result, it runs on most other Unix flavors as well. Furthermore, executables for Windows are available.

Easy step to install Doxygen in Ubuntu 9.04
1. Install package doxygen and doxygen-gui
2. In the terminal, run doxygenwizard
3. Customize the Doxyfile using doxywizard

Note : to show the dependency graph you have to
1. install graphviz package
2. select dot feature in doxywizard
3. specify the dotty path (Normally, in /usr/bin/)

NS2 v2.29 - Doc using Doxygen
1. Download from here
2. To extract, type tar -zxvf "filename.tar.gz" in the terminal
3. open index.html in html folder

Optional 4. copy folder to html folder to web server folder

Note : To enable search engine capability you should install php package

Sunday, June 7, 2009

Configuration file for proFTP in Ubuntu

For the one who have problem like me on proFTP. After googling for many many webpages, I've found the config file for anonymous access for proFTP

My modify config file : anonymous can do what ever they want.

Config file

Testing Ubuntu Jaunty Netbook Remix on Aspire One

I just have some time for fun testing Ubuntu netbook remix version of Jaunty. My testing environment is
OS : Ubuntu Jaunty Jackalope (9.04) netbook remix and PC version
Hardware : Acer Aspire one 110
Main Memory : 2GB
Non Volatile memory : Flash memory 8 GB
It is good at the first sight that it can boot on USB flash drive faster than Windows XP (home and professional edition). The interface is very nice and splendid animation. It has no question why I won't install this image into my aspire one. After all installation is complete which takes about 30 mins!!!, I've to wait for installing update about 1 hour ???.However, the new version still has some bugs. After I have change the look from netbook to classic, it cost me very much. The problem that I've face is that it cannot open X window after reboot (it says that the display is not composite or something like that ...). After fixing by using commandline, at last, I decided to newly install ubuntu using Desktop version instead.

The Ubuntu in desktop version costs only 2.3 GB for OS (less WinXP). The speed is , of course, also faster than older OS, Windows XP. Another impression about this Jaunty is that it can run compiz and wobbly effect (WOW!!!) like my laptop and the problem about the X windows is not happened in this version.

So, for the people who interests to install Ubuntu netbook remix version on Acer Aspire one, I recommend that you should not change the look from the default to the classic (as the system tells you) since it can cost you to install all of the thing again and again

Tuesday, June 2, 2009

Cisco console

Introduction

People who work with Cisco network equipment need to be able to connect to the console port on their devices. In Windows, you can simply fire up HyperTerminal to get basic access to your devices. If you are using Linux, then you need to know how this can be done with an application called Minicom.

Hardware

First, you are going to need a Cisco console cable, a Cisco device, and a computer. If your computer has a serial port, then you can use the standard console cable that comes with every Cisco device.

If you do not have a serial port (like most new laptops), then you need to purchase a USB to Serial adapter that supports Linux. This device will allow you to use the standard Cisco cable, which has a serial port on one end.

Install Minicom

You can easily install Minicom by using "System > Administration > Synaptic Package Manager". Search for "minicom" and choose to install the package. Click "Apply" and Minicom should be installed within a few seconds.

Find the name of your serial port

Next, you need to find out is which device your serial port is mapped to. The easiest way to do this is to connect the console cable to a running Cisco device. Now open up a Terminal using "Applications > Accessories > Terminal" and type this command:

dmesg | grep tty

The output will look something like this:

Look in this output for words that contain "tty". In this case, it is "ttyS0". That meas the name of the device the corresponds to your serial port is "ttyS0". Now we are ready to configure Minicom to use this information.

Configure Minicom

Open a terminal using "Applications > Accessories > Terminal". Now type this command to enter the configuration menu of Minicom:

sudo minicom -s

Use the keyboard arrow keys to select the menu item labeled "Serial Port Setup" and then hit "Enter". This will open a window that looks similar to the one below:

Change your settings to match the ones in the picture above. Here is what I had to change:

  • Change the line speed (press E) to "9600"
  • Change the hardware flow control (press F) to "No"
  • Change the serial device (press A) to "/dev/ttyS0"
    • Be sure to use the device name that you learned in the previous step

Once your screen looks like mine, you can hit "Escape" to go back to the main menu. Next, you need to select "Save setup as dfl" and hit "Enter" to save these settings to the default profile. Then select "Exit Minicom" to exit Minicom... ;)

To find out if you have configured Minicom correctly, type this command in the terminal:

sudo minicom

After entering your Ubuntu user password, you should be connected to your Cisco device.

Note: You may want to delete the Minicom init string if you see a bunch of gibberish every time you connect to a device. To do this, enter Minicom configuration with:

sudo minicom -s

Then select "Modem and dialing". Press "A" to edit the Init string, and delete all characters so that it becomes empty. Make sure you save this to the default profile with "Save setup as dfl". You should no longer see gibberish when you connect to devices.

Create a desktop launcher

If you want to have quicker access to Minicom, you can create a desktop launcher.

  1. Right-click on the desktop and choose "Create launcher"
  2. Click on "Icon" and choose the picture you want to use
  3. Use the "Type" pull-down menu and select "Application in terminal"
  4. Create a name like "Cisco Console" in the field labeled "Name"
  5. Enter this command into the field labeled "Command"
    • sudo minicom
  6. Hit "OK" and your desktop launcher is ready for you to use.

References

Using the Cisco console in Linux

Saturday, May 23, 2009

Ubuntu 9.04 keyboard and mouse problem

I just found Ubuntu 9.04 problem (possibly bug) of keyboard and mouse on my hardware (Dell Vostro 1310, Ubuntu 9.04 kernel 2.6.28-11). In the login splash screen, Ubuntu sometimes does not detect or enable my keyboard and touchpad, so I cannot login to my account.

Many ubuntu dell users also complain about this problem too. Some of them think that it is kernel version problem, so they use the older kernel instead. The others try to configure the xwindow using command xfix in recovery mode or power on and off the laptop.

For me, I use the solution given in this dell ubuntu forum.

Solution : just append the word "i8042.reset" after kernel /boot/vmlinuz-2.6.28-12-generic root=UUID=d655bf5b 3061-44bb-a9d8-2d6d9b4afc57 ro quiet splash of "/boot/grub/menu.lst"
title Ubuntu 9.04, kernel 2.6.28-12-generic
uuid d655bf5b-3061-44bb-a9d8-2d6d9b4afc57
kernel /boot/vmlinuz-2.6.28-12-generic root=UUID=d655bf5b 3061-44bb-a9d8-2d6d9b4afc57 ro quiet splash i8042.reset
initrd /boot/initrd.img-2.6.28-12-generic
quiet

Wednesday, May 20, 2009

NS-2 Installation on Ubuntu 9.04

The procedure for installing NS-2 in Ubuntu 9.04 on Dell Vostro 1310.

1. Download
ns-allinone-2.33.tar from here.
2. Place it in somewhere, e.g. /home/programmer, then extract it.
$ cd /home/programmer
$ tar -xvf ns-allinone-2.33.tar
3. Download & install some packages from repository
$ sudo apt-get install build-essential autoconf automake libxmu-dev
4. Install the ns2
$ cd ns-allinone-2.33
$ ./install
5. Edit some paths
$ gedit ~/.bashrc
Put these lines on that file. Off course, you might change /home/programmer for it depends on where you extract ns-allinone-2.33.tar.
# LD_LIBRARY_PATH
OTCL_LIB=/home/programmer/ns-allinone-2.33/otcl-1.13
NS2_LIB=/home/programmer/ns-allinone-2.33/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=/home/programmer/ns-allinone-2.33/tcl8.4.18/library
USR_LIB=/usr/lib
export TCL_LIBRARY=$TCL_LIB:$USR_LIB

# PATH
XGRAPH=/home/programmer/ns-allinone-2.33/bin:/home/programmer/ns-allinone-2.33/tcl8.4.18/unix:/home/programmer/ns-allinone-2.33/tk8.4.18/unix:/home/programmer/ns-allinone-2.33/xgraph-12.1/
NS=/home/programmer/ns-allinone-2.33/ns-2.33/
NAM=/home/programmer/ns-allinone-2.33/nam-1.13/
export PATH=$PATH:$XGRAPH:$NS:$NAM

6. Validate it (take very long time compare to install process)
$ cd ns-2.33
$ ./validate
7. (Optionally) Create a symlink, so that ns can be called from everywhere
$ sudo ln -s /home/programmer/ns-allinone-2.33/ns-2.33/ns /usr/bin/ns
8. Let it take effect immediately
$ source ~/.bashrc
9. Try to run it (and pray :)
$ ns
10. If the installation success, you will see % at the command prompt. Type following command to exit
% exit

Credit
./anggriawan

Testing ns2 Installation
Use the following ns batch command
set ns [new Simulator]
$ns at 1 “puts \“Hello World!\””
$ns at 1.5 “exit”
$ns run
Then,
1. Copy the commands above and paste in the text editor
2. Save the file as simple.tcl
3. Type command in command prompt
$ ns simple.tcl
4. It will show Hello World in the line below


Troble Shooting
1. Problem : The system cannot find Tcl or it tells that Tcl does not install correctly
Solution 1 : Check your ns tcl nam ... version, check folder name. If it is not correct, edit the .bashrc
Solution 2 : run ./install again
2. Problem : nam does not work
Solution 1 : In fact, you need to change that particular file in your Linux manually.

Here is what you should do.
--- tk8.4.18-orig/generic/tkBind.c 2006-07-21 08:26:54.000000000 +0200
+++ tk8.4.18/generic/tkBind.c 2008-07-05 12:17:10.000000000 +0200

@@ -586,6 +586,9 @@

/* ColormapNotify */ COLORMAP,

/* ClientMessage */ 0,
/* MappingNotify */ 0,

+#ifdef GenericEvent
+ /* GenericEvent */ 0,

+#endif
/* VirtualEvent */ VIRTUAL,

/* Activate */ ACTIVATE,

/* Deactivate */ ACTIVATE,

This @@ -586,6 +586,9 @@ indicates exact location of the line that you start to edit, if you are using gedit or other similar editor in Linux.
The + sign indicates what to add, and the - sign indicates what to delete.
Then run $ ./install to compile and install ns2 again

Credit
Fedora forum