Creating a time-lapse movie using avconv

This note explains how to take a number of still images and combine them into a movie using “avconv”.

This note applies to:

  • Ubuntu 14.04
  • avconv 9.16

Planning

Before starting a time-lapse project, one should consider some constraints. The number of pictures that can be taken by the camera is constrained by the size of the memory card where the camera saves its information. On the other hand, the largest possible number of pictures should be taken, since it provides for a smoother end video.

Therefore, an approximate length of the event to be recorded must be used, in conjunction with the total number of pictures that can be saved to memory, to compute the interval between each picture taken.

Also, one should consider the power needs for the extended duration that the camera is used.

Finally, the memory card used by the camera should be fast enough to record the images at the rate that they will be produced.

Image collection

After all pictures have been taken, one ends up with a large collection of images, generally numbered sequentially by the camera using a special naming convention. For this note, an example is used to demonstrate the process. In this example, about 2300 pictures were taken every two seconds, over a period of 1 hour and 20 minutes. The resulting collection was picture named as follows:

Creating Movie

On Ubuntu, the command-line tool “avconv” can be used to combines still images into a movie. The command required to combine the images from the previous example is:

The parameter “-r 10” sets the number of frames per second on the input stream. This is an important parameter since it influences both the smoothness of the video and its length. The higher the number, the smoother the resulting video. Ideally, the input frame rate should be 25 to 30 frames per seconds for the best smoothness.

However, following our example, at 25 frames per second, the resulting video would be 1.5 minutes long. In our example, we wish to have the resulting movie showing the original event over 4 minutes. Therefore, the input rate is set to 10.

The parameter “-start_number 6796” specifies the number at which the file name sequence starts at. This parameter is used with the input file format parameter “-i IMG_%d.JPG”, where the portion of the name with %d is replaced by a number, to find each image file.

The parameter “-q:v 0” sets the highest output video quality.

The parameter “-s hd1080” is used to sets the output dimensions of the video to high definition.

The parameters “-vcodec libx264” and “-crf 25” are used to set the output CODEC to H.264 and output frame rate. The output frame rate does not affect the length of the movie.

Conclusion

Although there are many factors to consider when making a time-lapse movie, the command-line tool “avconv” is really useful stitch together the video portion of the project. “avconv” is the successor to “ffmpeg”. Both tools are mature and contain a large number of options.

Therefore, use the options above as a starting point and experiment until you reach the desired effect.

Access WebDAV drive over SSL using Basic Auth via Windows 7

This note explains how to use a WebDAV drive using Windows 7. In particular, this note addresses issues that arise when the WebDAV drive enforces SSL, using a self-signed certificate, and basic authentication. All the steps detailed below are performed on a Windows 7 computer where the Web drive is intended to be used.

This note relates to:

  • Windows 7 client
  • WebDAV drive served by Apache 2.2

References:

Adjust Registry

This step is required if the WebDAV drive enforces user authentication using HTTP “Basic Auth”.

Start the program “regedit.exe” using the following steps:

  • Press “Start” button
  • Choose “Run”
  • Enter “regedit.exe” and press enter

In the regedit program, navigate down the tree using the following path: HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Services\WebClient\Parameters

Within the “Parameters” section, set the value of setting “BasicAuthLevel” to 2. The meaning of the values are:

  • 0 – Basic authentication disabled
  • 1 – Basic authentication enabled for SSL shares only
  • 2 or greater – Basic authentication enabled for SSL shares and for non-SSL shares

Close the regedit program.

Reboot Windows.

Import Self-Signed Certificate

This steps imports the WebDAV certificate to the store of trusted certificate. This step is necessary only if the certificate
is self-signed.

Open Internet Explorer as an administrator. Only IE will work for this step (Firefox and Chrome are not helping for this situation).
To open IE as an administrator, press on the “Start” button and find the Internet Explorer entry. Right click on the Internet Explorer entry in the start menu and choose “Run as administrator”.

  • In IE, browse to the site where the WebDAV is stored. It should be a URL that looks like “https://www.mycompany.com/dav/”. If the certificate has not been previously accepted, a dialogue box opens warning the user that the certificate is not trusted. Choose to “Continue to this website (not recommended)”.
  • Once the page of the WebDAV is displayed, the address bar will contain a tab titled “Certificate Error”. Click on this tab and choose “View Certificates”.
  • Click on the “Install Certificate…” button.
  • Choose the option “Place all certificates in the following store” and click on the “Browse…” button
  • Select “Trusted Root Certification Authorities” folder and press “OK” button
  • Click on “Next” and then “Finish”
  • Accept warnings

Once the certificate is installed, IE can be dismissed since it is no longer used.

Mount WedDAV drive

Mount the WebDAV drive using the following steps:

  • Start Windows Explorer (Start > All Programs > Accessories > Windows Explorer)
  • Right-click on “Computer” icon and select “Map Network Drive”
  • Select a letter for your drive
  • Enter the URL for the WebDAV drive (https://www.mycompany.com/dav/) in the field titled “Folder”
  • Select “Connect using different credentials”
  • Press “Finish” button
  • Enter user name and password

At this point, the WebDAV drive should be accessible like any other drive.

Setup development environment for EZ430-F2013 using Eclipse in Ubuntu

This note explains how to set up Eclipse for developing images for the EZ430-F2013. This note assumes that the development environment is set up in Ubuntu 12.10.

This note relates to:

  • Ubuntu 12.10
  • EZ430-F2013
  • msp430-gcc version 4.6.3
  • Eclipse Classic version 4.2.1

References:

Install Command-Line Tools

The installation of command-line tools to support the EZ430-F2013 development kit is covered in a different note. Please refer to the note Use EZ430-F2013 in Ubuntu to complete this step.

Install CDT

In Eclipse, the packages that support C/C++ development are named the C Development Toolkit, or CDT. Portions of the CDT are required to enabled a development environment for the EZ430-F2013:

  • C/C++ Development Tools
  • C/C++ Development Tools SDK
  • C/C++ Debugger Services Framework (DSF) Examples
  • C/C++ GDB Hardware Debugging

To install the CDT, in Eclipse:

Create a C project to use MSP-GCC

Create a C project:

  • “File” > “New” > “Project…” > “C/C++ / C Project”
  • Enter a project name
  • Use default location
  • Project Type: Executable > Empty Project > Linux GCC
  • Press Finish

Set up new project to use MSP-GCC:

  • Right-click on project, select “Properties”
  • Select page “C/C++ Build” > “Settings”
  • Select configuration “[ All configurations ]”
  • Select settings “Tool Settings” > “GCC C Compiler”
    • Command: msp430-gcc -mmcu=msp430f2013
  • Select settings “Tool Settings” > “GCC C Compiler” > “Includes”
    • Add include path: /usr/msp430/include
  • Select settings “Tool Settings” > “GCC C Compiler” > “Optimization”
    • Optimization Level: “Optimize for size (-Os)”
  • Select settings “Tool Settings” > “GCC C Linker”
    • Command: msp430-gcc -mmcu=msp430f2013 -Wl,-Map=${BuildArtifactFileBaseName}.map
  • Select settings “Tool Settings” > “GCC C Linker” > “Libraries”
    • Add library search path: /usr/msp430/lib
  • Select settings “Tool Settings” > “GCC Assembler”
    • Command: msp430-as
  • Select settings “Tool Settings” > “GCC Assembler” > “General”
    • Add include path: /usr/msp430/include
  • Select settings “Build Artifact”
    • Artifact type: “Executable”
    • Artifact extension: “elf”
  • Select settings “Binary Parsers”
    • select “Elf Parser”
  • Press “Apply” and “OK”

Once the project is set up correctly, it should be possible to build an image from source by right-clicking on the project and selecting “Build Project”. In the console, the output of the build should look something like the following:

Set Up Debugger Configuration

To debug the project directly from the IDE, a debugger must be configured. The following steps are used to configure a debugger to use the command-line tool “msp430-gdb”:

  • Select “Run” > “Debug Configuration…”
  • Select “GDB Hardware Debugging”
  • Press the “New” icon
  • Set name
  • Tab “Main”:
    • Project: select project
  • Tab “Debugger”:
    • GDB Command: msp430-gdb
    • Set “Use remote target”
    • JTAG Device: Generic TCP/IP
    • Host name or IP address: localhost
    • Port number: 2000
  • Tab “Startup”:
    • Reset and Delay: 3
    • Set: “Halt”
    • Initialization Commands: “monitor erase”
    • Set: “Load image”
    • Set: “Use project binary”
    • Set: “Load symbols”
    • Set: “Use project binary”
  • Tab “Common”:
    • Save as: “Shared file” (select project)
    • Display in favorite menu: “Debug”
  • Press “Apply”

Running the debugger from the IDE is the equivalent to running “msp430-gdb” at the command-line. It first requires that “mspdebug” runs to bridge to the EZ430-F2013 development kit. This can be perform from a terminal or from an Eclipse run configuration (next section).

To run the debugger, select from the menu “Run” > “Debug Configurations…”, choose the debugger create and press the button “Debug”.

Run MSPDEBUG from Eclipse

It is possible to run “mspdebug” from Eclipse using a run configuration. Here are the steps to set it up:

  • Select “Run” > “External Tools” > “External Tools Configurations…”
  • Right-click on “Program” and select “New”
  • Enter name: MSPDebug
  • Select “Main” tab:
    • Location: /usr/bin/mspdebug
    • Arguments: uif -d /dev/ttyUSB0 gdb

Once set up as an external tool, to run “mspdebug”, select “Run” > “External Tools” > “External Tools Configurations…”, click on the program called “MSPDebug” and press the “Run” button.

Conclusion

There are many short-cuts in Eclipse to run external tools and debug configurations without using the tedious menus. One of these short-cuts are located on the main tool bar. These short-cuts makes it very convenient to start “mspdebug” and “msp430-gdb”. The ability of developing and debugging using the EZ430-F2013 directly from Eclipse greatly reduces the development cycle of an image targeted for the MSP430.

Use EZ430-F2013 in Ubuntu

This note explains how to install the command-line tools in Ubuntu to compile, load and run images destined for the Texas Instrument EZ430-F2013.

The TI EZ430-F2013 is a USB development environment for small dongles that host a TI MSP430 micro-controller (MSP430-F2012 and MSP430-F2013).

This note relates to:

Install Packages

The packages required to work with the MSP430 are available from the main repositories.

Verify Drivers for EZ430-F2013

Insert the EZ430-F2013 in a USB port. Then, run “dmesg” to verify that it was detected correctly:

The output should end with a set of lines that looks as follows:

The report from “dmesg” shows that the development kit was mounted to /dev/ttyUSB0. For the remainder of the note, this value is assumed. However, you might need to adjust this value to fit your particular installation.

Writing a program for MSP430-F2013

Create a new source file.

Paste the following code:

The code above drives the LED found on the MSP430-F2013 to emit “SOS” in Morse code. A number of definitions are already declared in the file “msp430f2013.h”. Many header files relating to the MSP430 can be found in the directory /usr/msp430/include.

Compiling and Linking Program

Compiling and linking programs/images for the MSP430 is done by using “msp430-gcc”, which is a version of “gcc” that targets the MSP430 micro-controller. Most options available for “gcc” are also available for “msp430-gcc”.

Compiling using “msp430-gcc” yields object files, as with “gcc”. However, invoking the linker produces *.elf files, which can be loaded on the MSP430-F2013 via the development kit (EZ430-F2013).

Following the example started above, the two lines required to produce an object file from the source code, and then link into an image:

mspdebug

A command line utility called “mspdebug” is used to perform most operations that involves the EZ430-F2013 development kit.

First, insert the EZ430-F2013 in a USB port and verify that it is mounted to /dev/ttyUSB0 (see steps above).

When invoking “mspdebug”, one must specify the device that the EZ430-F2013 is mounted as.

This command opens a shell where a number of commands can be sent to the development kit. To leave the shell, press CTRL-D.

Loading Image on MSP430-F2013

Loading an image on an instance of MSP430-F2013 via the development kit is accomplished by using “mspdebug”:

where:

  • <device> refers to the device file name where the USB development kit is mounted
  • <elf-file> refers to the ELF file produce by the msp430-gcc linker

Following the example above:

Debugging MSP430

Via the EZ430-F2013, one can debug the program loaded in the MSP430, including single-step execution, via the “gdb” debugger provided by the MSP430 packages. The command-line utility “msp430-gdb” is similar to “gdb” but designed for the MSP430 micro-controller. However, “mspdebug” is needed to bridge “msp430-gdb” to the MSP430 via the EZ430-F2013 development kit.

The command “gdb” within the shell provided by “mspdebug” start a server that listens to commands from “msp430-gdb” and forwards them to the EZ430-F2013 development kit. When “msp430-gdb” connects to “mspdebug”, it provides a shell similar to the one provided by “gdb”.

The command required to start the server is:

In a different terminal, attach the debugger with the following command:

The commands available in “gdb” are also available in “msp430-gdb”:

  • To execute program: continue
  • To stop program: CTRL-C
  • To list stack variables: info locals
  • To list global variables: info variables

To continue the example started above:

Debug using X Debugger: ddd

If X is available, one can use “ddd”, which is a GUI application to simplify the use of gdb.

To use “msp430-gdb” via “ddd”, one must first start “mspdebug” and then invoke “ddd” by specifying “msp430-gdb”. To continue the example in this note:

Conclusion

Using the TI EZ430-F2013 development kit with an Ubuntu platform is a snap since all the tools required are readily available in the main repositories. Furthermore, anyone familiar with gcc and gdb can easily transition to the line of tools designed for the MSP430 since the commands and options are almost the same.

Fix magic for MP4 MSNV in Ubuntu 12.04

In Ubuntu, as in other flavours of Linux, utilities like “file” detect the type of files by using an algorithm based on “magic numbers”. This algorithm looks for fixed fields in the examined file. Lately, some of these utilities have failed in detecting the proper type for some encountered MP-4 files which do not contain the “magic numbers” expected of a MP-4 file.

This note presents a method to update the magic files to detect new file formats. More specifically, the method concentrates on updating the magic files to recognize the new MP-4 format.

This note relates to:

  • Ubuntu 10.04
  • Ubuntu 12.04
  • MP-4 format, major brand MSNV

References:

This note uses a number of examples to illustrate the fix. In these examples, two files are used, a MP-4 file recognized by the file utility named “known.mp4”; and, a MP-4 file not recognized by the utility named “unrecognized.mp4”.

Exploring the problem

For the recognized file, the following sequence is experienced:

As seen above, the format of the file is recognized correctly and the mime-type is return appropriately. Here is the sequence for the file which is not recognized correctly.

In the case of the file which is not recognized, a generic mime-type is returned.

Differences between files

Programs from the FFMPEG or libav projects can be used to find out details of video files. Using avprobe (or ffprobe), it is possible to get details from each file and examined the differences.

By looking at these reports, it becomes evident that although both files are reported as MP-4, they are not reporting the same major brand.

Detailed Differences

The “od” utility can be used to look at the byte information from each files. This information is necessary to craft the magic file needed to recognized the new format.

A different file header is observed from the file that is not recognized:

In the case of the recognized file, the bytes detected are from offset 4 to 11, where “ftypisom” is recognized as belonging to a file of type MP-4. The same bytes in the file not recognized are “ftypMSNV”. The crafting of the magic numbers to recognize this new file type must be based on this latter string.

Updating Magic Numbers

This note does not explain the format of the magic number files. This topic is covered in other pages. See the references above.

In Ubuntu, updating the file /etc/magic with the proper entries is all that is required for the file utility to detect the new types. There is no need to compile the file, as in other versions of Linux. Nor is there a need to perform any reboot.

To edit the magic number file:

The following lines should be added to the magic file:

After the magic number file is update, save and close.

Testing

To test that your changes are working, perform a “file” command on the previously not recognized video file:

If the results above are not observed, then something has gone wrong.

Conclusion

The same problem was encountered on Ubuntu 10.04 and the fix introduced above corrected the problem. I suspect that all intervening versions of Ubuntu between 10.04 and 12.04 suffer the same problem and that the same fix applies.

DD-WRT Router with Multiple Public IP Addresses

This note explains how to add new public IP addresses, in excess of the first static IP address, to the WAN interface of a DD-WRT router. All public addresses are assigned to computers that reside within the LAN network served by the router. Therefore, network address translation (NAT) is performed between the public addresses and the addresses assigned internally. This notes is written after it was successfully performed on:

  • ASUS RT-N16 Wireless Router
  • DD-WRT v24-sp2 (08/07/10) mega (SVN revision 14896)
  • ISP: TekSavvy

References:

When enquiring to receive a new static IP address from my ISP, I found out that a subnet could be leased for a monthly fee. I selected a subnet containing two IP addresses which was assigned to my internet service. The new addresses were communicated using a slash notation: XXX.XXX.XXX.XXX/30.

Although a /30 subnet might suggest that four distinct addresses are available, there are only two. In fact, each subnet contains two addresses that have special meaning: the first, which is the subnet identifier; and, the last, which is the subnet broadcast address. Therefore, the first address available for assignment in a subnet is the one after the subnet identifier. For example, if the assigned subnet was 1.2.3.4/30, then the subnet identifier would be 1.2.3.4, the broadcast address would be 1.2.3.7 and the available addresses would be 1.2.3.5 and 1.2.3.6.

For simplicity in the following examples, we will assume that the assigned subnet is 1.2.3.4/30. Also, it will be assumed that the public address 1.2.3.5 is assigned to a computer that is manually set with the LAN address 192.168.1.40.

Solution

The solution is two-fold. First, assign one of the new public IP addresses to the router’s WAN interface. Then, use firewall rules to route packets to and from the desired computer within the LAN.

Although the solution calls for entering commands through the router’s web interface, I suggest you test those commands by entering them at the command line using a telnet or SSH session to your router. Once this works well, transcribing the commands to the web interface is a good way to save those changes in case the router is rebooted.

Assign Public Address

Using a web browser, open the web interface to your router. This is usually done by directing your browser to an address similar to: 192.168.1.1.

Direct your browser by selecting the “Administration” tab, followed by the “Commands” sub-tab.

In the text box titled “Commands” under “Command Shell”, enter the commands to assign the public address to the WAN interface. Use the example below as a template and substitute the addresses according to your situation:

Once this is entered in the text box, save the changes by pressing the button titled “Save Startup”.

Firewall Rules

To assign the firewall rules, the text box mentioned in the previous step is used. However, when saving the content of the firewall rules, the button titled “Save Firewall” is used instead.

In the firewall rules, one command is used to map the public address to the internal address; one command is used to map the internal address to the public address, and; one command is used to accept each port that should be forwarded.

Use the following template and substitute the appropriate addresses and ports:

The above example forwards HTTP (port 80) and SSH (port 22) requests to the internal computer.

Reboot Reouter

For the changes to take effect, the router must be rebooted. Using the router’s web interface, navigate to “Administration” tab and the “Management” sub-tab. Finally, press the button titled “Reboot Router” at the bottom of the page.

Better Passwords with a Reasonable Effort

In this note, principles of good password creation are offered and discussed. At the end of the note, a process is offered to create passwords that follow the presented principles and require a reasonable mental effort.

Many “easy” tricks are offered over the web. It is up to the reader to analyze those approaches against the principles offered here.

Related topics:

Principles

Characteristics of a good password:

  • a password should be used only once for a given purpose
  • the compromise of one password should not compromise other passwords
  • a password should contain a large amount of entropy

Password used only once:
It is necessary to use a password only once. This is important in case one of your password is compromised. For example, let’s say you have an account with two services (Google and Facebook). If the same password is employed for both services, then an attacker who becomes aware of the password for one service can also access the other service.

Password compromise:
Passwords should not be related in such a way that knowledge of a password for one service reveals passwords for other services. For example, although the following passwords “123google”, “123facebook” and “123amazon” are different, an attacker discovering one would easily guess the others.

Entropy:

Entropy represents the amount of chaos associated with an entity. In the case of passwords, entropy is related to the number of tests an attacker would have to conduct to test all the possible passwords.

For example, if a bike lock was made of 4 numbers ranging from 1 to 8, then the total number of possible combinations would be 8 * 8 * 8 * 8 = 4096 combinations. Therefore, an attacker without knowledge of the proper combination would have to try at most 4096 different combinations to unlock the bike.

Entropy is expressed in the number of bits required to hold the total number of combinations. In the bike lock example, 4096 can be expressed in a value with 12 bits. This can be verified since 2 to the power of 12 is 4096. Each rotating wheel in the bike lock contribute 3 bits of entropy since each wheel can have 8 different position (2 ^ 3 = 8). If the same lock had only three wheels, the lock would provide only a total of 9 bits of entropy.

In the bike example, if each wheel could occupy 10 positions, instead of 8, then each wheel would provide 3.32 bits of entropy (2 ^ 3.32 = 10) and a bike lock made of four of those wheels would provide a total of 13.3 bits. Indeed, the lock provides 10 000 different combinations, which is 2 ^ 13.3.

What needs to be remembered from this exercise are the following concepts:

  • each position in a lock provides an amount of entropy
  • the larger number of combinations in a position means a larger amount of entropy
  • the total amount of entropy provided by a lock is the sum of entropy provided by each independent position in the lock

Passwords are similar to Bike Locks

A password is similar to a bike lock where each character in the password represents a mechanical wheel that can take a number of different values.

If a password is made only of lowercase letter (26 values), then each character is worth 4.7 bits of entropy.
If a password is made of lower and upper case letters (52 values), then each character is worth 5.7 bits of entropy.
If a password is made of lower and upper case letters, along with numbers and special characters (72 values), then each character is worth 6.2 bits of entropy.

To be safe, a password should have at least 64 bits of entropy. A great password should have 128 bits of entropy.

A question easily comes to mind: should each password be at least 11 characters? The answer is yes. Continue reading, a trick is given below on how to create long passwords and easily remember them.

Entropy Revisited

Astute readers might offer a password made out of words such as:

OrangeApple

There are 11 characters in this password. Since characters range in lower and upper cases, then each character offers 5.7 bits of entropy, which would mean 62.7 bits of entropy, right? No. If a password is made out of words, then the characters are related and not independently random. Therefore, an attacker trying words and not characters might find the password in a smaller amount of tries.

There are 171,476 English words in current use (between 17 and 18 bits of entropy for each word), so OrangeApple is worth only 34 bits of entropy, not 62.7.

Password Principles Restated

Characteristics of a good password:

  • a password should be used only once for a given purpose
  • the compromise of one password should not compromise other passwords
  • a password should contain a large amount of entropy (minimum 64 bits, better if 128 bits and above):
    • many characters in the password
    • varied characters (lower and upper cases, numbers, special characters)
    • unrelated characters (avoid whole words)

Mental Approach to Creating Better Passwords

Create passwords by combining the following tricks:

  • high entropy constant reused between all passwords to provide a minimum amount of entropy
  • add a variable component based on the context the password is used
  • use a mental transformation known only to you

Constant Component
Create a long string of seemingly random characters by using a saying you want to repeat yourself. Use a phrase that means something to you. Make it a message that will improve your life, since you will type it all the time. For example:

RoYoTiEv8Ki!

The above string of characters can easily be remembered if one uses the phrase: “Rotate Your Tires Every 8000 Kilometers!”. This component yields approximately 72 bits of entropy.

Variable component
This is the easiest part. The variable component should be based on the context in which the password is used. If this is a password for Google, then the variable part could be “google”. If the password is used to unlock your laptop, then the variable part could be “laptop”. The variable component should be easy for the password owner to recall from the context in which the password is used.

Mental Transformation
The aim of the mental transformation is to hide the variable part from a potential attacker. Continuing the examples above:

Password for Facebook: AfRoYoTiEv8Ki!cebook

Password for Google: OgRoYoTiEv8Ki!ogle

In these examples, the mental transformation consists of:

  • taking the first two letters of the variable component, reversing them and putting them in front of the constant component; and,
  • taking the remainder of the variable component and appending after the constant component.

In these examples, the entropy provided by the password is always at least 72 bits. The approach follows the presented password principles and, with a bit of practice, requires little mental effort.

Each reader should find for himself/herself a suitable mental transformation which is personal and original.

How to force 32-bit installation via WUBI

This note relates to WUBI for Ubuntu 10.04.

Reference: Can I force Wubi to download and install a 32 bit version of Ubuntu?

On machines that feature a 64-bit processor and not much memory (less than 1GB), it might be beneficial to install a 32-bit version of Ubuntu as opposed to a 64-bit version. This reason is that the performance price in processing is probably less than the performance price in swapping due to restricted memory. 64-bit versions of kernels and applications tend to use more memory than their 32-bit counterparts.

WUBI detects the computer configuration and selects the most appropriate version of Ubuntu. On a machine equipped with a 64-bit processor, it generally elects to use a 64-bit version of Ubuntu.

To force WUBI to use a 32-bit version of Ubuntu, use the “–32bit” command line option. Instead of starting WUBI via its icon, open a command-line prompt and run:

Continue the remainder of the installation as usual.

GWT apps using Maven and Eclipse

Used to be that getting a GWT project together using Maven and Eclipse was a tedious and frustrating task. Times have changed so that the process is quite a bit easier.

Uses:
openjdk-6-jdk
Eclipse 3.5
Google plugin for Eclipse 1.32 http://code.google.com/intl/en/eclipse/
gwt-maven-plugin 1.2 http://mojo.codehaus.org/gwt-maven-plugin/
Maven plugin for Eclipse 0.10.0 http://m2eclipse.sonatype.org/

Install the Google plugin for Eclipse into eclipse specifying the update site url http://dl.google.com/eclipse/plugin/3.5 through Eclipse’s Help->Install New Software->Add… and specify the url

If you have a previous version of the m2 plugin you will need to uninstall it as the 0.10.0 version will not upgrade properly otherwise. Install the Maven plugin.

From Eclipse, create a new Maven project:
File->New->Other->Maven->Maven Project

Do not check Create a simple project as we want to do archetype selection, but fill the rest in as you see fit then click Next.

Select either Nexus Indexer or All Catalogs as the catalog, then scroll down the list looking for a Group Id of org.codehaus.mojo with an Artifact Id of gwt-maven-plugin and choose the highest version (1.2 at this time) then click Next.

Fill in your Group Id and your Artifact Id and the rest of the fields and click Finish.

The next set of the instructions are mostly from http://code.google.com/intl/en/eclipse/docs/faq.html#gwt_with_maven.

In Eclipse, select your project then choose Project->Properties->Google->Web Toolkit and click Use Google Web Toolkit.

Then click on Web Application (Project->Properties->Google->Web Application and change the War Directory to src/main/webapp and uncheck Launch and deploy from this directory then click OK.

Open the pom.xml file under your project and check some Properties values. You want gwt-version to be 2.0.3 and maven.compiler.source and maven.compiler.source to be 1.6.

Right click on your project and select Run As->Maven Clean, then Run As->Maven Package.

Right-click your project and select Run As->Web Application. The first time you do this, you’ll have to select the location of the exploded WAR directory (by default it should be /target/).

If everything works out fine, you are now running in hosted mode. Click on the Development Mode view tab down where the Console tab is and copy and paste the URL shown there into a browser to see your app running.

GWT development/hosted mode is now running out of the WAR directory created by Maven. You can step through and debug your code as usual. If you make changes, it is sometimes possible to have your running application reflect those changes without restarting your debugging session:

  • If you change client-side code, just click Refresh in your browser.
  • To have server-side code changes reflected, your project’s build output path must be set to /target//WEB-INF/classes (Project properties > Java Build Path > Source > Default output folder). Then, when you change a server-side class click the Reload web server button in the Development Mode view.
  • If you change resource or configuration files in your WAR directory (HTML, JSP, CSS, etc.), you’ll have to terminate the launch configuration, run mvn clean package, and then launch again.

Free Remote PC Control software

Extracted from a Slashdot article.

http://www.teamviewer.com/ [teamviewer.com]

https://secure.logmein.com/products/free/ [logmein.com]

http://www.copilot.com/ [copilot.com]

http://skype.com/ [skype.com]

http://www.uvnc.com/addons/singleclick.html [uvnc.com] (reverse VNC)

http://www.crossloop.com/ [crossloop.com]

http://www.mikogo.com/en/ [mikogo.com]

http://showmypc.com/ [showmypc.com]

https://www.ntrconnect.com/ [ntrconnect.com]

http://www.zolved.com/remote_control [zolved.com]

http://www.wippien.com/ [wippien.com] (VPN)

http://code.google.com/p/gitso/ [google.com] (reverse VNC)