October 2007
Monthly Archive
Monthly Archive
Posted by white_b on 23 Oct 2007 | Tagged as: Linux
Some of us have run across situations where we want to be able to keep user-mode programs running in a Linux TTY session, but still want to be able to manage them remotely through SSH or other means.
One solution is the ‘linuxvnc’ utility, which can grab a TTY session and display it for use in a VNC window. I will be covering this utility, as tested on Ubuntu 7.04 Feisty (although it should work for virtually any distro).
For starters, let’s grab linuxvnc from the repositories with apt:
sudo apt-get install linuxvnc
Once that is done, fire it up: (root access is required to grab TTYs)
sudo linuxvnc X
Where ‘X’ is the TTY # you want to grab. linuxvnc should indicate that it’s listening on port 5900.
You can now connect with any VNC client, such as RealVNC, KRDC, or whatever. One thing I’ve noted is that KRDC has trouble with linuxvnc sessions if it attempts to use ‘Tight’ VNC encoding. I would recommend using zlib instead.
Of course if you’re using VNC over the Internet, I strongly recommend tunneling it through SSH. That, however, is a tip for another day.
Posted by walsh_r on 22 Oct 2007 | Tagged as: Media Center, Multimedia, Xbox 360
**Update Visit http://www.ryanwalsh.ca/blog/?p=8 for a new polished tutorial similar to this one, to convert all of your MKV’s to WMV (DTS support included).
Thanks again to Cody Browning for helping many of us come up with this conversion method. His original thread from xbox-scene.com can be found here.
The Xbox 360 was officially released by Microsoft on May 12, 2005, as a 7th generation gaming console, and network ready media center extender. The hardware capabilities of the Xbox 360 make it the best high definition video player on the market for its price. However, the software limitations imposed upon that hardware by Microsoft leave much to be desired by users hoping to to consolidate their living room multimedia equipment into one box. The biggest fall back of those limitations is by far the lacking support for any digital video file support other than WMV. The majority of internet available digital video content is not in WMV format.
The current popular format for internet digital high definition video content is Matroska video (MKV). MKV container files include x264 HD video content (720p, 1080i, and 1080p), along with 5.1 AC3 or DTS audio. The Xbox 360’s software limitations prevent it from being able to display MKV HD video files. This tutorial will demonstrate one method of converting MKV files into WMV-HD video files with 5.1 audio surround sound, using Windows XP or Windows Vista.
Required:
Background:
There are lots of different video codec combinations that can be used to decode MKV files, however, many of these packaged tend to have conflicting versions of video codecs (namely ffdshow) which cause unsatisfactory encodes to WMV-HD (choppiness, image quality, etc). It is my recommendation to uninstall all existing video codecs on the machine which will be used to encode the WMV-HD video, and install only the codecs listed above. Install any other future necessary codecs one at a time, and test encodes to verify that the new codecs have not introduced any problems.
Unfortunately TMPG 4.0 Express is not a free or open source product. I’ve chosen it in my demonstration because of its ease of use, flexibility of encode times/quality settings, and price.
Preparation:

After completing the above steps, you are now ready to convert MKV (x264) to WMV-HD for the Xbox 360.
Posted by walsh_r on 16 Oct 2007 | Tagged as: Databases, Web Design
The creation of a database driven website is very simple in concept; add content to the database, and display the content on pages. The work going on behind the scenes to make this concept function, is not always so simple. There are numerous methods and products that can be used to accomplish different parts of this task, but getting them all to work nicely together can deliver headaches to anyone.
One popular combination often chosen by developers is the use of the PHP scripting language, and MySQL database. Both products are free, open source, cross platform, and have a large base of corporate and personal users.
Getting PHP and MySQL to work nicely with Windows Server 2003 and IIS can be troublesome, mostly due to the many different versions of PHP and MySQL, and the frequency that each product is updated (don’t get me wrong, free updates to products are great, once they are configured and working as expected). After experiencing some problems related to versions myself, I decided to write this tutorial on how to configure an operational MySQL database capable of interacting with PHP, IIS 6.0 on Windows Server 2003.
Required:
Background:
PHP Installation
To test the PHP installation, create a new file in notepad that contains the code below. Save the file as test.php in the root directory of your website.
<?PHP
phpinfo();
?>
Open a web browser from your web server and test http://127.0.0.1/test.php . If PHP is installed correctly, you will get a listing of the PHP configuration.
MySQL Installation
*Remember the password that you assign to the root account! Document the password in a secure, reliable location.
To finish things off, we need to configure PHP to load some MySQL extensions. This will enable the web server, PHP, and MySQL to work together while server content to web pages from the MySQL database.
To test the configuration, create a new file in notepad that contains the code below. Save the file as mysqltest.php in the root directory of your website. Edit the code to replace the root password with the one previously assigned.
<?PHP
//(”server name”,”username”,”password”)
$rst = @mysql_connect(”localhost”,”root”,”insert_password_here”);
if (!$rst){
echo( “<p>Unable to connect to database manager.</p>”);
die(’Could not connect: ‘ . mysql_error());
exit();
} else {
echo(”<p>Successfully Connected to MySQL Database Manager!</p>”);
}
if (! @mysql_select_db(”mysql”) ){
echo( “<p>Unable to connect database…</p>”);
exit();
} else {
echo(”<p>Successfully Connected to Database ‘MYSQL’!</p>”);
}
?>
Open a web browser from your web server and test http://127.0.0.1/mysqltest.php . If everything is configured correctly, your web browser will display Successfully Connected to MySQL Database Manager and Successfully Connected to Database ‘MYSQL’.
The Web Server is now ready to serve PHP web pages and communicate with a MySQL database.
Posted by walsh_r on 12 Oct 2007 | Tagged as: Backups, Encryption
Quite a few people have asked me how to configure a secure means of transferring backup data. This tutorial outlines how to set up a Secure-FTP server using OpenSSH to encrypt the data with Windows 2003 Server, and how to set up a remote location to automatically upload backup data to the Secure-FTP server. The following method will work for any type of data.
Required:
Background:
Our first step is to set up the Windows 2003 Server as a Secure-FTP server by downloading and installing OpenSSH for Windows.
Our second step is to set up Secure-FTP client software at the remote location, and automate the backup job. The steps below outline this process.
The third and final step is to create the text file mentioned above, which will be called upon in the batch file scheduled to run automatically, and upload data from the client to the Secure-FTP server. This is merely an example of what you can do with WINSCP, more detailed documentation can be found on the WINSCP website.
Backup.txt
*Copy and paste the following code into backup.txt
# Automatically answer all prompts negatively not to stall
# the script on errors
option batch on
# Disable overwrite confirmations that conflict with the previous
option confirm off
# Connect using the username and password set up on the Secure-FTP Server, to the address of the Secure-FTP Server
# open user:password@example.com
open username:password@192.168.0.1
# Force binary mode transfer
option transfer binary
# Upload the backup data to current working directory
put c:\example\examplefile.txt
# Disconnect
close
# Exit WinSCP
exit
*End Code, do not copy and paste this line.
The Backup.txt script file is self explanatory. Insert the username and password of the account created on the Secure-FTP Server, and the address of the Secure-FTP Server. Also edit the path near the end of the script, to the local path and file name of the data you wish to upload from the WINSCP client. The script will open WINSCP, connect to the specified Secure-FTP Server, upload the data specified, disconnect, and close WINSCP.