[Tutor] (no subject)
steve at pearwood.info
Sun Oct 31 14:11:46 CET 2010
Jacob Bender wrote:
> I have a few more ?'s.
Well, don't keep them a secret, tell us what they are! What are your
> I was trying to make a program for ubuntu that
> does one function: if ctrl + Alt + "t" is pressed, to shut down the
> computer. There are only two problems. I want it to run in the
> background, so nobody knows it's there. I do know how to make it run
> at startup, so that isn't a problem. I found pygame, so I could say if
> ctrl +Alt + "t" is pressed to do something, but a black window would
> always have to be open, which leads to my first problem. I do know how
> a .pyw works, but it still rests in the Task Manager at the bottom of
> the screen. Thanks!
Well, I personally don't see the point, since your system almost
certainly will have ctrl-alt-delete as shutdown keys. I'm glad you're so
excited by your project that you felt you had to tell us about it.
By the way, .pyw files are for Windows. They don't have any special
powers in Ubuntu.
You also might find that the best way to change the shutdown key
combination is through /etc/inittab rather than writing a Python program
to do it.
More information about the Tutor