Friday, February 4, 2011

Ubuntu Application

I would like to document several apps that, I believe, are very useful as follows. Though there are many choices in WWW. The followings are really handy ones.

Programming Tools:
  • WingIDE (Python)
  • IntelliJ IDEA (Java)
  • Eclipse (C++/Java)
  • Rabbit VCS (Version Control)

MISC:
  • Mendeley
  • Stardict (Dictionary)

Tuesday, February 1, 2011

Brightness Control on T410 (T410s)

I find the brightness control seems to be not working after installing ubuntu 10.04 on my Thinkpad T410s.

Here are two solutions:

(1) Switch to console (CTRL+ALT+F2) and adjust the brightness. Then switch back to GNOME (CTRL+ALT+F7)

(2) Edit /etc/X11/xorg.conf
Under the "DEVICE" section, add the following OPTION
Option "RegistryDwords" "EnableBrightnessControl=1"


Done! Enjoy it!

Tuesday, January 25, 2011

Install Sun Java SDK 6 on Ubutnu 10.04

Since Ubuntu 10.04, Sun(Oracle?) SDK is not existed in multiverse anymore.

If you would like to install Sun Java SDK, you have to use "partner" repository.


sudo add-apt-repository "deb http://archive.canonical.com/ lucid partner"
sudo apt-get update
sudo apt-get install sun-java6-jdk


Is that all? Not quitely.

Choosing the default Java to use



Just installing new Java flavours does not change the default Java pointed to by /usr/bin/java. You must explicitly set this:


* Open a Terminal window
* Run sudo update-java-alternatives -l to see the current configuration and possibilities.
* Run sudo update-java-alternatives -s XXXX to set the XXX java version as default. For Sun Java 6 this would be sudo update-java-alternatives -s java-6-sun
* Run java -version to ensure that the correct version is being called.

You can also use the following command to interactively make the change;

* Open a Terminal window
* Run sudo update-alternatives --config java
* Follow the onscreen prompt

Ref: https://help.ubuntu.com/community/Java

Wednesday, December 1, 2010

Windows 7 HotKey in Ubuntu

As a bi-OS user, I am always confused with the hot-key setting while I switch between Operating System. No offense, while I said bi-OS user, I refer to Windows 7 and Ubuntu Lucid. (Not Mac OS).

Some hotkeys introduced in Windows 7 are very userful for myself. For example, Windows + Left / Right / Up / Down

If you never try above hotkeys, try it on a Windows O/S, and you will know what would happen.
Long story short, I would like to resize my windows the the left/right window. What should I do?

(1) You have to install wmctrl package
 sudo apt-get install wmctrl


(2) Open "System"-->"Preference"-->"Keyboard Shortcuts".
Bound Windows + Left to ==> wmctrl -r :ACTIVE: -b remove,maximized_vert,maximized_horz;wmctrl -r :ACTIVE: -e 0,0,20,1920,1150
Bound Windows + Right to ==> wmctrl -r :ACTIVE: -b remove,maximized_vert,maximized_horz;wmctrl -r :ACTIVE: -e 0,960,20,960,1150

To Maximize a windows:
Bound Windows + Up to ==> wmctrl -r :ACTIVE: -b remove,maximized_vert,maximized_horz;wmctrl -r :ACTIVE: -e 0,0,20,1925,1150


Would you like to learn more?
Read here: wmctrl tutorial

Tuesday, November 23, 2010

Where is my "Ctrl + Alt + Backspace" ?

After installing ubuntu 10.04, I quickly realized that CRTL-ALT-F1 (for opening a terminal) and CRTL-ALT-BACKSPACE (for killing X-server) are gone. Luckily, here is the solution I found:

Enabling Ctrl-Alt-Backspace for Ubuntu 10.04

  1. Select “System”->”Preferences”->”Keyboard”
  2. Select the “Layouts” tab and click on the “Layout Options” button.
  3. Select “Key sequence to kill the X server” and enable “Control + Alt + Backspace”
Enjoy your hot keys :)

Thursday, October 14, 2010

Move window buttons (Min, Max, Close) back to right in ubuntu 10.04

One of the most controversial change in ubuntu 10.04 is to have window buttons on the left side. Although this change favors many mac(apple) users. As a user worked in dual O/S, windows 7 and ubuntu, the change is somehow inconvenient. Here I explain how to move them back. (The min, max, and close button)

1. Open the configuration editor of gnome.
gconf-editor


2. Click on the + button next to the “apps” folder, then click “metacity” in the list of folders expanded for apps, and then click on the “general” category. The button layout can be now changed by editing the “button_layout” key.

3. Change it to:
menu:minimize,maximize,close


Save, close, and you are done. (Restart X Window to take effect)

Tuesday, August 24, 2010

Weired ssh-agent error in Ubuntu

To protect your private key, one might add a long pass-phrase for avoiding the burglary. However, somehow I see the following error while trying to add my private key to ssh-agent.
chucheng@ubuntuVM:~$ ssh-add
Could not open a connection to your authentication agent.

Here is the solution:
exec ssh-agent bash

Don't know why, but it just works :)

Results:
chucheng@ubuntuVM:~$ ssh-add
Enter passphrase for /home/chucheng/.ssh/id_rsa:
Identity added: /home/chucheng/.ssh/id_rsa (/home/chucheng/.ssh/id_rsa)