diff --git a/src/freedombone-image-customise b/src/freedombone-image-customise index 8396135f..aa3d79c1 100755 --- a/src/freedombone-image-customise +++ b/src/freedombone-image-customise @@ -586,6 +586,10 @@ function mesh_client_startup_applications { echo 'dconf write /org/mate/caja/desktop/volumes-visible false' >> $START_DESKTOP echo 'dconf write /org/mate/desktop/media-handling/automount-open false' >> $START_DESKTOP echo 'dconf write /org/mate/desktop/screensaver/lock-enabled false' >> $START_DESKTOP + echo "touch /home/$MY_USERNAME/.dbus/Xdbus" >> $START_DESKTOP + echo "chmod 600 /home/$MY_USERNAME/.dbus/Xdbus" >> $START_DESKTOP + echo "env | grep DBUS_SESSION_BUS_ADDRESS > /home/$MY_USERNAME/.dbus/Xdbus" >> $START_DESKTOP + echo "echo 'export DBUS_SESSION_BUS_ADDRESS' >> /home/$MY_USERNAME/.dbus/Xdbus" >> $START_DESKTOP chmod +x $START_DESKTOP START_DESKTOP2=$rootdir/home/$MY_USERNAME/.config/autostart/mesh-start.desktop @@ -646,6 +650,8 @@ function configure_user_interface { # to provide notifications chroot "$rootdir" apt-get -y install libnotify-bin + # some dbus stuff to enable notifications + if [[ $VARIANT != "usb" ]]; then # log in automatically chroot "$rootdir" apt-get -y install nodm xinit diff --git a/src/zeronetavahi b/src/zeronetavahi index 80a5902a..3e01cb78 100755 --- a/src/zeronetavahi +++ b/src/zeronetavahi @@ -132,7 +132,12 @@ function detect_new_tox_users { # get the nick of the user toxuser="$(echo "$line" | awk -F ' ' '{print $1}')" - export DISPLAY=:0.0 && export XAUTHORITY=/home/$MESH_USERNAME/.Xauthority && sudo -u MESH_USERNAME /usr/bin/notify-send $"$toxuser" $"has joined the mesh" --icon=dialog-information + if [ -r "/home/$MESH_USERNAME/.dbus/Xdbus" ]; then + . "/home/$MESH_USERNAME/.dbus/Xdbus" + fi + export DISPLAY=:0.0 + export XAUTHORITY=/home/$MESH_USERNAME/.Xauthority + sudo -u MESH_USERNAME /usr/bin/notify-send $"$toxuser" $"has joined the mesh" --icon=dialog-information break fi fi