- Posts: 154
- Thank you received: 0
How to put a password on the exit button
- Moutomation
- Topic Author
- Offline
- Premium Member
-
Less
More
2 years 2 months ago #306759
by Moutomation
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?
How to put a password on the exit button was created by Moutomation
Attachment not found
How do I check the g code renewal key from Classicladder?
Please Log in to join the conversation.
2 years 2 months ago #306775
by Aciera
Replied by Aciera on topic How to put a password on the exit button
You would have to modify the gmoccapy source code for this.How can I put a password on the exit button?
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.How do I check the g code renewal key from Classicladder?
Please Log in to join the conversation.
- Moutomation
- Topic Author
- Offline
- Premium Member
-
Less
More
- Posts: 154
- Thank you received: 0
2 years 2 months ago #306828
by Moutomation
Replied by Moutomation on topic How to put a password on the exit button
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.
2 years 2 months ago #306873
by zz912
Replied by zz912 on topic How to put a password on the exit button
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
This is first step:
linuxcnc.org/docs/stable/html/code/building-linuxcnc.html
Please Log in to join the conversation.
- Moutomation
- Topic Author
- Offline
- Premium Member
-
Less
More
- Posts: 154
- Thank you received: 0
2 years 2 months ago #306874
by Moutomation
Replied by Moutomation on topic How to put a password on the exit button
Thanks a lot
Please Log in to join the conversation.
2 years 2 months ago #306885
by rodw
Replied by rodw on topic How to put a password on the exit button
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.
- Moutomation
- Topic Author
- Offline
- Premium Member
-
Less
More
- Posts: 154
- Thank you received: 0
2 years 2 months ago #306901
by Moutomation
Replied by Moutomation on topic How to put a password on the exit button
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.
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.
2 years 2 months ago #306970
by Aciera
Replied by Aciera on topic How to put a password on the exit button
Try this:
modify these line in '/bin/gmoccapy':
To this:
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':
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.
- Moutomation
- Topic Author
- Offline
- Premium Member
-
Less
More
- Posts: 154
- Thank you received: 0
2 years 2 months ago #307013
by Moutomation
Replied by Moutomation on topic How to put a password on the exit button
Thanks a lot, I will try
Please Log in to join the conversation.
- Moutomation
- Topic Author
- Offline
- Premium Member
-
Less
More
- Posts: 154
- Thank you received: 0
2 years 2 months ago #307055
by Moutomation
Replied by Moutomation on topic How to put a password on the exit button
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
