You are not logged in.
Hi there...
Subject states it all. I did what the wiki explains without success. The x app is a script that calls zenity. The script itself works fine when called from command line.
The user with the crontab is member of the users group
[miguel@miguel ~]$ id
uid=1000(miguel) gid=100(users) grupos=100(users)
[miguel@miguel ~]$I also did a test writing to a text file in the filesystem (to make sure cronie was running) and - as expected - the file was created ![]()
Here the packages installed:
xorg-server 1.13.2-1
gnome-shell 3.6.3-2
cronie 1.4.9-2
I'm lost so it would be great if someone have any hints about this subject.
Best,
Last edited by mmf1902 (2013-02-25 05:07:40)
Offline
Here is the simple bash script:
#!/bin/bash
export DISPLAY=:0.0 ; zenity --notification --text='cronie' --timeout=3Here is also the crontab
[miguel@miguel ~]$ crontab -l
*0,*5 * * * * /home/miguel/bin/script
[miguel@miguel ~]$And the status of daemon
[miguel@miguel ~]$ systemctl status cronie.service
cronie.service - Periodic Command Scheduler
Loaded: loaded (/usr/lib/systemd/system/cronie.service; enabled)
Active: active (running) since dom 2013-02-24 02:29:43 CST; 42min ago
Main PID: 419 (crond)
CGroup: name=systemd:/system/cronie.service
├─ 419 /usr/sbin/crond -n
├─2321 /usr/sbin/anacron -s
├─2391 dbus-launch --autolaunch=8a12598c04f64f4bb39568fa398...
└─2392 /usr/bin/dbus-daemon --fork --print-pid 5 --print-ad...Offline
You have to set DBUS_SESSION_BUS_ADDRESS to send notifications. This should get you started: https://bbs.archlinux.org/viewtopic.php?id=121788
Offline
Stebalien you are the one...
Here is the script modified:
[miguel@miguel bin]$ cat script
#!/bin/bash
PIDS=$(pgrep gnome-shell)
for p in $PIDS; do
dbus=$(grep -z DBUS_SESSION_BUS_ADDRESS /proc/$p/environ | sed 's/DBUS_SESSION_BUS_ADDRESS=//')
user=$(grep -z USER /proc/$p/environ | sed 's/USER=//')
dply=$(grep -z DISPLAY /proc/$p/environ | sed 's/DISPLAY=//')
done
export DISPLAY=$dply
export DBUS_SESSION_BUS_ADDRESS=$dbus
zenity --notification --text='cronie' --timeout=3
[miguel@miguel bin]$ Thank you very much.
I will change this post as solved.
Best,
Offline