It would appear that on Aug 19, P Purkayastha did say:

> On 08/19/2010 12:37 AM, Joe(theWordy)Philbrook wrote:
> > I don't know how to write a script that checks if an
> > application is running and then tells it to gracefully quit.
> > But I'm thinking it would have to do something like (using
> > OpenOffice as an example):
> > 
> > piD=$(ps -A| grep soffice.bin |cut -d' ' -f2)
> > if [ "$piD" != "" ]
> >     then
> >     kill -15 $piD
> > fi
> > 
> > 
> > Except that:
> > 
> > 
> > problem 1) kill 15 only preserves the unsaved changes in OO.o
> >            docs via it's crash/recovery process... (I can't
> >        find a signal that causes it to ask me about unsaved
> >        changes...
> > 
> > ---<snipped more details of same problem...>---
> > 
> > But surely there must be a more graceful way to close gui apps
> > than kill -15????
 
> There is usually a graceful way for some apps. You will have to 
> individually treat each app, check whether it is running, and if it is 
> running then use commands adapted to that particular app.
> 
> For example all gvim instances run as servers (vim probably doesn't by 
> default) and you can send remote commands to them and make them save and 
> quit. Similarly, many apps have dbus instances and often if you browse 
> through the dbus tree, you will find that it has a quit command.

Do you mean that the developers/maintainers of various desktops that do
automatically convince most gui apps to prompt for unsaved changes during
a standard graceful shutdown process such as e17, kde, xfce, and I think
gnome, etc...  use, actually have to research the appropriate commands
for each and every individual app??? Or is there a cheat sheet somewhere
that has a list of applications in one column and a list of "_clean_
terminate session" commands in the other??? If the former then they work
too hard. 

I mean armed with such a list I could probably cobble something together
for the ones I use. 
Mostly:
OO.o    : which will at least try to save me with it's recovery process
abiword : ???
lyx     : which periodically does an auto save to it's backup copy

But as it is, I haven't a clue where to look for such commands. I sure don't
recall finding anything about such things in any application:menu:help nor
"man application" output. Though it could be hidden in some of the
techno-jargon that sails over my head...

But I only use abiword occasional (mostly when I want to export/import a
document to/from MSword  via RTF. {it takes less reformatting
margins/bullets/etc than doing the same with OO.o}). Both lyx and OO.o will
at least TRY to preserve my data via their recovery on "next start" or
"file open".

So if there isn't an available cheat sheet list, I guess I'll have to
continue scrolling through my virtual desktops, shutting things down prior
to calling whatever logout process I'm using.

-- 
|    ^^^   ^^^
|    <o>   <o>      Joe (theWordy) Philbrook
|        ^               J(tWdy)P
|       ___         <<jtw...@ttlc.net>>

       <sigh>


------------------------------------------------------------------------------
This SF.net email is sponsored by 

Make an app they can't live without
Enter the BlackBerry Developer Challenge
http://p.sf.net/sfu/RIM-dev2dev 
_______________________________________________
enlightenment-users mailing list
enlightenment-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/enlightenment-users

Reply via email to