public inbox for gentoo-user@lists.gentoo.org
 help / color / mirror / Atom feed
From: Alan McKinnon <alan.mckinnon@gmail.com>
To: gentoo-user@lists.gentoo.org
Subject: Re: [gentoo-user] pop up windows with text message
Date: Wed, 10 Jul 2013 11:21:22 +0200	[thread overview]
Message-ID: <51DD2792.70308@gmail.com> (raw)
In-Reply-To: <20130709165430.GC24522@syscon7.inet>

On 09/07/2013 18:54, Joseph wrote:
> How to design a sticky note pop-up when file is present?
> 
> I would like to check if file is present via and open a terminal window
> with a simple message.
> I think a simple bash script and a cron job would do the trick or is
> there a better solution?
> 
> I've tried cron + bash script
> 
> cron:
> 32 10 * * * sh /home/joseph/xp_share/wall.sh
> 
> wall.sh
> terminal
> wall file ready
> 
> When I open terminal and type: "terminal" new windows pops up
> But if close all the terminals and run wall.sh script the terminal will
> not open.
> I get an error message: (terminal:24945): Gtk-WARNING **: cannot open
> display:
> 


You want inotify for this.

You are polling something to discover if it's there, what yu really want
to do is let the kernel notify you when the event you are interested in
occurs.

There are many tools out there that interface with the kernel's inotify
system.


-- 
Alan McKinnon
alan.mckinnon@gmail.com



  parent reply	other threads:[~2013-07-10  9:23 UTC|newest]

Thread overview: 10+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2013-07-09 16:54 [gentoo-user] pop up windows with text message Joseph
2013-07-09 22:52 ` Neil Bothwick
2013-07-10  9:21 ` Alan McKinnon [this message]
2013-07-11  2:48   ` Joseph
2013-07-11  4:47     ` Wang Xuerui
2013-07-11  8:28     ` Neil Bothwick
2013-07-13  3:06       ` Joseph
2013-07-11  5:12 ` Mark David Dumlao
2013-07-13 22:59 ` felix
2013-07-15 18:17   ` Joseph

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=51DD2792.70308@gmail.com \
    --to=alan.mckinnon@gmail.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