Re: Auto shutdown

Lorenzo Sutton <[email protected]>
Newsgroups gmane.comp.audio.rosegarden.user
Message-ID <[email protected]>
On 02/09/2022 16:30, Lorenzo Sutton wrote:
 > On 02/09/2022 11:43, Will Godfrey wrote:
...
 >>> On 7/25/22 4:00 PM, Will Godfrey wrote:
 >>>> Is there any way to externally tell Rosegarden to close files and
 >>>> cleanly shut
 >>>> down?
...
 >>
 >>     pidof rosegarden
 >> followed by
 >>     kill nnnn
 >> seems to give a clean shutdown, even of a running instance. So all I
 >> need to do
 >> now is write a small program to combine those into a single command -
 >> might be
 >> able to do that in python.
 >>
 >
 > In bash you should be able to just do:
 >
 > kill $(pidof rosegarden)
 >

Or... with Python (including some fancy output in case the pid is not 
found, e.g. because rosegarden isn't actually running) - something like 
this:

https://gitlab.com/-/snippets/2401192
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.