Creating a bug report/issue
I have searched the existing open and closed issues
Required Information
- DietPi version
G_DIETPI_VERSION_CORE=8
G_DIETPI_VERSION_SUB=25
G_DIETPI_VERSION_RC=1
G_GITBRANCH='master'
G_GITOWNER='MichaIng'
- Distro version
bullseye
- Kernel version
Linux OrangePi 5.10.43 #3.0.6 SMP Mon Aug 1 14:28:13 CST 2022 aarch64 GNU/Linux
- Architecture
arm64
-
SBC model
Generic Rockchip RK3399 (aarch64)
(Orange Pi 4) -
Power supply used
5v 3A -
SD card used
Kingston 16 GB
Additional Information (if applicable)
-
Software title
Jotta-cli (Jottacloud terminal control) -
Was the software title installed freshly or updated/migrated?
Freshly installed from apt sources provided by jottacloud (jottacloud.com) -
Can this issue be replicated on a fresh installation of DietPi?
Yes
← If you sent a “dietpi-bugreport”, please paste the ID here →
Steps to reproduce
- Install the software step by step as indicated in the web
- run the command run_jottad
Expected behaviour
- The file /usr/lib/systemd/user/jottad.service must be read by systemctl and the daemon must start.
Actual behaviour
Starting via systemd...
Failed to connect to bus: $DBUS_SESSION_BUS_ADDRESS and $XDG_RUNTIME_DIR not defined (consider using --machine=<user>@.host --user to connect to bus of other user)
Failed to load systemd units. If systemd is not supported, please 'export JOTTAD_SYSTEMD=0' before running this command.
Failed to connect to bus: $DBUS_SESSION_BUS_ADDRESS and $XDG_RUNTIME_DIR not defined (consider using --machine=<user>@.host --user to connect to bus of other user)
Failed to connect to bus: $DBUS_SESSION_BUS_ADDRESS and $XDG_RUNTIME_DIR not defined (consider using --machine=<user>@.host --user to connect to bus of other user)
Extra details
Tried with users root and dietpi with the same behavior. It seems the variables are not declared:
export $(dbus-launch)
-bash: dbus-launch: orden no encontrada
declare -x HOME="/root"
declare -x LANG="es_ES.UTF-8"
declare -x LOGNAME="root"
declare -x MOTD_SHOWN="pam"
declare -x OLDPWD
declare -x PATH="/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin"
declare -x PWD="/root"
declare -x SHELL="/bin/bash"
declare -x SHLVL="1"
declare -x SSH_CLIENT="192.168.0.55 33000 22"
declare -x SSH_CONNECTION="192.168.0.55 33000 192.168.0.54 22"
declare -x SSH_TTY="/dev/pts/0"
declare -x TERM="xterm-256color"
declare -x USER="root"
This is the run_jottad script:
cat /usr/bin/run_jottad
#!/usr/bin/env bash
set -uo pipefail
systemd_stop_if_active() {
service="$1";
if command -v systemctl &> /dev/null && systemctl --user is-active -q "$service"; then
systemctl --user stop "$service"
fi
}
kill_all() {
if [ "$JOTTAD_KILL" = "1" ]; then
systemd_stop_if_active "jottad"
fi
killall jottad &> /dev/null && echo Shutting down jottad service...
}
start_systemd() {
echo Starting via systemd...
systemd_errmsg="Failed to load systemd units. If systemd is not supported, please 'export JOTTAD_SYSTEMD=0' before running this command."
systemctl --user daemon-reload || echo "$systemd_errmsg"
enabled=$(systemctl --user is-enabled jottad.service)
if [ "$JOTTAD_AUTOSTART" = "1" ] && [ "$enabled" = "disabled" ]; then
systemctl --user enable jottad.service
elif [ "$JOTTAD_AUTOSTART" = "0" ] && [ "$enabled" = "enabled" ]; then
systemctl --user disable jottad.service
fi
systemctl --user restart jottad.service
}
start_background() {
echo Launching jottad service...
jottad datadir $data_dir &
}
startup_all() {
lockfile="$runtime_dir/jottad.pid"
if command -v flock &> /dev/null && [ -e "$lockfile" ] ; then
flock "$lockfile" true
fi
if [ "$JOTTAD_SYSTEMD" = "1" ]; then
start_systemd
else
start_background
fi
echo 'run_jottad: Success!'
}
JOTTAD_AUTOSTART="${JOTTAD_AUTOSTART:-1}"
JOTTAD_KILL="${JOTTAD_KILL:-0}"
JOTTAD_SYSTEMD="${JOTTAD_SYSTEMD:-1}"
runtime_dir="${XDG_RUNTIME_DIR:-$HOME/.config}/jottad"
data_dir="${HOME}/.jottad"
kill_all
if [ "$JOTTAD_KILL" = "0" ]; then
startup_all
fi
Any help will be greatly appreciated