Take the 2-minute tour ×
Ask Ubuntu is a question and answer site for Ubuntu users and developers. It's 100% free, no registration required.

I have transmission as a start-up application. I use the command transmission -m to start it up. How can I quit transmission automatically when I'm shutting down?

The problems I'm facing is how to bring the running program to the foreground and send a quit command to it with a shell script? Or send a quit command without bringing it to the foreground?

share|improve this question

1 Answer 1

For a simple way you can create a .bash_logout file in your home dir that tells transmission to quit, e.g.:

transmission -q

or

transmission --quit

If the system does not run the .bash_logout, add it to /etc/gdm/PostSession/Default so it executes the logout script properly.


Another way is to add your command to the file /etc/gdm/PostSession/Default before the exit 0 line.

share|improve this answer

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.