Re: fedora 38 cron zenity

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Jul 19, 2023, at 09:18, Joe Feely via users <users@xxxxxxxxxxxxxxxxxxxxxxx> wrote:
> I have a few little scripts that crontab runs. Well it runs the espeak commands but no sign of it running the zenity bits
> 
> In crontab:-
> 0 * * * * ./Joe-drink-water-reminder
> 
> File Joe-drink-water-reminder contains:-
> espeak -a15 -p25 -s160 "Hey, get Joe a drink of water"
> zenity --info --title "Joe and water drinking" --width=850 --height=250 --text "<span foreground='blue' font='72'>drink</span>"
> 
> This works in a terminal with ./Joe-drink-water-reminder (including doing the zenity command), BUT not when cron initiates it (it only does the espeak bit).
> 
> This worked fine in f37 and earlier, just not f38.
> Any pointers (I've "googled" it with no success)

Tasks running in cron are running in a completely different session than your graphical login session, so they can’t launch graphical processes (although you can sometimes set the righ environment variables to trick it). Audio that interacts directly with the sound device will likely work because the user is granted access to the device.  I think pipewire and pulseaudio have a socket that is well known so that should work too.

You might get a better result by running them in a systemd --user timer unit, which I believe will run in your login session.

-- 
Jonathan Billings
_______________________________________________
users mailing list -- users@xxxxxxxxxxxxxxxxxxxxxxx
To unsubscribe send an email to users-leave@xxxxxxxxxxxxxxxxxxxxxxx
Fedora Code of Conduct: https://docs.fedoraproject.org/en-US/project/code-of-conduct/
List Guidelines: https://fedoraproject.org/wiki/Mailing_list_guidelines
List Archives: https://lists.fedoraproject.org/archives/list/users@xxxxxxxxxxxxxxxxxxxxxxx
Do not reply to spam, report it: https://pagure.io/fedora-infrastructure/new_issue



[Index of Archives]     [Older Fedora Users]     [Fedora Announce]     [Fedora Package Announce]     [EPEL Announce]     [EPEL Devel]     [Fedora Magazine]     [Fedora Summer Coding]     [Fedora Laptop]     [Fedora Cloud]     [Fedora Advisory Board]     [Fedora Education]     [Fedora Security]     [Fedora Scitech]     [Fedora Robotics]     [Fedora Infrastructure]     [Fedora Websites]     [Anaconda Devel]     [Fedora Devel Java]     [Fedora Desktop]     [Fedora Fonts]     [Fedora Marketing]     [Fedora Management Tools]     [Fedora Mentors]     [Fedora Package Review]     [Fedora R Devel]     [Fedora PHP Devel]     [Kickstart]     [Fedora Music]     [Fedora Packaging]     [Fedora SELinux]     [Fedora Legal]     [Fedora Kernel]     [Fedora OCaml]     [Coolkey]     [Virtualization Tools]     [ET Management Tools]     [Yum Users]     [Yosemite News]     [Gnome Users]     [KDE Users]     [Fedora Art]     [Fedora Docs]     [Fedora Sparc]     [Libvirt Users]     [Fedora ARM]

  Powered by Linux