Testing Java on Mac OSX86

One interesting thing I found after installing Mac (Intel) OSX86 was the availability of complete Java development package. The built-in Java resource has become an added value so that you don’t have to worry anymore to seek & find the Java package natively for your Mac.



I tried to create a simple java source from text editor & would like to see the compile process & runtime result. The source below normally will displayed a “Hello Java…” string:

class hello {
public static void main(String[] args) {
System.out.println(“Hello Java”); } }



I then switch to terminal & make it compiled with javac compiler command:

:~/javac hello.java

Let the compiled source run & see the result below:



It works fine. The apple system has proven that it also stands for Java development based application instead of others OS. A great work from Mac OS team developers.

Labels: ,

  Post a Comment

SSH: Remote Login without Password

If you work with a large number of Linux terminals & had difficulties to remember each console password, then you can keep this trick. Connecting to a remote method using SSH (Secure SHell) will prompt you a password screen before attempting to login into target host. Below procedure has the same mechanism with FTP auto connect using .netrc files like I had described earlier. The main similarity tricks is creating a file contains identity information or something like that. The difference is, you have to store the identity SSH file to the remote machine.



First of all, on your own computer, create a public key identification by generating manually from ssh-keygen command like below:

[root@tuxbook ~]# ssh-keygen
Generating public/private rsa key pair.
Enter file in which to save the key (/root/.ssh/id_rsa):
Enter passphrase (empty for no passphrase):
Enter same passphrase again:
Your identification has been saved in /root/.ssh/id_rsa.
Your public key has been saved in /root/.ssh/id_rsa.pub.
The key fingerprint is:
38:xx:7c:xx:cd:xx:3e:xx:94:xx:ea:xx:26:xx:8e:xx root@tuxbook.pegadaian.net

After it executed successfully, it will generated a file named id_rsa.pub under /root/.ssh directory. Copy this file by giving a new name with authorized_keys.

[root@tuxbook ~]# cp /root/.ssh/id_rsa.pub /root/.ssh/authorized_keys

Put this latest file into target machine in the same directory. That’s all. The next time you try to connect to remote host, it will always accepting you to log on since your computer identification have been recognized by authorized_keys file in the remote host. No passwords prompting on your screen anymore.




Keep this trick carefully & don’t let anyone touch your terminal because it has unlimited access to control the servers you had made after login with SSH. Cheers…

Labels: ,

  Post a Comment

Acer Travelmate 6291: Installing Mac OS X Tiger in Logical Partition

4 days full of patient downloading 4.4GB Mac OS X image from my office was not too worthless. Suddenly, I got interested in Mac after seeing from a site on internet how beautiful is their Mac desktop installed in x86 Intel machine. For somehow, my curiosity was shows up on that time. After 2 tired sick days trying to install & re-install, now I feel totally satisfied having triple boot system between Windows XP, Fedora 7 & Mac OS X in my Acer laptop.

As like usual, the very first action to do before installing an OS is preparing the partition storage. For this requirement, I tried to provide 10GB of new blank partition I made successfully after resizing partition from Linux Fedora 7. I then formatted this logical partition with FAT32 type since I don’t have any idea what the OS X will fits, either the partition tool seems not support to create the Mac journalized file system format (HFS+ or 0xaf).

Installing this such OS was very simple & quick. No frequent question window displayed like any other OS installation session & total time needed to starting installation was less than 30 minutes. After it first boot, Mac get started on it’s way replacing the grub boot menu from Fedora 7 & begun to showing it very artistic desktop. But wait… how the hell I can get switch back log on to Windows or Linux? Okay, I’ll think of it later. Now, it’s the time to taste my fresh Mac OS X sensation.



On my laptop, the display adapter was correctly installed & shows high quality WXGA 1280x800 resolution. The boot time to get the desktop was also quite fast. It was surprised me. Anyway, some hardware devices were not recognized successfully such as the web cam, MMC reader & even the sound card. It most worst than Linux, I thought. But, it’s fine for me for now.



Let’s take a look at about form you can find on left side of Finder menu bar. This Intel OS X86 required a specific processor to work. It needs at least SSE2 or SSE3 capable instruction set such as Intel Core 2 Duo.



The control panel window known as System Preferences are located on the dock. Some of tweaks can be done from here.



This is my partition table displayed from the same command as Linux has in a terminal.



Got tried OpenOffice 2.2 over Mac after downloading 133MB from internet. It’s an alternative cheapest office productivity solution.



The Mac start menu, very unique than any other common OS.



Widget are one of my favorite desktop session. It’s fancy appearance shows with F12 keyboard shortcut.



Also had VirtualBox for Mac & tried to run a Windows XP image. Quite interested but without any network interface enabled.



One for sure, this Mac was equipped with Apache web server installation. You have to download php module & also MySQL for Mac to enabled the MAMP (Mac Apache Mysql PHP) integration.



Only Bluetooth wireless networking technology has been recognized & working fine. I have been tested it for pairing into another device such as PDA.



Enough for my short review about insides the OSX sensation. Now, the odd questions are back. How the hell I can get switch to boot Windows or Linux or Mac? Actually, my existing Mac installation was located on 3rd partition on logical partition. This situation are bad based on osx86 online documentation. It was impossible to repair Fedora 7 boot grub menu automatically since grub doesn’t recognized the 0xaf type partition & won’t attach it normally. So, here is my first trial & error with /boot/grub/grub.conf files sampled by forum over the internet:

default=2
timeout=5
splashimage=(hd0,7)/boot/grub/splash.xpm.gz
hiddenmenu

title MacOS X (Tiger)
root (hd0,7)
chainloader –force +1

title Fedora 7
root (hd0,7)
kernel /boot/vmlinuz-2.6.21-1.3194.fc7 ro root=LABEL=/ quiet
initrd /boot/initrd-2.6.21-1.3194.fc7.img

title Windows XP
rootnoverify (hd0,0)
chainloader +1

Save the changes, re-run the below command before reboot the system:

grub-install /dev/sda

The grub boot menu was back. Select the first menu, but it won’t boot. So, I tried to change into 2nd alternative boot choice. Tried to boot with NTLDR XP boot loader. For this experience, I did exactly what others forum told me. Copying chain0 file got from Mac DVD root & adding a new line in c:\boot.ini:

[boot loader]
timeout=30
default=multi(0)disk(0)rdisk(0)partition(1)\WINDOWS
[operating systems]
multi(0)disk(0)rdisk(0)partition(1)\WINDOWS="Microsoft Windows XP Professional" /noexecute=optin /fastdetect
c:\chain0=”Mac OS X”

Save the changes & restart. After it shows XP boot loader menu, Mac boot choice still won’t boot. I was so confused until these steps. It seems that they were right. The 3rd testing session was based on Linux boot loader again, but with chain0 file copied under /boot/grub folder. Make a change on grub.conf so that it pointed to chain0 file to boot:


title MacOS X (Tiger)
root (hd0,7)
chainloader /boot/grub/chain0

Still failed with error booter message displayed. Finally, based on my own trial, I then copied all the 9 files (4.34MB) from root DVD installer into /boot/grub/i386.



Make changes to grub.conf liki below:

default=2
timeout=5
splashimage=(hd0,7)/boot/grub/splash.xpm.gz
hiddenmenu

title MacOS X (Tiger)
rootnoverify (hd0,7)
chainloader /boot/grub/i386/boot0

title Fedora 7
root (hd0,7)
kernel /boot/vmlinuz-2.6.21-1.3194.fc7 ro root=LABEL=/ quiet
initrd /boot/initrd-2.6.21-1.3194.fc7.img

title Windows XP
rootnoverify (hd0,0)
chainloader +1

Save & reboot. Vice versa!... the MacOS X from grub boot menu are now work to boot the OSX with boot0 file chainloader & booting from logical partition. Any comment are open since I’m a Mac newbie.

Labels: ,

  Post a Comment

qtparted: Linux Based Partition Magic

One of my question are now resolved on how to resize partition under Linux in easy way. Here it come qtparted, a GUI front-end likes Partition Magic. No more confuse with fdisk, parted or other command line tools. With basic knowledge of Partition Magic, now you are ready to action with qtparted.

qtparted has the same interface with Partition Magic. This is the greatest advantages when I tried to use it for the first time on my Fedora 7 box. For testing scenario, I tried to resizing my 3rd partition so that it will create a new blank partition. My pre-existing disk condition contains 5 partitions. Below was the partitions table as seen under qtparted window:



The first only active primary partition set to Windows XP in NTFS format type with size of 15GB. The rest of the partition stay under logical. The 2nd partition (FAT32) available for program files & it has 20GB size. The 3rd (FAT32) was stored 30GB for data files purposed. The 4th partition room provided for Fedora 7 (10GB in ext3 format) & the last was 500MB for Linux swap partition.

The new partition located after the 3rd partition & it’ll have size of 10GB after resizing the 30GB of the 3rd partition. In order to did this, do the same as you will did in Partition Magic. First, make a right click on selected partition & choose resize. Fill the Free Space After input box with the number you request or simply rubbed the green border white box until it has exactly the size you wish.



If it done, apply it with commit button. A new window form will show displayed the action progress.



Wait until it finished & you will see a new blank partition located precisely after the 3rd partition. As usual, match the existing partition table with grub.conf located at /boot/grub/grub.conf in order to pass the grub boot properly. Then, to make sure that there no data lost in 3rd partition, have a check with log on to Windows (considered to prepare the real Partition Magic & see it from there). For further test, format the blank partition with any kind of type & contrary checked it out from qtparted. I tested it with formatting with hfs+ (0xaf) format type for used of Mac OS.



Everything seems work correctly & successfully. Note that you may required dependencies package before installing qtparted on your Linux system. For Fedora 7, qtparted are available on this link. It dependencies package are known as jfsutils & xfsprogs.

Labels:

  Post a Comment