4.10. Linux Support: Running an Anatella graph in Linux

<< Click to Display Table of Contents >>

Navigation:  4. How to use Anatella? >

4.10. Linux Support: Running an Anatella graph in Linux

 

Currently, under Linux, we only support batch execution of Anatella graphs through the “AnatellaConsole” executable. We do not support the edition of new graphs (using “Anatella”). Typically, you’ll design an Anatella graph under windows and put it in production under linux.

 

To run Anatella under linux, you’ll need to install the package named “Wine”.

(i.e. Anatella runs inside Wine – Wine is not a Virtual Machine)
 

 

ANATEL~1_img8

The procedure to install “Wine” under “Ubuntu” is the following (This is an extract from https://wiki.winehq.org/Ubuntu ):
 

wget -nc https://dl.winehq.org/wine-builds/Release.key

sudo apt-key add Release.key

sudo apt-add-repository https://dl.winehq.org/wine-builds/ubuntu/

sudo apt-get update

sudo apt-get install --install-recommends winehq-stable

 

During the Wine installation, if you get some messages about downloading some additional optional components/packages (e.g. about downloading “Mono” or “Gecko”), you can safely skip these downloads: They are not required to make Anatella run properly (basically, you can safely skip any optional components).

 
 
The Anatella installation procedure under Linux is in 4 steps:
 
 

1.Download the portable version of Anatella (i.e. download the large ZIP file) and unzip the zip file in a suitable location: Typically, you’ll unzip the zip file inside the directory “/opt/timi”: i.e. You’ll type:
 

cd /opt
sudo mkdir timi
cd timi
sudo unzip /home/<user>/TIMiPortableFull_x64.zip

 
 

2.Setup “Wine”. “Wine” emits many warning messages inside the console. To get rid of these (annoying) warning messages, add the following line inside your “~/.bashrc” file:
 

export WINEDEBUG=-all

 
 
To be able to launch the “AnatellaConsole” executable in an easier way, you can add the following line inside the (same) “~/.bashrc” file:
 

alias anatellaconsole='WINEDEBUG=-all wine /opt/timi/bin/AnatellaConsole.exe'

 

 

ANATEL~1_img8

To edit the “~/.bashrc” file, I like to use a very simple text editor named “Joe”. To install “Joe”:
 

sudo apt-get install joe

 

Then, to edit the “~/.bashrc” file:
 

cd

joe .bashrc

<Scroll to the end of the file and add the required lines>

<Press [CTRL]+[K]+[X] to save your modifications inside the “.bashrc” file and exit>

<Press [CTRL]+[C] to cancel, ignore your modifications and exit>

 
 

3.To enter your Anatella “serial number”, run “TIMiEnterLicenceConsole.exe” inside a console: i.e. Typically, you’ll type:

 

 cd /opt/timi/bin/
 wine TIMiEnterLicenceConsole.exe <registration_name> <serial_number>

 

(Type “wine TIMiEnterLicenceConsole.exe” without any parameters to get help).
 

 

It’s possible to run both the “AnatellaConsole” executable (to run Anatella graphs in batch) and the “Anatella” executable (to edit or create new Anatella graphs) but we only support running Anatella in batch in Linux through the “AnatellaConsole” executable.

 

 
Once the “anatellaconsole” alias is created, it’s very easy to run Anatella graphs: For example, to run the “MyGraph.anatella” graph, you just type:

 

 anatellaconsole MyGraph

 

 
The command-line options are the same as usual: For example, here we re-define the global parameter named “myGlobalParameter” to the value “xxxx”:

 

 anatellaconsole MyGraph -DmyGlobalParameter=xxxx

 

 
Since the “AnatellaConsole” executable is a pure “console-based” executable, you can run it directly inside a “Putty/SSH” console (No X-Server is required! No graphical GUI is required!). This is very handy when working on a far remote Linux server that has a very low connection bandwidth (so low actually, that it won’t support any type of Graphical User Interface). Typically, in such situation, you’ll edit your .anatella files locally (on your windows PC – and since all the edition process is done locally, everything is fast and responsive), then you push your .anatella files on the remote linux server (e.g. using “WinSCP” – since the .anatella files are very small files this is not time-consumming to transfer them), and finally run your .anatella files on the remote Linux server by typing inside a Putty/SSH console something like:

 

 anatellaconsole MyGraph

 

 
Here are two example screenshots (Ubuntu 17.10 in 64 bit):

 

ANATEL~1_img155

 

 

ubuntu

 

 

ANATEL~1_img8

Some Anatella Actions require, in order to run, a working Graphical environment (i.e. the text console is not enough to make them run). Such that, it won’t be possible to execute these Actions inside a pure Putty/SSH text console.

 

The Anatella Actions that requires a Graphical environment are the Actions included inside the “R Visulation” category. Indeed, the objective of these “visualization” Actions is to display some bart chart, scatter plot, etc. inside a Graphical Window and they, of course, won’t work properly without a working Graphical environment.

 

 

ANATEL~1_img8

You can call any Linux tool from Wine/Anatella using the “start /unix” command. For example, the Javascript function “runLinux()” defined here below runs any linux command that is given as parameter:
 

function runLinux(s)

{

  if (!isLinux()) throw "Error: You are not using Linux!";

  var p=ProcessRunner();

  p.setVerbose(0);

  return p.runImmediate("cmd",["/c","start","/unix","/bin/bash","-c",s]);

}

 

Traditionally, a return value of “zero” means no error.