Active Directories


Browsing thry the GNOME bug database, I came along #63128.

I think the "Active Folders" thing is a great idea.  I *do not*,
however, think that building it into Nautilus is too smooth of an idea. 
That would bloat Nautilus, and then only make these active folders work
when in Nautilus, which is bad.

So, I wrote a super quicky little program that does something very very
simple; it scans a set of directories.  When it finds a file that does
not begin with a . (no hidden files, or worrying about .. or anythign)
is calls a script.  The program jsut does that.  I have have made an
~/Active/Print directory, attached to ~/Active/.scripts/Print script,
which sends the file out to lpr.  It works great. ^,^

Of course, the problem with the above is that dropping a file that is
not recognized by the print filters (.abw) doesn't do what one would
want.  I think gnome-print needs to be able to be launched in
"background" mode to take a file, load a bonobo-print filter if
necessary, and send it off to a GNOME-recognized printer.  That way we
could have centralized printer config, and also allow GNOME documents to
be easily printable from outside the GNOME apps.  Something like:

if gnome-print-spool --handles `gnome-mime-type "$FILE"` ; then
        gnome-print-spool --default-printer "$FILE"
        lpr "$FILE"

Of course, much better scripts could be ritten, and allow sys admins to
add more scripts to a /etc/print-spool.d/ directory or something, to
allow arbitrary apps to print their documents (perhaps tie it into lpr
or CUPS or something).  But that's off my original topic, isn't it?  ~,^

Anyways, the result of my work is that there is now a daemon wich works
no matter whether you are using Nautilus, GMC, saving in AbiWord, or
using the CLI.  The daemon scans for both a system and user config
file.  It is thus very usable by system admins to setup "Active
Directories," even on non-GNOME boxes.

The best way to configure this, I think, is to have the daemon launched
at login for each user (like how ssh-agent is).  The reasons are to A)
allow users to use their own config files, and B) allow the scripts to
pop up dialogs or soemthing ("Are You Sure?") which would require access
to the display.  Of course, the downside to this is if every user logged
in has a daemon monitoring /var/active/print or something; not only
would it be a waste of CPU time, but also the scripts would have to be
intelligent and check the owner of any files scanned.  But, in the end,
it makes things easier for the user; perhaps FAM can make it more

I want the daemon to use FAM, but since there are no Debian packages and
I can't get the damn thing to compile on any of my Debian boxes (all I
have here at home), it currently uses a very ugly sleep/scan loop.  I
will fix that when I can get FAM running on this machine.  (and of
course leave it there, although more optimized, for those without FAM
that want to use it).

Assuming the name Active Directory is OK (too Microsoft-ish?) I'll
release the GNOME Active Directory Daemon (GADD) sometime soon.  I'll
put up a copy of my one hour's work now if anyone is interested (note:
it still sucks right now, but at least it works).

Also, if it's to be included in future GNOME releases, may I use the BSD
(minus advertising clause) license, or do I have to use the Generally
Prohibitive License?  (And *NO*, I'm not a real GPL hater, I use it in
my biggest project; I just don't like using the GPL for system-related

Oh, btw, happy Thanksgiving to everyone who celebrated it today!  And
happy Thursday the 22nd to everyone who didn't!  ~,^

Sean Etc.

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