OpenCV error: the function is not implemented

Recently, we were working on a python 3 project that was using opencv. When we used conda defaults repository to install opencv it installed a 3.X.Y version which would produce the following error on PyCharm on Ubuntu 20.04 LTS:

pycharm cv2.error: OpenCV(3.4.2) highgui/src/window.cpp:710: error: (-2:Unspecified error) The function is not implemented. Rebuild the library with Windows, GTK+ 2.x or Carbon support. If you are on Ubuntu or Debian, install libgtk2.0-dev and pkg-config, then re-run cmake or configure script in function 'cvStartWindowThread'

Following the instructions above, we installed the missing packages using sudo apt-get install libgtk2.0-dev pkg-config; with no change on the results. To fix the issue, we completely removed opencv from the stables repository and we installed version 4.5.1 from the conda-forge repository as follows:

conda remove opencv;
conda install -c conda-forge opencv=4.5.1;

View Cisco Webex Recordings (or Join certain Live Sessions) on 64-bit Ubuntu 18.04 LTS

Recently, we were trying to view some Webex recordings on an updated Ubuntu 18.04LTS. After several attempts and various browsers (including the latest versions of Firefox, Google Chrome, Chromium), we could not view the recordings.

When clicking on the link, we would be redirected to install the Webex browser plugin, and then after we had installed it, we would either be redirected to a macOS installation file (Cisco_WebEx_Add-On.dmg) or to a Java servlet configuration file (CiscoWebExServlet).

We did lots of tests that are not worth mentioning, so we will go straight to the solution we followed from this page: https://gist.github.com/mshkrebtan/407786e334847544b40e7d6a8a53d247
What the solution recommended, was to install the 32-bit ESR version of Firefox, along with a 32-bit version of the Oracle JRE.

Enable support for 32-bit executables

Add the i386 architecture to the list of dpkg architectures :

sudo dpkg --add-architecture i386

Install the libraries required to execute ELF-32 executables:

sudo apt-get update
sudo apt-get install libc6:i386 libncurses5:i386 libstdc++6:i386

Install Firefox 78.7.0esr ESR (32-bit)

Beginning with Firefox 52 (released March 2017), plug-in support is limited to Adobe Flash and drops support for NPAPI, impacting plugins for Java, Silverlight, and other similar NPAPI-based plugins. Hence you need the ESR release. You can read more on that here: https://www.java.com/en/download/help/firefox_java.xml
Download Firefox ESR for Linux (32-bit) from here.
Unpack it to somewhere, for example, to /opt/webex/:

sudo mkdir -p /opt/webex/
sudo tar -xjvf firefoxesr.tar.bz2 -C /opt/webex/

Install the libraries required for Firefox (i386) to run smoothly:

sudo apt-get install libgtk-3-0:i386 libasound2:i386 libdbus-glib-1-2:i386 libxt6:i386 libxtst6:i386 libcanberra-gtk-module:i386 libcanberra-gtk-3-module:i386 topmenu-gtk3:i386

Install 32-bit Oracle JRE

Download Oracle JRE for Linux (a tar.gz archive for x86 architecture) from here. Unpack it to /opt/webex/:

sudo tar -xzvf jrelinux-i586.tar.gz -C /opt/webex/
sudo mv /opt/webex/jre /opt/webex/jre

Enable Java support in Firefox

Create symbolic links for the Java browser plugin libraries:

sudo apt-get install libpangoxft-1.0-0:i386 libxft2:i386 libpangox-1.0-0:i386 libxmu6:i386 libxv1:i386 libasound2-plugins:i386;

Create a Firefox launch script

cat << 'EOF' | sudo tee /opt/webex/firefox.sh

export ENV_HOME=/opt/webex
export FIREFOX_HOME=$ENV_HOME/firefox
export MOZ_PLUGIN_PATH=$ENV_HOME/firefox/plugins
export JAVA_HOME=$ENV_HOME/jre
export PATH=$JAVA_HOME/bin:$PATH

$FIREFOX_HOME/firefox --no-remote -P

This script will start a new instance of Firefox with the ProfileManager. Choose an existing Firefox profile or create a new one.
You might want to specify a specific profile to start with. Just add the profile name after the -P flag.
Don’t forget to make the script executable:

sudo chmod a+x /opt/webex/firefox.sh

You might want to create a symlink, like this to make it easier to start the 32-bit version of Firefox using a custom name:

sudo ln -s /opt/webex/firefox.sh /usr/local/bin/firefox-i386

Start a Webex session

Launch the 32-bit Firefox using the script and join a Webex session.
If webex.com sends you a jnlp (or a CiscoWebExServlet) file, and Firefox asks what to do with it, download it.
Further, in the Firefox Preferences > Applications, set the action for JNLP files: they should be opened with javaws (Java Web Start) which can be found here:


(Optional) Install the missing libraries required by Webex

Find out what required libraries are be missing (note that the session number may be different):

ldd ~/.webex/T30_MC/*.so | grep "not found"

You can use https://packages.ubuntu.com/ to find out which packages contain the libraries.

How to see the isc2.org Webex Online Instructor-Led courses using your browser only

Recently, we registered for some online instructor-led courses in isc2.org.
We were using a Ubuntu GNU/Linux machine with the latest Firefox / Chromium and even Chrome versions.
There was something wrong with the meeting. When clicking on the Join button, instead of loading, it was trying to download a java applet configuration (CiscoWebExServlet).
After reading about those files and a lot of work, which included setting up a 32-bit version of Firefox with a 32-bit version of the Oracle JRE and installing IcedTea, we managed to connect to the meeting, but we had no audio.

When trying to connect to the meeting via phone, we got no voice.

When trying the mobile application, it required a password, which was never supplied.

So, we had to find another way in!

Using the Network tab of the Inspect Element menu, we clicked on the gear in the upper right corner and enabled the Persist Log option. Then we clicked on the Join button and logged all redirects with their parameters.

In isc2.org virtual class, the Join button has a custom link to https://www.cirqlive.com/, which is used to join the meetings.
Once you click on that button, the browser follows several redirects between webex.com and cirqlive.com, and it ends up on this page https://isc2training.webex.com/tc3300/webcomponents/docshow/meetingframe.do?siteurl=isc2training asking to download the servlet.

From the logged redirects of the above link, we got the request to https://isc2training.webex.com/tc3300/m.do where we got the meeting ID and password in the POST parameters.
Then went to https://signin.webex.com/join added the meeting ID, which led us to this page https://isc2training.webex.com/isc2training/e.php?AT=SI&From=GPS&MK=XXXXXXXX (using fake meeting ID)
We filled in the Session Password and clicked on Join by browser, and we could join as expected.

Package pdftex.def Error: File `xyz-eps-converted-to.pdf’ not found: using draft setting. [Ubuntu]

Recently we were struggling with the following error whenever we were trying to use an eps figure with the pdflatex compiler.

Package pdftex.def Error: File `xyz-eps-converted-to.pdf' not found: using draft setting.

After trying several online remedies which all failed, we tried to convert the eps figure to pdf manually on the shell and we got the following error:

$ epstopdf
Command 'epstopdf' not found, but can be installed with:
sudo apt install texlive-font-utils

Following the advice on the shell, we installed texlive-font-utils and guess what? After compiling our Latex document again, the error was gone and the eps figure was successfully converted to a pdf!!

How to suspend Gnome Ubuntu 18.04LTS from top right menu

Recently, we were using the suspend option by searching option through the “Activities” menu. We were looking for alternatives for scenarios where we would not like to use a keyboard (e.g. on a touch-enabled screen).
After some quick testing we saw that when you long press the power button it turns into a Suspend button!!

In this video we can see that if you long press the power off button in the top right menu it will convert to the “Suspend” option!