Some dbus settings to enable mesh notifications
This commit is contained in:
parent
98afac9c4a
commit
97d93ab7d0
|
@ -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/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/media-handling/automount-open false' >> $START_DESKTOP
|
||||||
echo 'dconf write /org/mate/desktop/screensaver/lock-enabled 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
|
chmod +x $START_DESKTOP
|
||||||
|
|
||||||
START_DESKTOP2=$rootdir/home/$MY_USERNAME/.config/autostart/mesh-start.desktop
|
START_DESKTOP2=$rootdir/home/$MY_USERNAME/.config/autostart/mesh-start.desktop
|
||||||
|
@ -646,6 +650,8 @@ function configure_user_interface {
|
||||||
# to provide notifications
|
# to provide notifications
|
||||||
chroot "$rootdir" apt-get -y install libnotify-bin
|
chroot "$rootdir" apt-get -y install libnotify-bin
|
||||||
|
|
||||||
|
# some dbus stuff to enable notifications
|
||||||
|
|
||||||
if [[ $VARIANT != "usb" ]]; then
|
if [[ $VARIANT != "usb" ]]; then
|
||||||
# log in automatically
|
# log in automatically
|
||||||
chroot "$rootdir" apt-get -y install nodm xinit
|
chroot "$rootdir" apt-get -y install nodm xinit
|
||||||
|
|
|
@ -132,7 +132,12 @@ function detect_new_tox_users {
|
||||||
# get the nick of the user
|
# get the nick of the user
|
||||||
toxuser="$(echo "$line" | awk -F ' ' '{print $1}')"
|
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
|
break
|
||||||
fi
|
fi
|
||||||
fi
|
fi
|
||||||
|
|
Loading…
Reference in New Issue