On Fri, 14 May 2021 at 01:42, Billy Huddleston <bi...@ivdc.com> wrote:

>
> I'm trying to add a simple button on the right hand side to Shutdown the
> system.  I'm setting the machine up Kisok style.  So, how do you add a
> button that will throw up a confirm
> prompt, and then execute a systemctl poweoff command?


I think the first question is if you can do it from Python, outside of
Glade etc?

Start with code that can do the shutdown. Then find a way to run it. (I
quite want to add this as a button to Touchy)

 There are a few options here:
https://stackoverflow.com/questions/34039845/how-to-shutdown-a-computer-using-python

Then you would need to add that code to the Glade handler file, and set it
as the callback for a Glade button (probably an ordinary Glade button, not
a GladeVCP LinuxCNC special-button)

-- 
atp
"A motorcycle is a bicycle with a pandemonium attachment and is designed
for the especial use of mechanical geniuses, daredevils and lunatics."
— George Fitch, Atlanta Constitution Newspaper, 1912

_______________________________________________
Emc-users mailing list
Emc-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/emc-users

Reply via email to