2018年7月23日 星期一

[How To] [LXDE] Fix lxrandr not working

[How To] [LXDE] Fix lxrandr not working

in case you switch from traditional harddisk to SSD and your computer boot very fast that makes xrandr run too fast and makes it not work every time. you should

1. Edit the autostart file
    vim ~/.config/autostart/lxrandr-autostart.desktop

2. Add some sleep before xrandr
[Desktop Entry]
Type=Application
Name=LXRandR autostart
Comment=Start xrandr with settings done in LXRandR
Exec=sh -c 'sleep 2 && xrandr --output VGA1 --mode 1920x1080 --same-as LVDS1 --output LVDS1 --off'
OnlyShowIn=LXDE


3. restart X and done

2018年5月15日 星期二

[How To] install adblock in openwrt or LEDE

As we know some of the wireless devices cannnot install adblock plugin such as iphone and iPad. We can modify our routers to add adblock in our open source routers.

So how to do it:

The following packages is needed:
1. adblock (the adblock package)
2. libustream-mbedtls (For https download using uclient-fetch)
3. luci-app-adblock (in case for luci interface)

    #opkg install adblock libustream-mbedtls luci-app-adblock

After installation, you need some configuration. For luci, you can find the configuration in homepage-> "Service" Tab -> "Adblock"

enable the host that you need to.

for command line configuration
you need to: (I come from Hong Kong, so I block the reg_cn)
    #/etc/init.d/adblock enable 
    #/etc/init.d/adblock start
    #uci set adblock.global.enabled='1'
    #uci set adblock.reg_cn.enabled='1'
    #uci commit

To verify correct installation
In the log tab in Adblock luci page:
    Tue May 15 14:25:18 2018 user.info adblock-[3.4.3]: blocklist with overall 29670 domains loaded successfully (NETGEAR WNDR3700v4, LEDE XXXXX)
or the same line shown in command line
    #logread |grep adblock

from client side, try ping "analytics.google.com"
    $ ping analytics.google.com
    ping: analytics.google.com: Name or service not known


Conclusion
This adblock is not as good as the browser plugin one as it just block the advertisment hosts. But at least your private information will not be sent to those ad servers.

Cheers

2015年12月20日 星期日

[How to] Setup Samba in Linux

Let see my setup environment:

Server:
- Arch Linux  4.2.5-1-ARCH
- samba Version 4.3.3

Client:
Same as server

Network Setup:
Internet - Server(192.168.1) - Router(192.168.2) - Clients

= = =
Setup procedure:
1. Installation: (For both server and client)

#pacman -Syu samba

2. Setup config

I have made a config file to share the server /tmp folder and allow only me and home subnet only.

= = =
[global]
   workgroup = WORKGROUP
   server string = Samba Server
   hosts allow = 192.168.1. 127.
   printcap name = /etc/printcap
   load printers = yes
   log file = /var/log/samba/%m.log
   max log size = 50
   security = user
   dns proxy = no
   invalid users = nobody root
   map to guest = Bad User
   max connections = 10
[homes]
   comment = Home Directories
   browseable = no
   writable = yes
[tmp]
   comment = Temporary file space
   path = /tmp
   valid users = your_user
   public = no
   writable = yes

= = =

Configure your user to samba, and enter the user password.
#pdbedit -a -u your_user

3. Run

In server:
#systemctl enable smbd.service

If you also need netbios support:
#systemctl enable nmbd.service 

Server side should be more or less ready and change to Client

Client:

Just test the samba connection to the server

user@localhost:~$ smbclient -L 192.168.1.1 -U your_user
smbclient: Can't load /etc/samba/smb.conf - run testparm to debug it
Enter your_user's password:
Domain=[WORKGROUP] OS=[Windows 6.1] Server=[Samba 4.3.3]

        Sharename       Type      Comment
        ---------       ----      -------
        tmp             Disk      Temporary file space
        IPC$            IPC       IPC Service (Samba Server)
        your_user       Disk      Home Directories
Domain=[WORKGROUP] OS=[Windows 6.1] Server=[Samba 4.3.3]

        Server               Comment
        ---------            -------
        LOCALHOST            Samba Server

        Workgroup            Master
        ---------            -------
        WORKGROUP            LOCALHOST



If you see similar output, the connection should be ready and you can mount remote samba drive

#mount -t cifs //LOCALHOST/tmp /mnt -o user=your_user,workgroup=WORKGROUP,ip=192.168.1.1
password:


Nice and Done!!

2015年12月16日 星期三

[How To] Fix Tearing on Linux Intel Graphics

#cat /etc/X11/xorg.conf.d/20-intel.conf

Section "Device"
   Identifier  "Intel Graphics"
   Driver      "intel"

   Option      "TearFree"    "true"
EndSection


Works well on my arch linux machine. No tearing now in watching One Punch Man~ Cheers

2015年12月15日 星期二

rsync - a simple backup command

If you want to backup something just use the following command

$rsync -au /source/path/* /dest/path/folder 

In case after some days your source path have new files or some changes, just recall the command and it can simply update the destination folder to sync everything.

2015年10月23日 星期五

Alexa - a web page to show how pofitable of a web page

Alexa - http://www.alexa.com/ In internet point of view, browsing count means profit. This page can show the ranking of amount of access of a page. That is for simply, how profitable for the page is and the efficiency of putting advertisement there.

2015年10月2日 星期五

How To Download content in Python using urllib2 with example

I am working on a project that needs to download content from web and parse it's data in Python. I have done some modules which is useful in downloading stuff. Or I just share the source code.

= = =
#!/usr/bin/python2
import time
import urllib2

__user_agent = "Mozilla/5.0 (Windows NT 5.1; rv:40.0) Gecko/20100101 Firefox/40.0"

def url_req(url, cookie=None, max_retry=3, retry_wait_s=5):
    r_html = None
    retry = 0

    while 1 :
        if (retry == max_retry):
            break

        data_req = urllib2.Request(url)

        #cookie support
        data_req.add_header('User-Agent', __user_agent)
        if cookie is not None:
            data_req.add_header('Cookie', cookie)

        try:
            data_handler = urllib2.urlopen(data_req)
        except urllib2.URLError as e:
            print (e.reason)
            time.sleep(retry_wait_s)
            retry = retry+1
            continue
        except:
            pass
            time.sleep(retry_wait_s)
            retry = retry+1
            continue

        try: r_html = data_handler.read()
        except urllib2.URLError as e:
            print (e.reason)
            time.sleep(retry_wait_s)
            retry = retry+1



            r_html = None
            continue
        break

    return r_html

2015年10月1日 星期四

How To Create Windows Bootable USB on Linux

You know when working on Linux, there is still some constraint that is not easy to overcome. This time I would like to upgrade BIOS for my old Thinkpad. It seems the best choice with less risk is installing a Windows on another harddrive and upgrade it. But my laptop do not come with a DVD-ROM and also I don't have any external one. So I go for USB solution.

For all Linux bootable iso can be made through command "dd" but it doesn't work for Windows Disc as the MBR is different. So what I do is make use of a tools called "ms-sys"

Software Tools needed
Windows ISO (You should know how to get it)
gparted (partition the usb)
ms-sys

Steps:
1. use gparted to clear all partition on usb drive
2. use gparted to create NTFS partition on USB, set the partition as bootable
3. mount Windows ISO, copy all files from mount point to USB. "sync"
4. Call the magic "sudo ms-sys -7 /dev/sdX" to write the MBR to USB. I used Windows 7 as the example or you may read the help of ms-sys
5. unmount everything
6. Nice and Done and you got a bootable USB

Go Go Flash Bios!!

2015年8月18日 星期二

[How to] Python Create worker threads in Multi-processing Application

In case of processing large amount of data, multi-processing / multi-threading is a good way to speed up the whole process. In Python, some of the library is not thread safe, So using a multi processing as an example for the simple application

For simply, just look at the code:

2015年7月25日 星期六

Review of Android X86 4.4R3

Android X86 (http://www.android-x86.org/) have been release of the new version of official release. The new version is Android 4.4_R3 which is the third release of Android 4.4. If you would like to test on the lollipop you may try the beta release.

Let's see my review:

Setup:
Lenovo Thinkpad X61 (Intel T8300 4GB DDR2)
Arch Linux Kernel - 4.1.2-2-ARCH

Review:
Although it is the release version, it is easy for me to find bugs / non-implemented part on the software.

See whats the improvment:
1. Bug fix and it works on my thinkpad now. Last version is not supported
2. For native run, seems everything works fine

Please find the list below:
1. No multi screen support (May be too harsh to an open source software)
2. Sometimes the text in android UI will come to garbage words. Toggle the UI will come back to normal
3. Screen rotation breaks the usage as for PC, no screen rotation is needed. Makes me like handicap when the screen rotate
4. Tested on KVM. But I still can't make OpenGL work on it.

Conclusion:
The result is positive for the new release and it run most applications stablely. It is not far away from daily usage. I am sure when this project come to a stable version, this will come to a evolution to the PC market that people will switch to use Android-X86 rather than Windows in their PC. Or may be someday Microsoft will be down because of this.


2015年7月18日 星期六

[How to] Upgrade All pip installed packages in one command

One does simply

#pip freeze --local | grep -v '^\-e' | cut -d = -f 1  | xargs -n1 pip install -U
 
 

2015年7月9日 星期四

[How To] Install openwrt in Xiaomi Mini Router

Just install openwrt in my new Xiaomi mini router. First of all, I am not that trust China's product that do not have backdoor and tracking. So I choose the opensource openwrt firmware. The flashing procedure I have make a copy from site for my reference.

I have test for a few firmware
9 July, 2015
- Xiaomi default firmware
    never tested
- Openwrt CHAOS CALMER (15.05 RC2)
    5GHz and 2.4GHz works fine but the power is not strong as PandoraBox
- Openwrt CHAOS CALMER Trunk
    Only 2.4GHz, 5GHz not work
- Pandora Box Openwrt (Close Source) r1024
    I am not sure if I am black luck. 5GHz and 2.4GHz works great from the very beginning but it makes the 5GHz chip (mt7612E) burn out after use for a few hours. (Please leave comments if you have the same case as I am. I even flash every firmware and can't make the 5GHz chip work and it is dead. The router can work only with mt7620A with 802.11N 2T2R 300M (Better than a rubbish)

The following is the guide can change from default firmware to any third party firmware

= = =
1.      First off before anything else, install Chrome and its translator plug-in for all 3 Chinese language.
2.      Plug in power and Ethernet cable to one of the Ethernet ports
3.      Direct browser to 192.168.31.1.  Unfortunately I could not get Chrome to translate, likely because translation requires internet access, which has not been set up yet.
4.      The first screen will appear.  Press blue button to get to next screen.

5.      The next screen sets up the wifi network name and password.  Note that the wifi password is also used later for access to the browser page (192.168.31.1).  


6.      Once you have set this up, plug in WAN cable for access to internet.  Internet access also enables the Chrome translation and you can confirm that the router works properly before proceeding.
7.      The next few steps involve first loading the development version of the firmware, then loading a firmware version which provides SSH access with the last step being loading the OpenWRT firmware onto the router
8.      Apparently loading the development version ofthe firmware voids warranty, so beware. Development version can be obtained from http://www1.miwifi.com/miwifi_download.html.  Point to the mini router to get the correct firmware/software.  At the same time you can also download the PC Client (although I don't recommend this) and also one of either iOS or Android app.  You will NEED one of these to complete the steps. The development ROM that I downloaded was named miwifi_r1cm_all_ace8a_0.6.40.bin.  Apparently the development ROM that is used is important because some of the ROMs may not allow the next step of flashing the SSH firmware.  The older ROMs can be found here http://www.miui.com/thread-1776173-1-1.html.  Try to use the development ROM that has been proven to allow the next step of the process



9.      The above downloads the Chinese versions of PCClient and iOS/Android apps.  To get the translated software follow these links. The iOS/Android are necessary because they are used to link the hardware to the miwifi account that you are about to set up.  Without the link, the SSH version of the ROM(and SSH password) will not be available
http://en.miui.com/forum.php?mod=viewthread&tid=55706(portable version – although I have not used)
10.  Create and activate a new account at Xiaomi  https://account.xiaomi.com/pass/register.  When you have setup the account and logged in, remember the User ID.  You will note that there is no device associated with the account.  The association has to be done via theiOS/Android app.  Unfortunately there does not seem to be a way to do that via the PC Client, which is why I do not recommend installing this.
11.  Using your iOS or Android device, open the app.  Login using the ID and password in the step above.  The account then recognises the Xiaomi mini router device. This is required for the SSH firmware.
12.  To get the SSH firmware proceed to http://www1.miwifi.com/miwifi_open.html.  Halfway down the page there is a SSH button

13.  Click on the button and sign into the Xiaomi account when requested.  After signing in you will be presented with a page to download the SSH firmware.  Also note the SSH password for root user in the middle of the page.  The SSH firmware will have the name miwifi_ssh.bin

14.  Now that you have all the firmware, it is just a matter of flashing in the correct sequence. First off, get an empty USB drive and format to FAT or FAT32.  I tried unsuccessfully using drives less than 2GB.  In the end, I had to use a 2GBdrive, although the firmware(s) were a lot smaller in size.
15.  Copy the development firmware into the USBdrive.  (Did I tell you to delete all other content? – Please do).  Rename the development firmware to miwifi.bin.  This is important
16.  The development firmware and SSH firmware flash both follows the same procedure
a.      Pull the power from router, at the router
b.     Plug USB drive into router.  
c.      Press reset button (in the hole to the left ofthe USB drive)
d.     While holding down the reset button, plug in thepower.  The orange light in front of the router will remain steady for a short while before it starts flashing
e.     Once the orange light starts flashing, releasethe reset button and sit back until the light in front of the router turns blue.  Also if there are indicator lights on your USB drive, they will flash as the drive is being read.  If the orange light does not flash, try with another USB drive and confirm that the drive is formatted to FAT or FAT32.
17.  The router can be re-set up between each flash just to confirm that it is working, but I generally just flash the firmwares one after the other.  
18.  I also tend to delete all the contents from the USB drive between flash.  I don't know the impact of not deleting, but better safe than wrong.  
19.  The SSH firmware do not have to be renamed for the flash.  Just keep the name as miwifi_ssh.bin
20.  Once the SSH firmware has been successfully flashed, confirm SSH via putty and also Winscp. Port is 22, username “root” and password as noted from step 13.
21.  The OpenWRT firmware will need to be downloaded from http://downloads.openwrt.org.cn/PandoraBox/Xiaomi-Mini-R1CM/.  I used the latest version PandoraBox-ralink-xiaomi-mini-r583-20140827.bin.  Once downloaded, rename the file to 20140827.bin
22.  Open Winscp and connect to the router using 192.168.31.1, Port 22, username root and password as from step 13.  Transfer 20140827.bin to the /tmp directory.The tmp directory is in the root of the drive
23.  Open putty and connect to the router using 192.168.31.1, Port 22.  Enter root as username and password as above
24.  Change to the tmp directory - cd /tmp
25.  Confirm that you have the right directory by doing a directory listing (ls –l) and confirming that the 20140827.bin file is listed
26.  Finally flash the OpenWRT firmware using puttycommand
mtd -r write /tmp/20140703.bin firmware
27.  The router will reboot once it has beensuccessfully flashed.
28.  Access the OpenWRT router via 192.168.1.1 on your browser.  Unfortunately the default pages are in Chinese.  Default account usernamewill be “root” and password “admin”
29.  Once in, ignore the quick guide setup and navigate to the language page to change language to English.  On the left, third choice down, first subchoice and third tab page with the first settings.  Click on green button on bottom left to “Save and Apply”.   It may be necessary to reboot, but I did not have to.

2015年7月1日 星期三

[How To] identify a ssh bash session in linux

Very simple just edit .bash_profile

= = =
#
# ~/.bash_profile
#

[[ -f ~/.bashrc ]] && . ~/.bashrc
skip_x="0"

if [ -n "$SSH_CLIENT" ] || [ -n "$SSH_TTY" ]; then
    echo "THIS IS AN SSH SESSION"
    skip_x="1"
fi


#check if x started


ps aux | grep tty |grep startx 2>&1 > /dev/null
if [ "$?" == "0" ]; then
    skip_x="1"
fi

if [ "$skip_x" == "0" ]; then
    exec startx
fi

= = =

2015年6月7日 星期日

[How To] Lenovo Thinkpad run in full speed with battery removed in linux

After using for nearly 9 years (since 2006) of my thinkpad X60 battery. It cannot be charged in a Saturday. As lenovo will limit the CPU speed when the notebook removed the battery. It decrease the performance a lot when battery removed. So for this case, I have searched for a solution.

Let's see my setup:
Lenovo Thinkpad X61 T8300 2.4GHz

How to override it:

When the battery was removed, Lenovo limit the CPU speed in bios, for this case, setting the  scaling_max_freq will not work.

#To see which frequency of the CPU you can set, you may:
$ cat /sys/devices/system/cpu/cpu0/cpufreq/scaling_available_frequencies
2401000 2400000 2000000 1600000 1200000 800000


#So To override the BIOS limit:
echo 1 > /sys/module/processor/parameters/ignore_ppc

#replace the 2400000 for your max CPU speed
for x in /sys/devices/system/cpu/cpu[0-1]/cpufreq/;do
  echo 2400000 > $x/scaling_max_freq
done



Very nice and done.

Just a reminder that when override the bios limit may harm the mainboard. For this case, it is highly recommand to use i7z or phc-intel to lower the voltage of the processors (I have set it before that). It may have less chance for overloading the mainboard.

Cheers.

= = =
reference:
http://blog.patshead.com/2013/04/my-bios-is-limiting-my-cpu-clock-speed.html

2015年6月6日 星期六

[How To] Lower the heat of your computer without any hardware changes in Windows

[How To] Lower the heat of your computer without any hardware changes

Recently I have used the computer of my wife. It is not a fast computer but the computer case blow out hot wind and make the bedroom very hot after starting the computer. Even if I start the speedstep on CPU (or CnQ for AMD processors). The hot wind still blow out from the computer.

And I have found a solution by using a software called "Throttle Stop" you may find it in the following link:

http://www.techpowerup.com/downloads/2288/throttlestop-6-00/

And for the right setting, you also need the following software too:
hwmonitor: http://www.cpuid.com/softwares/hwmonitor.html
 Helps to monitor the voltage as well as the CPU temperature

and

intelburntest easy to find in google
Helps to fullload your CPU to test the stability of your computer

What you need to do is to undervolt of the CPU power and test for the stability. It will not harm on any of the performance.

1. Start intelburntest, hwmonitor and Throttle Stop
2. Start intelburntest
3. in Throttle Stop, lower the VID by pressing the down arrow.
4. If your computer freeze up, start from 1 but increase a little of the last value
5. If intelburntest can pass for some testes, your computer should be more or less stable.
6. Run " Throttle Stop" at start up.


The main advantage for undervolt not only the heat. But also the power consumption of your computer and also the life of electric component on the mainboard. Also, undervolt can help CPU to emmit less heat and can help to slower the CPU fan for less noice. Few steps for more advantages. Why not do it.

My Intel Core 2 6420 undervolt during fullload from 1.35v to 1.1875v

 Cheers for less heat and save the earth

2015年5月23日 星期六

[How To] turn arch linux box to a wireless Access Point in the simplest way

Access point setting may be a little difficult for general linux user, I would like to introduce a one step way to use your linux box with a USB wifi dongle to change it to a wireless AP

1. Identify your USB wifi dongle support AP mode or not.
In order to turn your USB wifi to Access Point, your USB dongle must support AP Mode. you may check if it is supported by following:

$iw list
Wiphy phy1
    max # scan SSIDs: 4
    max scan IEs length: 2285 bytes
    Retry short limit: 7
    Retry long limit: 4
    Coverage class: 0 (up to 0m)
    Device supports RSN-IBSS.
    Supported Ciphers:
        * WEP40 (00-0f-ac:1)
        * WEP104 (00-0f-ac:5)
        * TKIP (00-0f-ac:2)
        * CCMP (00-0f-ac:4)
        * 00-0f-ac:10
        * GCMP (00-0f-ac:8)
        * 00-0f-ac:9
        * CMAC (00-0f-ac:6)
        * 00-0f-ac:13
        * 00-0f-ac:11
        * 00-0f-ac:12
    Available Antennas: TX 0 RX 0
    Supported interface modes:
         * IBSS
         * managed
         * AP
         * AP/VLAN
         * monitor
         * mesh point
                  ...

 If you plug in your usb dongle and the Supported Interface modes do not have the "AP" mode, you need another usb module. Most likely for my personsal recommendation Atheros Chipset is a good choice.

2. Introduce to you a create_ap script. You may find it in the following link:
https://bbs.archlinux.org/viewtopic.php?pid=1269258

or from AUR
https://aur.archlinux.org/packages/create_ap/

Just install it and with the dependencies.

Just simply run a command

#create_ap wlan0 eth0 MyAccessPoint MyPassPhrase

And it is Done!! How come it is so easy.

There is a word for Chinese People "前人種樹後人蔭" "People plant trees, childen cools under tree"

Thanks for open source

2015年5月19日 星期二

[How to] Block ssh brute-force attack using sshguard in linux


In case your Linux box have provided a ssh function and connect to a public internet IP directly, in most case you will face a lot of brute-force attack. For this case, sshguard can help to lower the rate of the attack.

How it works
For simply, sshguard read logs from sshd and block suspicious attack by iptables.

In order to view if you are being attacked:
$journalctl -axe
...
 5▒▒▒ 19 12:28:10 localhost sshd[22109]: Connection closed by 70.60.248.30 [preauth] <==== Port Scan
 5▒▒▒ 19 12:28:34 localhost sshd[22111]: Did not receive identification string from 195.154.55.58
 5▒▒▒ 19 12:28:35 localhost sshd[22112]: Invalid user ubnt from 195.154.55.58
 5▒▒▒ 19 12:28:35 localhost sshd[22112]: input_userauth_request: invalid user ubnt [preauth]
 5▒▒▒ 19 12:28:36 localhost sshd[22112]: pam_tally(sshd:auth): pam_get_uid; no such user
 5▒▒▒ 19 12:28:36 localhost sshd[22112]: pam_unix(sshd:auth): check pass; user unknown
 5▒▒▒ 19 12:28:36 localhost sshd[22112]: pam_unix(sshd:auth): authentication failure; logname= uid=0 euid=0 tty=ssh ruser= rhos
 5▒▒▒ 19 12:28:38 localhost sshd[22112]: Failed password for invalid user ubnt from 195.154.55.58 port 54126 ssh2
 5▒▒▒ 19 12:28:38 localhost sshd[22112]: error: Received disconnect from 195.154.55.58: 3: com.jcraft.jsch.JSchException: Auth
 5▒▒▒ 19 12:28:38 localhost sshd[22112]: Disconnected from 195.154.55.58 [preauth]
 5▒▒▒ 19 12:28:39 localhost sshd[22115]: Invalid user admin from 195.154.55.58
 5▒▒▒ 19 12:28:39 localhost sshd[22115]: input_userauth_request: invalid user admin [preauth]
 5▒▒▒ 19 12:28:40 localhost sshd[22115]: pam_tally(sshd:auth): pam_get_uid; no such user <=== Attack
 5▒▒▒ 19 12:28:40 localhost sshd[22115]: pam_unix(sshd:auth): check pass; user unknown
 5▒▒▒ 19 12:28:40 localhost sshd[22115]: pam_unix(sshd:auth): authentication failure; logname= uid=0 euid=0 tty=ssh ruser= rhos
 5▒▒▒ 19 12:28:42 localhost sshd[22115]: Failed password for invalid user admin from 195.154.55.58 port 51840 ssh2
 5▒▒▒ 19 12:28:43 localhost sshd[22115]: error: Received disconnect from 195.154.55.58: 3: com.jcraft.jsch.JSchException: Auth
 5▒▒▒ 19 12:28:43 localhost sshd[22115]: Disconnected from 195.154.55.58 [preauth]
 5▒▒▒ 19 12:28:44 localhost sshd[22117]: pam_tally(sshd:auth): Tally overflowed for user root <=== Attack
 5▒▒▒ 19 12:28:44 localhost sshd[22117]: pam_unix(sshd:auth): authentication failure; logname= uid=0 euid=0 tty=ssh ruser= rhos
 5▒▒▒ 19 12:28:46 localhost sshd[22117]: Failed password for root from 195.154.55.58 port 54190 ssh2 <=== Attack

... 

Installation

Very simple
# pacman -S sshguard
# iptables -N sshguard
# iptables -A INPUT -p tcp --dport 22 -j sshguard
# iptables-save > /etc/iptables/iptables.rules

# systemctl start sshguard.service
# systemctl enable sshguard.service


And you may find from the log
$journalctl -axe 
 5▒▒▒ 19 12:28:46 localhost sshguard[26588]: Blocking 195.154.55.58:4 for >630secs: 40 danger in 4 attacks over 12 seconds (all 

Nice and done 

2015年5月4日 星期一

Android X86 native experience - Android-x86 4.4r2

Android X86 is a project that can run android natively on X86 computer. I have downloaded and tested the latest release of "Android-x86 4.4r2" which was released on 1Jan 2015, as live CD. The experience is as follows:

1. Hardware
- Lenovo Thinkpad X61 (intel T8300, i965 4GB DDR2, ABGN4965)
- Desktop Computer (intel core 2 duo 6420, G33, 4GB DDR2, AMD HD4670)

2. Testing
It is strange that the laptop gives a very poor experience that the OS crash on the first screen of checking wifi status during inputing the Google Account. I have tested for a couple of times and it still not work. Seems cannot found a solution on web yet. I have tried to use a USB wifi and the issue is still the same.

For the Desktop computer, it is strange that everything works out of box.
Performance is great, very fast and no a little lag.
CPU works great with Speedstep
Graphics card works well with acclaration
Most app works

Just wanna know if it support MCE remote, or I will buy one or the android x86 media center.

= = =
Download Link:
http://www.android-x86.org/

2015年5月2日 星期六

[How to] Fix the kernel module issues for VirtualBox

As some of the linux users may face issues related to kernel modules, just would like to document how I fix the issue

I was face the issue on the log

VBoxManage: error: Failed to create the host-only adapter
VBoxManage: error: VBoxNetAdpCtl: Error while adding new interface: failed to open /dev/vboxnetctl: No such file or directory
VBoxManage: error: Details: code NS_ERROR_FAILURE (0x80004005), component HostNetworkInterface, interface IHostNetworkInterface
VBoxManage: error: Context: "int handleCreate(HandlerArg*, int, int*)" at line 66 of file VBoxManageHostonly.cpp


To fix it, just load all kernel modules at boot up

# cat /etc/modules-load.d/virtualbox.conf
vboxnetadp
vboxnetflt
vboxpci
vboxdrv





= = =
Nice and Done

2015年4月11日 星期六

[How To] Speed up GUI for old Mac

Currently, there was a new release of OSX Version 10.10 Yosemite. But for some of the old Mac they equip with 2GB of memory and Core 2 CPU that may harm performance if come with those fancy UI. Disable those UI can boost system performance. Please find the tools below:

1. TinkerTool
http://www.bresink.com/osx/TinkerTool.html

With this tool, you can disable (some of) the animation effects

2. Beamoff (For Virtualbox and VMware users)
https://github.com/JasF/beamoff
https://www.youtube.com/watch?v=kDjirnJcanw
http://www.insanelymac.com/forum/topic/302424-yosemite-on-vmware-unusable/

By adding beamoff on startup, UI speed up alot and become smooth