I am interested in seeing whether gtk3 is capable of developing a GUI consisting of a main laptop window running MATE. It should have a background of my choosing (.png or .jpg.) Also required are 15 simple buttons clickable by mouse or triggered by a single key. Also required are 9 multi-vertex lines responding to buttonsndnd 6 pairs of circles each with colored centers which are displayed ON/OF as if they were indicator LED's in real life. The buttons set 1 of 30 characters in an ascii string and send it asynchronously out the serial port to a microcontroller.
I would like a few good tutorials and actual application samples to study. It would be nice to watch a demo or two on youtube as well.
I have not seen gtk development mentioned yet in correlation with VSCode which I have installed on this device so I am interested in what IDE is used with GTK3 which I have installed. I have no idea what dependencies the gtk tool needs. I'd like to assume the install took care of that but my recent dealings with Linux makes me suspect that it probably didn't.
Since setting up any application/tool is so critical to operation I would appreciate any remark as to what to watch out for.
As of this writing I haven't attempted to launch gtk3 primarily because I haven't gotten to it yet.
Ubuntu 20.04 LTS was released in 2020-April; and ends its 5 years of standard support in a number of weeks; so your release should have you considering a release-upgrade path, unless you're close to the end of your project anyway.
Also note that GTK4 is where the development is, with GTK3 in maintenance mode only; being there for legacy apps that haven't been ported to the newer version yet.
Thanks for your tips. They are useful to me at this stage.
I have written some fairly interesting things in Visual Studio 2019 to interface GUI with a PIC microcontroller both in serial comms and USB. Granted the USB one relied on a truckload of boiler plate code but then don't all USB apps? For that reason I am currently most well-practiced to work in C#.
It looks like I should probably switch up to the latest Ubuntu and gtk revs. according to guiverc.
I am quite new to Linux these days so I have still to learn about the end-of-life particulars in the Linux world.
I am really surprised. Just after I read your reply I opened a terminal and entered:
sudo apt update
sudo apt upgrade
Both commands finished without error, the second one naturally took quite a while to complete.
A minute ago in order to confirm what version I now have, I ran lsb_release -a (which came from Google's AI search result.) I'm thinking AI is not very "I" I got this:
I have to think there must be another way to upgrade. I should tell you I don't have enough experience with Linux yet to go searching for all sorts of component/dependency files and compiling and building them, etc. I am presently relying on package extracting and running automation. Somehow I managed to upgrade from 16 to 20 a few weeks ago so I don't see why this isn't proceeding as expected.
Perhaps you can spot the impediment from the screen capture and offer a further suggestion.
Before I end this reply I also consulted Google and AI provided this command line to install gtk4: sudo apt install libgtk-4-dev
Can you spot any issues preventing this from succeeding?
You'll probably want to get your system up-to-date first. Check in Software & Updates → Updates tab that you have "Notify me of a new Ubuntu version" set to "For long term release only". Then you can run:
sudo do-release-upgrade
Be sure to backup everything first, just in case. That'll get you to 22.04 LTS. You could jump again to 24.04 LTS by repeating the step. It may take an hour or more to complete.
As a personal bias, I prefer Qt. It has much better documentation (this vs. that for a button). Plus, I was using Python for both toolkits. GTK was annoying to develop with for that reason.
Depends on how you learn best. C# + GTK could be a smoother learning curve for you, since GTK is what MATE (GTK 3) uses, so it should fit into the desktop better (subjectively, since GTK 4 may not)
@lah7 explained how to upgrade your OS version in place. apt update refreshes repository metadata and apt upgrade installs latest updates and patches for the current OS version only.
I'd prefer to use GTK version bundled with OS, i.e. GTK 3. BTW, GTKSharp does not support GTK4 yet.
Thanks for that insight in the scope of update and upgrade commands!
This a.m. I read that Ubuntu 24.04 packages gtk4 within which seems like it would be ideal if I can get the 24.04.6 upgrade to work.
Can you say whether that package version includes those 4 or 5 dependencies? I've read about them on the gtk install page but haven't got a clue how to install the files in each app unless I have to go to each of the respective authors' web sites and encounter even more impediments?
About that, what is the relationship of GTKSharp to GTK4 and what implication does that lack of support have for my preferring to code in C#? Is GTKSharp an extension or library?
Useful to know the release date explanation. Now I understand the why.
I will attempt to upgrade Ubuntu to 24.04 tonight by the method you recommended. As I said to Eugene I read that 24.04.6 includes GTK4 so I am looking forward to a seamless install.
Having said that, a day or so ago I used libgtk-3-dev to install GTK3 and I believe that completed. Do you think it would be wise to un-install that? If so what is the most efficient way?
I just looked at "Gtk – 4.0: Building GTK" and couldn't believe how labor intensive the install/build process is especially when I recall installing MS Visual Studio 2019 community IDE complete with all its platform choices. Pick the options and click install, voila after some time you get a prompt to create a project or solution. I guess I was spoiled.
I think what I am understanding here is that I may have been saved all that labor if I get UM LTS v 24.04.2 installed. Would you come to the same conclusion?
If I then expand on what your earlier remark means, because GTKSharp does not support GTK4 yet then it presumably does for GTK3. If GTK library can't be called by C# directly then what does one do and how does one say, hack the project developed in GTK4?
I hope I'm not getting ahead of myself and maybe should wait to resolve these details after working through some of the tutorials and examples.
Truth be told that is the way I recently got from v16 to v20. I think I mentioned earlier in the discussion that my upgrade went smoothly but I had forgotten I nuked v16.
I am further "invested" having gotten a number of hardware (printers and serial comm ports and usb/serial converter) working nicely and my desktop arranged and some other apps working.
I think I will try the suggestions on offer here and as a last resort try the nuking method!
The package system takes care of all this. You can keep it installed, then when you upgrade, you'll have the version of libgtk-3-dev intended for that version of Ubuntu MATE.
If you were doing two upgrades, then assuming libgtk-3-dev relies on a lot of other packages (or generally large), the upgrade would finish quicker (+ less bandwidth, less disk space) if there's less packages needed to upgrade by removing that and anything no longer needed:
I could code in C since I've done it before some time ago. It's just that I developed the application I am trying to reproduce for the Ubuntu O.S. on a laptop- I already have a successful app that I did in Visual Studio 2019 by M.S. running on Windows 11. I am quite familiar with C# and could have used it more or less as a model at least in the flow chart sense and maybe in the data binding sense.
I don't remember ever doing anything GUI related in C itself. I started my GUI adventure decades ago with Borland C++ Builder. Then after that it was the various M.S. Visual Studio releases.
I recently attempted getting the "Uno" product running with dotnet8 and VSCode and I ran into a literal nightmare of install issues with Uno even after successfully installing VSCode and dotnet8.