Install RPdb
This site describes how to install RPdb on your desktop system.
Java GUI or console application
For the Java applications ensure that the following requirements are met.
- You are using a recent Windows or Linux system
- Java Version 17+ ist installed on your system. For example, you can use a JRE from Adoptium
- The Desktop app requires the
SWT
library installed on your system. For Windows this is installed by default. Linux's users may have to install a package that is named likelibswt-gtk-4-java
The installation process is performed by an own application that is cross-platform. Just download the installer and start it. It will guide you through the process and will install the selected type of application.
Info
The core of the installation process is provided by a simple and open source libraray Java-Installer.
Special settings
In some scenarious you may require custom settings to be applied for the installation. To get all available settings you have to start the Installer with the --help
argument. You will get an output like below.
Native console application
No installer or Linux package is currently available for the native console application. In order to use it, you have to install and upgrade it by yourself.
For Linux, you can download and execute this as follows.
sudo wget https://rpdb.rpjosh.de/api/download/RPdb-go-linux-amd64_latest -O /usr/bin/RPdb-go
chmod +x /usr/bin/RPdb-go
# Run it
RPdb-go --version
Since this application is also open source, you can build the application yourself for any operating system, as long as you have Go.
# Optional: set the installation path
export GOBIN=$HOME/go/bin
go install github.com/RPJoshL/RPdb/v4/go/cmd/rpdb@latest
# Run it (note that the outputed version isn't correct because we build it locally)
$GOBIN/rpdb --version
Set up autocomplete
If you are using Linux and Bash for your terminal, you can also set up autocomplete. This makes working with RPdb on the console much easier. You need the package bash-completion
installed on your system. It's installed by default for most distributions.
# Load the completion code into the current shell (only temporary)
source <(RPdb-go completion bash)
# Write bash completion code to a file and source it from .bash_profile (persistent)
RPdb-go completion bash > ~/.config/RPJosh/RPdb-go/completion.bash.inc
printf "
# RPdb shell completion
source '$HOME/.config/RPJosh/RPdb-go/completion.bash.inc'
" >> $HOME/.bashrc
Warning
To improve the performance when starting your terminal, the completion code was cached in a local file completion.bash.inc
instead of executing the command completion bash
each time starting the terminal. Even though this code doesn't change frequently, you should update it when the completion stops working
Configuration
In contrast to the Java console, the configuration is not done via the console. Instead, a simple YAML file is used. The default path to this file is $HOME/.config/RPJosh/RPdb-go/config.yaml
/ %APPDATA%\RPJosh\RPdb-go\config.yaml
. You can also specify a custom file location by using the --config
argument.
An example of the config file with all options is attached below.
user:
# The API-Key to login in
apiKey: 64CharacterLongApiKey
# For security reasons you can also provide the API Key dynamically via a file. The token is then read from the specified field
apiKey_file: /mnt/secrets/apiKey
# Force the use of a specific language for the API. This is a two-digit code (ISO 639).
# Supported values are for example 'de' and 'en'
language: en
# When running multiple instances with the same API-Key (WHICH IS NOT RECOMMENDED),
# you should set this flag to true so that the other client is also notified when an entry or
# attribute was changed
multiInstance: false
# Configuration options for specific attributes. You have to provide at least one value
attributes:
# You can provide an attribute either by name or ID
- id: 123
# Option to hide the attribute from list / show actions. It will still be executed if a "script" was given
hide: false
# Script or program to call when the entry should be executed
program: /home/myUser/RPdb/toggle-wifi.sh
# By default, besides the parameter (#1,...) of the entry additional details like:
# dateTime (#2), attributeName (#3) and entryId (#4) are passed. If you just require
# the raw parameter values, set this flag to true.
passOnlyParameter: false
# Script or program to call when an entry (with an execution time in the past) was deleted.
# The "passOnlyParameter" option is also used here
onDelete: /home/myUser/RPdb/undo-wifi.sh
# Specify by unique attribute name
- name: "Attribute name"
hide: true
# Configure the logger. You can also use the environment variables 'LOGGER_PRINTLEVEL' for that
logger:
# Minium print level for the console (trace, debug, info, warn, error)
printLevel: info
# Minimum log level for the log file
logLevel: warning
# Path to write the logs to. Leave this empty to disable logging to a file
logPath: ""