[Ubuntu Natty] Transfer files to Transformer TF101

Thursday, May 26, 2011
4 意見
Currently, the TF101 has been treated as MTP instead of UMS when connects to PC.
And there're two ways I found to transfer files into to its internal storage.

Reference: [Guide] Mount Internal Storage in Ubuntu

By gmtp
$ sudo apt-get install gmtp
By mtpfs
1. $ lsusb (find out vendorId of your device)
Bus 001 Device 007: ID 0b05:xxxx ASUSTek Computer, Inc.
2. add 'SUBSYSTEM=="usb", ATTR{idVendor}=="0b05", MODE="0666"' to
/etc/udev/rules.d/95-android.rules

3. $ sudo apt-get install mtpfs
4. $ sudo mkdir /media/TF101
5. $ sudo chown user.user /media/TF101
6. add 'mtpfs /media/TF101 fuse user,noauto,allow_other 0 0' to /etc/fstab
7. uncomment 'user_allow_other' in /etc/fuse.conf

Reboot and have fun.

[Ubuntu Natty] Make active tab in GNOME terminal more prominent

Thursday, May 19, 2011
0 意見
The active tab in newly Ubuntu Natty was hard to distinguish from each others.
Let's try to make it more prominent!

Steps:
1. create ~/.gtkrc-2.0
2. copy&paste the following content into ~/.gtkrc-2.0
style "gnome_terminal_notebook"
{
fg[NORMAL] = "#00ff00"
bg[NORMAL] = shade (1.25, "#3c3b37")
}

widget "*TerminalWindow.*.GtkNotebook*" style "gnome_terminal_notebook"


And remember to logout/login to make new settings take effect.

References: http://askubuntu.com/questions/40332/how-to-make-selected-tab-in-terminal-more-prominent

[Ubuntu Natty] Disable Overlay Scrollbars

0 意見
This article was originally posted at "http://ubuntu4beginners.blogspot.com/2011/04/disable-overlay-scrollbars-in-ubuntu.html"

If you don't like the new overlay scrollbars, try the following steps

$ sudo apt-get remove overlay-scrollbar
$ sudo su
$ echo "export LIBOVERLAY_SCROLLBAR=0" > /etc/X11/Xsession.d/80overlayscrollbars


and reboot. You're all set!

[Ubuntu Maverick] Eclipse Helios SR2 crash while navigating linux kernel source

Monday, April 18, 2011
0 意見
For work purpose, I've installed CDT with newest eclipse-jee helios SR2, but the eclipse always crashed(killed by OS) when it was doing C/C++ indexing. By investigating this, I found there are error dumps resides at the installation directory of eclipse, filename looks like hs_err_pidXXXX.log, where XXXX was the pid killed by OS.

The beginning of the file would be something like the following:

#
# A fatal error has been detected by the Java Runtime Environment:
#
# SIGSEGV (0xb) at pc=0x00007fc77d932c8c, pid=17060, tid=140494693254912
#
# JRE version: 6.0_24-b07
# Java VM: Java HotSpot(TM) 64-Bit Server VM (19.1-b02 mixed mode linux-amd64 compressed oops)
# Problematic frame:
# V [libjvm.so+0x5d5c8c]

Well, it seems like an buffer overrun bug of JVM, and I think I don't have time to dig in XD.

But, I just switched my VM from sun-java5 to sun-java6 yesterday, and before that I can
use eclipse to trace kernel source without any problem. So, I'm gonna give it a try by changing the VM used by eclipse back to sun-java5.

Here's the steps:

Add the red part in $ECLIPSE_HOME/eclipse.ini

--launcher.XXMaxPermSize
256m
--launcher.defaultAction
openFile
-vm
/usr/lib/jvm/java-1.5.0-sun/bin/java

-vmargs
-Dosgi.requiredJavaVersion=1.5

And finally, this solved the crash problem.
My eclipse just works like a charm now.

[Ubuntu Maverick] Install packages from PPA

Wednesday, January 26, 2011
0 意見
Personal maintained packages will update more frequently than the official release in most of the cases. For example, ibus.

Recently, I just installed ibus-pinyin in Maverick, after playing with ibus for a while, I found out that it didn't support Simplified/Traditional Chinese switching. The pinyin result always mixed up SC/TC characters and made me so hard to choose the right one.

Thanks for Google, I found something helpful. The current version in official release was 1.3.7-1ubuntu4, but the latest version of ibus in PPA is 1.3.9, and it supported the SC/TC switching since 1.3.8. Cool!

Installation steps stated bellow:

1. Go to PPA Website.
2. Search packages you would like to install, ex. ibus
3. We can found the ppa maintained by ibus author, https://launchpad.net/~shawn-p-huang/+archive/ppa
4. In the "Adding this PPA to your system" section, we can find "ppa:shawn-p-huang/ppa"
5. Open your favorite terminal
6. $sudo add-apt-repository ppa:shawn-p-huang/ppa


The script will do all the tedious things for you. (import key, install...etc)

P.S. You can find the new-added site located at "/etc/apt/sources.list.d/"