Description of problem: 6_s1: xmessage fails to run in root cron jobs. Email failure message: /etc/cron.hourly/_hourly: /local/cron/hourly/ck_mail_spool: No protocol specified xcb_connection_has_error() returned true I have a common partition (/local) shared between all installs. Install script creates links from /etc/cron* to /local/cron/* In other words, if it works in /mga5(4,3,2,Mandriva) they should still work on cauldron. Version-Release number of selected component (if applicable): How reproducible: Always Steps to Reproduce: 1. save following as test_case 2. chmod +x test_case 3. verify it works. ./test_case 4. Put it in /etc/cron.hourly with cp test_case /etc/cron.hourly or link it ln -sf $PWD/test_case /etc/cron.hourly/ 5. two minutes after the hour you should have a pop up message or a failure message in root's mail box. 6. as root: cat /var/mail/root -----8<----8<----8<- cut below this line---8<----8< #!/bin/bash export PATH=/usr/local/sbin:/usr/sbin:/sbin:/usr/local/bin:/usr/bin:/bin export DISPLAY=:0 export COLUMNS=80 export LINES=24 xhost +localhost:root > /dev/null 2>&1 xhost +localhost > /dev/null 2>&1 xhost +$(cat /etc/hostname) > /dev/null 2>&1 nohup xmessage "\ # message from test_case. # when done: rm -f /etc/cron.daily/test_case " > /dev/null 2>&1 & sleep 2 #********* end test_case *******************************
Have you researched your error message: "No protocol specified xcb_connection_has_error() returned true" and found anything about that? I agree that based on your script you pasted, it should work.
(In reply to David Walser from comment #1) > Have you researched your error message: > "No protocol specified > xcb_connection_has_error() returned true" > > and found anything about that? Yep, that is how I found out about trying +localhost:root. Also compared/verified /etc/ssh/sshd_config and /mga5 were functionally the same. > I agree that based on your script you pasted, it should work. Yes, and this is a show stopper for me. As you can see I have a few scripts using it: $ ls /local/cron/hourly ck_4_rpms ck_mail_spool clean_score php.cron ck_connection ck_mythtv_storage create_run_user pull_updates ck_ir_tuner ck_systemctl_service cron_perms sys_audit and same amount of scripts over in /local/cron/daily. I even have xmessage alarms from other systems to get my attention.
Assigning to all packagers collectively, since there is no maintainer for xmessage. Please reassign if the culprit is a different package.
CC: (none) => marja11Assignee: bugsquad => pkg-bugsSource RPM: (none) => xmessage???
(In reply to Marja van Waes from comment #3) > Assigning to all packagers collectively, since there is no maintainer for > xmessage. Please reassign if the culprit is a different package. I am pretty sure it is not a xmessage problem. My guess, root cause of bug 19038 or/and bug 19039 help resolve this bug.
Summary: 6_s1: xmessage fails to run in root cron jobs. => 6_s1: xmessage fails to run in root or user cron jobs.
Sorry about toggling the title. None of my user cron jobs had a condition needed to run xmessage. I created a false one and xmessage launched a pop up. root cron jobs are still broke.
Summary: 6_s1: xmessage fails to run in root or user cron jobs. => 6_s1: xmessage fails to run in root or cron jobs.
Solution is to add the following to root cron jobs needing X11 access xhost +si:localuser:root
Status: NEW => RESOLVEDResolution: (none) => FIXED