Mailinglist Archive: opensuse (795 mails)

< Previous Next >
Re: [opensuse] KDE and directories
  • From: Per Jessen <per@xxxxxxxxxxxx>
  • Date: Tue, 07 Nov 2017 13:23:45 +0100
  • Message-id: <ots8kh$o6d$1@saturn.local.net>
Roger Oberholtzer wrote:

On Tue, Nov 7, 2017 at 11:59 AM, Per Jessen <per@xxxxxxxxxxxx> wrote:
Roger Oberholtzer wrote:

I think I know the answer to this (and Google was no help), but I
thought I would ask in case I messed something very obvious:

Is it possible to have KDE run a program when you enter a directory?
Say in Dolphin. We want to sense if the current directory contains a
file with a specific name. If so, do something. The point is that it
should be automatic. And it must be done for all directories. There
is no name rule or pattern that can be used.

I presume entering means changing current working directory to <some
directory>.
Monitoring that sounds like a job for inotify - but I am not sure if
changing current working directory is a filesystem event.

How is the file created? It might be better to monitor all
directories for a user and only look for that file being created or
updated.

The file is updated independent of this. It contains status
information about the data in that directory. This status information
should be used to update a map (Navit) to reflect the status of the
data in that directory. It only applies to the current directory.

"current directory" is a status for a process, a user likely has several
processes, each with a current directory.

So a cron job is not appropriate. It must be triggered by the user
entering the directory.

A user can enter a directory when e.g. a cronjob is started with his
userid. Does that count too?



--
Per Jessen, Zürich (7.6°C)
http://www.dns24.ch/ - your free DNS host, made in Switzerland.


--
To unsubscribe, e-mail: opensuse+unsubscribe@xxxxxxxxxxxx
To contact the owner, e-mail: opensuse+owner@xxxxxxxxxxxx

< Previous Next >
Follow Ups