Ubuntu: Where is the NiViewer in Ubuntu 16.04 LTS?


I am pretty much new to Ubuntu file and directory system. I installed OpenNi2 using sudo apt install libopenni2-dev but now could not find the NiViewer executable to test the installation. I looked in /usr/bin and usr/local/bin but its not there.However when I download OpenNI2 from here it contains a NiViewer which does not run. But when i execute the install.sh then the NiViewer runs. I looked into the install.sh file. It has this two parts I guess...installing the udev rules and exporting the environmental variables. This is how the install.sh file looks

if [ `whoami` != root ]; then  echo Please run this script with sudo  exit  fi    ORIG_PATH=`pwd`  cd `dirname $0`  SCRIPT_PATH=`pwd`  cd $ORIG_PATH    if [ "`uname -s`" != "Darwin" ]; then    # Install UDEV rules for USB device    cp ${SCRIPT_PATH}/primesense-usb.rules /etc/udev/rules.d/557-primesense-usb.rules   fi    OUT_FILE="$SCRIPT_PATH/OpenNIDevEnvironment"    echo "export OPENNI2_INCLUDE=$SCRIPT_PATH/Include" > $OUT_FILE  echo "export OPENNI2_REDIST=$SCRIPT_PATH/Redist" >> $OUT_FILE  chmod a+r $OUT_FILE  

My questions are the following:

  1. can I make NiViewer run without running the install.sh file by just the things available after I have sudo apt install libopenni2-dev? i.e. can the udev rules be set without running the install.sh file?(environmental variables already has the path /usr/lib added to it I guess)
  2. If I install OpenNI2 using the install.sh file then the location of the libs gets altered. Its not the usual /usr/lib. How will any cmake detect the location of OpenNI libs if I need OpenNI to build any other library like PCL or OpenCV?


I don't think that you actually installed OpenNI. To install download either the 32bit or 64bit. Once downloaded go to the download location, normally the Downloads folder, and extract the downloaded file. Once extracted just press Ctrl+Alt+T on your keyboard to open Terminal. When it opens, navigate to where the file was extracted, and run the command(s) below:

sudo ./install.sh  

Once down run:

cd Tools  ./NiViewer  

to run the viewer.

Note:If u also have question or solution just comment us below or mail us on toontricks1994@gmail.com
Next Post »