Install ksysguardd on Ubuntu 24.04
Ksysduard and ksysguardd have been completely removed from Ubuntu 24.04. This page describes what was done to install ksysguardd from source on Ubuntu 24.04 Server (headless).
Hosts 1, 3 & 5 are currently Raspberry Pi 5 NVMe Ubuntu 24.04 Server nodes running ksysguardd for monitoring.
Obtain the source package
The first step is to locate the source packages. In this case the sources came from the Ubuntu 22.04 repositories. While the package was available for installation on 23.04, the source couldn't be located. In this case the sources were downloaded on an Ubuntu 22.04 machine.
The repo list needs to be modified to allow source packages to be downloaded.
vi /etc/apt/sources.list
Uncomment the source repository lines:
## Note, this file is written by cloud-init on first boot of an instance
## modifications made here will not survive a re-bundle.
## if you wish to make changes you can:
## a.) add 'apt_preserve_sources_list: true' to /etc/cloud/cloud.cfg
## or do the same in user-data
## b.) add sources in /etc/apt/sources.list.d
## c.) make changes to template file /etc/cloud/templates/sources.list.tmpl
# See http://help.ubuntu.com/community/UpgradeNotes for how to upgrade to
# newer versions of the distribution.
deb http://ports.ubuntu.com/ubuntu-ports jammy main restricted
deb-src http://ports.ubuntu.com/ubuntu-ports focal main restricted
## Major bug fix updates produced after the final release of the
## distribution.
deb http://ports.ubuntu.com/ubuntu-ports jammy-updates main restricted
deb-src http://ports.ubuntu.com/ubuntu-ports focal-updates main restricted
## N.B. software from this repository is ENTIRELY UNSUPPORTED by the Ubuntu
## team. Also, please note that software in universe WILL NOT receive any
## review or updates from the Ubuntu security team.
deb http://ports.ubuntu.com/ubuntu-ports jammy universe
deb-src http://ports.ubuntu.com/ubuntu-ports focal universe
deb http://ports.ubuntu.com/ubuntu-ports jammy-updates universe
deb-src http://ports.ubuntu.com/ubuntu-ports focal-updates universe
## N.B. software from this repository is ENTIRELY UNSUPPORTED by the Ubuntu
## team, and may not be under a free licence. Please satisfy yourself as to
## your rights to use the software. Also, please note that software in
## multiverse WILL NOT receive any review or updates from the Ubuntu
## security team.
deb http://ports.ubuntu.com/ubuntu-ports jammy multiverse
deb-src http://ports.ubuntu.com/ubuntu-ports focal multiverse
deb http://ports.ubuntu.com/ubuntu-ports jammy-updates multiverse
deb-src http://ports.ubuntu.com/ubuntu-ports focal-updates multiverse
## N.B. software from this repository may not have been tested as
## extensively as that contained in the main release, although it includes
## newer versions of some applications which may provide useful features.
## Also, please note that software in backports WILL NOT receive any review
## or updates from the Ubuntu security team.
deb http://ports.ubuntu.com/ubuntu-ports jammy-backports main restricted universe multiverse
deb-src http://ports.ubuntu.com/ubuntu-ports focal-backports main restricted universe multiverse
deb http://ports.ubuntu.com/ubuntu-ports jammy-security main restricted
deb-src http://ports.ubuntu.com/ubuntu-ports focal-security main restricted
deb http://ports.ubuntu.com/ubuntu-ports jammy-security universe
deb-src http://ports.ubuntu.com/ubuntu-ports focal-security universe
deb http://ports.ubuntu.com/ubuntu-ports jammy-security multiverse
deb-src http://ports.ubuntu.com/ubuntu-ports focal-security multiverse
# deb [arch=arm64] https://download.docker.com/linux/ubuntu jammy stable # disabled on upgrade to jammy
# deb-src [arch=arm64] https://download.docker.com/linux/ubuntu focal stable
Then change directory to a download area and install the extraction stuff
apt update
apt install dpkg-dev
cd /my-download-folder
apt source ksysguard
The result should look like
drwxr-xr-x 12 root root 4096 May 26 14:56 ksysguard-5.18.4.1/ -rw-r--r-- 1 root root 13340 Apr 6 2020 ksysguard_5.18.4.1-0ubuntu1.debian.tar.xz -rw-r--r-- 1 root root 2818 Apr 6 2020 ksysguard_5.18.4.1-0ubuntu1.dsc -rw-r--r-- 1 root root 517548 Apr 6 2020 ksysguard_5.18.4.1.orig.tar.xz
Then copy the resulting file and directories over to an Ubuntu 24.04 machine ready to be compiled.
Then over on the Raspberry Pi 5 NVMe machine with Ubuntu 24.04 Server
apt install cmake
apt-get install build-essential
apt install extra-cmake-modules
apt install libsensors-dev
apt install libpcap-dev
Next go to your development folder and then modify CMakeLists.txt to look like the following:
cmake_minimum_required(VERSION 3.0)
project(ksysguard)
set(PROJECT_VERSION "5.18.4")
set(KSYSGUARD_VERSION 4.98.0)
set(KSYSGUARD_STRING_VERSION "${KSYSGUARD_VERSION}")
set(QT_MIN_VERSION "5.12.0")
set(KF5_MIN_VERSION "5.58.0")
find_package(ECM ${KF5_MIN_VERSION} REQUIRED NO_MODULE)
set(CMAKE_MODULE_PATH ${ECM_MODULE_PATH} ${ECM_KDE_MODULE_DIR} ${CMAKE_CURRENT_SOURCE_DIR}/cmake)
include(CheckIncludeFiles)
include(KDEInstallDirs)
include(KDECMakeSettings)
include(KDECompilerSettings NO_POLICY_SCOPE)
include(KDEClangFormat)
include(ECMAddTests)
include(ECMInstallIcons)
include(FeatureSummary)
# find_package(Qt5 ${QT_MIN_VERSION} CONFIG REQUIRED COMPONENTS
# Core
# Widgets
# )
# find_package(KF5 ${KF5_MIN_VERSION} REQUIRED COMPONENTS
# Config
# CoreAddons
# DBusAddons
# DocTools
# I18n
# IconThemes
# Init
# ItemViews
# KIO
# NewStuff
# Notifications
# WindowSystem
# )
# find_package(KF5 REQUIRED COMPONENTS SysGuard)
add_definitions(-DQT_NO_URL_CAST_FROM_STRING)
add_definitions(-DQT_USE_QSTRINGBUILDER)
#add_definitions(-DQT_NO_CAST_FROM_ASCII)
#add_definitions(-DQT_NO_CAST_TO_ASCII)
#add_definitions(-DQT_DISABLE_DEPRECATED_BEFORE=0x060000)
if (EXISTS "${CMAKE_SOURCE_DIR}/.git")
add_definitions(-DQT_DISABLE_DEPRECATED_BEFORE=0x060000)
add_definitions(-DKF_DISABLE_DEPRECATED_BEFORE_AND_AT=0x054200)
endif()
find_package(Sensors)
set_package_properties(Sensors PROPERTIES
TYPE OPTIONAL
PURPOSE "Allows to show sensor information")
find_package(libpcap)
set_package_properties(
libpcap PROPERTIES
TYPE RECOMMENDED
PURPOSE "libpcap is used for per-application network usage."
)
if (libpcap_FOUND)
find_package(Libcap)
set_package_properties(Libcap PROPERTIES
TYPE OPTIONAL
PURPOSE "Needed for setting capabilities of the per-application network plugin."
)
endif()
include_directories(${CMAKE_CURRENT_BINARY_DIR})
configure_file(config-workspace.h.cmake ${CMAKE_CURRENT_BINARY_DIR}/config-workspace.h)
# add_subdirectory( gui )
# add_subdirectory( doc )
# add_subdirectory( pics )
# add_subdirectory( example )
add_subdirectory( ksysguardd )
# add_subdirectory( plugins )
# add clang-format target for all our real source files
file(GLOB_RECURSE ALL_CLANG_FORMAT_SOURCE_FILES *.cpp *.h)
kde_clang_format(${ALL_CLANG_FORMAT_SOURCE_FILES})
feature_summary(WHAT ALL INCLUDE_QUIET_PACKAGES FATAL_ON_MISSING_REQUIRED_PACKAGES)
# find_package(KF5I18n CONFIG REQUIRED)
# ki18n_install(po)
# find_package(KF5DocTools CONFIG)
# if(KF5DocTools_FOUND)
# kdoctools_install(po)
# endif()
finally:
cmake CMakeLists.txt
cd ksysguardd
make
The resulting ksysguardd binary should now be sitting in ../bin/ksysguardd ready to be copied over to the /bin directory on your Raspberry Pi 5 headless servers.
Happy monitoring.