I'd like to have my Linux box (a QNAP TS-210 NAS) send the order to go to sleep (or hibernation) to my main Windows 7 computer.

As the NAS is running Linux, I can't use psshutdown from SysInternals' PsTools. Is there any Linux equivalent? Or some "magic packet" that can order the Win7 computer to sleep.

I know I could install a SSH daemon and trigger a shutdown command from the Linux box using ssh, but ideally I do not want to install anything on the Win7 computer.

I can install Linux software on the NAS, no problem about this. PHP, python and perl are also available on it.

link|improve this question

67% accept rate
While searching for an answer for you I came across this. While not for you someone else might find it helpful online-tech-tips.com/computer-tips/remote-shutdown-command – MrStatic Feb 13 '10 at 21:23
@Snark why not install wine on the nas and use that to run psshutdown? – MrStatic Feb 13 '10 at 21:29
@MrStatic: Thanks for the link. The NAS has an ARM CPU, it cannot run Wine. – Snark Feb 13 '10 at 22:16
feedback

3 Answers

Yes.

You can use the net rpc shutdown -I x.x.x.x -U username%password command from linux (I think - it works under XP).

I had to install my distribution's samba package to get the net command. You'll have to enable remote shutdown on your windows box too. Have a look at how to do it in xp. You might have to add a few parameters if you want to put your win box to sleep instead of shutting down though.

link|improve this answer
feedback

I've been trying hard to find a way to do exactly this.

The previous answer will work for shutdown but not sleep. I cannot find an RPC command to issue a sleep/hibernate to the system, or that would work perfectly.

I suspect a tool/daemon will need to be installed on the windows system to make it work, and btw thanks for the idea for windows ssh daemon!

link|improve this answer
feedback

http://www.vistaheads.com/forums/microsoft-public-windows-vista-general/2325-how-make-computer-sleep-remotely.html

This modifies Remote Desktop to display all the shutdown options. This is the same way all the shutdown options show up when you remote into Server 2003/2008.

link|improve this answer
feedback

Your Answer

 
or
required, but never shown

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