My Personal Blog

A short description about your blog

I've had to play with this every time I reinstall Ubuntu and want to setup a VNC web client which is really handy when I'm work and need to access my PC at home for whatever reason. 

First, make sure you have remote desktop enabled by going to Menu -> System -> Preferences -> Remote Desktop.  Click "Allow other users to view your desktop" and "Allow other users to control your desktop."  For my use, since I VNC into my desktop from remote locations and thus will not be at my desk to accept my own connection, I uncheck "You must confirm each access to this machine" and check "Require the user to enter this password."  Make sure you use a strong password.  Of course, you may need to configure your router to forward incoming communication for ports 5800 and 5900 to your desktop you're wanting to connect into. 

Second, if you do not already have apache installed, install it:

sudo apt-get install apache2

Third, download the tightvnc-java package. I use the latest version at Tightvnc's website rather than the one in Ubuntu's repositories. Download and extract the java Binary *.class and JAR files in Zip archive (or Tar+Gzip) and extract the contents wherever you want.

Finally, open Nautilus as root by hitting Ctrl-F2 and typing gksu nautilus (or if you're a Linux pro, you can use a terminal to copy the contents to /var/www/vnc).  Browse to /var/www and create a folder named vnc.  Copy the contents of the java vnc viewer to /var/www/vnc. Open index.html and replace all the contents with this:

<HTML>
<TITLE>
TightVNC desktop
</TITLE>
<APPLET CODE="VncViewer.class" CODEBASE=classes/ ARCHIVE="VncViewer.jar"
        WIDTH="800" HEIGHT="632">
<PARAM NAME="PORT" VALUE="5900">
<param name="Open New Window" value="yes">
</APPLET>
<BR>
<A href="http://www.tightvnc.com/">TightVNC site</A>
</HTML>

And that should do it.  You can now access it via http://ip.address/vnc or use a dynamic DNS service such s DnsExit to create a domain name that points to your home IP. 

 

 


Tagged in: Untagged 

I found that Joomla's caching feature can cause my server to run out of space quickly unless the admin consistently purges expired cache.  Since Joomla only has a manual mechanism in place to be able to do this, I decided to create a script that can be run by a cron job to handle this for me.

Its quite simple.  First, I load Joomla's framework then simply call the function to purge the cache.

$mainframe = startJoomla();

jimport('joomla.filesystem.folder');
jimport('joomla.filesystem.file');

$cache =& JFactory::getCache('');
$result = $cache->gc();

if ($result) {
    echo 'Expired cache purged.';
} else {
    echo 'Failed to purge expired cache.';
}

function startJoomla()
{
    define('_JEXEC', true);
    define( 'DS', DIRECTORY_SEPARATOR );
    define('JPATH_BASE', dirname(__FILE__) );
    // load joomla libraries
    require_once JPATH_BASE . DS . 'includes' . DS . 'defines.php';
    require_once JPATH_LIBRARIES . DS . 'loader.php';
    jimport('joomla.base.object');
    jimport('joomla.factory');
    jimport('joomla.filter.filterinput');
    jimport('joomla.error.error');
    jimport('joomla.event.dispatcher');
    jimport('joomla.event.plugin');
    jimport('joomla.plugin.helper');
    jimport('joomla.utilities.arrayhelper');
    jimport('joomla.environment.uri');
    jimport('joomla.environment.request');
    jimport('joomla.user.user');
    // JText cannot be loaded with jimport since it's not in a file called text.php but in methods
    JLoader::register('JText', JPATH_BASE . DS . 'libraries' . DS . 'joomla' . DS . 'methods.php');
    JLoader::register('JRoute', JPATH_BASE . DS . 'libraries' . DS . 'joomla' . DS . 'methods.php');

    $mainframe = & JFactory::getApplication('site');
    $GLOBALS['mainframe'] = & $mainframe;
    return $mainframe;
}

I put this code in a file in Joomla's root directory. Then I created a cronjob to have this script ran by PHP every night.  My cronjob looks something like this:

/usr/bin/php /home/username/public_html/purgecache.php

And that's it! Automatic purging.


Tagged in: Untagged 

Well, it never fails that when I upgrade Ubuntu, I run into a few issues.  Gotta love open source. :-)

The issue was with my ATI drivers.  I had initially installed them using ATI's script for the catalyst 10.4 driver which is suppose to have support for Ubuntu 10.04.  But after installing it, every little movement was super choppy and jerky.  So I decided to remove it.  Usually easy enough right?  Just a sudo apt-get remove fglrx and success?  Nope.

Removing fglrx ...
dpkg-divert: mismatch on package
  when removing `diversion of /usr/lib/libGL.so.1.2 to /usr/lib/fglrx/libGL.so.1.2.xlibmesa by fglrx'
  found `diversion of /usr/lib/libGL.so.1.2 to /usr/lib/fglrx/libGL.so.1.2.xlibmesa by xorg-driver-fglrx'
dpkg: error processing fglrx (--purge):
 subprocess installed post-removal script returned error exit status 2
Processing triggers for ureadahead ...
Errors were encountered while processing:
 fglrx

It failed.  After searching for a long time, I finally came across a discreet page that gave me what I needed to make it happen.

sudo dpkg-divert --rename --remove /usr/lib/libGL.so.1.2
sudo dpkg-divert --rename --remove /usr/lib32/libGL.so.1.2 sudo dpkg --force-all --purge fglrx

Success! Afterward, just make sure you reinstall either xorg's open source ATI driver or Ubuntu's fglrx package as you might find yourself in low graphics mode otherwise :-)  You may also need to do

sudo dpkg-reconfigure xserver-xorg

Later...I found this post which helped tremendously as well.


Tagged in: Untagged 

So, my well used WD 160GB portable drive started clicking.  I heavily use it to store my web development files and when the clicks started, I became very nervous.  So, I did a search for a new drive.  Well, as I often do, I impulsively bought the WD My Password SE 1TB drive from Amazon thinking, wow that much space, so portable and decently priced! (It was as much as my 160GB I bought two years ago).  I began nightly backups (wonderful tool rsync is) until my new drive arrived. 

It finally arrived yesterday.  I was so impressed with my slick, little drive with so much data capacity.  I quickly reformatted (to ext3 of course) and synced my files from the old to the new.  Then I had the wake up call.  I picked up the drive to move some cables around and bam, connection was lost and bye bye all unsaved data.  What the crap?  Turns out, the slightest little touch of the cable causes it to lose connection, and I do mean the slightest touch.  Wouldn't mind it so much if this wasn't a portable drive.  Who designed this thing?  They should be fired.


Tagged in: Untagged 

Dear Family and Friends,

A belated Merry Christmas and a Happy New Year to you all!  We hope that 2009 treated you well and that 2010 will be full of new mercies and blessings. 

It’s hard to believe that we have begun our third year in Houston, Texas.  We are far from becoming true “Texans” though.  Thus far, we have resisted buying over-sized vehicles, using phrases such as “fixin to,” calling all non-alcoholic carbonated beverages coke or buying a Republic of Texas flag.  Despite Texas' attempt to indoctrinate Alan with Texas government and history this past spring, we pretty much remain Virginians with one exception.  We've become yellow-bellied when it comes to the weather as we are in jackets when its only seventy degrees!  We can't complain though as seventy degree winters are quite nice.

We celebrated our fifth anniversary this past week which is another hard to believe.  At this rate, we'll be celebrating our 50th before we know it!  There has been some bumps along the way, but each year has truly been more fulfilling than the previous.  We both eagerly look forward to what the Lord has planned for our lives as we grow old together.

Pancho and Felíz are doing quite well.  They are as crack-headed as ever but have been fun and good little companions.  We couldn't imagine life without them.

Last year at this time, things at work were uncertain due to the aftermath of Hurricane Ike.  Alan's department was closed and thus he was transferred into a new department created post Ike.  What was directly caring for patients turned into an eight hour day desk job.  After several months of working behind a desk while locked behind bars, Alan had just about enough.  He finally started to apply to local hospitals closer to home.  By the grace of God, he busted out of prison in March when he accepted a job at a local hospital.  He is now working on a medical/surgical/telemetry floor and loving it.  Not only is it just ten minutes down the road but also a much better working environment with a lot of opportunity. He has already been awarded two bronze pins for patient recognition and is the co-chair for the hospital's Clinical Informatics Committee.  

Eda still loves her job.  It has been a bit of a change in pace this year as the school district decided to change from a block schedule to a seven period schedule.  This year she is teaching several pre-advanced placement courses in Spanish and has been recognized for her talent by being a finalist out of hundreds of teachers for the HEB Teacher Recognition Award.  The highlight of her year has been her role as the advisor to Clear Brook's CRY (Children Rights and You) chapter.  This is a national organization that fights for the rights of children.  Clear Brook's chapter has been involved in several community services including adopting local families to provide Christmas gifts and volunteering at the Boys and Girls Harbor.

Speaking of the Boys and Girls Harbor; we have had a couple opportunities to serve through our church and through CRY.  It is a temporary home for 4-18 year old children whose parents are not able to care for them for whatever reason.  These little guys are full of energy, smiles, and hope despite their dire circumstances.  We wanted so much to pack them all up and bring them home with us.  It is heart breaking knowing that most of them do not have a home to go to for Christmas. If you think of it, please pray for these little guys.  We hope to become more involved with this ministry over this next year.

We pray that God blesses you greatly in 2010 and that He shines His Light upon you.  We love and miss you all!

With Love,


Alan, Eda, Pancho and Felíz.


Tagged in: Untagged 

I'm always on the search for a decent piece of software to help track the time I spend on various coding projects for clients.  Before I found Tasktop, I was already using Mylyn tasks to plan out items I needed to do for various projects.  But I used a timer no my phone, then manually recorded the time into another project tracker such as Zoho Projects, JForce, or Trac.  A pain in the you know what if you know what I mean.  As I usually do when I have had enough with my current method of doing things, I do a google search to see if anything new presents itself.  Well, this time my search led me to Tasktop and I was sold as soon as I tried the trial.

Tasktop is not the perfect solution for me.  The perfect solution is an all-in-one project tracker, invoice and quote manager.  The project trackers above fall short and/or are expensive for small-scale freelancers like myself.  However, Tasktop has solved my time tracking issues and has made it very convenient to code for clients within Eclipse and track billable hours.  And, if I use a supported connector, Tasktop will keep my tasks and time in sync with various project trackers! 

I'm not going to layout all of Tasktop's feature as you can head over to Tasktop.com to see and experience it for yourself.  However I will layout a couple of my favourite features.  

1) I love the feature that opens all the windows you were working on when you deactivated a task.  This makes sure that only windows (editor or built-in browser) that are pertinent to the task are open.  It is such a convenience and a time saver!

2) I live off Google calendar and Tasktop allows syncing tasks as calendar events to my calendar!  It will even display the current events in the bottom left hand corner of Eclipse.  It gives you the option to sync the due date/time and or scheduled date for the task. 

3) Of course my most favourite and the reason I found Tasktop to begin with, is the time tracker capability.  I can add/edit/remove time items to be billed.  The ONLY thing I do not care for and have communicated to Tasktop is the way the "No Task Active Time."  Basically it tracks the time that Eclipse is open but a task is not activated.  However, I'm bouncing back and forth between items for clients and I have not found a way to tell it to divvy out  no task active time between the clients appropriately.  So, I'm forced to just ignore it.  Myabe I'm configuring it wrong, I dunno.  I hope I am and will be enlightened soon ;-)

 

Anyway, Tasktop pro is $99 bucks but for me, it is well worth it.


Tagged in: Untagged 

I like it.  Looks much more professional and not so "bright and bubbly."    I like the label drop down where I can select as many labels as I want by selecting or deselecting the check boxes then clicking Apply.   Rows look more tight as well.  The colors are more tame and appealing.

I was looking forward to themes but I like the new look so much, now I really don't care.

Do you like the new look?  Why or why not?


Tagged in: Untagged 

Dear friends and family,

We hope this letter finds you well.  Last year when I sat down to write this letter, it was on our back porch under sunny skies and 75 degree weather.  Today, I am bundled up in my warmest fleece because its 34 degrees - For Houstonians, that’s cold!  Don’t fret though, they are predicting 72 degrees for Christmas day and we’re OK with that.

I guess we are officially Houstonians since we have been here just over a year now.  Pops helped to start off 2008 with excitement for us.  I got a call from him in the first half of January – he was in the hospital.  He had driven himself there the night before after suffering through five days of abdominal pains.  Turns out it was appendicitis.  They removed it just before his 80th birthday.  Within six weeks he was back to his old self working full time in his shop and as spunky as usual.  We are thankful for God’s healing hand in his life.

For Alan’s birthday in February I decided to kidnap him and take him to Austin to check out the music scene.  I guess I shouldn’t quit my day job since it was brutally cold and we just couldn’t get into the bar hopping, music scene.  Instead we both got nasty colds and spent the weekend running to wal-mart to buy cold medicine.  Happy birthday Alan…

For Spring break we were blessed to have Nana, Sally and Ashley come to spend the week with us.  We took in the Houston Livestock Show and Rodeo.  That was a great cultural adventure for all – Thank goodness Nana and Sally yanked me away from the pooping cow just in time!

The school year ended well and before we knew it our summer travels had begun.  We met up with our dear friends the Hamptons (the elder and younger ones) in San Antonio.  It was great to spend time with all of them and to take in the sights.  Shortly there after we embarked on a two week road trip with the dogs up to Virginia.  Along the way we spent some time in Savannah, GA sightseeing, Wilmington, NC visiting Alan’s little brother Ethan and in Monroe, NC with our friends the Quinns.  The time in Virginia went quickly, but we are thankful for all the friends and family we spent time with.

The big news maker for us has been hurricane Ike.  The school year had barely begun and we were out again for what we thought would be a couple of days for this “minor, category 2” storm.  We took my parents and the dogs and evacuated to San Antonio for a couple of days just to be safe. Thankfully my parent’s home was spared and they had power as soon as we returned.  We lost a tree and power for about a week, but the weather was cool and it was a good time to reflect on God’s goodness and provision. Many others were not so fortunate.  We were out of school for two weeks because there was no power, 39 of our 40 schools were damaged, many students’ homes were uninhabitable and there was simply too much debris for the school buses to move around safely.  The hospital where Alan works was severely damaged.  It took in about four feet of water.  We were very fortunate that he was paid for the time that he could not return to work, and that he still has a job.  Nearly 4,000 employees of that hospital system have lost their jobs.  Again, we see God’s graceful provision in our lives.  Things will not return to normal at that hospital and Alan plans to start the job search in January. All in all it’s been an adventurous and blessed year.  We even got some SNOW here in Houston a couple of weeks ago.  The kids were thrilled to make snow men (even though it required scooping up all the snow on the block).  It was a great way to lift spirits here during the Christmas season. Most of all we are grateful for God’s gift to us in His Son Jesus Christ this Christmas season.  For despite the circumstances of the word around us and the burden of our sins, God gave us redemption and hope by faith in His Son, Jesus, born to us 2,000 years ago.  We pray that you would be able to fully enjoy this most precious gift during the Christmas season.

With love,

Alan, Eda, Pancho and Felíz


Tagged in: Untagged 

I recently came across jFusion, a powerful and revolutionary Joomla component to bridge Joomla with various softwares.  I started testing out its plugin for vBulletin (the forum software used on this site).  After posting some questions, hacks, and suggestions, I offered to help out in developing the vBulletin plugin.  I was soon afterward invited to join the team!  I, along with another gentleman named Haythem, will be maintaining the vBulletin plugin.

 We have already made huge leaps in getting the vBulletin plugin working well with Joomla!  The next release of jFusion (set for December 25th) will include the newly enhanced vBulletin plugin!  But if you can't wait, check out our SVN at http://code.google.com/p/jfusion.


Tagged in: Untagged 

UPDATE 2010 May 23: For Ubuntu 10.04 (Lucid), it is no longer required to download and install the individual 32bit libraries.  Just follow step number 2 and 9-12.

 

I decided to upgrade my version of Eclipse to the latest, 3.4.  I have a 32bit laptop and a 64 bit desktop.  I hate having to maintain two copies of Eclipse so I maintain one 32bit version of Eclipse on my jump drive.  Obviously, this poses some problems with my 64bit desktop.  There a ways to get a 32bit version of Eclipse fully functional on a 64bit OS.  With 3.3, I had no problems doing this.  But with 3.4, I ran into some new issues.  Specifically with getting the Aptana plugin to work properly.  Nothing in the aptana perspective would display and it would crash with errors relating to it not finding a suitable xulrunner.

 This is how I ended up doing it.  I used parts of the how to found here on the Ubuntu forums posted by linuxed.

1)  I downloaded the following packages: 

Eclipse
libnss3-1d 32-bit
xulrunner-1.8 32-bit
libnspr4-0d 32-bit
libstartup-notification0 32-bit
libhunspell-1.1-0 32-bit

2)  Install the following via apt

sudo apt-get install ia32-libs ia32-sun-java6-bin

 3) Create a temporary folder lib32

mkdir lib32

 4) Extract the above packages, then extract data.tar.gz in each of the library packages.  

5) Copy the following files from the corresponding packages' data.tar.gz to the lib32 folder you created

libnss3-1d: usr/lib:

  • libnss3.so.1d
  • libnssutil3.so.1d
  • libsmime3.so.1d
  • libssl3.so.1d

libnss3-1d: usr/lib/nss:

  • libfreebl3.so
  • libnssckbi.so
  • libnssdbm3.so
  • libsoftokn3.so

Copy all the files in usr/lib for  libnspr4-0d, libstartup-notificaton0 and libhunspell-1.1-0

6) Place the entire xulrunner folder in the lib32 folder

7) Place the entire eclipse directory wherever you want to run it from.  For me, it was my jump drive.  For you it may be /opt, /usr/lib32, or whatever.

8)  Copy the entire lib32 directory to /usr/lib32

sudo cp -R lib32/* /usr/lib32/

 9) Create the following file:

sudo gedit /usr/bin/eclipse

 10) Place the following into the file and save it

export PATH=/direct/path/to/eclipse/installation/:/usr/lib/jvm/ia32-java-6-sun/bin:/usr/lib32/:$PATH
export JAVA_HOME=/usr/lib/jvm/ia32-java-6-sun/
export MOZILLA_FIVE_HOME=/usr/lib32/xulrunner/ cd /direct/path/to/eclipse/installation/
./eclipse $*

11) Make it executable

sudo chmod +x /usr/bin/eclipse

 12) Run eclipse from either the application launcher or a terminal

To get Aptana installed and working, do the following

1) Open Eclipse and intall the SDK.  Click Help->Software Updates.  click on the Available Software tab and type in"eclipse sdk." Click on "Eclipse SDK" and then install.

2) Once installed, restart eclipse.  Then go to Window -> Preferences -> General -> Capabilities  and check "Classic Update"

3) Go to Help -> Software Updates -> Find and Install. Select " Search for new features to install" and click next.  Click "New Remote Site" and add "http://update.aptana.com/update/studio/3.2/site.xml"

4) Click Ok then Finish.  Install Aptana.

5) Restart and you should be good to go!

Comment below if you have any questions or run into roadblocks.


Tagged in: Untagged 
«StartPrev1234567NextEnd»