How to put a password on the exit button

More
2 years 2 months ago #306759 by Moutomation
 

Attachment not found

I am making Gmoccapy full screen, but I do not want the user to close the cnc screen without entering a password. should not be able to access anything other than the CNC screen without entering the password. How can I put a password on the exit button? It will be like a settings page and I should be able to set the password.
How do I check the g code renewal key from Classicladder? 

Please Log in to join the conversation.

More
2 years 2 months ago #306775 by Aciera

How can I put a password on the exit button?

You would have to modify the gmoccapy source code for this.

How do I check the g code renewal key from Classicladder?

you can't as there is no hal pin or state tag that reflects the reload action. You would need to handle this in the GUI source code.

Please Log in to join the conversation.

More
2 years 2 months ago #306828 by Moutomation
If there is someone who can do this for a fee, I am ready to pay. I think there is someone who can do this, because the people who make this program probably won't have much difficulty in putting a password on the exit.

Please Log in to join the conversation.

More
2 years 2 months ago #306873 by zz912
Can you compile LCNC yourself from source codes? You have to master it so that when someone helps you, you can use it.

This is first step:
linuxcnc.org/docs/stable/html/code/building-linuxcnc.html

Please Log in to join the conversation.

More
2 years 2 months ago #306874 by Moutomation
Thanks a lot

Please Log in to join the conversation.

More
2 years 2 months ago #306885 by rodw
IN the gmocappy source there is a screen handler written in Python. There is also a glade screen definition, You probably just need to modify the handler for the exit button or even better move it to the already password protected area. Sorry its been 7 or 8 years since I modified gmocappy

Please Log in to join the conversation.

More
2 years 2 months ago #306901 by Moutomation
I don't have to use gmoccapy, the reason I use gmoccapy is because it automatically reads the g-code file when it first starts and has a file refresh button. I can use another graphical user interface. I have a file whose name doesn't change, for example CutDocument.ngc, but its content does.
I don't want the operator to select the g code file every time. Because the g code file is sent to linuxcnc over the network without changing its name.

Please Log in to join the conversation.

More
2 years 2 months ago #306970 by Aciera
Try this:

modify these line in '/bin/gmoccapy':

 

Attachment not found



To this:
Code:
    # If button exit is clicked, press emergency button before closing the application     def on_btn_exit_clicked(self, widget, data=None):         # if 'Use unlock code' option is activated on the settings/hardware tab we ask for the code using the system.dialog         if self.widgets.rbt_use_unlock.get_active():             if self.dialogs.system_dialog(self):                 self.widgets.window1.destroy()         else:             self.widgets.window1.destroy()

Note, standard unlock code is "123", which is displayed in the tool tip text when the mouse hovers over the settings button so you might want to change it to something else. To do that open the .pref file in the machine config folder and find the line 'unlock_code':
 

Attachment not found



 

Please Log in to join the conversation.

More
2 years 2 months ago #307013 by Moutomation
Thanks a lot, I will try

Please Log in to join the conversation.

More
2 years 2 months ago #307055 by Moutomation
I tried it and it was exactly what I wanted. Thanks a lot

Please Log in to join the conversation.

Time to create page: 0.908 seconds
Powered by Kunena Forum