2015年3月27日 星期五

ppsspp - Best linux psp emulator

Just have a test on ppsspp. By setting the frame skip and the controller, I can play psp games on my old Thinkpad X61. Nearly no other configuration is needed. I can play with the rom smoothly on my linux computer.

Spec:
T8300 with X3100 onboard

There is less games on linux machines but I am sure ppsspp can give some fun to those who work alot on linux.

2015年3月21日 星期六

[How to] Setup Chinese Input Method on Linux - SCIM

SCIM is a very good Chinese input program for Linux, exspecially for 速成 (Chinese Quick) Method. Setup is very simple in arch linux

1. Install Package
# pacman -S scim scim-table

2. To enable it in startup
$ vim ~/.xinitrc
export XMODIFIERS=@im=SCIM
export GTK_IM_MODULE="scim"
export QT_IM_MODULE="scim"
scim -d


exec startlxde

Sometimes it is not work for reload setting on the tray icon. But reboot computer can help.

2015年3月16日 星期一

New Computer - migrate arch linux from AMD to intel

For years my computer is used, it was found dead after 7 years of working of my AMD Computer. After recover from sadness, I bought new parts to fix it. As the original one was using DDR2 which is quite outdated, I bought a new (not means fast) CPU and mainboard.

Let see the migration spec:
Original Config:
AMD Athlon II X2 240e
J&W Nvidia Geforce 8200 Mainboard
2GB x4 DDR2 RAM
GPU: nvidia onboard

New Config:
Intel Pentium G3258
Asrock B85 Mainboard
8GB x1 DDR3 RAM
GPU: intel onboard

Software:
Arch Linux 3.18.6-ARCH 64bit

After connect everything, computer bootup as usual. It boot up successfully to console user login.

The following is not work:
1. X
2. network

For the network part as the interface index was changed, just amend the configuration on netctl, the dnsmasq (dhcp server and dns provider) and dhcp client and everything works great. Just a reminder that the service of original setting was still running, and these services should be stopped.

For X windows, as I original was using the open-source driver xf86, what I need to do is uninstall nouveau, remove all the configurations and install package "xf86-video-intel" from pacman and it works!!


2015年3月15日 星期日

[How To] Bridge network interfaces using netctl

There are some ways to bridge network interfaces. The most popular one is "brctl". Other than brctl and we can use netctl to preform this task. relativly easy with easier settings.

1. Create a configuration file
# cat /etc/netctl/bridge
Description="Example Bridge connection" 
Interface=br0 
Connection=bridge 
BindsToInterfaces=(enp3s0 snp3s1) 
IP=static 
Address='192.168.1.1/24' 
#Gateway='192.168.10.200' 
## Ignore (R)STP and immediately activate the bridge SkipForwardingDelay=yes 

2. Just start it
# netctl start bridge

3. If it works fine, just enable it during boot
# netctl enable bridge

Nice and done.

a good reminder that the interfaces in the bridge should be disable the DHCP settings. 

2015年3月13日 星期五

Marvel App - An Mobile Application prototype generator

https://marvelapp.com/

This is a awesome site that can generate an iOS application from pictures on Dropbox. It's good for generating prototype of mobile application.


2015年3月11日 星期三

nbench - a simple computer benchmark tools for linux

nbench is a very small program that can benchmark a device base on the computation power of AMD K6-2 233 MHz (ha~ very slow CPU). It can also be use to compare the performance on ARM base devices.

http://www.tux.org/~mayer/linux/bmark.html

The results of my computer. Not that fast
= = =

$ nbench
BYTEmark* Native Mode Benchmark ver. 2 (10/95)
Index-split by Andrew D. Balsa (11/97)
Linux/Unix* port by Uwe F. Mayer (12/96,11/97)

TEST                : Iterations/sec.  : Old Index   : New Index
                    :                  : Pentium 90* : AMD K6/233*
--------------------:------------------:-------------:------------
NUMERIC SORT        :          1323.9  :      33.95  :      11.15
STRING SORT         :          222.57  :      99.45  :      15.39
BITFIELD            :      4.4029e+08  :      75.53  :      15.78
FP EMULATION        :          236.86  :     113.66  :      26.23
FOURIER             :           25906  :      29.46  :      16.55
ASSIGNMENT          :          33.154  :     126.16  :      32.72
IDEA                :            7018  :     107.34  :      31.87
HUFFMAN             :          2775.9  :      76.98  :      24.58
NEURAL NET          :          46.583  :      74.83  :      31.48
LU DECOMPOSITION    :          1589.2  :      82.33  :      59.45
==========================ORIGINAL BYTEMARK RESULTS==========================
INTEGER INDEX       : 84.283
FLOATING-POINT INDEX: 56.617
Baseline (MSDOS*)   : Pentium* 90, 256 KB L2-cache, Watcom* compiler 10.0
==============================LINUX DATA BELOW===============================
CPU                 : Dual AuthenticAMD AMD Athlon(tm) II X2 240e Processor 1600MHz
L2 Cache            : 1024 KB
OS                  : Linux 3.18.6-1-ARCH
C compiler          : gcc version 4.9.2 20150304 (prerelease) (GCC)
libc                :
MEMORY INDEX        : 19.955
INTEGER INDEX       : 21.878
FLOATING-POINT INDEX: 31.402
Baseline (LINUX)    : AMD K6/233*, 512 KB L2-cache, gcc 2.7.2.3, libc-5.4.38
* Trademarks are property of their respective holder.

2015年3月9日 星期一

More on Wifi Network

Super-G
- Super G is Atheros' proprietary frame-bursting, compression, and channel bonding technology to improve IEEE 802.11g (Wi-Fi) wireless LAN performance. The throughput transmission speed limit when using Super G is claimed to be up to 40 Mbit/s-60 Mbit/s at a 108 Mbit/s signaling rate, which is achieved through the bonding of two 54 Mbit/s 802.11g channels.

802.11h
IEEE 802.11h-2003, or just 802.11h, refers to the amendment added to the IEEE 802.11 standard for Spectrum and Transmit Power Management Extensions. It solves problems like interference with satellites and radar using the same 5 GHz frequency band. It was originally designed to address European regulations but is now applicable in many other countries. The standard provides Dynamic Frequency Selection (DFS) and Transmit Power Control (TPC) to the 802.11a PHY. It has been integrated into the full IEEE 802.11-2007 standard.

The above setting appear on my openwrt router. Just enable it for simply

2015年3月8日 星期日

Open source whatsapp library - yowsup

Yowsup is an opensource python library that can send whatsapp message
Link:
https://github.com/tgalal/yowsup/
  and
http://openwhatsapp.org/

The simple procedure is as follows:

1. install python

2. install yowsup
# easy_install yowsup2

Or if you have installed the previous version before
# easy_install -U yowsup2

3. Registration
*** As it needs a password to run the program. Registration is needed to get the password
please see the path in man help page to get the mmc and mnc for the network operator

Assume the country code is 852 (I am from Hong Kong)
And the phone number to register is 6XXXXXXX

Those mnc and mmc can be found in wiki
https://en.wikipedia.org/wiki/Mobile_country_code

$yowsup-cli registration -m 454 -n 00 -p 8526XXXXXXX -C 852 --r sms

After receive SMS send
$yowsup-cli registration -m 454 -n 00 -p 8526XXXXXXX -C 852 -R 123-123
status: ok
kind: free
pw: abc123abc123abc123abc123abc1

price: $8.00
price_expiration: 1428812312
currency: HKD
cost: 8.00
expiration: 1457345645
login: 8526XXXXXXX
type: new


and You can Get the password from the result

4. Config file

[merowoo@localhost ~]$ cat yowsup-cli.config
cc=852
phone=8526XXXXXXXX
password=abc123abc123abc123abc123abc1


5. Send Message
#yowsup-cli demos -s 8526XXXXXXX "This is my first message" -c yowsup-cli.config

This can help to make some speedy notification to mobile environment which is much better than email. The source code of yowsup-cli can be easily modify to fit on programs.

2015年3月7日 星期六

[How to] bind volume keys on Thinkpad X61 on arch linux

[How to] bind volume keys on Thinkpad X61 on arch linux

Org:
http://mizupc8.bio.mie-u.ac.jp/pukiwiki/index.php?ArchLinux%2FThinkPad%20X61

I don't know japanese but it works as expected. Cool
= = = Quote = = =

ThinkPad X61 での ArchLinux の設定に関するページです。

Volume キー

画面の照度調整などは標準インストールで使えるようになったが、Awesome WM ではボリュームの調整ボタンが使えなかった。xbindkeys パッケージをインストールして、設定ファイルに volume キーに関する記述をすればよい。
% sudo pacman -S xbindkeys
依存関係を解決しています...
相互衝突をチェックしています...

パッケージ (1): xbindkeys-1.8.6-1

Total Download Size:    0.02 MiB
Total Installed Size:   0.05 MiB

:: インストールを行いますか? [Y/n] y
:: パッケージを取得します ...
 xbindkeys-1.8.6-1-x...    20.5 KiB   133K/s 00:00 [######################] 100%
(1/1) キーリングのキーを確認                       [######################] 100%
(1/1) パッケージの整合性をチェック                 [######################] 100%
(1/1) パッケージファイルのロード                   [######################] 100%
(1/1) ファイルの衝突をチェック                     [######################] 100%
(1/1) 空き容量を確認                               [######################] 100%
(1/1) インストール xbindkeys                       [######################] 100%
xbindkeys の提案パッケージ
    tk: xbindkeys_show
% xbindkeys -d > ~/.xbindkeysrc
以下の内容を ~/.xbindkeysrc に追加。
# Increase volume
#"amixer  set Master 2dB+" ←dBで指定すると、Invalid command で不可だった。
"amixer  set 'Master' 5%+"
  XF86AudioRaiseVolume

# Decrease volume
#"amixer set Master 2dB-"
"amixer  set 'Master' 5%-"
  XF86AudioLowerVolume

# Toggle mute
"amixer set Master toggle"
  XF86AudioMute
.xinitrc に awesome を起動する前に xbindkeys を実行するよう記述する。
xbindkeys ←追加
exec awesome