4. Ferret/PyFerret installation on Ubuntu

4.1. Create folder on D: or E: partition

For example the folder name is ferret_training

4.2. Download and install miniconda

  • Download Miniconda2-latest-Linux-x86_64.sh file from drive that shared for training participants and locate to folder created above (ex: ferret_training).

  • Launch ubuntu and change work directory to Miniconda2-latest-Linux-x86_64.sh file is located.

Hint

Hint: To check current work directory type ‘pwd’ (without quote) on ubuntu terminal and press enter.

alt text goes here

check current working directory

Change work directory to folder that Miniconda2-latest-Linux-x86_64.sh file is located (for ex: E:BayuTraining_ferret).

Type ‘cd file_directory_path’ (without quote) to change work directory.

Note

To change to Windows folder/directory, usually we use ‘../../mnt/’ then followed by partition name and folder name. Example is shown as below:

alt text goes here

change directory

Check whether it is in the correct directory. By type ‘ls -l’ we should see Miniconda2-latestLinux-x86_64.sh file in this directory.

alt text goes here

list Miniconda installer code

Run Miniconda2-latest-Linux-x86_64.sh script use command as followings:

./Miniconda2-latest-Linux-x86_64.sh

The result after press enter will be shown below:

alt text goes here

Run Miniconda shell script

Press enter several time to review license agreement:

alt text goes here

Review License Agreement

Type ‘yes’ (without quote) then press enter:

alt text goes here

Accepting the license terms

Press enter, after extracting the result will be shown as below:

alt text goes here

All requested packaged already installed

Type ‘yes’ (without quote) then press enter:

alt text goes here

Finished of Miniconda installation

Close ubuntu terminal by type ‘exit’ then press enter or click X sign on upper right corner.

4.3. Download and install Ferret/PyFerret

Launch Ubuntu terminal

alt text goes here

Launch Ubuntu terminal

Download and install PyFerret using miniconda by type below command and press enter

conda create -n FERRET -c conda-forge pyferret --yes
alt text goes here

Launch Miniconda environment

PyFerret already installed. To launch ferret, environment where we installed pyferret is needed.

Type below command and press enter to activate this environment

source activate FERRET
alt text goes here

activate FERRET env

Type ‘ferret’ (without quote) then press enter to launch Ferret in Ubuntu

alt text goes here

FERRET Launch

PyFerret already installed but to launch graphical visualization an X server will need to be installed on the Windows 10 system and the DISPLAY variable will need to be set in Bash.

4.4. Install graphical program on WSL

  • Make sure to close Ubuntu terminal before you install graphical program on WSL.

  • Download XMing software installer from https://xming.en.softonic.com/download or from training shared drive.

  • Install XMing by double-click installer file.

alt text goes here

XMing Setup Wizard

alt text goes here

Select components of XMing to be install

alt text goes here

Completing the XMing Setup Wizard

Tip

Tip: If XMing is properly installed and launched, it will be shown small icon of XMing on Windows taskbar.

alt text goes here

XMing active indicator

Once you have an X server installed and running, you’ll need to install graphics applications.

Attention

Attention: To download and install it run the following command on Ubuntu terminal:

sudo apt-get install x11-apps
alt text goes here

x11-apps installation

Type ‘Y’ and press enter:

alt text goes here

x11-apps installation completed

Once the applications have been installed, you can start them by setting your display and executing the application on the Bash shell.

Type following command on Ubuntu terminal and press enter:

export DISPLAY=:0
alt text goes here

export DISPLAY

4.5. Automatic ferret environment and WSL graphical activated

  • Using ferret environment and WSL graphical may need to comment the lines that launch the conda environment and Windows X server.

  • To make it easier, you can add command lines in .bashrc file that located in the home folder.

In a new terminal, type the following:

cd ~/
nano .bashrc

Scroll to the bottom of the file and add following lines

conda activate FERRET
export DISPLAY=:0
alt text goes here

automatic environment setup

Attention

Press Ctrl+x, press ‘Y’ then press enter. Close the terminal by type ‘exit’ and press enter or click X sign on upper right corner.

4.6. Test installed Ferret/PyFerret

Open Ubuntu terminal from Windows start menu.

alt text goes here

Ubuntu Launch

Type ‘ferret’ (without quote) in ubuntu terminal then press enter.

alt text goes here

Ferret Launch

Ferret software is ready to use.

Tip

For checking WSL graphical program that we need to visualize data plot, ferret demonstration script can be used.

The jnl files are “go scripts”, available to you when you run Ferret, for example: “GO tutorial” shows you around Ferret.

Type ‘go tutorial’ (without quote) and press enter:

alt text goes here

go tutorial demo

Press enter:

alt text goes here

plot demo

Press enter several times will show you example of scripts and plot results:

alt text goes here

plot multiple views demo

alt text goes here

vector demo

alt text goes here

fill demo

Type ‘quit’ (without quote) to exit ferret and back to ubuntu terminal.

This is end of installationGuide’s document.

GOOD LUCK!!!