Saturday, February 16, 2013

[Ubuntu] It's Alacarte time! Menu Editing in Ubuntu

Editing application menu in Lubuntu is not as straightforward as in Windows. Right-clicking only allow adding shortcut to desktop.

Editing .xml to change how the application menu look is not fun to work with and very time consuming.

Very luckily, the is a small utility namely "alacarte" that let you modify it in GUI. To install, simply:
sudo apt-get install alacarte
This is how alacarte look like. Simple & intuitive

[Ubuntu] An Easy Way to Remove Unwanted Locale

There are many unwanted Locale settings file in Ubuntu which can be deleted to save some space.
sudo apt-get install localepurge
Run the command above, a multiple choice DOS-liked user interface will be prompted. Selected those that wish to be kept and all deselected will purge.

Wednesday, February 13, 2013

[Ubuntu] DraftSight installation

DraftSight installation is not as simple as it seems to be even though it comes with .deb file. The dependencies are not fully resolved, leaving out a few modules required by DraftSight missing. The error message that appeared is:
Failed to load modules
If this happened, simply install the following:
  1. Install this first alone:
    sudo apt-get install ia32-libs
  2. Then install:
    sudo apt-get install libdirectfb-extra libxcb-render-util0
If the above do not solve DraftSight start up issue, then try the method discussed in this helpful article:

Become Terminal Pro with Shortcuts Keys

Ever want to be proficient with terminal (linux command line)? Then these are the tips & tricks that you must know:

Become a Command Line with These Time-Saving Shorcuts by lifehacker.com
URL: http://lifehacker.com/5743814/become-a-command-line-ninja-with-these-time+saving-shortcuts 

Share this post if the article has made you a pro, have fun!

Monday, February 4, 2013

[Ubuntu] After upgrade cannot access internet despite connection is up

I upgraded our server last night via apt-get update & apt-get upgrade, when the server reboot it cannot connect to internet and other network segment. It can access only all the resources in the same subnet.

There are a few solutions worth to try:

  • ifdown the network interface and ifup it again
  • when perform upgrade of Ubuntu, the system might modified /etc/resolv.conf to include 127.0.0.1 as nameserver. Sometimes this will mess thing up and you can't get online. You can either delete everything inside, or use google DNS: nameserver 8.8.8.8
  • if you have bonding, you might want to add dns-nameserver 8.8.8.8 8.8.4.4 under your bond0
  • restart your networking: restart networking (this could be different from reboot Ubuntu. Because my connection got fix by restarting the network, while reboot doesn't help at all
If you do not wish to tackle with all this stupid problem, my advice is only upgrade when you need it. As long as your server is running fine and the upgrade is not going to fix any issues, just keep it as it is.

[Ubuntu] Wireless not working when on battery

If you have read my previous post How to release/renew IP when dhclient doesn't work, but you still unable to use your wireless when running your laptop on battery mode, then it could have something to do with the power management in Ubuntu.

The symptom you might get is:
  1. the wireless IP cannot be renew/release
  2. the wireless connection is up, but you can ping local or internet
  3. the wireless takes forever to get an IP from your router
The reason behind is when you're on battery, Ubuntu will activate power saving on your wireless device. This made the device cannot function properly. In this case my wireless device is:
"Broadcom Corporation" "BCM4312 802.11b/g LP-PHY" -r01 "Foxconn International, Inc." "T77H030.00 Wireless Mini PCIe Card"
If you are asking for help, you can identify your network controller by enter this command in terminal (special thanks to Serendah Linux from Ubuntu Malaysia LoCo Team to provide this command):
lspci -mm | grep Network | sed 's/.*"Network controller" //'
There are some solution that propose to deal with the 'wireless' file in the following location
  • /etc/pm/power.d
  • /usr/lib/pm-utils/power.d
but those doesn't work for me, and it might happen to you as well. If that is the case, you can still solve it by manual enter the following command into terminal:
  • iwconfig eth1 power off
Please note that the "eth1" has to be your wireless interface. Some might name after "wlan1". You have to enter the command every time you reboot a new session. I have not found any working method to execute this command during start up, if you do found it, please share with me.

Friday, February 1, 2013

[Ubuntu] How to release/renew IP when dhclient doesn't work.

I have encountered a very weird issue with Ubuntu 12.10 wireless networking where dhclient -r and dhclient cannot work as expected. The wireless device lock to the same IP, and unable to connect to internet or any other shared resources in the network.

Any other methods such as:
  1. Delete the profile in network manager
  2. restart networking service
  3. ifdown and ifup the interface
  4. Manually set IP address & DNS server
  5. Restart the router
Do not work as well. So what's the real fix for this problem? If you ever encounter the same problem as I did, you might try delete all the DHCP lease file located in /var/lib/dhcp/. New one will be generated automatically. Here's how my DHCP folder look alike:


If delete doesn't work for you, give me five because we are having the same issue. When I open the folder, there are multiple files inside, I deleted all (make sure you have turn off you wireless device before doing so) and let the system generates a new one.

After that, open up the new files with root privilege leafpad (or any other text editor), you will see the following:
 lease {  
  interface "eth1";  
  fixed-address 192.168.1.122;  
  option subnet-mask 255.255.255.0;  
  option routers 192.168.1.1;  
  option dhcp-lease-time 50400;  
  option dhcp-message-type 5;  
  option domain-name-servers 202.188.0.133,202.188.1.5;  
  option dhcp-server-identifier 192.168.1.1;  
  option dhcp-renewal-time 25200;  
  option dhcp-rebinding-time 44100;  
  renew 5 2013/02/01 22:24:39;  
  rebind 6 2013/02/02 04:55:53;  
  expire 6 2013/02/02 06:40:53;  
 }  
It's very simple here, modify the 10.0.0.122 192.168.1.122 (Updated: 25 Nov 2014) to some other available IP address, save it and turn on your wireless device. Wait for a few seconds and voila!

Most probably you are now able to online and start surfing. And if this does help, please leave me a comment so at least I know my blog help others. Cheers~!