Skip to content
Snippets Groups Projects
Commit 97d93ab7 authored by Bob Mottram's avatar Bob Mottram
Browse files

Some dbus settings to enable mesh notifications

parent 98afac9c
No related branches found
No related tags found
No related merge requests found
......@@ -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
......
......@@ -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
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment