2008/12/22

Windows UI - change to mac style

hide the windows bar and replace with this.



Get it free at http://rocketdock.com/

Beryl - change what u think about Linux UI

Beryl is an OpenGL accelerated desktop that seeks to provide a free, open source desktop experience to the community that reflects the wishes of the users. Above all else, the project seeks to listen to and respond to the requests of the user base...


Windows Vista (Aero) Vs Linux Ubuntu (Beryl) - The funniest videos are a click away

Installing Beryl On A CentOS 5.0 Desktop: http://www.howtoforge.com/beryl_centos5.0

Mount new disk on CentOS

1. Check what is the new hard disk device name with "fdisk -l", it should be something like /dev/sda. You can easily identify which is the new drive by running "mount" and finding the drive that exists in "fdisk -l" but is not mounted.
mount; fdisk -l

2. Create a partition on the new drive, (the sample code below assume the disk is /dev/sdd)
fdisk /dev/sdd

3. Create a filesystem on the new partition, we use ext3 file system.
mkfs.ext3 /dev/sdd

4. Create a directory named whatever you like, this will be where you mount the new disk
mkdir /backup

5. Edit /etc/fstab an add a record for the new drive at the end of the file. This will make the server mount the drive automatically after reboot. Mount options (like noatime and nodiratime) can be added as a comma separated list of values after "defaults": "defaults,noatime,nodiratime"

echo "/dev/sdd /backup ext3 defaults 0 0" >> /etc/fstab

Linux records information about when files were created and last modified as well as when it was last accessed. There is a cost associated with recording the last access time. Linux has a special mount option for file systems called noatime that can be added to each line that addresses one file system in the /etc/fstab file. If a file system has been mounted with this option, reading accesses to the file system will no longer result in an update to the atime information associated with the file. The importance of the noatime setting is that it eliminates the need by the system to make writes to the file system for files which are simply being read. Since writes can be somewhat expensive, this can result in measurable performance gains.

nodiratime does the same thing but for directories. I know the beginners guide says to use both mount options on file systems, but from others I've talked to and places I've read it seems noatime implies nodiratime because noatime is a superset and nodiratime is a subset used specifically to disable it for directories but leave it on for files, and when you use noatime, it does it for everything, files/dirs

echo "/dev/sdd /backup ext3 rw,noatime,nodiratime 0 0" >> /etc/fstab

Mount the drive. "mount -a" just mounts everything according to /etc/fstab.

mount -a

Reboot to make sure it starts ok with the new drive mounted.

2008/12/20

MonoDevelop 1.91 on Cent OS

Last post we installed Mono 2.x run time. Here we will get MonoDevelop install on GNOME, for development environment.

First, here are the related software. You should have most of them when installing the run-time:

yum install glib2-devel pango-devel gtk2-devel glade2-devel libgnome-devel \
gnome-desktop-devel gnome-panel-devel libgnomeprintui22-devel \
gtksourceview-devel ruby ruby-rdoc gtkhtml38-devel wget

Now, we need make the required environment variables while we're building the IDE, as well in its run-time. So let's make it into shellscript called env.sh (or whatever you like it).

echo 'PATH="/opt/mono/bin:$PATH"' /opt/mono/env.sh
echo 'export PKG_CONFIG_PATH=/opt/mono/lib/pkgconfig' >> /opt/mono/env.sh
echo 'export LD_LIBRARY_PATH=/opt/mono/lib' >> /opt/mono/env.sh
echo 'source /opt/mono/env.sh' >> /opt/mono/env.sh

chmod +x /opt/mono/env.sh

Now we are ready to build MonoDevelop from tarball source. The following packages are the minimum software needed - we will build them one-by-one:

gtk-sharp

cd ~/
wget http://ftp.novell.com/pub/mono/sources/gtk-sharp212/gtk-sharp-2.12.5.tar.bz2
tar xjf gtk-sharp-2.12.5.tar.bz2
cd ./gtk-sharp-2.12.5
./configure --prefix=/opt/mono
make;make install

Mono.Addins

wget http://ftp.novell.com/pub/mono/sources/mono-addins/mono-addins-0.3.1.tar.bz2
cd ./mono-addins-0.3.1
./configure --prefix=/opt/mono
make;make install

Monodoc

wget http://ftp.novell.com/pub/mono/sources/monodoc/monodoc-2.0.zip
unzip monodoc-2.0.zip
cd ./monodoc-2.0
./configure --prefix=/opt/mono
make;make install

Mono Tools

wget http://ftp.novell.com/pub/mono/sources/mono-tools/mono-tools-2.0.tar.bz2
tar jfxv mono-tools-2.0.tar.bz2
cd ./mono-tools-2.0
./configure --prefix=/opt/mono
make;make install

MonoDevelop

wget http://ftp.novell.com/pub/mono/sources/monodevelop/monodevelop-1.9.1.tar.bz2
tar jfxv monodevelop-1.9.1.tar.bz2
cd ./monodevelop-1.9.1
./configure --prefix=/opt/mono
make;make install

You should now able to start up MonoDevelop in GNOME, enjoy.

2008/12/17

Mono 2.x on CentOS 5

Mono no longer packages for Red Hat distribution but still provide sources. Here we will grab the source code, and install manually on a Cent OS 5.2 box.

First off, make sure you have all the development tools installed:

Pre-Software requirement

yum groupinstall "Development Tools"
yum install httpd build-essential gcc bzip bison pkgconfig glib-devel \
glib2-devel httpd-devel libpng-devel libX11-devel freetype fontconfig \
pango-devel ruby ruby-rdoc gtkhtml38-devel wget

At this time, Mono 2.0.1 is the latest. You can always check for new build at http://ftp.novell.com/pub/mono/sources-stable/

Getting all the needed Mono software

cd /root
wget http://ftp.novell.com/pub/mono/sources/mono/mono-2.0.1.tar.bz2
wget http://ftp.novell.com/pub/mono/sources/xsp/xsp-2.0.tar.bz2
wget http://ftp.novell.com/pub/mono/sources/mod_mono/mod_mono-2.0.tar.bz2
wget http://ftp.novell.com/pub/mono/sources/libgdiplus/libgdiplus-2.0.tar.bz2

Unlike many other tutorials, we will install using "Java" style - the version # is included:

mkdir /opt/mono-2.0.1

Let's make a desult symlink:,

ln -s /opt/mono-2.0.1 /opt/mono

This is needed when building xsp:

export PKG_CONFIG_PATH=/usr/lib/pkgconfig/:/opt/mono/lib/pkgconfig/:/usr/lib/
Set path (even we don't actually have it yet)

export PATH=/opt/mono/bin:$PATH

Now we are ready to compile:

tar jvfx mono-2.0.1.tar.bz2

cd mono-2.0.1
./configure --prefix=/opt/mono-2.0.1
make; make install

tar jvfx xsp-2.0.tar.bz2
cd ~/xsp-2.0
./configure --prefix=/opt/mono
make; make install

tar jvfx mod_mono-2.0.tar.bz2

cd ~/mod_mono-2.0
./configure --prefix=/opt/mono --with-mono-prefix=/opt/mono --with-apr-config=/usr/lib/httpd/modules
make; make install

tar jvfx libgdiplus-2.0.tar.bz2
cd ~/libgdiplus-2.0
./configure
make; make install

You should now have mod_mono.so in /usr/lib/httpd/modules. Also you should have mod_server in /opt/mono/bin.
You directories should look like those:

Directory contents are as follows:

ls /opt/mono/bin/

al                    mono-api-info
al2                   mono-api-info2
asp-state             monodis
asp-state2            mono-find-provides
caspol                mono-find-requires
cert2spc              monograph
certmgr               monolinker
chktrust              monop
cilc                  monop2
dbsessmgr             mono-service
dbsessmgr2            mono-service2
disco                 mono-shlib-cop
dtd2rng               mono-test-install
dtd2xsd               mono-xmltool
fastcgi-mono-server   mozroots
fastcgi-mono-server2  nunit-console
gacutil               nunit-console2
genxs                 pedump
gmcs                  permview
httpcfg               prj2make
ilasm                 resgen
ilasm2                resgen2
installvst            secutil
jay                   setreg
macpack               sgen
makecert              signcode
mbas                  smcs
mconfig               sn
mcs                   soapsuds
mjs                   sqlsharp
mkbundle              wsdl
mkbundle2             wsdl2
mod-mono-server       xbuild
mod-mono-server2      xsd
mono                  xsp
mono-api-diff         xsp2
ls /opt/mono/lib/
libgdiplus.a             libmono-profiler-aot.so.0
libgdiplus.la            libmono-profiler-aot.so.0.0.0
libgdiplus.so            libmono-profiler-cov.a
libgdiplus.so.0          libmono-profiler-cov.la
libgdiplus.so.0.0.0      libmono-profiler-cov.so
libikvm-native.a         libmono-profiler-cov.so.0
libikvm-native.la        libmono-profiler-cov.so.0.0.0
libikvm-native.so        libmono.so
libmono.a                libmono.so.0
libmono.la               libmono.so.0.0.0
libMonoPosixHelper.a     libMonoSupportW.a
libMonoPosixHelper.la    libMonoSupportW.la
libMonoPosixHelper.so    libMonoSupportW.so
libmono-profiler-aot.a   mono
libmono-profiler-aot.la  pkgconfig
libmono-profiler-aot.so  xsp
ls /usr/lib/httpd/modules/
libphp5.so              mod_file_cache.so
mod_actions.so          mod_filter.so
mod_alias.so            mod_headers.so
mod_asis.so             mod_ident.so
mod_auth_basic.so       mod_imagemap.so
mod_auth_digest.so      mod_include.so
mod_authn_alias.so      mod_info.so
mod_authn_anon.so       mod_ldap.so
mod_authn_dbd.so        mod_log_config.so
mod_authn_dbm.so        mod_log_forensic.so
mod_authn_default.so    mod_logio.so
mod_authn_file.so       mod_mem_cache.so
mod_authnz_ldap.so      mod_mime_magic.so
mod_authz_dbm.so        mod_mime.so
mod_authz_default.so    mod_mono.so
mod_authz_groupfile.so  mod_mono.so.0.0.0
mod_authz_host.so       mod_negotiation.so
mod_authz_owner.so      mod_proxy_ajp.so
mod_authz_user.so       mod_proxy_balancer.so
mod_autoindex.so        mod_proxy_connect.so
mod_cache.so            mod_proxy_ftp.so
mod_cern_meta.so        mod_proxy_http.so
mod_cgid.so             mod_proxy.so
mod_cgi.so              mod_rewrite.so
mod_dav_fs.so           mod_setenvif.so
mod_dav.so              mod_speling.so
mod_dbd.so              mod_status.so
mod_deflate.so          mod_suexec.so
mod_dir.so              mod_unique_id.so
mod_disk_cache.so       mod_userdir.so
mod_dumpio.so           mod_usertrack.so
mod_env.so              mod_version.so
mod_expires.so          mod_vhost_alias.so
mod_ext_filter.so
And the mod_mono config file should be like this:

ls /etc/httpd/conf/mod_mono.conf
vi
/etc/httpd/conf/mod_mono.conf
<ifmodule>
LoadModule mono_module /usr/lib/httpd/modules/mod_mono.so
AddType application/x-asp-net .aspx
AddType application/x-asp-net .asmx
AddType application/x-asp-net .ashx
AddType application/x-asp-net .asax
AddType application/x-asp-net .ascx
AddType application/x-asp-net .soap
AddType application/x-asp-net .rem
AddType application/x-asp-net .axd
AddType application/x-asp-net .cs
AddType application/x-asp-net .config
AddType application/x-asp-net .Config
AddType application/x-asp-net .dll
DirectoryIndex index.aspx
DirectoryIndex Default.aspx
DirectoryIndex default.aspx
</ifmodule>
Let's move it to CentOS style:

mv /etc/httpd/conf/mod_mono.conf /etc/httpd/conf.d/mod_mono.conf

Restart web server

service httpd restart

Make a simple test file named default.aspx:
<%Response.Write("mono on centos - it works");%>

If you see that message at http://localhost/default.aspx, congrad, there you have it!

Mercury簡易改裝

有同好有一樣的困擾 - 如何使用自己的data logging軟體,因此寫了這篇來分享我的簡易改裝。 Background 雲豆子 MERCURY roaster 烘豆機的設計是使用自行開發的軟體,來:1. 操控風門/火力; 2. data logging/自動烘焙。 ...