public inbox for gentoo-user@lists.gentoo.org
 help / color / mirror / Atom feed
From: Michael <confabulate@kintzios.com>
To: gentoo-user@lists.gentoo.org
Subject: Re: [gentoo-user] cronie setup questions
Date: Wed, 09 Oct 2024 17:45:47 +0100	[thread overview]
Message-ID: <8452477.T7Z3S40VBb@rogueboard> (raw)
In-Reply-To: <MTAwMDAyOC53ZG5lc2RheQ.1728487885@quikprotect>

[-- Attachment #1: Type: text/plain, Size: 1790 bytes --]

On Wednesday 9 October 2024 16:31:16 BST Walter Dnes wrote:
> On Thu, Oct 03, 2024 at 07:47:34PM -0400, Walter Dnes wrote
> 
> >   The Gentoo install suggested using "cronie".  I want to run a script
> > 
> > daily as local user.  The config I want is...
> > 
> > 35 7 * * * waltdnes /home/waltdnes/pm/check4update/check4update
> 
>   My email shows that the job is launching, but tripping over
> permissions.  Here's what it's supposed to do...
> 
> * Because I'm running a custom build of Pale Moon web browser, I can't
>   use the built-in updater from the standard version
> * I want to check the palemoon.org Atom feed for new releases
> * A text file "previous.txt" has the date stamp of the most recent entry
> * bash script "check4update"...
> *** wget's the webpage
> *** greps the "<published>" lines
> *** the top line has the most recent posting
> *** compare the the most recent <published> date with "previous.txt"
> *** if the same, exit
> *** if not the same...
> *** 1) update "previous.txt" with the newest date
> *** 2) use "geeqie" to display a garish messege about the update
> 
>   That last step is the problem.  I get the following error...
> 
> (geeqie:14531): Gtk-WARNING **: 07:35:01.797: cannot open display:
> 
>   What do I need to do to allow "geeqie" to open up in an X window as
> user "waltdnes".

You could let it know which display to use in your script, something like:

export DISPLAY=:0

However, it gets more complicated if a user is not logged in whenever the 
script happens to run and if the display is on :1 or some other value.  You 
would probably need to fish for $DISPLAY using awk or something similar and 
feed this into your script before your '/usr/bin/geeqie %u'.  Someone more 
knowledgable on scripting languages will hopefully advise.

[-- Attachment #2: This is a digitally signed message part. --]
[-- Type: application/pgp-signature, Size: 833 bytes --]

      parent reply	other threads:[~2024-10-09 16:45 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2024-10-03 23:47 [gentoo-user] cronie setup questions Walter Dnes
2024-10-04  1:58 ` Dale
2024-10-04  4:58 ` Arve Barsnes
2024-10-09 15:31 ` Walter Dnes
2024-10-09 16:43   ` Arve Barsnes
2024-10-09 16:45   ` Michael [this message]

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=8452477.T7Z3S40VBb@rogueboard \
    --to=confabulate@kintzios.com \
    --cc=gentoo-user@lists.gentoo.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox