[Feature Request] Automatic shutdown

Suggestions and discussion of future versions
Post Reply
ilyes
New User
New User
Posts: 3
Joined: Sun Dec 16, 2007 8:08 pm
Location: Sousse, Tunisia.

[Feature Request] Automatic shutdown

Post 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.
markybob
Compulsive Poster
Compulsive Poster
Posts: 1230
Joined: Thu May 24, 2007 11:27 pm
Location: Chicago, IL, USA
Contact:

Re: [Feature Request] Automatic shutdown

Post 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.
andar
Top Bloke
Top Bloke
Posts: 1050
Joined: Fri Jun 08, 2007 8:38 pm
Location: Victoria, BC
Contact:

Re: [Feature Request] Automatic shutdown

Post 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.
ilyes
New User
New User
Posts: 3
Joined: Sun Dec 16, 2007 8:08 pm
Location: Sousse, Tunisia.

Re: [Feature Request] Automatic shutdown

Post 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.
markybob
Compulsive Poster
Compulsive Poster
Posts: 1230
Joined: Thu May 24, 2007 11:27 pm
Location: Chicago, IL, USA
Contact:

Re: [Feature Request] Automatic shutdown

Post 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
ilyes
New User
New User
Posts: 3
Joined: Sun Dec 16, 2007 8:08 pm
Location: Sousse, Tunisia.

Re: [Feature Request] Automatic shutdown

Post 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.
Post Reply