How to put a password on the exit button
- Moutomation
- Offline
- Premium Member
Less
More
- Posts: 135
- Thank you received: 11
02 Aug 2024 16:12 - 02 Aug 2024 16:14 #306759
by Moutomation
How to put a password on the exit button was created 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 do I check the g code renewal key from Classicladder?
Attachments:
Last edit: 02 Aug 2024 16:14 by Moutomation.
Please Log in or Create an account to join the conversation.
- Aciera
- Offline
- Administrator
Less
More
- Posts: 3969
- Thank you received: 1717
02 Aug 2024 18:20 #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?
The following user(s) said Thank You: zz912, Moutomation
Please Log in or Create an account to join the conversation.
- Moutomation
- Offline
- Premium Member
Less
More
- Posts: 135
- Thank you received: 11
03 Aug 2024 04:04 #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 or Create an account to join the conversation.
- zz912
- Offline
- Platinum Member
Less
More
- Posts: 508
- Thank you received: 81
03 Aug 2024 18:58 #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
The following user(s) said Thank You: Moutomation
Please Log in or Create an account to join the conversation.
- Moutomation
- Offline
- Premium Member
Less
More
- Posts: 135
- Thank you received: 11
03 Aug 2024 19:22 #306874
by Moutomation
Replied by Moutomation on topic How to put a password on the exit button
Thanks a lot
Please Log in or Create an account to join the conversation.
- rodw
- Offline
- Platinum Member
Less
More
- Posts: 10750
- Thank you received: 3543
03 Aug 2024 22:08 #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
The following user(s) said Thank You: Moutomation
Please Log in or Create an account to join the conversation.
- Moutomation
- Offline
- Premium Member
Less
More
- Posts: 135
- Thank you received: 11
04 Aug 2024 05:55 - 04 Aug 2024 05:59 #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.
Last edit: 04 Aug 2024 05:59 by Moutomation.
Please Log in or Create an account to join the conversation.
- Aciera
- Offline
- Administrator
Less
More
- Posts: 3969
- Thank you received: 1717
05 Aug 2024 07:16 #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':
To this:
# 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':
Attachments:
The following user(s) said Thank You: Moutomation
Please Log in or Create an account to join the conversation.
- Moutomation
- Offline
- Premium Member
Less
More
- Posts: 135
- Thank you received: 11
05 Aug 2024 16:46 #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 or Create an account to join the conversation.
- Moutomation
- Offline
- Premium Member
Less
More
- Posts: 135
- Thank you received: 11
06 Aug 2024 04:15 #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 or Create an account to join the conversation.
Moderators: newbynobi, HansU
Time to create page: 0.145 seconds