Tuesday, November 10, 2009

Create a Terminal Command in Solaris

Create a text file in your desktop.

Edit the text file with the commands that you would want it to run, as if typing on terminal.

For example you want to set the keyboard layout to dvorak, type in "xmodmap /usr/share/xmodmap/xmodmap.dvorak".

Close the file, right-click, Properties>Permissions, then check the Make file runnable option.

Go to /usr/bin/ in File Browser. (Places>System>Filesystem>usr>bin)

After that, click File>Open in Terminal.

In terminal, type in "mv /export/home/*your-user-name*/Desktop/*file-name-of-command* *command-name-you-like*"

===========END==========

Note: If you get "Permission Denied" errors in terminal, you need to use terminal as a super user. To do this, enter "su" in terminal. Then, type in your password (even if you don't see anything being typed) and hit enter. Now try the command again. =)


EXAMPLE:
I want to create a command that I could type in terminal to easily set the keyboard layout to dvorak.

I create a file in desktop, name it whatever I want like "dvoraker".

In the file, I write the xmodmap command mentioned above.

I go to /usr/bin/ and open it in Terminal.

Then in terminal, assuming my username is grapeseed, I write "mv /export/home/grapeseed/Desktop/dvoraker asdf".

Done. Now when I reboot and need to reload my dvorak layout, I just launch terminal and tap the four keys under my left hand (that's why I named the command asdf).


TIP: It's also wise to create a notification to tell you that the command successfully completed. In this example, I may write "echo 'dvorak success'" in addition to the xmodmap command.

Saturday, November 7, 2009

How To Get the GCC Package for Solaris

Go to System>Administration>Package Manager
Type in "gcc" in the search bar.
Click "gcc-dev" in the results. [EDIT] Tick the checkbox to the left of "gcc-dev". The square is actually a checkbox. GUI fail.
Click Install/Update on the taskbar.
Confirm and finish your installation.
(Installing may take a while, as it downloads from the server but that's basically it.) =)

How To Install Apache Http Server on a Unix System

Unix system: Solaris, Linux, etc.

Steps:
download the Unix Source at http://httpd.apache.org/download.cgi
extract the tar file
follow instructions on INSTALL file.
[EDIT]Sometimes when running commands on the terminal, you might get "Permission Denied" errors. This can be solved by typing in "su" which is like sudo, the equivalent of "Run as administrator" on Windows. After typing that in, you will have to enter your administrator password. When you have done this, type in the command that was unsuccessful earlier on.

Note: installing requires a gcc package (it's a C compiler). Click here for more details on getting the gcc.
Lacking the GCC generates a different error "No compatible C compiler found".

How To Change Your Keyboard Layout to Dvorak in Solaris

Got this from sinewalker .

Launch terminal by going to Applications>System Tools>Terminal.
Type in "xmodmap /usr/share/xmodmap/xmodmap.dvorak".
 You're done. =)

I'll update this later with a how-to on creating a script or batch file to automate this by autorun or at least make it easy. I'm running Solaris as a VM on a Windows host and I'm not sure if the xmodmap setting is permanent or otherwise.

Wednesday, October 7, 2009

Internet for CHEAP!


I now have 3G internet via Huawei 3G modem! It's a plug and play USB stick that connects via a SIM card.

The Globe tattoo prepaid kit that I bought for PhP800 includes:
Huawei 3G modem (my model is E1552)
Prepaid SIM card (tattoo vanity SIM with sketches on it)
2 crapware CDs! lol

I tried Globe before and it's too unbearably slow at my house so I tried my cousin's Sun Cellular modem and it's fast enough!

So I bought the kit mentioned above, unlocked my modem courtesy of some friends at http://www.pinoymodders.com and subscribed to a SIM card-only account at Sun shop. Lots of advantages like no lock-in period, usable in all networks, mobile, fast (in some areas).

I <3 it!

Have CHEAP internet, will waste my time on the internet.

Thursday, July 30, 2009

Blog Suspended [UPDATED]

I'm temporarily suspending this blog until I get a stable lifestyle. lol

Will be back this September, hopefully. I'll still keep on learning darkstar and eclipse, though. :)

[10.07.09]
UPDATE: Back online! Yey! I'm thinking of changing the title and topic of this blog. The Fanboy Blog will now be known as "Have Internet, Will Program" and will cover anything internet and/or anything programming, especially game programming.

Thursday, July 23, 2009

How to Get the Maven Plugin for Eclipse

Maven is a Java Project Management tool that makes life a lot easier for java developers. You'll need it eventually specially if you are going to try out Project Darkstar development exclusively in Eclipse. To learn more about maven, visit the official website.

This how-to is for the online installation of the Maven plugin for Eclipse, meaning YOU WILL NEED AN ACTIVE INTERNET CONNECTION.

To install it, open Eclipse. Then, go to Help>Install New Software. Click the "Add" button.
Type in anything you want for the Name field... e.g. "maven2"
Paste this onto the Location field: "http://m2eclipse.sonatype.org/update/"
You may also choose to download stable development builds by pasting
"http://m2eclipse.sonatype.org/update-dev"

Wait for a bit while eclipse tries to locate the files needed for download.
When it's done checking, try clicking next.
YOU MAY NOTICE THAT IT CANNOT CONTINUE.
You need to uncheck the components mentioned in the Details - the ones it can't find.
From what I encountered, it was Maven Integration for AJDT and Maven SCM handler for Subclipse.

After this, you only need to click Finish. NOTE that sometimes the Finish Button doesn't become clickable. This is just a minor bug. Just click Cancel and do the whole process again.