Page 1 of 1
[Feature Request] Automatic shutdown
Posted: Sun Dec 16, 2007 8:14 pm
by ilyes
Hi,
I'd like to thank you for all your talent, time and effort put into this program and I'd like to ask if it's possible to add this new feature in Deluge with which the user would enable Deluge to shutdown the PC automatically once Deluge finishes downloading (and optionally seeding for some time). Would that be feasible on Linux? Such an option exists in uTorrent, the Windows-only bittorrent client.
Thank you very much.
Re: [Feature Request] Automatic shutdown
Posted: Sun Dec 16, 2007 8:42 pm
by markybob
ilyes wrote:Hi,
I'd like to thank you for all your talent, time and effort put into this program and I'd like to ask if it's possible to add this new feature in Deluge with which the user would enable Deluge to shutdown the PC automatically once Deluge finishes downloading (and optionally seeding for some time). Would that be feasible on Linux? Such an option exists in uTorrent, the Windows-only bittorrent client.
Thank you very much.
the simple answer is no.

shutdown on any sane linux box requires root privilege. in fact, you cant even ask for help as a normal user. example:
markybob@peg:~$ /sbin/shutdown --help
shutdown: you must be root to do that!
you could get overly complicated and have deluge store the root password and such...but that's a web that i dont really wanna get involved with. too risky.
Re: [Feature Request] Automatic shutdown
Posted: Mon Dec 17, 2007 12:15 am
by andar
markybob wrote:ilyes wrote:Hi,
I'd like to thank you for all your talent, time and effort put into this program and I'd like to ask if it's possible to add this new feature in Deluge with which the user would enable Deluge to shutdown the PC automatically once Deluge finishes downloading (and optionally seeding for some time). Would that be feasible on Linux? Such an option exists in uTorrent, the Windows-only bittorrent client.
Thank you very much.
the simple answer is no.

shutdown on any sane linux box requires root privilege. in fact, you cant even ask for help as a normal user. example:
markybob@peg:~$ /sbin/shutdown --help
shutdown: you must be root to do that!
you could get overly complicated and have deluge store the root password and such...but that's a web that i dont really wanna get involved with. too risky.
That being said, you could write a plugin for deluge to talk to another application via DBUS that would shutdown the system.. ie. some app thats running as root.
Re: [Feature Request] Automatic shutdown
Posted: Mon Dec 17, 2007 2:34 pm
by ilyes
Hi,
Thanks for the quick response.
Regarding, the automatic shutdown of the system, I actually meant poweroff. I don't understand the issue of the privileges since it's possible to shutdown the PC from a shell prompt on my fedoa 8 by just typing the poweroff command, from a non root account. Since a user is able to do that then normally programs running by that user should be able to do that too. Please, I'd like you to remember the fact that Linux isn't a server only OS anymore and is used more and more for desktops. Bringing the permission issue is kind of old fashioned. It's all about the functionality: Is it doable or not? Windows can do it through a single Win32 call, why not Linux?
Thank you.
Re: [Feature Request] Automatic shutdown
Posted: Tue Dec 18, 2007 1:40 am
by markybob
ilyes wrote:Hi,
Thanks for the quick response.
Regarding, the automatic shutdown of the system, I actually meant poweroff. I don't understand the issue of the privileges since it's possible to shutdown the PC from a shell prompt on my fedoa 8 by just typing the poweroff command, from a non root account. Since a user is able to do that then normally programs running by that user should be able to do that too. Please, I'd like you to remember the fact that Linux isn't a server only OS anymore and is used more and more for desktops. Bringing the permission issue is kind of old fashioned. It's all about the functionality: Is it doable or not? Windows can do it through a single Win32 call, why not Linux?
Thank you.
first of, poweroff isnt a normal system utitilty. it's not on 99% of systems.
second....those were just a silly things to say. permissions and security matter to most linux users, including the programmers of deluge. apparently you dont care, but hey, this is open source; you could do it yourself like andar suggested via plugin
Re: [Feature Request] Automatic shutdown
Posted: Tue Dec 18, 2007 11:16 am
by ilyes
Hi!
markybob wrote:
first of, poweroff isnt a normal system utitilty. it's not on 99% of systems.
Right.
markybob wrote:
second....those were just a silly things to say. permissions and security matter to most linux users, including the programmers of deluge. apparently you dont care, but hey, this is open source; you could do it yourself like andar suggested via plugin
I *do* care about permissions and security. This is one of the advantages of Linux over Windows. That's being said, I typically queue torrents (during the afternoon) for download and they mostly complete after midnight, when I'm asleep. I just don't want to keep my machine sucking electrical power during all the night and being idle, hence my request.
I have an additional question. Does the plug-in manager export the status of Deluge (through some variables, callbacks, messages) to the plug-ins (i.e, like downloading, seeding, idle) so that the said plug-ins can act accordingly?
I'm sorry, if I bothered you.
BR.