Re: stopping cinnamon-started apps at logout

2014-05-14 Thread Ed Greshko
On 05/15/14 11:27, Garry T. Williams wrote:
> On 5-12-14 11:21:51 Ahmad Samir wrote:
>> On 11/05/14 18:52, Wolfgang S. Rupprecht wrote:
>>> I'd assumed that the apps started by cinnamon when I logged in
>>> would also be killed when I logged out.  That doesn't seem to be
>>> the case for non-X11 programs that hang around forever and watch
>>> files.
>> I am not sure but it could be systemd-logind; try editing
>> /etc/systemd/logind.conf and change:
>>
>> #KillUserProcesses=no
>>
>> to KillUserProcesses=yes
>>
>> then reboot the system or restart systemd-logind.service.
>>
>> (Check the logind.conf manual page for more details).
> Although this may very well be the solution that Wolfgang is looking
> for, I suspect that there will be a more fine-grained option evolving
> sometime in the future.  The problem is, how do you kill the programs
> you want killed off upon logout without killing something like
> screen(1)?
>

Well, the 2 "display manager" specific options mentioned earlier, which run 
scripts that can be tailored to individual needs, would seem to fit that bill.

-- 
Do not condemn the judgment of another because it differs from your own. You 
may both be wrong. -- Dandemis
-- 
users mailing list
users@lists.fedoraproject.org
To unsubscribe or change subscription options:
https://admin.fedoraproject.org/mailman/listinfo/users
Fedora Code of Conduct: http://fedoraproject.org/code-of-conduct
Guidelines: http://fedoraproject.org/wiki/Mailing_list_guidelines
Have a question? Ask away: http://ask.fedoraproject.org


Re: stopping cinnamon-started apps at logout

2014-05-14 Thread Garry T. Williams
On 5-12-14 11:21:51 Ahmad Samir wrote:
> On 11/05/14 18:52, Wolfgang S. Rupprecht wrote:
> > I'd assumed that the apps started by cinnamon when I logged in
> > would also be killed when I logged out.  That doesn't seem to be
> > the case for non-X11 programs that hang around forever and watch
> > files.
>
> I am not sure but it could be systemd-logind; try editing
> /etc/systemd/logind.conf and change:
>
> #KillUserProcesses=no
>
> to KillUserProcesses=yes
>
> then reboot the system or restart systemd-logind.service.
>
> (Check the logind.conf manual page for more details).

Although this may very well be the solution that Wolfgang is looking
for, I suspect that there will be a more fine-grained option evolving
sometime in the future.  The problem is, how do you kill the programs
you want killed off upon logout without killing something like
screen(1)?

-- 
Garry T. Williams

-- 
users mailing list
users@lists.fedoraproject.org
To unsubscribe or change subscription options:
https://admin.fedoraproject.org/mailman/listinfo/users
Fedora Code of Conduct: http://fedoraproject.org/code-of-conduct
Guidelines: http://fedoraproject.org/wiki/Mailing_list_guidelines
Have a question? Ask away: http://ask.fedoraproject.org


Re: stopping cinnamon-started apps at logout

2014-05-12 Thread Wolfgang S. Rupprecht

Ahmad Samir  writes:
> On 11/05/14 18:52, Wolfgang S. Rupprecht wrote:
>> I'd assumed that the apps started by cinnamon when I logged in would
>> also be killed when I logged out.  That doesn't seem to be the case for
>> non-X11 programs that hang around forever and watch files.  Those
>> programs just get passed off to PID 1 when one logs out and continue on
>> their merry way till the system reboots.  If one logs in again, another
>> instance of the program is started.
> I am not sure but it could be systemd-logind; try editing
> /etc/systemd/logind.conf and change:
>
> #KillUserProcesses=no
>
> to
> KillUserProcesses=yes

Thanks!  That is a great find.  I'll try. 

-wolfgang
-- 
users mailing list
users@lists.fedoraproject.org
To unsubscribe or change subscription options:
https://admin.fedoraproject.org/mailman/listinfo/users
Fedora Code of Conduct: http://fedoraproject.org/code-of-conduct
Guidelines: http://fedoraproject.org/wiki/Mailing_list_guidelines
Have a question? Ask away: http://ask.fedoraproject.org


Re: stopping cinnamon-started apps at logout

2014-05-12 Thread Ahmad Samir

On 11/05/14 18:52, Wolfgang S. Rupprecht wrote:


I'd assumed that the apps started by cinnamon when I logged in would
also be killed when I logged out.  That doesn't seem to be the case for
non-X11 programs that hang around forever and watch files.  Those
programs just get passed off to PID 1 when one logs out and continue on
their merry way till the system reboots.  If one logs in again, another
instance of the program is started.

The exact program I'm running is a IMAP watcher that watches my remote
INBOX and grabs the new mail as soon as it arrives.   It would be good
if it stopped when I logged out.

   /usr/bin/getmail --idle=INBOX

Any ideas?  Do I have to keep track of the PID myself and find a logout
hook to hang a kill -HUP onto?  Does .bash_logout or .logout even get
called?

  -wolfgang



I am not sure but it could be systemd-logind; try editing 
/etc/systemd/logind.conf and change:


#KillUserProcesses=no

to
KillUserProcesses=yes

then reboot the system or restart systemd-logind.service.

(Check the logind.conf manual page for more details).

--
Ahmad Samir
--
users mailing list
users@lists.fedoraproject.org
To unsubscribe or change subscription options:
https://admin.fedoraproject.org/mailman/listinfo/users
Fedora Code of Conduct: http://fedoraproject.org/code-of-conduct
Guidelines: http://fedoraproject.org/wiki/Mailing_list_guidelines
Have a question? Ask away: http://ask.fedoraproject.org


Re: stopping cinnamon-started apps at logout

2014-05-11 Thread Ed Greshko
On 05/12/14 07:39, Wolfgang S. Rupprecht wrote:
> Ed Greshko  writes:
>> I found this for gnome/gdm.   Maybe it will be useful for you if you use gdm?
>>
>> http://www.linuxquestions.org/questions/linux-desktop-74/gnome-run-script-on-logout-724453/
> I may have to do that.  Thanks.

Welcome.  Sorry to take the round-about path to a solution.
>
> Strikes me as an oversight that one has to hack a file together and
> install that with root privs.  Whatever is starting the apps really
> should kill it too.
>

I don't use "getmail" but maybe it is thought that this would be a good program 
to keep running in the background so that the next time you login all your 
email is already downloaded to your local store?



-- 
Do not condemn the judgment of another because it differs from your own. You 
may both be wrong. -- Dandemis
-- 
users mailing list
users@lists.fedoraproject.org
To unsubscribe or change subscription options:
https://admin.fedoraproject.org/mailman/listinfo/users
Fedora Code of Conduct: http://fedoraproject.org/code-of-conduct
Guidelines: http://fedoraproject.org/wiki/Mailing_list_guidelines
Have a question? Ask away: http://ask.fedoraproject.org


Re: stopping cinnamon-started apps at logout

2014-05-11 Thread Wolfgang S. Rupprecht

Ed Greshko  writes:
> I found this for gnome/gdm.   Maybe it will be useful for you if you use gdm?
>
> http://www.linuxquestions.org/questions/linux-desktop-74/gnome-run-script-on-logout-724453/

I may have to do that.  Thanks.

Strikes me as an oversight that one has to hack a file together and
install that with root privs.  Whatever is starting the apps really
should kill it too.

-wolfgang
-- 
users mailing list
users@lists.fedoraproject.org
To unsubscribe or change subscription options:
https://admin.fedoraproject.org/mailman/listinfo/users
Fedora Code of Conduct: http://fedoraproject.org/code-of-conduct
Guidelines: http://fedoraproject.org/wiki/Mailing_list_guidelines
Have a question? Ask away: http://ask.fedoraproject.org


Re: stopping cinnamon-started apps at logout

2014-05-11 Thread Ed Greshko
On 05/12/14 07:16, Ed Greshko wrote:
> On 05/12/14 00:52, Wolfgang S. Rupprecht wrote:
>> Any ideas?  Do I have to keep track of the PID myself and find a logout
>> hook to hang a kill -HUP onto?  Does .bash_logout or .logout even get
>> called?
> FWIW, I know you're running cinnamon, I just had to go back and figure out 
> what I did several fedora versions ago to kill off a program in a similar 
> situation.  I knew that I did itbut my memory hadn't kicked yet.
>
> I use KDE and KDE has a directory called /etc/kde/shutdown where you can 
> place scripts to run on logout.
>
>

I found this for gnome/gdm.   Maybe it will be useful for you if you use gdm?

http://www.linuxquestions.org/questions/linux-desktop-74/gnome-run-script-on-logout-724453/


-- 
Do not condemn the judgment of another because it differs from your own. You 
may both be wrong. -- Dandemis
-- 
users mailing list
users@lists.fedoraproject.org
To unsubscribe or change subscription options:
https://admin.fedoraproject.org/mailman/listinfo/users
Fedora Code of Conduct: http://fedoraproject.org/code-of-conduct
Guidelines: http://fedoraproject.org/wiki/Mailing_list_guidelines
Have a question? Ask away: http://ask.fedoraproject.org


Re: stopping cinnamon-started apps at logout

2014-05-11 Thread Ed Greshko
On 05/12/14 00:52, Wolfgang S. Rupprecht wrote:
> Any ideas?  Do I have to keep track of the PID myself and find a logout
> hook to hang a kill -HUP onto?  Does .bash_logout or .logout even get
> called?

FWIW, I know you're running cinnamon, I just had to go back and figure out what 
I did several fedora versions ago to kill off a program in a similar situation. 
 I knew that I did itbut my memory hadn't kicked yet.

I use KDE and KDE has a directory called /etc/kde/shutdown where you can place 
scripts to run on logout.


-- 
Do not condemn the judgment of another because it differs from your own. You 
may both be wrong. -- Dandemis
-- 
users mailing list
users@lists.fedoraproject.org
To unsubscribe or change subscription options:
https://admin.fedoraproject.org/mailman/listinfo/users
Fedora Code of Conduct: http://fedoraproject.org/code-of-conduct
Guidelines: http://fedoraproject.org/wiki/Mailing_list_guidelines
Have a question? Ask away: http://ask.fedoraproject.org


Re: stopping cinnamon-started apps at logout

2014-05-11 Thread Ed Greshko
On 05/12/14 06:42, Wolfgang S. Rupprecht wrote:
> Ed Greshko  writes:
>> In your .bash_logout file you could place a "killall" statement and
>> name the process you want to kill off.  See the killall man page.
> Are you seeing .bash_logout called when you exit a desktop session?  I
> don't, but then our setups might differ a bit. (I'm using f20
> w. cinnamon)

Humm  It has been a *long* time since I've tried that.   I could swear the 
last time I had it working

> As an aside, doing it cleanly from .bash_logout would be a bit tricky
> because I wouldn't want it run when any ssh or tty based logout
> happened, only when the logout was from the GUI session that started the
> apps.

I was thinking of checking for the existence of a "DISPLAY" environment 
variable to avoid that. 

But, if .bash_logout isn't effective on GUI logout my idea is worthless.


-- 
Do not condemn the judgment of another because it differs from your own. You 
may both be wrong. -- Dandemis
-- 
users mailing list
users@lists.fedoraproject.org
To unsubscribe or change subscription options:
https://admin.fedoraproject.org/mailman/listinfo/users
Fedora Code of Conduct: http://fedoraproject.org/code-of-conduct
Guidelines: http://fedoraproject.org/wiki/Mailing_list_guidelines
Have a question? Ask away: http://ask.fedoraproject.org


Re: stopping cinnamon-started apps at logout

2014-05-11 Thread Wolfgang S. Rupprecht

Ed Greshko  writes:
> In your .bash_logout file you could place a "killall" statement and
> name the process you want to kill off.  See the killall man page.

Are you seeing .bash_logout called when you exit a desktop session?  I
don't, but then our setups might differ a bit. (I'm using f20
w. cinnamon)

As an aside, doing it cleanly from .bash_logout would be a bit tricky
because I wouldn't want it run when any ssh or tty based logout
happened, only when the logout was from the GUI session that started the
apps.

-wolfgang
-- 
users mailing list
users@lists.fedoraproject.org
To unsubscribe or change subscription options:
https://admin.fedoraproject.org/mailman/listinfo/users
Fedora Code of Conduct: http://fedoraproject.org/code-of-conduct
Guidelines: http://fedoraproject.org/wiki/Mailing_list_guidelines
Have a question? Ask away: http://ask.fedoraproject.org


Re: stopping cinnamon-started apps at logout

2014-05-11 Thread Ed Greshko
On 05/12/14 00:52, Wolfgang S. Rupprecht wrote:
> I'd assumed that the apps started by cinnamon when I logged in would
> also be killed when I logged out.  That doesn't seem to be the case for
> non-X11 programs that hang around forever and watch files.  Those
> programs just get passed off to PID 1 when one logs out and continue on
> their merry way till the system reboots.  If one logs in again, another
> instance of the program is started.
>
> The exact program I'm running is a IMAP watcher that watches my remote
> INBOX and grabs the new mail as soon as it arrives.   It would be good
> if it stopped when I logged out.
>
>   /usr/bin/getmail --idle=INBOX
>
> Any ideas?  Do I have to keep track of the PID myself and find a logout
> hook to hang a kill -HUP onto?  Does .bash_logout or .logout even get
> called?
>
>  -wolfgang

In your .bash_logout file you could place a "killall" statement and name the 
process you want to kill off.  See the killall man page.

-- 
Do not condemn the judgment of another because it differs from your own. You 
may both be wrong. -- Dandemis
-- 
users mailing list
users@lists.fedoraproject.org
To unsubscribe or change subscription options:
https://admin.fedoraproject.org/mailman/listinfo/users
Fedora Code of Conduct: http://fedoraproject.org/code-of-conduct
Guidelines: http://fedoraproject.org/wiki/Mailing_list_guidelines
Have a question? Ask away: http://ask.fedoraproject.org