Friday, June 27, 2008

Ubuntu machine's hostname is invisible to router

Edit /etc/dhcp3/dhclient.conf

Uncomment or add the following line

send host-name "yourhostname"


Source
http://ubuntu.wordpress.com/2006/02/06/fix-hostname-unknown-in-router/

Labels: ,

Tuesday, December 18, 2007

TrueMobile 1300 running on Ubuntu with WPA

Refer to: http://ubuntuforums.org/archive/index.php/t-411299.html

sudo wpa_passphrase (your wireless ssid)
The Terminal will say it is getting it or something like that, and there will be a cursor below that line.
Enter your WPA password

Now Terminal will give you a very long string for your key. I just copied and pasted it into NetworkManager's password prompt, and also in the keychain request that came up right after.

Labels:

Sunday, September 23, 2007

How to change your MAC address in Linux and Window XP

Refer to http://zedomax.com/blog/2007/01/13/hack-changing-your-mac-address-in-window-xpvista-linux-and-mac-os-x/


Linux

1) Bring down the interface: “ifconfig eth0 down”

2) Enter new MAC address: “ifconfig eth0 hw ether 00:00:00:AA:AA:AA”

3) Bring up the interface: “ifconfig eth0 up”

Windows 2000/XP
Method 1:

This is depending on the type of Network Interface Card (NIC) you have. If you have a card that doesn’t support Clone MAC address, then you have to go to second method.

a) Go to Start->Settings->Control Panel and double click on Network and Dial-up Connections.

b) Right click on the NIC you want to change the MAC address and click on properties.

c) Under “General” tab, click on the “Configure” button

d) Click on “Advanced” tab

e) Under “Property section”, you should see an item called “Network Address” or “Locally Administered Address”, click on it.

f) On the right side, under “Value”, type in the New MAC address you want to assign to your NIC. Usually this value is entered without the “-” between the MAC address numbers.

g) Goto command prompt and type in “ipconfig /all” or “net config rdr” to verify the changes. If the changes are not materialized, then use the second method.

h) If successful, reboot your system.

Method 2:

This should work on all Windows 2000/XP systems

a) Go to Start -> Run, type “regedt32″ to start registry editor. Do not use “Regedit”.

b) Go to “HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Control\Class\{4D36E972-E325-11CE-BFC1-08002BE10318}”. Double click on it to expand the tree. The subkeys are 4-digit numbers, which represent particular network adapters. You should see it starts with 0000, then 0001, 0002, 0003 and so on.

c) Find the interface you want by searching for the proper “DriverDesc” key.

d) Edit, or add, the string key “NetworkAddress” (has the data type “REG_SZ”) to contain the new MAC address.

e) Disable then re-enable the network interface that you changed (or reboot the system).

Method 3:

Use the program Etherchange from http://ntsecurity.nu/toolbox/etherchange/

Labels: ,

Friday, August 10, 2007

My first attempt to run Flex compiler on Ubuntu

Today I tried creating my first Flex application, so I downloaded Flex 2 SDK from Adobe website and extracted it on my just-installed Ubuntu. Then, I started to search a tutorial of Hello World program on the Internet and found one. After gradually following his steps, I got an error while the problem is being compiled by Flex compiler.

$
mxmlc first.mxml

Loading configuration file /usr/local/flex2/frameworks/flex-config.xml
Segmentation fault (core dumped)
$

I had no idea why mxmlc crashed whenever I tried to compile a mxml file. Finally, I found an article stating about this problem in LaunchPad. As a result, I did what he said immediately and it's perfect. There is no problem anymore.

According to the article, the problem is that Ubuntu’s default JRE doesn’t like Flex SDK. Thus, I need to download a new JDK from Sun or others. The instructions below is the steps to install JDK. Please be noticed on step 4, since it's very important. In my case, even though I chose to follow the option 1, I still need to do step 4 of the option 2.


How to Install JDK (Refer to Space Program Blog)
    1. Option 1:
      1. run: sudo apt-get install sun-java5-jdk
    2. Option 2: (if option 1 doesn't work)
      1. download jdk 1.5 from sun, the Self extracting linux version, .bin extension (NOT rpm)
      2. run: sudo apt-get java-package
      3. run: fakeroot jdk***.bin
      4. run: sudo update-alternatives --config java
        - select the j2sdk1.5-sun option
      5. run: java -version
        - just to make sure it's the new version

Labels: , ,

Thursday, May 03, 2007

I Have Reinstalled Windows, and Now Ubuntu Won't Start!

Refered to The Official Ubuntu Book

The first thing your computer does when you turn it on is read a special place on your hard disk called the master boot record (MBR). The information written there tells the computer what to do next. When you installed Ubuntu, it placed a boot menu on the MBR that lets you choose from which system to boot.

Unfortunately, when you reinstall Windows it will recreate the MBR, not taking into consideration that any other OS may exist and replacing it with an MBR that only boots Windows. This is no good, and you naturally want to be able to replace it with the menu that lets you choose which system to boot.

Grab the CD you used to install Ubuntu on your computer. If you don't have it anymore, download a CD image from www.Ubuntu.com/download, and burn it on a blank CD. If you used the desktop CD to install, you will need to use the alternate install CD with the traditional text mode installer.

Insert the CD in the drive, and restart your computer. It will boot on the CD instead of using the hard disk as usual. Now highlight the Rescue a Broken System line, and press Enter. Select your language and keyboard, and let the installer detect the network (for the computer name, you can leave the default Ubuntu) just like when you installed Ubuntu for the first time.

You will then be presented with a list of available partitions on your hard disks. Don't worry about the first line (/dev/disks/disk0/part1). Start looking at the other lines. You need to remember on which disk and on which partition Ubuntu is installed. Most of the time, you probably have just one disk. If you have Windows installed on it, it is probably located on the first partition of this disk, and Ubuntu should be on the second one. Therefore, you probably want to select /dev/disks/disk1/part2 (then press Enter), unless your situation is more complex.

On the last screen, select the first line Execute a shell in.... You can now enter commands. Start by mounting the disks on your system:

foo@bar:~# mount -a

Now type:

foo@bar:~# df

Look at the list printed on the screen. Search the last column for the single / character, and on the corresponding line look for the first column. It should say something such as /dev/hda2 (the last few characters may be different for you). Now type the following command, and replace /dev/hda with what you have just read, but without the last digit (/dev/hda instead of /dev/hda2 in the above example):

foo@bar:~# grub-install /dev/hda

Wait for the process to finish. It might take a few minutes. About a dozen lines should have appeared on the screen. Check whether you find the text "installation finished." If you do, everything went fine. You can now restart your computer by typing

foo@bar:~# exit
Eject the CD, and then select Reboot the System. Welcome back to Ubuntu!

Labels:

How to turn off beep sound for Terminal

Going to System / Preferences / Sound / System Beep
Uncheck Enable System Beep

or

Add the following line in the file .inputrc
set bell-style none

Labels: