February 26, 2009

Networking Services…IPv6 and a Corrupt Database

Posted in How-to, Software, Windows tagged , , , , , , at 1:35 am by Joshua

All I wanted to do is install the Peer to Peer Networking Service for Windows XP.  A process I have done many times.  For some reason I have never installed it on my home computer (which has Windows Media Center Edition 2005), I guess because I usually use that computer to play games, rather than work ( I have a laptop which I use for developing), but have found myself doing more work on it after I got my new 22″ screen.

1st Problem:

I tried to install Peer to Peer Networking Service through the settings: Control Panel->Add or Remove Programs -> Add/Remove Windows Components ->Networking Services-> ‘Click’ Details-> Check off Peer to Peer.  I clicked ‘OK’ and it starts installing, only to stop half with the error ‘extended error has occured.

Great.  There always seems to be a problem when I try to do something simple.  So, after doing some research, I learned that  Peer to Peer Networking relies upon IPv6, which for some reason I didn’t have installed.  Another reason could have been that I exceeded the number of connections, where XP Pro only has 10, and XP Home has 5.  But I went with the IPv6 solution, especially since when checked in the Properties of my Network Connection, it did not come up.
Reference: http://www.neowin.net/forum/index.php?showtopic=541890

2nd Problem:

I went into  Control Panel -> Network and Internet Connections -> Network Connections ->Right Click on any of the Connections and go to ‘Properties’ -> Click ‘Install’ -> Select ‘Protocol’ -> Click ‘Add’ -> Select ‘IPv6′ -> and Click ‘OK’.  It should have installed, but didn’t, once again I got ‘extended error has occured.
An easy way to install IPv6 is to open up the Command Prompt and type:

C:\>netsh interface ipv6 install

Unfortunately I got the same error on the Command Prompt as well.  Which lead me to believe that at least I was on the right track on finding my error, since the message was the same, maybe a single fix will solve both problems.

Solution:

First to fix the error, open the Command Prompt and enter:

C:\>esentutl /p %windir%\security\Database\secedit.sdb

Reference: http://www.howtofixcomputers.com/forums/xp-networking/unable-install-microsoft-tcp-ip-version-6-protocol-111993.html#post478762

This will basically open and run a Windows Database Utility program to repair (what seems to be) a Windows security database.  What bothers me is that I don’t know how this error happened.  The feedback that I got was:

The database is not up-to-date. This operation may find that this database is corrupt because data from the log files has yet to be placed in the database.

Why is it not up-to-date? and why were the log files on placed in the database? It could be from a previous bad shut down, or something.  Either way, this opertation will fix the database, but recommend that you run the ‘Recovery’ operation.  I did not.

Next rerun the IPv6 command, either from Command Prompt, or from the Network Connection properties.  If you run from the Command Prompt, you should get in nice ‘Ok’ when the operation has completed successfully.  Finally going back to my original issue, installing the Peer to Peer Networking Service, attempt to install it.  In my case success!  Worked like a charm.

…now stop EXTENDING MY ERRORS!!!

February 24, 2009

XRap on Sourceforge!

Posted in Open Source, Software, XRap tagged , , at 4:28 pm by Joshua

I needed some more space for storing each version of XRap, as I ran out of space on my previous account and had to take down some older releases to make room for the newer.  I am pretty sure some of you have noticed some dead links.  My solution, open up an account at Sourceforge, and start posting all my code and releases there.  There was a ton of options, and setup procedures to endure, but I guess if you want people to find your work, and understand what it does then you must.  I have updated all the deadlinks to point to the XRap download page on Sourceforge.  I hope to document more of the work and changes that I put into XRap on Sourceforge, and I will continue posting How-to’s on what I have been learning on my blog.

February 2, 2009

Dissecting the Linux Filesystem Hierarchy Standard

Posted in Open Source, Software, XRap tagged , , , , at 7:38 pm by Joshua

While trying to figure out where and how I am going to install XULRunner apps on to a Linux system, I realized a little nugget of information which I did not know (or forgot).  Where do file go when an application is installed under a Linux system?

After some searching around, I actually found that the majority of Linux distributions follow the Filesystem Hierarchy Standard (FHS).  Here is a breakdown of the structure:

Directory Description
/ Root Directory of the entire file system
/bin/ Command Binaries available to the user
/boot/ Boot Loader files
/dev/ Device Files
/etc/ Host Specific configuration files
/home/ User home directory
/lib/ Essential libraries for binaries in /bin and /sbin
/media/ Mount point for removable media
/mnt/ Mount point for temporarily mounted file systems
/opt/ Add-on Application software packages
/proc/ Documents kernel and process status as text files
/root/ Home directory for the root user
/sbin/ System binaries
/srv/ Data for services provided by the system
/tmp/ Temporary storage
/usr/ Contains the majority of user utilities and applications
/var/ Variable Files, Logs, Spool files, and temporary e-mail files

The standard is quite lengthy, with many critical and optional subdirectories, so I suggest you figure out what directory you are curious about, by narrowing it down by the above table, or checking out Filesystem Hierarchy Standard on Wikipedia, and then dive into the standard, here.

My install destination: /usr/share/

Update!

According to XULRunner documentation, XR apps are installed to /usr/lib/vendor/applicationName.  Which means that the app would be considered a library in reference to a binary in the /usr/bin/.

November 25, 2008

Triple Web Threat

Posted in Open Source, Software tagged , at 6:08 pm by Joshua

While it may not be very interesting to the average Internet user, Lunascape may intrigue many web developers.  Basically its a Web Browser capable of changing its web-rendering engine to any of the big three right now, Trident (Internet Explorer), Gecko (Firefox), or Web Kit (Safari/Chrome).3engine According to its website, its using a optimized version of Gecko which making it the fastest web browser, among the other 4.  Currently I’m addicted to Google Chrome, mainly for the minimalist design, and it’s speed, and from some of the screen shots I’ve seen, Lunascape seems very cluttered, and a lot like IE.  It is only in alpha release though, so I’m hoping that something will be done to their UI.  There are other features to it, such as Tabs, Mouse Gesturing, RSS and Blog Information, Podcasting, Skins, Security Manager, and Plug-ins.

I can’t really see the average Internet user having any need to change their “web-rendering engine”, and most of its features are pretty standard in the other more established browsers, however the Web developers can go crazy, they now have one tool to test them all.

November 5, 2008

Installing PHPUnit on Ubuntu 8.04

Posted in How-to, Programming, Software tagged , , , at 2:13 pm by Joshua

  1. You need to get the latest release of PHP

    $sudo apt-get install php5

  2. To get PHPUnit you need to get the PEAR installer, which is part of PHP

    $sudo apt-get install php-pear

  3. Once you have PEAR installed you must register the PEAR channel with the PEAR environment

    $sudo pear channel-discover pear.phpunit.de

  4. The and the last step is to get and install PHPUnit

    $sudo pear install phpunit/PHPUnit

Good luck!

October 24, 2008

Update: XRap 0.1 for Windows Release

Posted in Open Source, Software tagged , , , , , at 3:05 am by Joshua

I’ve been working hard at cleaning up my code, getting the directories to work in XML, and cleaning up my code generator so that WiX would accept it.

So far this is what XRap can do:

  • Takes a correctly structured XULRunner application, with the XULRunner runtime directory in the application directory, and create a .wxs WiX file
  • Gets the application name and vendor from the application.ini file, where Vendor will represent the directory to be installed in the ‘Program Files’ directory, and the Name will be a sub-directory of the vendor
  • Create an executable (appname.exe) in the application directory, using the xulrunner-stub.exe found in the xulrunner runtime directory
  • WiX then takes the .wxs and compiles it using a program called Candle, if successful it will create a .wixobj
  • WiX take the compiled .wixobj file and links it using Light, which if successful will create the msi
  • When the msi is run, it will automatically install the application to the end-users ‘Program Files’ folder, add a shortcut to the executable (appname.exe) in the Start menu, and adds the application to the Add/Remove Programs list

What XRap needs from the developer:

  • Unzip XRap to a useful location
  • XulRunner Runtime in a directory within the application directory
  • The application directory and XRap.exe (and its unzipped files) are in the same folder
  • All files must have an extension (in the XulRunner Runtime main directory there is a file called Licence which needs the extension .txt added to it.  I’m going to try an resolve this issue)
  • The XulRunner application works using -> C:\appName>xulrunner.exe application.ini
  • Run XRap using the command -> C:\>XRap.exe AppDirectory
    • where AppDirectory is the directory of the application
Starting XRap

Starting XRap

I’m working on the WiX UI installer, which will allow the end-user to select what type of installation (Typical, Full, or Custom), allows the user to select the location of the installation, show the licence the software is applied to, and just provide the user more information about the installation.  I’m trying to make amount of work from the developer minimal, but it seems like for the UI installer to work I will need some input from the developer.

XRap Completed

XRap Completed

Source File Download

XRap.zip Download

September 16, 2008

Mozilla Developer Days

Posted in Open Source, Software tagged , , , , , , at 9:23 pm by Joshua

This week I’ve had the pleasure of attending the Mozilla Developer Days here in Toronto.  I have never attended an event like this, and I must say that it was quite an interesting experience.  There were developers from as far away as Germany who came to talk about Mozilla and their products.  

After the introductions, we were given a brief overview of some of the technologies and case studies under development at Mozilla, most of which I have never heard of before, and I had to do a little research to findout a little more.

XUL (XML User Interface Language) – is an XML markup language which relys on CSS, JavaScript and the DOM for creating Mozilla applications and extensions

XULRunner – Is the runtime environment used by XUL applications.  

Fennec – A mobile version of Firefox currently in development.

SVG (Scalable Vector Graphics) – is an XML based standard for rendering graphics in a browser, offering anti-aliasing, filter-effects, pattern fills, gradient fills and animations.

After the discussion on the projects we were introduced to some of the faces at Mozilla, the first of whom was Stephen Lau who was working on Songbird, which is an open-source cross platform media player, which has the ability to be completely customized through extensions and add-ons.  His demo showed off some of the great work he is creating using XULRunner, he used CSS for the color theme and layout, and it was amazing to see all the data Songbird is pulling from the Web.  However my inital reaction when the Songbird app first opened, was how similar it looked to Apple’s iTunes, I’m hoping that the layout is adjusted before it is released.

Next was Jono DiCarlo who began showing off Ubiquity, which I was actually foundout about last week. He actually gave a lot more backgound on the inner workings of Ubiquity, and the direction they are trying to take it, as well as some of the difficulties they are having.  I am very excited about this project, but it does sound like they are a while from release.

After we had a short Q&A and had a chance to talk to some of the developers about Mozilla and their technologies.  Unfortunately I had to leave during the lunch break to go to work, I really wanted to go into the Desktop track to learn more about their applications and extensions, and hopefully see more about XULRunner, I guess i’ll have to check out the videos

See the Presentations

September 11, 2008

Ubiquity!

Posted in Open Source, Software tagged , , at 8:33 pm by Joshua

This week I was introduced to Ubiquity, a very cool Firefox extension currently in the alpha release.  By cool, i mean that this little app potentially has the ability to bring together and combine the most relevent parts of the Web for you and your needs.  Currently there seems to be about 20 commands built-in to the current build, however there are a ton more which have been created by other users. Once the extension has been installed (which can be found here), pressing <CTRL>+<SPACE> will activate Ubiquity.  You don’t even need to know any commands to start, by typing a search term will instantly hit you back with results from Google, scrolling down will give you results from Wikipedia, IMDB, and Yahoo.  Highlighting and address on a Web page, and typing the command ‘map’ in Ubiquity, will return a fully interactive map from Google Maps, with the option to directly insert that map into an email or webpage.

Key to the development of the extension, is how incredibly easy it is to get started in creating new commands, it took me about 30-45 minutes to get through the Author Tutorial, and another 6 minutes to watch the introduction video.

After writing the ‘Hello-world’ program in the tutorial and going through the code of the examples, I was stuck, I didn’t know what command I could create.  So I decided to check my Gmail for any messages I may have neglected to read, but wait, there is a “Search Mail” button at the top, I could create a command to search my Email!

CmdUtils.CreateCommand({
name: “inbox-search”,
author: {name:”Joshua Doodnauth”},
licence: “GPL”,
description: “Searches the Users Gmail Inbox”,
help: “User must be logged on”,
takes: {“inbox-search”: noun_arb_text},
preview: function(pblock, theSearch) {
pblock.innerHTML = “Gmail Search: ” + theSearch.text;
},
execute: function( theSearch ) {
Utils.openUrlInBrowser(“http://mail.google.com/mail/?hl=en&shva=1#search/”+theSearch.text);
}
})

SIMPLE! Basically the ‘takes:’ function tells the user how to activate the command, the ‘preview:’ function will show how the command takes its input, and depending on what your it may return some result from the input command. The ‘execute’ function is where you run your command, which will usually execute in a new window.  All I did is use ‘inbox-search’ to activate the command, take the user’s input after the command as the search term, and inject it into the Gmail Search URL.  The only problem, is that obviosly the user will need a Gmail account, and will have to be logged in at the time.  In light of the login problem, I took the same idea of searching to somewhere the user doesn’t need an account, Google Image Search.

CmdUtils.CreateCommand({
name: “image-search”,
author: {name:”Joshua Doodnauth”, email:”jsdoodnauth@gmail.com”},
licence: “GPL”,
description: “Searches for images on Google”,
takes: {“image-search”: noun_arb_text},
preview: function(pblock, imSearch) {
pblock.innerHTML = “Google Image Search: ” + imSearch.text +” <br /><img src=’http://www.google.ca/intl/en_ALL/images/images_hp.gif’ width=’150′ />”;
},
execute: function(imSearch) {
var URL = “http://images.google.ca/images?gbv=2&hl=en&safe=on&q={QUERY}&btnG=Search+Images”;
var query = imSearch.text;
var searchStr = URL.replace(“{QUERY}”,query);
Utils.openUrlInBrowser(searchStr);
}
})

Almost identical, in the execute function I separated the search query from being directly inserted into the URL, and put the query into a variable. What I really wanted, was to return a preview of 5-8 images, but I need to find someone who can help me.  So for now I just put up the Google Image Search logo.

Ubiquity is a great extension, with many possibilities, and I will definiately keep my eye on where this project is going

Follow

Get every new post delivered to your Inbox.