You are on page 1of 1

#!

/bin/bash
# Check whether the user is logged-in
while [ -z "$(pgrep gnome-session -n -U $UID)" ]; do sleep 3; done
# Export the current desktop session environment variables
export $(xargs -0 -a "/proc/$(pgrep gnome-session -n -U $UID)/environ")
# Execute the input command
nohup "notify-send 'Es hora de tomar un descanso, $USER'" >/dev/null 2>&1 & exit 0

#!/bin/bash
# Check whether the user is logged-in
while [ -z "$(pgrep gnome-session -n -U $UID)" ]; do sleep 3; done
# Export the current desktop session environment variables
export $(xargs -0 -a "/proc/$(pgrep gnome-session -n -U $UID)/environ")
# Execute the input command
notify-send "Es hora de tomar un descanso, $USER" >/dev/null 2>&1 & exit 0

*/1 * * * * /home/usuario/escribirmensaje.sh

You might also like