gladevcp catalog, and other questions

More
16 Jan 2023 02:17 #262084 by JetForMe
Okay, I have Glede 3.38.2-2 installed via apt, but I'm running into the same problem with the missing gladevcp catalog. Moreover, as I suspected, manual-example.ui is still for GTK+2:

 
Attachments:

Please Log in or Create an account to join the conversation.

More
16 Jan 2023 02:22 #262085 by cmorley
The fact it still works (I assume you are looking in 2.9 or master) is an anomaly.
You can't edit it with that latest GLADE editor and we should update it.
We don't guarantee any old panels will still work. Definitely won't work if you use python handler files.

As said.
linuxcnc 2.9 uses python3 and GTK3, so can use the latest GLADE editor.

Please Log in or Create an account to join the conversation.

More
16 Jan 2023 02:58 #262087 by JetForMe
What does that mean, "linuxcnc 2.9 uses python3 and GTK3, so can use the latest GLADE editor"? I'm great with that on my router, no problem. But I'm trying to follow these docs: linuxcnc.org/docs/2.9/html/gui/gladevcp.html

And in section 2.1 "Exploring the example panel" it refers me to manual-example, and that's the file I tried to open above.

So, is it just a case of stuff in 2.9 (and master) being obsolete? Is there a working example for GladeVCP so I can add UI to Axis?

For that matter, does Axis even use GTK+? Looking at src/emc/usr_intf/axis/axis.py, I see it imports Tkinter.Tk, and the UI still looks old, so I'm guessing it's Tk, and somehow magically incorporates GladeVCP plugins into its UI?

And can I use this from the run-in-place installation I currently have? The GladeVCP docs section 3.2 say "If LinuxCNC was not installed from a package, the LinuxCNC shell environment needs to be set up with <linuxcncdir>/scripts/rip-environment, otherwise Glade won’t find the LinuxCNC-specific widgets". That's an absolute path, and it's not at all clear where that XML tag should go; it doesn't even show it being closed. Grepping the source turns up no example of using it.

Please Log in or Create an account to join the conversation.

More
16 Jan 2023 03:34 #262088 by cmorley
Unfortunately I don't think the docs have been updated completely. I see gtk2 on the page and that is old information.
Yes the example sims are old - looks like they run but can't be edited properly.
On my system (I use compiled RIP linuxcnc) glade 3.22 is used and it's gtk3 and it found the glade libraries.

ahh in the RIP script the path is exported:

if [ -z "$GLADE_CATALOG_SEARCH_PATH" ]; then
GLADE_CATALOG_SEARCH_PATH=$EMC2_HOME/lib/python/gladevcp
else
GLADE_CATALOG_SEARCH_PATH=$EMC2_HOME/lib/python/gladevcp:"$GLADE_CATALOG_SEARCH_PATH"
fi

Now I'll find where it should find them on an installed system and get back to you.

Please Log in or Create an account to join the conversation.

More
16 Jan 2023 04:05 #262089 by cmorley
can you open :
/usr/lib/python3/dist-packages/gladevcp

and see if there is an XML file named hal_python.xml?

I have an installed version that is missing that file so won't load the widgets

Please Log in or Create an account to join the conversation.

More
16 Jan 2023 04:11 #262090 by cmorley
so adding the file and setting the enviromental variable allowed me to see widgets.

Please Log in or Create an account to join the conversation.

More
16 Jan 2023 04:47 #262093 by cmorley
You can set the catalog path in the preference file.
set it to look in:
/lib/share/glade3/catalogs

Please Log in or Create an account to join the conversation.

More
16 Jan 2023 05:00 #262094 by JetForMe

can you open :
/usr/lib/python3/dist-packages/gladevcp

and see if there is an XML file named hal_python.xml?

I have an installed version that is missing that file so won't load the widgets

Alas, I don't have /usr/lib/python3/dist-packages/gladevcp on my system. I've only done the RIP, and I don't think I ever ran an install step.

Please Log in or Create an account to join the conversation.

More
16 Jan 2023 05:12 #262095 by JetForMe

You can set the catalog path in the preference file.
set it to look in:
/lib/share/glade3/catalogs

I also don't have that directory. Is there a step I missed after doing the build for run-in-place?

Also, I'm now at my shop and able to look at my working real controller (not the sim on Debian 11 I've been talking about in this thread). It's running a 2.9-pre0 version I installed via package manager a couple years ago:
$ dpkg -l | grep linuxcnc
hi  linuxcnc-doc-en                               1:2.9.0~pre0.2917.g0dc3ccf83                 all          motion controller for CNC machines and robots (English documentation)
hi  linuxcnc-uspace                               1:2.9.0~pre0.2917.g0dc3ccf83                 amd64        motion controller for CNC machines and robots

It uses axis for the DISPLAY, and some custom VCP I made a couple years ago that relies on GTK+2 (<requires lib="gtk+" version="2.24"/>). This currently works, but I seem to have glade-gtk2 installed on that machine. I'm guessing the GTK+3 change came after this build?

I'd love to update my linuxcnc and this machine, but I'm a bit nervous about how painful that might be. It's currently running Debian 10 (Buster).

Please Log in or Create an account to join the conversation.

More
16 Jan 2023 05:24 #262096 by cmorley
Sorry I thought you were using an installed version.
RIP is easier to play with - I personally wouldn't use an installed version if I wanted anything customized.

Ya it's possible you had 2.9 (it would have been master at the time) before python3 was in.
I can't tell exactly when but 2021 sometime it looks like.

If your machine works I wouldn't touch it. I would build system on a a new harddrive so you can swap back if you need to.

Please Log in or Create an account to join the conversation.

Moderators: mhaberlerHansU
Time to create page: 0.155 seconds
Powered by Kunena Forum