2015年7月28日 星期二

Ubuntu 開機時不想輸入密碼 How to Login Ubuntu Without Password

想要在開機時不輸入密碼,可以修改 /etc/lightdm/lightdm.conf 下的這行:
autologin-user=你的帳號
取消只要刪掉這行或用#注解或留空白即可


If you do not want to enter password when login ubuntu, edit /etc/lightdm/lightdm.conf
autologin-user=yourname
Cancel that just comment this line by # or remove it, or empty

2015年6月25日 星期四

[Android] Permission Denial when broadcasting Intent



When suffering the problem about Permission Denial, the LOG pattern might like this:
Permission Denial: broadcasting Intent { act=com.abc.intent.YOUR_INTENT flg=0x10 } from com.abc.myapp (pid=1191, uid=10119) requires com.abc.permission.APP_PERMISSION due to registered receiver BroadcastFilter{2463d6a8 u0 ReceiverList{d4f8ecb 695 com.android.systemui/10104/u0 remote:2fa2559a}}


It declaim the intent you broadcasting has no appropriate permission you used.

Now you can think about that any place has defined the permission before you used it?

You can check it by adb bugreport
adb bugreport > bugreport.txt


If you can find the following patterns in report you output, it means your device has granted the permission:
Permissions:
  Permission [com.abc.myapp.permission.WRITE_SETTINGS] (39f2d3cc):
    sourcePackage=com.abc.myapp
    uid=10124 gids=[] type=0 prot=signature|system
    packageSetting=PackageSetting{4b48615 com.abc.myapps/10124}
    perm=Permission{af5ad2a com.abc.permission.APP_PERMISSION}

If not, it means you don't have the permission cause you suffering Permission Denial.



2015年5月22日 星期五

Asus Nexus 7 can't find device in adb debug mode.


Asus Nexus 7 cannot found in Android device chooser.
Besides, adb devices also not list in.

The root cause is computer can not recognize your device (Nexus 7),
When device plugged in computer, it will make a selection of MTP / PTP

If you didn't see the dialog, you can find it in:
Settings --> Storage --> Top Right Option (Computer USB Connection) tap--> choose MTP
Note: I can success in recognize device in choose PTP mode, too.

如果你的 Asus Nexus 7 插上電腦後怎麼通都找不到 Debug  裝置,除了先打開偵錯模式外,也有可能是你沒有選擇 MTP 或 PTP 模式,從
[設定] --> [儲存空間] --> 右上角選項 (USB電腦連線) --> 選 MTP
但有時候 PTP 也能抓到裝置,呵呵。

2015年3月12日 星期四

Ububtu iBus icon disapear 圖示消失

某一天 iBus 的圖示突然消失了,害我心慌慌,雖然仍然可以打字,但是你知道人對於未見的東西總是有恐懼感,而且很不方便。

在網路上找到以下方法‥



killall ibus-daemon (結束程序)
ibus-daemon -d (重啟ibus)

ibus-daemon -d -x -r

資料來源:http://blog.sina.com.cn/s/blog_4d3559c701012lem.html

2015年1月29日 星期四

Update Google Chrome in Ubuntu

參考這裡(ref here )http://superuser.com/questions/130260/how-to-update-google-chrome-in-ubuntu
You must have http://dl.google.com/linux/deb/ in repo list
Now open a terminal. Type following -
sudo apt-get --only-upgrade install google-chrome-stable
This will install the current stable version of it. Now you have to kill all instances (may be hidden) of old Google Chrome.
sudo pkill -15 google-chrome
sudo pkill -15 chrome
Then start google-chrome as you start it.

2014年11月6日 星期四

Ubable to execute dex: Cannot merge new index

 [solution on stackflow]


Android Error in Eclipse: “Unable to execute dex: Cannot merge new index 65799 into a non-jumbo instruction!”



One solution that I found that got it working for me was to add dex.force.jumbo=true to my project.properties.
This is assuming you are running ADT 21 as this feature wasn't available in previous versions.

http://stackoverflow.com/questions/13439882/android-error-in-eclipse-unable-to-execute-dex-cannot-merge-new-index-65799-i

2014年10月28日 星期二

ubuntu 12.04 fix tooltips dark problem

problem like:
http://askubuntu.com/questions/70599/how-to-change-tooltip-background-color-in-unity

1. install GNOME Color Chooser
2. edit shortcut(link)

http://blog.vogella.com/2012/12/04/eclipse-papercut-10-eclipse-on-ubuntu-fixing-the-black-background-color-in-hover/

FIX ECLIPSE (LUNA) DISPLAY ON UBUNTU 14.04

http://www.kaibader.de/fix-eclipse-luna-display-on-ubuntu-14-04/





In case of starting Eclipse from a console two environment variables need to be set in advance  to avoid a corrupted Eclipse window:
export SWT_GTK3=0
export UBUNTU_MENUPROXY=0
In my case I created a desktop entry~/.local/share/applications/eclipse.desktop to facilitate the startup. Adapt it to your needs:
[Desktop Entry]
Version=4.4
Name=Eclipse
Comment=Eclipse IDE
Exec=env UBUNTU_MENUPROXY=0 SWT_GTK3=0 /home/kai/eclipse/eclipse
Icon=/home/kai/eclipse/icon.xpm
Terminal=false
Type=Application
Categories=Utility;Application