Enabling Dell XPS 9500 fingerprint reader on Kubuntu 23.04

This post is a mini tutorial on how to enable the fingerprint reader of the Dell XPS 9500 laptop on Ubuntu 23.04.

Install fprintd:

sudo apt install fprintd libpam-fprintd

If you are another laptop and you are lucky your fingerprint reader might work out of the box. On Dell XPS 9500, you need to download the lastest driver from http://dell.archive.canonical.com/updates/pool/public/libf/libfprint-2-tod1-goodix/

wget http://dell.archive.canonical.com/updates/pool/public/libf/libfprint-2-tod1-goodix/libfprint-2-tod1-goodix_0.0.6-0ubuntu1~somerville1_amd64.deb
sudo dpkg -i libfprint-2-tod1-goodix_0.0.6-0ubuntu1~somerville1_amd64.deb

After this open the Users page in the System Settings. There should be a new button named “Configure Fingerprint Authentication…”. From here you should be able to enroll your fingerprint.

You can also use the fprintd tools to manage your fingerprint:

  • fprintd-list to list the registered fingerprints
  • fprintd-enroll to rengister new fingerprints
  • fprintd-verify to check previously registered fingerprints

Finally, you must configure pam to use your fingerprint. You can select for which authentication process fingerprints will be used and if they are required, acting like a 2FA, or if they are sufficient, working in parallel of your password. I recommend to use them in sufficient mode, at least in a first time, so that you can still use your password if you encounter an issue.

As an example if you want to use fingerprints to sudo, you need to add auth sufficient pam_fprintd.so in /etc/pam.d/sudo, just before the line @include common-auth. Then the next time you use sudo, it will display Place your finger on the fingerprint reader instead of prompting for your password. If you want to use your password you can use Ctrl+C to cancel the fingerprint request.

Moving Users folder on Windows

These are the step required to move the Users folder from the system partition to an other partition e.g. from C:\ to D:\ .
Note that once rebooted in command line mode the drive letter might have changed; you must check the actual drive letters and change the commands accordingly.

  1. Reboot in command line mode
  2. robocopy /copyall /mir /xj C:\Users D:\Users
  3. rmdir /S /Q C:\Users
  4. mklink /J C:\Users D:\Users

qmake and vcpkg

I’ve been trying to use vcpkg lately. And if it works easily with CMake, using it with qmake is undocumented. A quick Google search gives useless results including 2 year old forum posts where the conclusion is to use CMake. However there is hope.

How vcpkg works with CMake

To understand how vcpkg can be made to work with qmake we have to understand how it works when used normally i.e. with CMake.

When you install a package with vcpkg it gets installed in the packages/<package-name>_<triplet> folder. But you do not really need to care as vcpkg provides a CMake toolchain file that will automatically detect the vcpkg installed packages.

Let’s say you want to install and use yaml-cpp, all you have to do is:

./vcpkg install yaml-cpp
cd <my_project>
mkdir build
cd build
cmake .. -DCMAKE_TOOLCHAIN_FILE=<path_to_vcpkg>/scripts/buildsystems/vcpkg.cmake
cmake . -build

Provided that in your CMakeLists.txt you have:

find_package(yaml-cpp CONFIG REQUIRED)
target_link_libraries(my_project PRIVATE yaml-cpp)

It will just work and you project will link againt the yaml-cpp library provided by vcpkg.

Making it work with qmake

Sadly, vcpkg does not provide any support for qmake, so it won’t work out of the box by simply adding a command line option.

Solution 1: pkgconfig

The easiest solution is to take advantage of pkgconfig and PKG_CONFIG_PATH. To use this you need to update your .pro with:

CONFIG += link_pkgconfig
PKGCONFIG += yaml-cpp

And then run qmake with PKG_CONFIG_PATH pointing to the vcpkg installed folder:

PKG_CONFIG_PATH=<vcpkg>/installed/x64-linux/lib/pkgconfig qmake my_project.pro

Solution 2: brute force

If you dont want to, or cannot, use pkgconfig, it is still possible to make it work by taking adavantage of the fact that vcpkg does not only put installed packages in the packages folder but also in the installed folder where we have a nice hierarchy:

installed/x64-linux/debug/lib/libyaml-cpp.a
installed/x64-linux/include/yaml-cpp/
installed/x64-linux/lib/libyaml-cpp.a

That means that you just can just add a few line to you .pro file to use vcpkg libraries.

CONFIG(debug, debug|release) {
    LIBS += -L<vcpkg>/installed/<triplet>/debug/lib
} else {
    LIBS += -L<vcpkg>/installed/<triplet>/lib
}

INCLUDEPATH += <vcpkg>/installed/<triplet>/include

And then you just need to add LIBS += -lyaml-cpp to link against the yaml-cpp library provided by vcpkg