Sunday, December 21, 2008

Fedora 10 now work natively with eeepc

Use
/dev/sda1 - 100m for /boot
/dev/sda2 - 3700m for /
/dev/sda3 - rest for swap
/dev/sdb1 - all for /usr

Webcam work by changing /Sys/devices/platforms/eeepc/camera to 1
Wifi works perfectly
Wired network works perfectly
Skype works mean mic, speaker & webcam ok
Vlc works fine
Install vmware server 2.0

Wednesday, December 10, 2008

Change uid in MacOSX

#!/bin/bash

echo dscl . -change /Users/xxx UniqueID 501 new_uid
echo dscl . -change /Users/xxx PrimaryGroupID 20 new_gid
echo chown -R : /Users/xxx
echo ls -n

Sunday, November 16, 2008

EeePC running on vmware

The instruction provided in sourceforge how to setup the EeePC with vmware need one last step. The xorg.conf cannot display the xwindow properly.

I use another vmware instance like CentOS to mount the vmware disk of the EeePC installed. Copy the below and detach the EeePC's vmware disk and it works though the vmware network card not support by Xandos's based EeePC OS. Lack of interests to fix it. May be later.

Thank you posting in http://forum.eeeuser.com/viewtopic.php?pid=200740#p200740 which provide the below.

Section "ServerLayout"
Identifier "Xandros"
Screen 0 "Screen1"
InputDevice "keyboard"
InputDevice "mouse"
EndSection

Section "Files"
ModulePath "/usr/lib/xorg/modules"
FontPath "/usr/share/fonts/X11/misc"
FontPath "/usr/share/fonts/X11/Type1"
FontPath "/usr/share/fonts/X11/75dpi"
FontPath "/usr/X11R6/lib/X11/fonts/Type1"
EndSection

Section "ServerFlags"
Option "AllowMouseOpenFail"
Option "BlankTime" "5"
Option "DontVTSwitch" "true"
Option "AIGLX" "false"
Option "GLX" "false"
Option "GLCore" "false"
EndSection

Section "InputDevice"
Identifier "keyboard"
Driver "kbd"
Option "CoreKeyboard"
Option "XkbRules" "xorg"
Option "XkbLayout" "us"
Option "XkbVariant" ""
EndSection

Section "InputDevice"
Identifier "mouse"
Driver "mouse"
Option "Device" "/dev/input/mice"
Option "Protocol" "IMPS/2"
Option "Emulate3Buttons" "yes"
Option "ZAxisMapping" "4 5"
Option "CorePointer"
EndSection

Section "Monitor"
Identifier "Monitor1"
VendorName "ASUS"
ModelName "eeePC P701"
Modeline "800x480" 29.58 800 816 896 992 480 481 484 497 -HSync +Vsync # 60 Hz
EndSection

Section "Device"
Identifier "Device1"
Driver "vesa"
EndSection

Section "Screen"
Identifier "Screen1"
Device "Device1"
Monitor "Monitor1"
DefaultDepth 24
SubSection "Display"
Depth 8
Virtual 1680 1680
EndSubSection
SubSection "Display"
Depth 15
Virtual 1680 1680
EndSubSection
SubSection "Display"
Depth 15
Virtual 1680 1680
EndSubSection
SubSection "Display"
Depth 16
Virtual 1680 1680
EndSubSection
SubSection "Display"
Depth 24
Virtual 800 600
EndSubSection
EndSection

Sunday, November 09, 2008

CentOS 5.2 now support PMP SIL3124

It can't be until CentOS 5.2. As there is bug to use VMServer 2.0 in Fedora 9 which support PMP SIL3124 with my CFI enclosure, I fall back to use the stable CentOS 5.2 which work perfect with VMServer 2.0.

I can have rock solid stable host running CentOS 5.2 which allow me to extend my storage with PMP SIL3124 linked up with CFI enclosure to build RAID5. Then install VM Server 2.0 to test different OS.

Tuesday, October 07, 2008

how to create sparsebundle image file in Mac OSX

#!/bin/bash

if [ ! -n "$2" ]; then
echo $0: machine_name MACid
exit 1
fi

hdiutil create -size 80G -type SPARSEBUNDLE \
-imagekey sparse-band-size=65536 \
-fs HFS+J \
-volname "Backup $1" \
~/Documents/"$1_$2".sparsebundle

Above is to create a sparsebundle file required for Time Machine backup to remote afp

Monday, October 06, 2008

autofs mount of nfs and afp with stardom NAS and Synology NAS

Stardom come with nfs
Synology come with afp

Use below to automount afp

1) add below to /etc/auto_master
/afp auto_afp
2) add below to auto_afp
mountpoint -fstype=afp afp://username:password@synology_ip_address/afp_share
3) use below to refresh autofs
automount -vc

Use below to automount nfs
1) add below to /etc/fstab
stardom_ip_address:/mnt/ide1/nfs_share /opt/nfs_share nfs resvport rw 0 0
2) use below to refresh autofs
automount -vc

Wednesday, October 01, 2008

madplay

diff -up ./audio_carbon.c.lama ./audio_carbon.c
--- ./audio_carbon.c.lama 2004-01-23 17:41:31.000000000 +0800
+++ ./audio_carbon.c 2008-10-01 20:22:00.000000000 +0800
@@ -94,7 +94,7 @@ void callback(SndChannelPtr channel, Snd
}

static
-int wait(struct buffer *buffer)
+int delay(struct buffer *buffer)
{
if (MPWaitOnSemaphore(buffer->semaphore, kDurationForever) != noErr) {
audio_error = _("MPWaitOnSemaphore() failed");
@@ -263,7 +263,7 @@ int play(struct audio_play *play)
/* wait for block to finish playing */

if (buffer->pcm_nsamples == 0) {
- if (wait(buffer) == -1)
+ if (delay(buffer) == -1)
return -1;

buffer->pcm_length = 0;



#!/bin/bash

export CFLAGS="\
-I/Users/Shared/gnu/libid3tag-0.15.1b/include \
-I/Users/Shared/gnu/libmad-0.15.1b/include \
-msse \
"

export CPPFLAGS="\
-I/Users/Shared/gnu/libid3tag-0.15.1b/include \
-I/Users/Shared/gnu/libmad-0.15.1b/include \
"

export LDFLAGS="\
-L/Users/Shared/gnu/libid3tag-0.15.1b/lib \
-L/Users/Shared/gnu/libmad-0.15.1b/lib \
"

./configure \
--prefix=/Users/Shared/gnu/madplay-0.15.2b \

Tuesday, July 01, 2008

Use of vcdxrip

#!/bin/bash

if [ ! -n "$2" ]; then
echo $0: 0/1 dir
exit 1
fi

DRIVE=$1
shift

DESTDIR="$HOME/Videos/mpg/$1"
shift

if [ ! -d "$DESTDIR" ]; then
mkdir -p "$DESTDIR" || exit 1
fi

cd "$DESTDIR" && \
/bin/rm -f * && \
/usr/bin/vcdxrip $* -C /dev/scd$DRIVE && \
eject /dev/scd$DRIVE && echo vcdxrip successfully && exit 0

echo vcdxrip fail || exit 1

Sunday, June 29, 2008

eeepc 900 now install with fedora 9 using SDHC card inserted in the builtin reader

change the BIOS setting to boot from card reader.
connect external DVD reader with DVD burned with Fedora 9 i386 image
select the atl2 network driver
deselect the internal SSD harddisks and let Fedora 9 install only to the SD card
after 1+ hour install. It boots successfully
The built in wired connection work so I can connect to internet and post this message.
Change the display to 1024x768 under the menu (System/Display)
logout and login again then change the resolution to 1024x600 using System/Preference/Hardware/Screen Resolution


Problems noted:

Battery life checking not work quite well
Wireless lan not configured after first boot - This is now solved by yum --enablerepo=livna-testing install kmod-madwifi.  Thanks http://kernelreloaded.blog385.com/index.php/archives/madwifi-wireless-for-asus-eee-pc-on-fedora-9-howto/
....

Next steps:

updating new packages and refresh the systems
Finding way to enable wireless
Need to check if the built in web cam work - it works nows but can I disable in BIOS but still work? Default BIOS setup is to disable WebCam

Another nice documents http://fedoraproject.org/wiki/EeePc#ACPI_State_of_play

Sunday, June 22, 2008

compile open-vm-tools-2008.06.03-96374 in Fedora 9

Based on http://alanlam.blogspot.com/2008/06/compile-virtualbox-from-source-with.html, to install the additional packages

use the command

su root -c 'yum install libdnet-devel'
su root -c 'yum install libicu-devel.i386'

Install further

libicu-devel-3.8.1-7.fc9 Sun 22 Jun 2008 02:24:32 PM HKT
libicu-3.8.1-7.fc9 Sun 22 Jun 2008 02:24:18 PM HKT
libdnet-devel-1.12-3.fc9 Sun 22 Jun 2008 02:23:04 PM HKT
libdnet-1.12-3.fc9 Sun 22 Jun 2008 02:23:03 PM HKT
procps-devel-3.2.7-20.fc9 Sun 22 Jun 2008 02:21:10 PM HKT
ncurses-devel-5.6-16.20080301.fc9 Sun 22 Jun 2008 01:37:30 PM HKT
elfutils-0.133-3.fc9 Sun 22 Jun 2008 01:30:16 PM HKT
elfutils-libs-0.133-3.fc9 Sun 22 Jun 2008 01:30:15 PM HKT
gtk2-devel-2.12.10-2.fc9 Sun 22 Jun 2008 12:08:48 PM HKT
atk-devel-1.22.0-1.fc9 Sun 22 Jun 2008 12:08:43 PM HKT
gtk-doc-1.9-4.fc9 Sun 22 Jun 2008 12:08:42 PM HKT
docbook-utils-0.6.14-13.fc9 Sun 22 Jun 2008 12:08:41 PM HKT
pango-devel-1.20.1-1.fc9 Sun 22 Jun 2008 12:08:39 PM HKT
docbook-style-dsssl-1.79-5.fc9 Sun 22 Jun 2008 12:08:36 PM HKT
cairo-devel-1.6.4-1.fc9 Sun 22 Jun 2008 12:08:35 PM HKT
pixman-devel-0.10.0-1.fc9 Sun 22 Jun 2008 12:08:34 PM HKT
perl-SGMLSpm-1.03ii-18.fc9 Sun 22 Jun 2008 12:08:33 PM HKT
libXcomposite-devel-0.4.0-4.fc9 Sun 22 Jun 2008 12:08:33 PM HKT
docbook-style-xsl-1.73.2-9.fc9 Sun 22 Jun 2008 12:08:29 PM HKT
libXtst-devel-1.0.3-3.fc9 Sun 22 Jun 2008 12:03:36 PM HKT

Download procps-3.2.7-20.fc9.src.rpm

Patch the procps.spec

svn diff -r 29:28 https://osstools.svn.sourceforge.net/svnroot/osstools/trunk/rpmbuild/SPEC/procps.spec

Apply the patch available at

svn co https://osstools.svn.sourceforge.net/svnroot/osstools/trunk/patch/open-vm-tools-2008.06.03-96374.patch -r 30

Compile VirtualBox from source with Fedora 9

Follow build instructions http://www.virtualbox.org/wiki/Linux%20build%20instructions

use the following commands:

svn co http://virtualbox.org/svn/vbox/trunk vbox
cd vbox/
su root -c 'yum install compat-gcc-34-c++'
su root -c 'yum install libxml2-devel.i386'
su root -c 'yum install libxslt-devel.i386'
su root -c 'yum install libIDL-devel'
su root -c 'yum install libpng-devel'
su root -c 'yum install SDL-devel'
su root -c 'yum install libXcursor-devel'
su root -c 'yum install qt3-devel'
su root -c 'yum install qt4-devel'
su root -c 'yum install kernel-devel'
su root -c 'yum install pulseaudio-libs-devel'
./configure --with-gcc-compat=gcc34
source env.sh
kmk all

install the following packages in Fedora 9 i386

pulseaudio-libs-devel-0.9.10-1.fc9 Sun 22 Jun 2008 10:37:42 AM HKT
pulseaudio-libs-zeroconf-0.9.10-1.fc9 Sun 22 Jun 2008 10:37:34 AM HKT
kernel-devel-2.6.25.6-55.fc9 Sun 22 Jun 2008 10:35:38 AM HKT
qt-devel-4.3.5-2.fc9 Sun 22 Jun 2008 10:34:37 AM HKT
qt-x11-4.3.5-2.fc9 Sun 22 Jun 2008 10:34:29 AM HKT
qt-4.3.5-2.fc9 Sun 22 Jun 2008 10:34:25 AM HKT
nas-libs-1.9.1-4.fc9 Sun 22 Jun 2008 10:34:24 AM HKT
redhat-rpm-config-9.0.2-1.fc9 Sun 22 Jun 2008 10:34:23 AM HKT
libXfixes-devel-4.0.3-3.fc9 Sun 22 Jun 2008 10:34:23 AM HKT
libXi-devel-1.1.3-4.fc9 Sun 22 Jun 2008 10:34:22 AM HKT
qt3-devel-3.3.8b-12.fc9 Sun 22 Jun 2008 10:33:47 AM HKT
qt3-3.3.8b-12.fc9 Sun 22 Jun 2008 10:33:38 AM HKT
libXt-devel-1.0.4-5.fc9 Sun 22 Jun 2008 10:33:35 AM HKT
libXinerama-devel-1.0.3-1.fc9 Sun 22 Jun 2008 10:33:34 AM HKT
libXft-devel-2.1.12-5.fc9 Sun 22 Jun 2008 10:33:34 AM HKT
libSM-devel-1.0.2-5.fc9 Sun 22 Jun 2008 10:33:33 AM HKT
libmng-devel-1.0.9-6.1 Sun 22 Jun 2008 10:33:33 AM HKT
libmng-1.0.9-6.1 Sun 22 Jun 2008 10:33:32 AM HKT
libICE-devel-1.0.4-3.fc9 Sun 22 Jun 2008 10:33:32 AM HKT
libjpeg-devel-6b-41.fc9 Sun 22 Jun 2008 10:33:31 AM HKT
fontconfig-devel-2.5.0-2.fc9 Sun 22 Jun 2008 10:33:28 AM HKT
freetype-devel-2.3.5-6.fc9 Sun 22 Jun 2008 10:33:26 AM HKT
libXcursor-devel-1.1.9-2.fc9 Sun 22 Jun 2008 10:32:54 AM HKT
SDL-devel-1.2.13-3.fc9 Sun 22 Jun 2008 10:32:18 AM HKT
mesa-libGLU-devel-7.1-0.31.fc9 Sun 22 Jun 2008 10:32:16 AM HKT
libXrender-devel-0.9.4-3.fc9 Sun 22 Jun 2008 10:32:16 AM HKT
libXext-devel-1.0.4-1.fc9 Sun 22 Jun 2008 10:32:15 AM HKT
libX11-devel-1.1.4-1.fc9 Sun 22 Jun 2008 10:32:12 AM HKT
libXdmcp-devel-1.0.2-5.fc9 Sun 22 Jun 2008 10:32:10 AM HKT
libXrandr-devel-1.2.2-3.fc9 Sun 22 Jun 2008 10:32:09 AM HKT
xorg-x11-proto-devel-7.3-12.fc9 Sun 22 Jun 2008 10:32:08 AM HKT
libXau-devel-1.0.3-5.fc9 Sun 22 Jun 2008 10:32:07 AM HKT
mesa-libGL-devel-7.1-0.31.fc9 Sun 22 Jun 2008 10:32:04 AM HKT
SDL-1.2.13-3.fc9 Sun 22 Jun 2008 10:32:01 AM HKT
alsa-lib-devel-1.0.16-3.fc9 Sun 22 Jun 2008 10:31:58 AM HKT
libxcb-devel-1.1-4.fc9 Sun 22 Jun 2008 10:31:56 AM HKT
automake-1.10.1-2 Sun 22 Jun 2008 10:31:53 AM HKT
libpng-devel-1.2.29-1.fc9 Sun 22 Jun 2008 10:31:09 AM HKT
libIDL-devel-0.8.10-2.fc9 Sun 22 Jun 2008 10:30:40 AM HKT
glib2-devel-2.16.3-5.fc9 Sun 22 Jun 2008 10:30:37 AM HKT
libxslt-devel-1.1.24-1.fc9 Sun 22 Jun 2008 10:30:09 AM HKT
libgpg-error-devel-1.6-2 Sun 22 Jun 2008 10:30:08 AM HKT
libgcrypt-devel-1.4.0-3 Sun 22 Jun 2008 10:30:08 AM HKT
libxml2-devel-2.6.32-2.fc9 Sun 22 Jun 2008 10:29:39 AM HKT
zlib-devel-1.2.3-18.fc9 Sun 22 Jun 2008 10:29:37 AM HKT
compat-gcc-34-c++-3.4.6-9 Sun 22 Jun 2008 10:27:16 AM HKT
compat-gcc-34-3.4.6-9 Sun 22 Jun 2008 10:27:02 AM HKT
iasl-20061109-4.fc9 Sun 22 Jun 2008 09:17:32 AM HKT
dev86-0.16.17-9.fc9 Sun 22 Jun 2008 09:16:24 AM HKT
gcc-c++-4.3.0-8 Sun 22 Jun 2008 09:14:15 AM HKT
libstdc++-devel-4.3.0-8 Sun 22 Jun 2008 09:14:08 AM HKT


But get the following errors:

vbox/src/VBox/Additions/x11/xclient/seamless-x11.cpp:188: error: ‘XmuClientWindow’ was not declared in this scope
kmk[3]: *** [vbox/out/linux.x86/release/obj/src/VBox/Additions/VBoxClient/seamless-x11.o] Error 1
The failing command:
@g++ -c -O2 -g -Wall -pedantic -Wno-long-long -Wno-trigraphs -Wno-variadic-macros -pipe -O2 -mtune=generic -fno-omit-frame-pointer -fno-strict-aliasing -fvisibility-inlines-hidden -fvisibility=hidden -DVBOX_HAVE_VISIBILITY_HIDDEN -m32 -Ivbox/include -Ivbox/out/linux.x86/release -DVBOX -DVBOX_OSE -DRT_OS_LINUX -D_FILE_OFFSET_BITS=64 -DRT_ARCH_X86 -D__X86__ -DIN_RING3 -DHC_ARCH_BITS=32 -DGC_ARCH_BITS=32 -DIN_GUEST -DIN_GUEST_R3 -DIN_RT_R3 -DVBOX_X11_CLIPBOARD -DVBOX_HGCM -DSEAMLESS_GUEST -DDYNAMIC_RESIZE -D_GNU_SOURCE -Wp,-MD,vbox/out/linux.x86/release/obj/src/VBox/Additions/VBoxClient/seamless-x11.o.dep -Wp,-MT,vbox/out/linux.x86/release/obj/src/VBox/Additions/VBoxClient/seamless-x11.o -Wp,-MP -o vbox/out/linux.x86/release/obj/src/VBox/Additions/VBoxClient/seamless-x11.o vbox/src/VBox/Additions/x11/xclient/seamless-x11.cpp
kmk[3]: Leaving directory `vbox/src/VBox/Additions'
kmk[2]: *** [pass_binaries_before] Error 2
kmk[2]: Leaving directory `vbox/src/VBox'
kmk[1]: *** [pass_binaries_before] Error 2
kmk[1]: Leaving directory `vbox/src'
kmk: *** [pass_binaries_before] Error 2


During the configure, it won't check for dependence of libXmu-devel

su root -c 'yum install libXmu-devel'

and it works!

Saturday, June 14, 2008

How to enable Time Machine on unsupported volumes

http://www.engadget.com/2007/11/10/how-to-enable-time-machine-on-unsupported-volumes


defaults write com.apple.systempreferences TMShowUnsupportedNetworkVolumes 1



use control-click of TimeMachine preference to select the hidden mounted point

Configuring an AppleTalk Server in Linux

http://book.chinaunix.net/special/ebook/RedHat_Linux_Bible/8140final/LiB0228.html
Note 
In general, AppleTalk should be used on trusted networks. If you are running a firewall on your netatalk server, however, you must open access to several ports for netatalk to work. In particular, you may need to open ports 548 (AFP over TCP/IP), 201 (AppleTalk routing), 202 (AppleTalk name binding), 204 (AppleTalk echo), and 206 (AppleTalk zones).




restart autofs in leopard without reboot

As of 10.5.2:

sudo service com.apple.autofsd stop
sudo service com.apple.autofsd start 

Sunday, June 01, 2008

Fedora 9 nfs enable via firewall

Fedora 9 nfs can now export to my mac pro just using firewall wizard.  Add port 111 tcp/udp and 2049 tcp/udp and it works

fedora 9 now work with sil 3124/3132 and multiple port 3726

My mac pro early 2008 keep on crashing with sil 3132 and sil 3726 multiple port.  Also don't like the proprietary silicon image drivers.

Like the software raid that come with linux.

Saturday, May 24, 2008

Stardom NAS - gentoo

don't like the Gemini Linux 2.6.15 that come with STARDOM-NAS. enable the telnet by using the non-documented telnet.cgi

http://ip/cgi/telnet/telnet.cgi

Now can telnet into the box. Then find the good documents http://nas-2000.org/mwiki/index.php?title=HowTo_Compile_Programs_on_the_NAS

The document need some update basically the below won't work. Just ignore it.
ln -s usr/portage/profiles/default-linux/arm/ etc/make.profile

Also need to create etc/resolv.conf. Also the tar -xjvpf ../stage3-armv4l-2005.1.tar.bz2 inside the NAS not working quite well. So using the NFS mount to the NAS and bzip2 -dc stage3-armv4l-2005.1.tar.bz2 | tar xvf - from the nfs client that come with Linux/MacOS.

There are still some error regarding /dev/??? during tar bunzip2 which can be ignored.

Still running gentoo

emerge --sync

If result is good, will check in to http://osstools.svn.sourceforge.net

Wednesday, April 30, 2008

enable subversion server come with Leopard

Mac Leopard actually come with subversion server and client that integrated with its own apache2.

Steps to enable it:
LoadModule dav_svn_module libexec/apache2/mod_dav_svn.so
LoadModule authz_svn_module libexec/apache2/mod_authz_svn.so
    • enable httpd-ssl.conf by removing the comment from the following line in /etc/apache2/httpd.conf:
    Include /private/etc/apache2/extra/httpd-ssl.conf
    • Add the following line at the end of file /etc/apache2/extra/httpd-ssl.conf but before the </VirtualHost>
    DAV svn
    SVNPath /opt/repos
    AuthType Basic
    AuthName "Authorization Realm"
    AuthUserFile /etc/svn-auth-file
    Require valid-user
    • create the /etc/svn-auth-file using the following command to create user id. It will prompt for password twice
    htpasswd -cm /etc/svn-auth-file
    • restart apache by
    /usr/sbin/apachectl restart
    • mkdir the subversion repository, generate the first repository and change ownership of the folder to match with apache user
    mkdir /opt/repos
    svnadmin create /opt/repos
    chown -R www:www /opt/repos
    • test the access to subversion server using the https://127.0.0.1/svn/
    • try with svn co https://127.0.0.1/svn/trunk --username

    Wednesday, March 26, 2008

    Concate VCDs to mp4 using VLC

    #!/bin/bash

    /bin/cat $* | /Users/xxx/Applications/VLC.app/Contents/MacOS/VLC - \
    --sout "#transcode{vcodec=h264,vb=1024,acodec=mp4a,ab=192,scale=1}:\
    standard{access=file,mux=mp4,dst=\"/Users/xxx/Movies/vcd.mp4\"}" \
    vlc:quit -I dummy

    Sunday, February 17, 2008

    My Mac Pro - use 2 extra sata as as esata



    The left is my Mac Pro bought in Feb 2008.
    I read http://www.anandtech.com/mac/showdoc.aspx?i=2832&p=3.  This is a little bit outdate as it is for 2006 Mac Pro.
    This is much easy now for 2008's Mac Pro. The heatsink cover can be easy removed as it is now put in place like Macbook MagSafe Connector.  There is no need to pull the memory cage back towards the rear of the case nor pushing the heat sink cover in the opposite direction to unlatch it as explained in the above url

    The fan assembly can be removed by just two screws.  One attached it to the motherboard at the top right.  The other is hidden between plastic fan assembly and the heat sink (bottom right of the fan assembly after removing the heat sink cover).  The the picture below showing the hidden screw to loose the fan assembly and on of the magnet to attach the heat sink cover