Tuesday, September 2, 2014

TF CLC pending changes look abhorrent

I keep wondering who does this look readable to ? Isn't there too much information duplication here ? What's wrong with the existing .diff format ? Why invent a new standard ? Merely creating a new  standard won't do !! you have to make it work for the users !!

Microsoft seems to be in perpetual denial about it's rock stardom, like a high school teenager, it seems to think people will call it cool just because it is going against the norm. No ! going against the norm is not the only criterion . Making it better than the norm is what makes it cool. Wheather it goes against the norm or it extends and furthers the norm is immaterial to the user. 

$/Cobalt Search/Development/CobaltPlatformSearch
.checkstyleConfig.xml                                                                                       edit   C:\Users\uc180375\workspaces\search\CobaltPlatformSearch\.checkstyleConfig.xml
.tfignore                                                                                                   add    C:\Users\uc180375\workspaces\search\CobaltPlatformSearch\.tfignore
.tpignore                                                                                                   edit   C:\Users\uc180375\workspaces\search\CobaltPlatformSearch\.tpignore
gradle.properties                                                                                           add    C:\Users\uc180375\workspaces\search\CobaltPlatformSearch\gradle.properties
ivy.xml                                                                                                     edit   C:\Users\uc180375\workspaces\search\CobaltPlatformSearch\ivy.xml

$/Cobalt Search/Development/CobaltPlatformSearch/ant
deploy.xml                                                                                                  edit   C:\Users\uc180375\workspaces\search\CobaltPlatformSearch\ant\deploy.xml

$/Cobalt Search/Development/CobaltPlatformSearch/config
spring-imports.xml                                                                                          edit   C:\Users\uc180375\workspaces\search\CobaltPlatformSearch\config\spring-imports.xml

Attaching the image below to show the actual command line output. 






What's wrong with something simpler, shouldn't brief be simple ? - for removed files, + for added files, * for edited files.



-  C:\Users\uc180375\workspaces\search\CobaltPlatformSearch\.checkstyleConfig.xml
+ C:\Users\uc180375\workspaces\search\CobaltPlatformSearch\.tfignore
C:\Users\uc180375\workspaces\search\CobaltPlatformSearch\.tpignore
+ C:\Users\uc180375\workspaces\search\CobaltPlatformSearch\gradle.properties
C:\Users\uc180375\workspaces\search\CobaltPlatformSearch\ivy.xml
C:\Users\uc180375\workspaces\search\CobaltPlatformSearch\ant\deploy.xml
* C:\Users\uc180375\workspaces\search\CobaltPlatformSearch\config\spring-imports.xml



Shell Script that will clean this mess


#!/bin/bash

tf status -login\:domain\\user,pass -workspace:workspace -format:brief > ~/tmp

# Change windows CRLF to Unix
sed -i 's/\r//' ~/tmp

# Remove first two lines, they are table header.
sed 1,2d ~/tmp >~/tmp1
mv ~/tmp1 ~/tmp 

# Remove all the lines starting with "$/" those lines show the directory on TFS server.
awk '!/^\$\//' ~/tmp > ~/tmp1
mv ~/tmp1 ~/tmp 

# Remove empty lines
awk 'NF > 0' ~/tmp > ~/tmp1
mv ~/tmp1 ~/tmp
 

##sed 's/[\/t]*[ ]*add//'
##sed -n 's/.*add -t //p' ~/tmp

#awk '/add|edit/+ {print $NF}' ~/tmp > ~/tmp1
awk '{print substr($0, index($0, $2))}'  ~/tmp > ~/tmp1
mv ~/tmp1 ~/tmp

STATUS_OUTPUT=`cat ~/tmp` 
rm ~/tmp

echo "$STATUS_OUTPUT"

Monday, March 24, 2014

org.springframework.data.mapping.PropertyReferenceException: No property change found for type

Caused by: org.springframework.data.mapping.PropertyReferenceException: No property change found for type Login!
at org.springframework.data.mapping.PropertyPath.<init>(PropertyPath.java:75)
at org.springframework.data.mapping.PropertyPath.create(PropertyPath.java:327)
at org.springframework.data.mapping.PropertyPath.create(PropertyPath.java:359)
at org.springframework.data.mapping.PropertyPath.create(PropertyPath.java:307)
at org.springframework.data.mapping.PropertyPath.from(PropertyPath.java:270)
at org.springframework.data.mapping.PropertyPath.from(PropertyPath.java:241)
at org.springframework.data.repository.query.parser.Part.<init>(Part.java:76)
at org.springframework.data.repository.query.parser.PartTree$OrPart.<init>(PartTree.java:201)
at org.springframework.data.repository.query.parser.PartTree$Predicate.buildTree(PartTree.java:291)
at org.springframework.data.repository.query.parser.PartTree$Predicate.<init>(PartTree.java:271)
at org.springframework.data.repository.query.parser.PartTree.<init>(PartTree.java:80)
at org.springframework.data.jpa.repository.query.PartTreeJpaQuery.<init>(PartTreeJpaQuery.java:57)
at org.springframework.data.jpa.repository.query.JpaQueryLookupStrategy$CreateQueryLookupStrategy.resolveQuery(JpaQueryLookupStrategy.java:91)
at org.springframework.data.jpa.repository.query.JpaQueryLookupStrategy$CreateIfNotFoundQueryLookupStrategy.resolveQuery(JpaQueryLookupStrategy.java:162)
at org.springframework.data.jpa.repository.query.JpaQueryLookupStrategy$AbstractQueryLookupStrategy.resolveQuery(JpaQueryLookupStrategy.java:69)
at org.springframework.data.repository.core.support.RepositoryFactorySupport$QueryExecutorMethodInterceptor.<init>(RepositoryFactorySupport.java:304)
at org.springframework.data.repository.core.support.RepositoryFactorySupport.getRepository(RepositoryFactorySupport.java:161)
at org.springframework.data.repository.core.support.RepositoryFactoryBeanSupport.initAndReturn(RepositoryFactoryBeanSupport.java:224)
at org.springframework.data.repository.core.support.RepositoryFactoryBeanSupport.afterPropertiesSet(RepositoryFactoryBeanSupport.java:210)
at org.springframework.data.jpa.repository.support.JpaRepositoryFactoryBean.afterPropertiesSet(JpaRepositoryFactoryBean.java:84)
at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.invokeInitMethods(AbstractAutowireCapableBeanFactory.java:1571)
at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.initializeBean(AbstractAutowireCapableBeanFactory.java:1509)
... 51 more
null
null


The exception above is caused by Named Queries whose names are not properly namespaced.


@NamedQueries({
@NamedQuery(
name = "Login.findLogins",
query = "SELECT login FROM Login login WHERE login.login = :login"
),
@NamedQuery(
name = "Login.changePassword",
query = "Some query"
)})

Saturday, October 19, 2013

Basic web application with SBT for Netbeans from scratch

If you haven't read my previous post SBT application for Netbeans from scratch, you will find it helpful to read it.
This post will illustrate how to create a webapplication from scratch. We will assume some knowledge of setting up a basic scala application with sbt. We won't be creating any scala code. Instead we will try to render a basic index.html page.
  • Create a project directory and name it what you want. cd into the project directory.
  • Create the following directories
mkdir -p src/main/resources src/main/scala src/main/webapp src/main/webapp/WEB-INF src/main/webapp/META-INF src/test/scala src/test/resources project

Application build, dependencies, plugins setup

  • Create build.sbt inside the project root directory and copy the text below into the file.
 name := "scalatra-sbt-1"

 version := "1.0"

 scalaVersion := "2.10.2"

 sbtVersion := "0.12.4"

 seq(webSettings :_*)

 libraryDependencies ++= Seq(
    "ch.qos.logback" % "logback-classic" % "1.0.6" % "runtime",
    "org.mortbay.jetty" % "jetty" % "6.1.22" % "container"
  )
Make sure that each setting is separated by an empty line.
  • Create a new file inside the project directory and name it build.properties. Copy the text below into the build.properties file.
sbt.version=0.12.4
  • Create another file plugins.sbt inside the project directory. Copy the text blow into that file.
// you can also add multiple repositories at the same time
resolvers ++= Seq(
  "Scala Tools Releases" at "http://scala-tools.org/repo-releases/",
  "Java.net Maven2 Repository" at "http://download.java.net/maven/2/"
)

addSbtPlugin("com.earldouglas" % "xsbt-web-plugin" % "0.4.2")

addSbtPlugin("com.mojolly.scalate" % "xsbt-scalate-generator" % "0.4.2")

addSbtPlugin("org.scalatra.sbt" % "scalatra-sbt" % "0.3.2")

addSbtPlugin( "org.netbeans.nbsbt" % "nbsbt-plugin" % "1.0.2" )
Once again, make sure each sbt task above is followed by an empty line, other wise sbt will complain.

web application setup

  • Create a new file src/main/webapp/index.html and copy the following text into it.
<html>
   <head>
      <title> First Scala WebApp</title>
   </head>
   <body>
      <h1>Hello, world from Scala webapp</h1>
   </body>
</html>
  • Create a new file src/main/webapp/WEB-INF/web.xml file and add the following lines into it.
  <xml version="1.0" encoding="UTF-8">

 <!DOCTYPE web-app PUBLIC "-//Sun Microsystems, Inc.//DTD Web Application 2.2//EN" "http://java.sun.com/j2ee/dtds/web-app_2_2.dtd">

 <web-app>

 </web-app>

At this point you should be good to run the application. Use the following commands.
 > sbt clean compile
 >
 > sbt container:start
Now go to app by clicking on the link.
Bingo ! you got your first scala webapp running.

SBT application for Netbeans from scratch

  • mkdir NetbeansSBT
  • mkdir NetbeansSBT
  • Create a new file called build.sbt in the NetbeansSBT directory and add the following lines to it.

name := "netbeans-sbt-1"

version := "1.0"

scalaVersion := "2.10.2"

sbtVersion := "0.12.4"

  • Don't forget to seperate them with empty lines
  • Create a directory called project in the root project directory.
  • Create two files build.properties and plugins.sbt.
  • Open project/build.properties and add the following line

sbt.version=0.12.4

  • Open project/plugins.sbt and add the following line to it.

addSbtPlugin( "org.netbeans.nbsbt" % "nbsbt-plugin" % "1.0.2" )

Notice how the sbt version inside the build.sbt and build.properties match. This is needed.

  • Run the following command from the root directory.

mkdir -p src/main/scala src/main/resources src/test/scala src/test/resources

At this point you should have your project setup. You can now run the following command to compile the project.

sbt clean compile publish-local

We still have to generate netbeans project files so that it can be opened in Netbeans for editing. Use the following commands to do that.

  • Run sbt

    sbt

If you are able to run sbt command ok, you should see output similar to this.

[info] Loading global plugins from /home/venkat/.sbt/plugins

[info] Loading project definition from /home/venkat/Documents/Scala/Scalatra/scalatra-sbt-1/project

[info] Set current project to scalatra-sbt-1 (in build file:/home/venkat/Documents/Scala/Scalatra/scalatra-sbt-1/)`

  • From sbt prompt run the netbeans command. This should generate netbeans files.

> netbeans

[info] About to create NetBeans project files for your project(s).

[info] Successfully created NetBeans project files for project(s):

[info] scalatra-sbt-1

Bingo ! Open the project up in Netbeans. Rant and rave in the comment section.

Friday, August 9, 2013

Perforce Command line tips

  • How to search changelists by user. 
 p4 changes -u vakkive -L
  •  How to apply a patch ?
There is no perforce way to do this. However, IntelliJ has a way to apply patches . Look inside the VCS drop down menu.
 

Thursday, December 13, 2012

Javascript Unit Testing


The following posts will use QUnit functions for testing. There is no explicit marking of QUnit functoins. So, when in doubt search in QUnit API.


Testing if a button was clicked



The following code shows you how to unit test weather a button was clicked in javascript. I found need for this while trying to test the following scenario: When user presses enter while an input box has focus then fire a click event on the button next to the input box.
test(“button clicked”, function(){
$(“#button”).on(‘click’, function(event){
$(this).data(‘clicked’, true);
});

$(“#button”).click();
ok($(“#button”).data(‘clicked’), “button clicked”)
});
As you can see the sky is the limit to what can be tested with such a technique.

Friday, October 5, 2012

Ramaze on OpenShift

Ramaze App on OpenShift



  • Create an account with Openshift.
  • Install rhc gem using the following command.

sudo gem install rhc


  • Complete rhc setup using the OpenShift's get-started page.
  • Log into your OpenShift account and create an application using the web interface.
    • This will create a git repo on openshift.
    • Once application creation is completed a git repo link is provided.
  • Clone the repo to your local workstation using link provided. Url looks something like this. 

ssh://54038126c5ca47f5aa549052cc11cd8d@${app-name}-${namespace}.rhcloud.com/~/git/${app-name}.git/

  • Let's say you have cloned it to $HOME/projects/app

cd app
mv config.ru config.ru.orig
cd ..

ramaze create app
cp $HOME/app/* $HOME/projects/app/ 
cd $HOME/projects/app

  • Openshift uses bundler to manage dependencies. Install bundler using
sudo gem install bundler
  • Create a Gemfile and Gemfile.lock
  • Add the following entries to Gemfile 

gem 'ramaze', '2012.04.14'


gem 'sequel', '3.40.0'


gem 'pg', '0.14.1'
  • Run bundle install. This will update Gemfile.lock file with dependencies.
  • Add all the files to git, commit and push.
  • What's great about Openshift is for every push, it stops the server, builds, redepoys application and starts the server.
  • Now go to the application link provided on your application creation page, you should see the "Welcome to Ramaze" Page.

Here is a deployed application if you want to look at it.










Friday, May 18, 2012

Basic TFS Commands


Checkout Files

tf get /force /overwrite /login:${username}@{domain},${password} 
Links

diff/merge configuration in Team Foundation - common Command and Argument values



Some TFS commands for the rainy day when your TFS goes broke.
Replace the following in the command below with your own information.
$USERNAME = your username
$PASSWORD = your password
$DOMAINNAME = your domain name ( TLR by default. )

Commands

Q.) List my shelves.
A.) tf /login:$USERNAME@$DOMAINNAME,$PASSWORD shelvesets /owner:c138884
Q.) List files modified in working copy.
A.) tf /login:$USERNAME@$DOMAINNAME,$PASSWORD status /recursive .
NOTE: The last dot refers to current directory. If that argument is not specified tfs lists all changes in the workspace. If you have multiple projects inside the workspace the changes are listed per directory.
Q.) List working copy changeset number.
A.) tf /login:$USERNAME@$DOMAINNAME,$PASSWORD history /recursive /stopafter:1 .
Q.) Update project source code to latest version.
A.) tf /login:$USERNAME@$DOMAINNAME,$PASSWORD get /recursive
Q.) Update to specific changeset.
A.) tf /login:$USERNAME@$DOMAINNAME,$PASSWORD get /recursive /version:171568

Wednesday, May 2, 2012

What goals are available for maven nbm plugin



How to find the plugin goals for mvn nbm plugin.

Running this command on nbm plugin should display the available goals. This is not specific to nbm and should work on any maven plugin.

mvn help:describe -Dplugin=nbm -Dmedium=true


Here is the goals available for maven nbm plugin version 3.7
Name: NBM Maven Plugin
Description: Maven plugin for creating NetBeans modules. It defines a custom
  lifecycle called 'nbm'. During packaging, the module JAR is enhanced with
  NetBeans-specific manifest entries and, along with other required files,
  packed into a *.nbm file, ready for distribution. Additionally the plugin
  provides aggregator goals to create an update site or cluster for your module
  projects.
Group Id: org.codehaus.mojo
Artifact Id: nbm-maven-plugin
Version: 3.7
Goal Prefix: nbm

This plugin has 13 goals:

nbm:autoupdate

  Description: Create the NetBeans auto update site definition.

nbm:branding

  Description: Package branding resources for NetBeans platform/IDE based
    application. The format of branding resources is the same as in NetBeans
    Ant-based projects. The src/main/nbm-branding folder of the project is
    assumed to contain the branding content. Within the directory, the
    following folder structure is assumed:
    - 1. pick the IDE/platform module which contents you want to brand. eg.
      org-openide-windows.jar
    - 2. locate the jar within the IDE/platform installation and it's cluster,
      eg. modules/org-openide-windows.jar
    - 3. create the same folder structure in src/main/nbm-branding, make folder
      with the module's jar name as well. eg. create folder by name
      modules/org-openide-windows.jar
    - 4. within that folder place your branding modifications at the same
      location, as if they were withn the jar, eg.
      org/openide/windows/ui/Bundle.properties and place the changed bundle
      keys there.

nbm:build-installers

  Description: (no description available)

nbm:cluster

  Description: Create the NetBeans module clusters from reactor.
    Semi-deprecated; used only for standalone modules and 'suites'.

nbm:cluster-app

  Description: Create the NetBeans module clusters/application for the
    'nbm-application' packaging projects

nbm:help

  Description: Display help information on nbm-maven-plugin.
    Call
      mvn nbm:help -Ddetail=true -Dgoal=<goal-name>
    to display parameter details.

nbm:manifest

  Description: Goal for generating NetBeans module system specific manifest
    entries, part of 'nbm' lifecycle/packaging. In order to have the generated
    manifest picked up by the maven-jar-plugin, one shall add the following
    configuration snippet to maven-jar-plugin.
 
<plugin>
    <groupid>org.apache.maven.plugins</groupid>
    <artifactid>maven-jar-plugin</artifactid>
    <version>2.2</version>
    <configuration>
        <usedefaultmanifestfile>true</usedefaultmanifestfile>
    </configuration>
</plugin>

nbm:nbm

  Description: Create the NetBeans module artifact (nbm file), part of 'nbm'
    lifecycle/packaging.

nbm:populate-repository

  Description: A goal for identifying NetBeans modules from the installation
    and populating the local repository with them. Optionally you can also
    deploy to a remote repository.
    If you are looking for an existing remote repository for NetBeans
    artifacts, check out http://bits.netbeans.org/maven2/, it contains API
    artifacts for multiple releases.
    http://bits.netbeans.org/netbeans/trunk/maven-snapshot/ may also be used
    for SNAPSHOT artifacts if you wish to test development builds.

    See this HOWTO on how to generate the NetBeans binaries required by this
    goal.

    Compatibility Note: The 3.0+ version puts all unrecognized, non-module, 3rd
    party jars in the org.netbeans.external group and adds them as dependencies
    to respective modules. That can cause backward incompatibility with earlier
    versions which generated incomplete (different) maven metadata.

nbm:run-ide

  Description: Run NetBeans IDE with additional custom module clusters, to be
    used in conjunction with nbm:cluster. Semi-deprecated; used only for
    standalone modules and 'suites'.

nbm:run-platform

  Description: Run a branded application on top of NetBeans Platform. To be
    used with projects with nbm-application packaging only and the project
    needs to be built first.

nbm:standalone-zip

  Description: Create a standalone application out of the composed clusters
    of nbm-application

nbm:webstart-app

  Description: Create webstartable binaries for a 'nbm-application'.

Friday, March 30, 2012

Why TFS sucks giant hairy balls.


I have been using TFS at a client for SCM. It is the worst SCM tool I have used so far. I thought there was no parallel for ClearCase in how unproductive the tool can be, but TFS has got ClearCase beat by miles. TFS has managed to be worse than even CVS. Below I list my grievances about TFS. At the time of writing this article I am using four different TFS interfaces to manage the TFS’s stink.

TFS CLI
TFS Windows Explorer Integration
TFS GUI Client
TFS Eclipse plugin

No ignore option.
There is no inbuilt gui for ignoring files from SCM. You are expected to edit .tpignore file. Well now, you carefully edit the .tpignore file like TFS respects you for being a human and guess what, TFS just made you the sucker because eclipse plugin decides whether or not to honor that file depending on what day of the week it is.  The only interface that seems to honor this is the Visual Studio TFS client. 


I wonder how and why large corporations pay thousands of dollars for this crap and chose to go with vendor lock in. In the age of GIT and HG, TFS has invented new lows.

No Detect Local Changes.

Other than eclipse none of the other interfaces seem to have a detect local changes option.

Very Intrusive

IMO, a SCM tool is supposed to track the changes in file contents and not the meta-data. On one hand I am trying to escape the wrath of eclipse and on the other hand I have to put up with the TFS crap.

I try to edit the files in netbeans and so I have to remove the lock that TFS puts on the files, so I change the permissions. I make a very minor change in a file and now I need to commit the changes.

So I right click in Explorer only to find there is no detect changes option. So I try the Get Latest Changes button, nothing happens. TFS GUI Client seems to behave the same way.
So, I start eclipse so I can commit the changes, well guess what the almighty eclipse plugin does, it marks all the files in the entire project as modified even the freaking jar files. There goes my entire day trying to figure out which file was actually edited. Try explaining that to your lead and business folks. What are you fucking molested as a child ? You dare say learn TFS way, I say trying to find workaround for TFS's short comings isn't a way, it is, by all means, hacking. 

Why does TFS give a fuck which editor I use to edit the files. Compare different versions of the files and see if there are any differences in the files and mark as changed.


Does not warn when there are file conflicts before checkin


I have had multiple occasions when TFS silently overwrites the version on the server without telling me that there is a new version of the same file on the server.

Only work around to this is update the source code and build right before checkin.

More suckiness to come ......

Monday, January 3, 2011

Netbeans Template for Ruby SDL.

This blog post contains a template based on a tutorial from www.SDLTutorials.com. While there is a myriad other ways for you to create an SDL window, I have found this pleasing to the eye.

Find steps below to save this in your Netbeans templates.

--> Copy the code below into a file and save it as rubysdl_template.rb
--> Go to Tools -> Templates
--> In the template tree view click on Ruby
--> Press Add button on the right side and open up the rubysdl_template.rb file.
--> Give the template a name, say Ruby SDL Window.

You are done. Now when you create a new ruby file you will see this template in the list of files.

This code will run and show a window without adding anything else provided you have Ruby/SDL installed. Ruby/SDL works with c implementation of Ruby so it is also assumed that you have ruby from www.ruby-lang.org installed. Another assumption is that SDL 1.2.14 is installed.

To run this code press Shift-F6 with the file open in Netbeans , you will see a dialog prompting to choose ruby implementation and various other options, choose ruby from www.ruby-lang.org and you should see a window.

I have used Ruby / SDL 2.1.1.1, but the code is simple enough that it will run with any version of Ruby / SDL.

So here goes the code.




# To change this template, choose Tools | Templates
# and open the template in the editor.

require 'sdl'

class CApp

def initialize
surfDisplay = nil
@running = true
end

def onExecute
return -1 if(onInit==false)

while @running
while event=SDL::Event2.poll
onEvent(event);
end
onLoop
onRender
end

onCleanup

return 0;
end

##
# Initiates the SDL system. Starts the basic display window.
##
def onInit
SDL.init(SDL::INIT_EVERYTHING)
return false if((@surfDisplay = SDL::Screen.open(640,480,32,SDL::HWSURFACE | SDL::DOUBLEBUF)) == nil)
return true
end

##
# This function performs actions on various events.
# Only an event object can be passed as an argument.
##
def onEvent(event)
case event
when event = SDL::Event2::Quit
@running = false;
end
end

def onLoop

end

def onRender

end

##
# Cleans up before quitting. It is a good practice to free up any surface that
# is no longer being used.
##
def onCleanup
@surfDisplay.destroy
SDL.quit
end

##
# Main block. SDL Window is instantiated from this.
##
if __FILE__==$0
cApp = CApp.new # This variable has not been initialized.
cApp.onExecute
end

end

Wednesday, October 6, 2010

Unix Text editor with Syntax highlighting

If you work on Unix, chances are the only editor you have is VI. While I am all for proving my manliness by working with VI, I would rather make my life easier. So I did a little bit of research and found a way to install an editor with GUI and syntax highlighting on AIX.
I found that there are two ways to do this. One download source code of any of the linux editors like gedit or VIM and compile on AIX and use them. I am no c/ c++ developer but I have tried to compile VIM 7.3 on AIX 6.1 without success. Second method is to use precompiled java based source editors. After trying JEdit, Jext and RText, I have settled on RText as the best option. JEdit does not seem to work well over putty. Jext does not have syntax highlighting for korn shell scripts so it does not serve my purpose. Otherwise Jext is a good option as well. In the rest of the post I will try and list the steps one would need to follow to get RText working over putty on AIX.

RText is a source code editor with syntax highlighting. 

Softwares you will need:


Prerequisites:

            We assume that you have either Sun’s or IBM’s jre up and running. The installation procedure for jre is out of scope for this post.

Installing Putty
Xming ships with putty. If don't have putty installed already then it is better to install it along with  Xming.
Installing XMing
Xming installation is straight forward. Make sure that the putty checkbox is checked and accept the defaults for the rest of the screens.

Installing Rtext:
  • Download RText
  • Move the file to AIX box if you have not downloaded it to AIX directly. I have myinstallation in $HOME directory.
  • Unzip the file.

         tar  –xvf r text***.tar.gz
  • Copy the following lines into a file named rtext (or anything else you please)

#!/bin/sh
export JAVA_HOME=/usr/java5
export RTEXT_HOME=RText installation directory
export PATH=$PATH:$RTEXT_HOME
$JAVA_HOME/jre/bin/java -jar $RTEXT_HOME/RText.jar
  • Place the file in rtext installation directory (ex: $HOME/rtext/)
  • Rtext Installation complete.
Running Rtext:
  • Make sure if the Xming server is started. If not start Xming from All Programs Menu.
  • Now Fire up putty
  • Click on session in the left side explorer and enter your IP address.
  • Expand SSH and select on X11 in the side explorer.
  • Select Enable X11 forwarding check box.

  • Press Open and enter your user name and password.
  • Navigate to RTEXT_HOME and run rtext. (make sure you have executable permissions on the file.)

  • If you want to be able call rtext from anywhere on the Unix box with just “rtext” command, create a symbolic link for it.
  • ln –s $RTEXT_HOME /usr/bin/rtext
  • If you want to start rtext in the background so that you can run other commands on the putty session use the following command. 
$RTEXT_HOME/rtext &
  • Two things to remember before you attempt to start RTEXT are
    • Check if Xming is started. If the server is started you will see a tray icon. If not start it.
    • Check if your putty session has X11 enabled. Unfortunately if you have not enabled while starting the session the only way to enable it to start another putty session with X11 enabled this time.
Benefits of RTEXT:
  • Has syntax highlighting for sh, ksh, csh.
  • The entire application can be run via one jar unlike JEdit. So the application can be run by issuing 
java –jar Rtext.jar

On a final note, if anybody was successful in compiling VIM on AIX 6.1 I request you to share the procedure with me.