Friday, June 28, 2013

Matlab Installation in Windows 7: Version 2007 and older

To install Matlab 2007 on Windows 7

1) Change Windows 7 Theme to the classic one (windows classic)
2) Install Matlab.

 To use Matlab with other windows 7 themes you have to change java used by matlab.

Update 
1) in my case, jre7 will not work. Change back to original java provided by Matlab and turns out the program run perfectly.

1) download latest java version and install it.
2) go to C:\Program Files(x86)\MATLAB\R2007b\sys\java\jre\win32 you will find a file named jre1.6.0 rename it to Original_jre1.6.0
3) go to C:\Program Files\Java you will find file named jre7 (jetX for Xversion) copy to C:\Program Files(x86)\MATLAB\R2007b\sys\java\jre\win32
and rename it to jre1.6.0

Now you can use matlab with all themes. [1]

Change the Matlab locale 

Unfortunately, there is no other way to change the Matlab locale except changing the user locale & system locale on Windows 7.

1) Go to Control Panel -> Region and Language
2) Formats Tab -> Choose your local
3) Administrative Tab -> Choose your local
4) Reboot
5) Enjoy your Matlab in your selected locale. [2]


Wednesday, June 26, 2013

Officially Performed Full Roll Over

2013年 6月26日

水曜日

Around 07:45

福井県福井市大宮6-10-16LLハイム5、203号室

Saturday, June 22, 2013

Manjaro-xfce 0.8.6 Installation Notes

Basic Installation

1) Installation was pretty straight forward. Either run it from CD/DVD or boot from USB.

2) To create Live USB, a few choices of software are available for free.
     -- USB Live Creator from pendrivelinux.com
     -- Unetbootin
     -- Linux Live USB Creator

3) All products did not provide Manjaro 0.8.6 as one of the choices in the selection list. Even some (Unetbootin if I'm not mistaken), did not even list Manjaro. For my case, I use Linux Live USB creator. Manjaro 0.8.5 was selected from the list and has been warned regarding the compatibility of the distro version. Just ignore the warning and the software will create your USB live based on Manjaro 0.8.5 settings. The creation of USB live only takes a few minutes. In case you want to use USB Live Creator, just select Arch Linux in the list. I think, there will be no problem [has not been tested].

4) In my case, I did dual booting along Windows 7. One thing for sure, I hate the fact that GRUB2 will overwrite windows MBR. Luckily, there is alternative and I have successfully install my 2nd OS without the need of replacing MBR with GRUB2 [1][2].

5) In [1], the author formatted one of the partition as FAT32. In my case, I skip this step. The partition of my laptop are as follows;

     -- /dev/sda1   [Primary Partition] [ASUS reserved partition. Windows 7 boot loader]  [NTFS]
     -- /dev/sda2   [Primary Partition] [Windows 7]  [NTFS]
     -- /dev/sda3   [Primary Partition] [Manjaro; root, GRUB2, swap file] [ext4]
     -- /dev/sda4   [Extended Partition]
     -- /dev/sda5   [Logical Partition] [My Data 1] [NTFS]
     -- /dev/sda6   [Logical Partition] [My Data 2] [NTFS]

6) Restart the PC and boot the USB live. Install from the launcher on the desktop.

7) In case you hate the CLI installer and want to run the installation process using terminal, type command below in terminal.

 sudo setup

8) For my case, I installed the Manjaro in /dev/sda3 together with GRUB2. I skip the creation of swap partition for later configuration using swap file.

Windows 7 Dual-boot Configuration

1) Reboot into the USB live once again.

2) Open the terminal and type the following command to copy the first 512 bytes of data from the Linux root partition into windows NTFS partition.

 dd if=/dev/sda3 of=/run/media/<user>/<partition-name>/linux.bin bs=512 count=1

3) Reboot your pc into Windows. Open command window as admin [type cmd in the search box, right click  on the cmd and select to "Run as administrator"].

4) Copy linux.bin file into the windows boot partition (e.g. C:)

5) Type the following command inside cmd window. You can change the "Linux" name to any other name that suit you.

 bcdedit /create /d “Linux” /application bootsector

6) The command will give an alphanumeric identifier (e.g. d7294d4e-9837-11de-99ac-f3f3a79e3e93) that will be referred to as ID in the remaining steps.

7) Type the following command in the cmd window. The command first specify the partition where linux.bin resides. Then, specifying the path to linux.bin file followed by creating an entry for booting list after "Windows 7" option. The timeout can be set to any number in seconds.

 bcdedit /set {ID} device partition=c:
 bcdedit /set {ID}  path \linux.bin
 bcdedit /displayorder {ID} /addlast
 bcdedit /timeout 15

8) If you want to delete the Linux option, you could do it by following commands. The first command will give you a list of IDs in the boot manager. Identify the ID and execute second command. [1][3][4].

 bcdedit 
 bcdedit /delete {ID}

9) Enjoy your newly installed Manjaro OS.

Post-installation Tweak

1) Make swap file [5].

2) Mount windows partition automatically using ntfs-2g and fstab [6][7]. The uid and gid can be found using the following command;

 sudo nano /etc/passwd

3) Font rendering tweak to make font look better. Use the general way as the easy way will give error result.

4) Setting NTP in Windows 7 to ensure time sync between OS. Ensure your Manjaro time is set to UTC

 hwclock --systohc --utc

5) Optimize battery performance [8][9]. TLP tweak works like a charm..... improved my battery life about double of times as to compared without it.

6) Script to test the battery usage during sleep/suspend mode.

7) Further Arch Linux fine tuning post-installation guide. See also part III and part IV

8) Japanese input

9) Install dmenu

 sudo pacman -S dmenu

10) Edit grub bootloader to allow "hibernate". For my case, using swap file requires some modification as follows [10][11][12][13]:

 sudo filefrag -v /swapfile

Note the physical_offset of the first line (e.g. 190464). Then, open the grub bootloader with command:

 sudo nano /etc/default/grub

Change the GRUB_CMDLINE_LINUX="" to GRUB_CMDLINE_LINUX="resume=/dev/sda6 resume_offset=190464". Then automatically regenerate grub gile with:

 sudo grub-mkconfig -o /boot/grub/grub/cfg

Next is to add "resume" hook to mkinitcpio.conf:

 sudo nano /etc/mkinitcpio.conf

put "resume" before "filesystems" at the HOOKS: line:

 HOOKS="....... resume filesystems"

Finally rebuild the initrd image:

 sudo mkinitcpio -p linux39

"linux39" must be chosen accordingly by typing:

 ls -a /etc/mkinitcpio.d/

11) Install Slim

 sudo pacman -S slim
 sudo systemctl enable slim.service -f



Thursday, June 20, 2013

Hardware :- Complete!

I'm very happy today.....

My effort for the past 1 month has not been wasted....

The circuit & hardware system just worked!!!

Well.... Give my self a BIGGGG HUGGG~!


~in the middle of running Manjaro xfce4 using live USB~
~in fact, writing this entry using built in firefox~
~decided to install on my laptop to use for entertainment purposes; no need to burden my CPU with unnecessary work~

~arrrh.... upgrading manjaro completed!! ~

~details on next entry~

Sunday, June 16, 2013

Linux Series - Arch Linux

Since my last post <distro hopper?>, I rarely boot OS other than Win 7.

Yesterday, out of no where I felt like wanted to try Arch Linux. I'm sure I was reading somewhere on Arch Linux but couldn't found the memory which probably embedded deep enough in my brain.

Anyway, I spent my whole Friday doing the installation stuff.

I was wondering what is Arch Linux all about. Without much thinking, I started to download the ISO image and walllaaahh!!.... Virtual box installation.... USB live... and so on....

Basically, what I've learnt within about 36 hours is that..... Arch Linux is really cool....

If you want to control everything (~you could say everything) you want to put into your customized OS... then, Arch Linux might be the one suit you best...

I like ubuntu very much.... ever since version 7.04 if I'm not mistaken.... up until now.... So, I could say that I quite comfortable with debian base linux.. It just that... I want something new.... something that could give me the WoW!! thing like the first time I use ubuntu.... You know.... command line... terminal.... sudo stuff....

Well, I have successfully installed basic Arch Linux with Xfce4 Desktop Environment.... not really complete though.... Then I thought.... I don't have time for this... I mean.... stuff is really cool but you have to spend considerable time to learn something new..... pacman... yaourt.... packer.... systemd...

[pacman is very nice and I think I like it better than any other distro package manager that I have used so far.... ]

Then.... I googled the linux distribution ... finding the Arch Linux based distro... I still love and willing to learn more on Arch Linux.... I stumble upon Chakra and Manjaro..... Watched Chakra review on youtube... Manjaro as well....

It seems that Chakra does not suit me well... because the path they have taken that deviate away from the original Arch Linux motto....

Well.... now I have Arch Linux 64 and Manjaro 64 on my Virtual Box.... Frankly speaking... I like Manjaro... love it at first use.... Manjaro with Xfce4.... simple... fast.. clean... and geeky!! yeah...

XP, OS X, Mint, Arch Linux, Manjaro in action
[Manjaro] Updating with simple command:- sudo pacman -Su

How do I describe Arch Linux (~and its derivatives distro) in simple word....


Awesome



Wednesday, June 12, 2013

Himpunan Masalah Wuduk II

Himpunan Masalah Wuduk

Urine, Wuduk & Solat

1) A certainty is not replaced by a doubt. A mere sensation not backed up by actual traces of urine can be safely ignored.

2) In the event that you actually ‘see’ some drops of urine then you need only run water over the affected area until the trace is removed. This should only take about a minute. There is no need to make the whole garment wet.

3) If you forgot where the urine was, just make an educated guess concerning where it might be and wash that area. After that you can consider the garment to be pure. [1][2]

4) Al-Syeikh Muhammad bin Soleh al-Uthaimin ditanya tentang persoalan ini:

Apabila saya selesai berwudhu, lalu saya menuju ke tempat solat, saya terasa keluarnya titisan air kencing dari zakar saya, maka apa yang perlu saya buat?

Jawapan:

“Yang sepatutnya hendaklah dia berpaling dari sangkaan ini, seperti yang diarahkan oleh para imam (ulama) umat Islam, dan jangan dia terpengaruh dengan sangkaannya itu, tidak perlu dia pergi (ke tandas) untuk melihat zakarnya, adakah betul-betul keluar ataupun tidak. Perkara ini insyaalllah jika memohon pertolongan dengan Allah daripada (was-was) syaitan yang direjam dan dia tinggalkan (sangkaannya), ia akan hilang. Adapun jika yakin (benar-benar air kencing keluar), seperti (jelasnya) matahari (benar-benar yakin), maka hendaklah dia membasuk bahagian yang terkena air kencing itu dan mengulangi wudhunya. Ini kerana sebahagian orang apabila dia merasa basah dihujung zakarnya, dia menyangka telah keluar sesuatu (sedikit dari air kencingnya), jika pasti (keluar air kencing, lakukanlah) seperti yang aku nyatakan kepada kamu, (masaalah) yang ditanya ini bukanlah salisul baul (penyakit air kencing tidak lawas), kerana ia akan berhenti, (sebaliknya) Salisul baul itu ia berterusan keluar, adapun yang ditanya ini ia keluar setitis atau dua titis selepas ada gerakan, ini bukan salisul baul. Maka jika keluar dua titik kemudian berhenti, ia hendaklah dibersihkan dan berwudhu kali kedua, beginilah yang dia (orang yang yakin benar-benar keluar titisan air kencing) lakukan, hendaklah dia bersabar dan mengharapkan pahala daripada Allah.” (Liqa’ al-Bab al-Maftuh 15/184) [3][4][5][6]





Booting from Grub


  1. PC lama.... 
  2. Installed with Fedora but forgot the password...
  3. Cannot log in into windows due to blue screen crash
  4. Cannot get into the BIOS
  5. Always stumble upon the Grub menu
  6. Try to boot from USB installed with Ubuntu 13.04
  7. Follow the command below and successfully backup important data
  8. At the GRUB menu, hit the C key to enter command mode
grub> root (hd0,0)   # first harddrive, first partition
grub> find /[tab]    # type the slash then press [tab], and it will try to list files on this partition
Error 17: Cannot mount selected partition   # Oops no file system here
grub> root (hd0,1)   # first harddrive, second partition
grub> find /[tab]
 Possible files are: lost+found var etc media ...   # That was my hard drive with my linux install
grub> root (hd1,0)   # second hard drive usually is the USB drive if you have only one internal drive
grub> find /[tab]
 Possible files are: ldlinux.sys mydoc myfile mystick syslinux.cfg  # Bingo, that's the USB stick
  • Boot the drive by entering
chainloader +1
boot

[source]