Skip to content

Installing ParaView (Ubuntu)

Effie Daum edited this page Feb 4, 2024 · 1 revision

As lots of lab members may tell you, ParaView is very useful for analyzing point clouds and assessing ICP-based maps and trajectories. We can easily install ParaView using apt:

sudo apt install paraview

Yet, the apt version of ParaView can easily be outdated compared to the latest releases on the official website : as of writing, apt only installs ParaView 5.4.1 on Ubuntu 18.04, while ParaView's website yields ParaView 5.10.1.

Download ParaView, untar it, add ParaView to path

The /opt directory is a great place for installing ParaView. Download the tar.gz of the ParaView version of your liking. Once the download is complete, open a terminal from where you downloaded ParaView.

# Create a folder in /opt to install ParaView
sudo mkdir /opt/paraview

# Untar inside /opt/paraview
sudo tar xzf ParaView-<version+rest-of-the-file-name>.tar.gz -C /opt/paraview --strip-components=1
# Ex :
# sudo tar xzf ParaView-5.10.0-MPI-Linux-Python3.9-x86_64.tar.gz -C /opt/paraview --strip-components=1

# Symlink to run ParaView from the terminal
ln -s /opt/paraview/bin/paraview ~/bin/paraview

Add ParaView icons inside the user icons

ParaView icons are included in the tar.gz more specifically in /opt/paraview/share/icons/hicolor. These icons will be copied inside ~/.local/share/icons/hicolor :

cp -r /opt/paraview/share/icons/hicolor ~/.local/share/icons/

# Update the icon cache
sudo update-icon-caches ~/.local/share/icons/*

Create MIME Type for files extensions that should be opened with ParaView

Ubuntu uses MIME types and packages xmls to determine which applications can be used to open files that have certains file extensions. We will save the following file inside ~/.local/share/mime/packages/paraview.xml :

<?xml version="1.0" encoding="UTF-8"?>
<mime-info xmlns="http://www.freedesktop.org/standards/shared-mime-info">
    <mime-type type="application/x-paraview">
        <comment>ParaView Document</comment>
        <comment xml:lang="en_US">ParaView Document</comment>
        <glob pattern="*.pvd" />
        <glob pattern="*.pvs" />
        <glob pattern="*.vti" />
        <glob pattern="*.vtp" />
        <glob pattern="*.vts" />
        <glob pattern="*.vtu" />
        <glob pattern="*.case" />
        <glob pattern="*.sos" />
        <glob pattern="*.vtk" />
        <icon name ="paraview"/>
  </mime-type>
</mime-info>

We then need to update the mime database :

sudo update-mime-database ~/.local/share/mime

There we go ! We now have .vtk files with a ParaView MIME type and with ParaView icons !

View of Nautilus with ParaView MIME types and icons

Create Desktop Entry

We now need to configure Ubuntu in order to include ParaView in the list of applications that can used to open .vtk files. For that, we must create a Desktop Entry that could be used to launch ParaView from the Activities Menu. Luckily for us, there is a ParaView desktop file in /opt/paraview/share/applications. We can copy it in the appropriate directory :

cp /opt/paraview/share/applications/org.paraview.ParaView.desktop ~/.local/share/applications/paraview.desktop

Add the following line to ~/.local/share/applications/paraview.desktop :

MimeType=application/x-paraview;

As with earlier configurations, we must update the desktop entries database :

sudo update-desktop-database ~/.local/share/applications

Done ! We can now run ParaView directly by opening .vtk files !

Norlab's Robots

Protocols

Templates

Resources

Grants

Datasets

Mapping

Deep Learning

ROS

Ubuntu

Docker (work in progress)

Tips & tricks

Clone this wiki locally