As mentioned in a previous post, we installed OBS studio on our machine in order to make some desktop recordings.
What that post did not mention are two issues that we had:

when recording using the Screen Capture (XSHM) source, the recording would only show a black screen and it would actually record the mouse only!

when trying to record a LibreOffice application like Calc through the Window Capture (XComposite) source, Calc would not show in the properties dialog under the Window dropdown menu

The way we fixed these issues is not something that is always guaranteed to work but it is worth a try!
Initially we thought it would be a good idea to install the NVidia driver since we had a GeForce GTX 660M on the machine.
We hoped that the OBS studio black screen issue was a driver issue so we decided to follow the RPM Fusion guide on installing NVidia drivers.

We installed the NVidia driver, added the CUDA support and updated the system using these two commands:

After the machine booted and the graphical interface came up, we noticed that the machine was too slow and there was 100% CPU utilization for over 15 minutes.
After some very efficient Google-Fu, we realised that this was some bug that we were not willing to deal with and so we had to remove the newly installed NVidia driver.
Again following the RPM Fusion guide, we executed the following command to remove the driver from our system:

dnf remove xorg-x11-drv-nvidia\*

Please note that we DID NOT execute the last step of the guide on how to Recover from NVIDIA installer.
As it is mentioned in the guide: the NVidia binary driver installer overwrites some configuration and libraries.
Since having a clean state did not work for us, we decided to give a go of this hybrid setup that we had.
Following another full restart we were able to see that OBS Studio was working as expected and it the black screen issue was no more!!
Also, we could choose LibreOffice from the Window dropdown and we could record that as well!

As implied, this guide is a hack, it could work for you as well or not.
Our opinion is that, it is worth to give it a go!
As a synopsis, what we did was to install the NVidia driver and uninstall it, the libraries that got overwritten by this process fixed the black screen issue of OBS studio.

In order to record a few desktop sessions on our Fedora GNU/Linux machine, we decided to use the OBS Studio as it appeared to be a very powerful tool.
Unfortunately, this software does not ship with the official repositories so we had to install it from the rpmfusion.org repository using the following commands.

#Enable access to both the free and the nonfree repository
#free repository: for Open Source Software (as defined by the Fedora Licensing Guidelines) which the Fedora project cannot ship due to other reasons
#nonfree repository: for redistributable software that is not Open Source Software (as defined by the Fedora Licensing Guidelines); this includes software with publicly available source-code that has "no commercial use"-like restrictions
sudo dnf install https://download1.rpmfusion.org/free/fedora/rpmfusion-free-release-$(rpm -E %fedora).noarch.rpm https://download1.rpmfusion.org/nonfree/fedora/rpmfusion-nonfree-release-$(rpm -E %fedora).noarch.rpm;
#Perform the installation
sudo dnf install obs-studio;

Background:

RPM Fusion provides software that the Fedora Project or Red Hat don’t want to ship. That software is provided as precompiled RPMs.

Codecs in Fedora

By default Fedora does not ship with several codecs whose license is not free.
So we had to install a few packages manually and be able to playback or process sever multimedia formats.

Specifically we installed the following plugins and libraries for GStreamer (needed for the Totem Movie Player):

gstreamer1-libav: This package provides libav-basedGStreamer plug-ins.Libav is a free software project, forked from FFmpeg in 2011, that produces libraries and programs for handling multimedia data.

gstreamer1-plugins-good: GStreamer Good Plugins is a collection of well-supported plugins of good quality and under the LGPL license.

GStreamer is a streaming media framework, based on graphs of filters which operate on media data. Applications using this library can do anything from real-time sound processing to playing videos, and just about anything else media-related. Its plugin-based architecture means that new data types or processing capabilities can be added simply by installing new plugins.

Additional h264 – h.264 Codec – Optional

Following, we decided to install the OpenH264 codec implementation and its extensions for Firefox and gstreamer.

Cisco provides an OpenH264 codec (as a source and a binary), which is their of implementation H.264 codec, and they cover all licensing fees for all parties using their binary. This codec allows you to use H.264 in WebRTC with gstreamer and Firefox.It does not enable generic H.264 playback, only WebRTC.

While setting up Android Studio on a Fedora 27x64, we got the following message from the Android Studio Setup Wizard:

We have detected that your system can run the Android emulator in an accelerated performance mode.
Linux-based systems support virtual machine acceleration through the KVM (Kernel-mode Virtual Machine) software package.

After going through the website mentioned in the message we noticed that there were no instructions for Fedora so we decided to write our own.

Below are the steps we followed to enable hardware acceleration for the Android emulator.

Step 1: Verify that your CPU has virtualization extensions.

Execute the following in a terminal:

egrep '^flags.*(vmx|svm)' /proc/cpuinfo;

if you get ANY output then it would mean that your CPU supports either VMX or SVM which is good.
If it does not print anything then the emulator will fall back to software virtualization, which is extremely slow.

Step 2: Install the virtualization packages

sudo dnf group install --with-optional virtualization;

Step 3: Start the service

sudo systemctl start libvirtd;

Step 4: Automatically start the service on boot:

sudo systemctl enable libvirtd;

Step 5: Verify that the kvm kernel modules were loaded

lsmod | grep kvm

If the above command does not print kvm_intel or kvm_amd, it would mean that KVM is not properly configured.

After updating our GNU/Linux distribution from Fedora 26 to Fedora 27, and maybe updating Viber Desktop client as well, Viber stopped working. To be more precise it could not connect to the internet any more. (Note: we used the RPM package of ViberDesktop to install Viber on our Fedora system).

Solution for the OpenSSL issue – Create a symbolic link to the missing library in the libraries folder of Viber

From the error we could see that the application was trying to access the functions SSLv23_client_method and SSL_library_init and it could not find them.
It was obvious that the missing functions were related to the SSL protocol, so we executed the following to make sure all necessary OpenSSL packages were installed.

sudo dnf install openssl openssl-devel;

After that we tried Viber again and gave us the same error.
So we made the assumption that Viber could not ‘see’ the installation of OpenSSL.
Then we decided to use the following command to:

As you can see in the results, the two files that got us interested were in end the same file so we decided to use /usr/lib64/libssl.so.10 whose name was not tight to a minor distribution version of the library and would automatically link to any minor updates in the future.

After examining the Viber installation folder in /opt/viber/, we saw that there was a lib folder there with no SSL libraries available (even though all the QT and networking libraries were there already):

Examining our OS, we saw that in the rest of the locations were the QT libraries were installed there was a copy of the libssl as well.
So we decided to make a soft symbolic link of the /usr/lib64/libssl.so.10 shared library in the Viber libraries folder.
We did two tests:

Creating a symbolic link named libssl.so.10 failed.

Creating a symbolic link name libssl.so succeeded and solved the issue!

The command that we used was the following:

sudo ln -s /usr/lib64/libssl.so.10 /opt/viber/lib/libssl.so;

After performing this step, Viber was working again as expected!

$ sudo ln -s /usr/lib64/libssl.so.10 /opt/viber/lib/libssl.so;
$ /opt/viber/Viber
Qt WebEngine ICU data not found at /opt/viber/resources. Trying parent directory...
Qt WebEngine resources not found at /opt/viber/resources. Trying parent directory...
Qt WebEngine ICU data not found at /opt/viber/resources. Trying parent directory...
Qt WebEngine resources not found at /opt/viber/resources. Trying parent directory...
QQuickItem: Cannot set activeFocusOnTab to false once item is the active focus item.
QQuickItem: Cannot set activeFocusOnTab to false once item is the active focus item.
QQuickItem: Cannot set activeFocusOnTab to false once item is the active focus item.
QQuickItem: Cannot set activeFocusOnTab to false once item is the active focus item.
QQuickItem: Cannot set activeFocusOnTab to false once item is the active focus item.
qml: type=""
qml: type=""
qrc:/QML/Feed/FeedView.qml:98:5: QML ListViewEx: Binding loop detected for property "bottomMargin"
QObject: Cannot create children for a parent that is in a different thread.
(Parent is QObject(0x7f3f5f970520), parent's thread is QThread(0x4191210), current thread is QThread(0x515f5b0)
Invalid SOS parameters for sequential JPEG

Recently we tried to install some packages from the Android SDK through Android Studio 3.0.1 and we got the error that the PC ran out of space while downloading the necessary packages and could not perform the operation.

/tmp was not explicitly set so it was automatically configured to have half of the size of the RAM.
We didn’t not want to change the download path for the Java environment (and hence Android Studio and Android SDK tools) as after leaving the tmpfs folder it could mean that we would have to manually maintain the new path and clean it up. So we ended up in temporarily increasing the size of /tmp partition which did the trick and the virtual device was installed successfully.

Solution – temporarily increase the size of the /tmp partition:

The command we used to increase the size of the /tmp partition on Fedora 27 was the following:

sudo mount -o remount,size=8G,noatime /tmp;

After executing we, it we immediately saw that the results were applied without the need for a restart or any other operation and we could proceed to use the PC as normal.

Solution

Execute the following as a normal user

xhost +si:localuser:root;
sudo ./arduino;

Background Story and More Information

Recently we needed to start the official Arduino IDE as root on Fedora to allow the application to take control of the serial port.
We were getting the following error whenever we tried to upload the application to the board:

So, we tried to start the arduino IDE using root and got another error:

[[email protected] bin]$ sudo ./arduino;
[sudo] password for george:
No protocol specified
Picked up JAVA_TOOL_OPTIONS:
No protocol specified
java.awt.AWTError: Can't connect to X11 window server using ':0' as the value of the DISPLAY variable.
at sun.awt.X11GraphicsEnvironment.initDisplay(Native Method)
at sun.awt.X11GraphicsEnvironment.access$200(X11GraphicsEnvironment.java:65)
at sun.awt.X11GraphicsEnvironment$1.run(X11GraphicsEnvironment.java:115)
at java.security.AccessController.doPrivileged(Native Method)
at sun.awt.X11GraphicsEnvironment.(X11GraphicsEnvironment.java:74)
at java.lang.Class.forName0(Native Method)
at java.lang.Class.forName(Class.java:264)
at java.awt.GraphicsEnvironment.createGE(GraphicsEnvironment.java:103)
at java.awt.GraphicsEnvironment.getLocalGraphicsEnvironment(GraphicsEnvironment.java:82)
at sun.awt.X11.XToolkit.(XToolkit.java:126)
at java.lang.Class.forName0(Native Method)
at java.lang.Class.forName(Class.java:264)
at java.awt.Toolkit$2.run(Toolkit.java:860)
at java.awt.Toolkit$2.run(Toolkit.java:855)
at java.security.AccessController.doPrivileged(Native Method)
at java.awt.Toolkit.getDefaultToolkit(Toolkit.java:854)
at java.awt.SystemColor.updateSystemColors(SystemColor.java:473)
at java.awt.SystemColor.(SystemColor.java:465)
at processing.app.Theme.init(Theme.java:84)
at processing.app.Base.(Base.java:219)
at processing.app.Base.main(Base.java:144)

This error occurred because the default configuration of the X server permissions did not allow the root to connect to it.
To verify this, we used xhost (the X server access control program) to check the permissions.
Executing xhost with no command line arguments gave us a message indicating whether or not access control was currently enabled, followed by the list of those users allowed to connect.
For example in our case the output was as follows:

Synopsis

When compiling we run into an error where an a wireshark enum was conflicting with a system one.
To resolve that issue we modified the file: epan/dissectors/packet-gluster.h and at line 357 we removed the next enum:

It is safe to delete it as it exists in the exact same form and same values in the system header files.
Please note that in version 1.8.15 we found the following enum, which shows that it was decided later on to just change the enum fields.

Later during compilation we got the error that there was an undefined reference to g_memmove, we copied the definition of g_memmove (see below) from packaging/macosx/native-gtk/glibconfig.h at line 81 and pasted it on the first line of the files ui/gtk/export_object_smb.c and epan/dissectors/packet-ssl-utils.c.

Finally during documentation generation we had a problem with two authors that there were Non-ASCII characters in their names so we updated the file AUTHORS and replaced the names Peter Kovář with Peter Kovar and Роман Донченко with Roman Donchenko which are strings that only contain ASCII characters.

The Problems One by One

checking for pod2man... /usr/bin/pod2man
checking for pod2html... no
configure: error: I couldn't find pod2html; make sure it's installed and in your path

Solution: sudo dnf install perl-podlators perl-Pod-Html;

checking for GTK+ - version >= 2.12.0 and < 3.0... Package gtk+-2.0 was not found in the pkg-config search path.
Perhaps you should add the directory containing `gtk+-2.0.pc'
to the PKG_CONFIG_PATH environment variable
No package 'gtk+-2.0' found
no
*** Could not run GTK+ test program, checking why...
*** The test program failed to compile or link. See the file config.log for the
*** exact error that occured. This usually means GTK+ is incorrectly installed.
configure: error: Neither Qt nor GTK+ 2.12 or later are available, so Wireshark can't be compiled

Solution: sudo dnf install gtk2-devel gtk3-devel;

checking for pcap-config... no
checking for extraneous pcap header directories... not found
checking pcap.h usability... no
checking pcap.h presence... no
checking for pcap.h... no
configure: error: Header file pcap.h not found; if you installed libpcap
from source, did you also do "make install-incl", and if you installed a
binary package of libpcap, is there also a developer's package of libpcap,
and did you also install that package?

Solution: Copy the definition of g_memmove (see below) from packaging/macosx/native-gtk/glibconfig.h at line 81 and paste it on the first line of the files ui/gtk/export_object_smb.c and epan/dissectors/packet-ssl-utils.c.

After attaching the card reader on the host machine, we executed lsusb to verify that we could see the card reader on the host machine.
Among the results we got the following line indicating that the card reader was available.