A Mindmap as the Desktop and Unblocking VUE

I use the Tufts University application VUE  the Visual Understanding Environment both as a pseudo mind map tool and as a way of organising my ‘desktop’.

I find using MindMap and Concept map applications a handy way of quickly getting to the files and applications I need (I currently use Freeplan and XMind as well)

For my purpose these tools be able need to be able to launch other applications as that allows me to click on a node of the map to open a document or suitable application for something I am working on. For example if debugging a network problem I may want to launch Wireshark, so I would then click on the relevant node in my map to launch wireshark

But I had a problem with VUE,  if the application launched is not already running then VUE ‘blocks’ and you cannot do anything else within VUE until the launched application is exited.

Fortunately as the source is available it meant it was possible to find why this was happening and fix it. VUE is written in  JAVA. (an  added the complication that I had just reinstalled Linux and had not got the JAVA tools installed, so that diverted my attention for a while).

While the JAVA tools were installing  I set to finding out what was happening. I detail this, not because its especially new or exciting, but you may have a similar project and so by recounting what I did it may help you do the same.

To find out what was going on I first launched VUE  from within a terminal so I could see the any messages. (This is always a handy starting point for debugging in Linux )

This showed that it was using gnome-launch to call external applications. Next was to find where in the code this was used.

I went for a brute for approach of grepping all the source folders.

</pre>
grep gnome * -r
<pre>

Which showed that the gnome-action takes place in Util.java. To narrow down where it was hanging I added some extra debug messages to the source and modified some of the existing ones to narrow down where the hang was happening.

The problem was the while statement at line 10. As nothing seems to be done with the data read into line, it seemed safe to comment out the statements. The modified code is shown below.

</pre>
Log.info("gnome-open " + url);
 process = runtime.exec(new String[] {"gnome-open" , url});
 // out("process: " + process);
 InputStream stdin = process.getErrorStream();
 InputStreamReader isr = new InputStreamReader(stdin);
 BufferedReader br = new BufferedReader(isr);
 String line = null;
 System.out.println("<OUTPUTa>");
 //while ((line = br.readLine()) != null)
 // System.out.println(line);

 System.out.println("<OUTPUTb>");</pre>

Final thoughts… VUE also hooks in to using http://www.opencalais.com/ to provide semantic analysis of resources. (if you are  not sure what that is, go and take a look…its worth it ).

This entry was posted in computing, linux, mindmaps and tagged , , , , , , . Bookmark the permalink.

Comments are closed.