Run on Linux/Mono #1764
Replies: 57 comments 10 replies
-
All the code of LaserGRBL is C# so I think it could be compiled for Linux in Mono, using MonoDevelop. |
Beta Was this translation helpful? Give feedback.
-
It compiles fine on Arch Linux (xbuild) with latest mono 5.0.0. But when trying to run with
Can this be solved? |
Beta Was this translation helpful? Give feedback.
-
Hi Jackeler, I am happy that someone is trying to port LaserGRBL in linux. TimingBase is a class for precise and hi-resolution timing. It is based on You can try to replace the whole HiResTimer class with this code:
|
Beta Was this translation helpful? Give feedback.
-
Thank you for the fast reply. That works! Then i got this:
So i simply commented it out, like this:
Does this break something? Anyway, i can start it now without direct error/crash on Linux! One optical issue is that the menu bar has no font, but function seems okay. I will now test if the connection to my machine works! :) |
Beta Was this translation helpful? Give feedback.
-
SetTimerResolution change the frequency of task- switching that in windows is about 66Hz (15 mSec) to a higher frequency that made LaserGRBL more responsive and fast in streaming g-code to arduino. It's ok to comment it out |
Beta Was this translation helpful? Give feedback.
-
Okay good, that makes sense. Test results:
|
Beta Was this translation helpful? Give feedback.
-
Great job @Jakeler Comment DrawWaterMark in PlaceholderTextBox class. protected override void OnPaint(PaintEventArgs e) |
Beta Was this translation helpful? Give feedback.
-
Had to comment it in So i was able to successfully engrave something with LaserGRBL now. More test results: |
Beta Was this translation helpful? Give feedback.
-
Hi @Jakeler With Arch Linux (xbuild) and mono 5.0.0 i hope you can achieve better result then me. However i remember the biggest issue was on Raster Import form. Not because of my vectorizing/line2line code, but because the WinForm layout I am using. I see some issue that should be the same you have now. I.e. the misalignment of the connect button, of the stop-continue button etc. The whole interface of LaserGRBL is designed using "TableLayoutPanel" that allow me to make it working very well on different resolution, resizing, different space used in different string translation etc. Maybe some form should be re-designed to use a simpler & fixed layout schema to work in mono. |
Beta Was this translation helpful? Give feedback.
-
I should have an old laptop that I can sacrifice to a linux installation. I would be happy to help you with this job. |
Beta Was this translation helpful? Give feedback.
-
According to to Mono docs, support for Windows Forms 2.0 is complete, but it seems not the same like on Windows. I also noticed that resizing the window smaller does not move the stop-continue buttons back, causes them to disappear at some point. Overall, most elements look not quite right. I would also prefer a more modern style, instead of this Windows 2000 theme on Linux. I have not really any experience with C# and Windows GUI stuff, so i am not sure if i can do this or help you a lot. Now looking at the code i started to understand it a bit, but still... In addition some code is commented in Italian, which i don't understand. You don't neccessarily need addidtional hardware, if you have a half decent PC you can run it just as virtual machine guest with VirtualBox. So you leave your Windows Host running and can quickly start another OS virtual. (I do this often the other way around, with Windows as guest on my Linux PC, especially for development very useful) |
Beta Was this translation helpful? Give feedback.
-
I am able to install linux both on physical or virtual machine, this is not a problem for me. The only problem is to find time :-) In any case, I take advantage of your availability to obtain some information that can speed up this step.
More: when I do my old try i remember that I cannot graphical edit my winform UI directly from monodevelop, because they only support editing GTK Form. Is the situation still the same? I mean, are you able to open a form, like mainform, and edit it graphically from monodevelop or not? |
Beta Was this translation helpful? Give feedback.
-
Update; i have installed Linux Mint with mono v5.4.16 and monodevelop 7.1. Both are the latest version. With xbuild it compile |
Beta Was this translation helpful? Give feedback.
-
Update: solved (switching to .net 4.5) |
Beta Was this translation helpful? Give feedback.
-
Awesome to see that you are on it! I had not much time today to answer, anyway everything is solved now? Let me know how it goes and if you need help with something. ;) |
Beta Was this translation helpful? Give feedback.
-
The members in this thread have really gone the distance in getting LaserGRBL to work on Debian. I worked on the original NT project back in the early 1990's. As an operating system developer for almost 50 years, I still develop real time systems for several industries, using Linux almost exclusively these days. |
Beta Was this translation helpful? Give feedback.
-
@Rybec: Thanks for describing installation using Playonlinux. I created a POL-Installation-Script to automate most of the steps including download of latest version and com port mapping in regedit. @arkypita: Shall a create a PR to add it to the repo? What is the best path to put it in? |
Beta Was this translation helpful? Give feedback.
-
Thank you so much! I was hoping someone could use my process to do this. |
Beta Was this translation helpful? Give feedback.
-
I created a pull request with a setup script now: |
Beta Was this translation helpful? Give feedback.
-
Hi @Styne13 |
Beta Was this translation helpful? Give feedback.
-
Hi @arkypita It might depend on the version 5.22 with mono available in macOS. |
Beta Was this translation helpful? Give feedback.
-
Thanks for providing us with this wonderful program, @arkypita .But now I am confused by a problem. |
Beta Was this translation helpful? Give feedback.
-
Be very careful. My experience on a 5 GHZ 8 core systems with 64 GB of ram
shows the GRBL stops frequently due to buffers filling up. The laser stays
on the movement stops and it results in a destroyed piece of work. There
are also display issues with the latest mono and wine.
…On Sat, Dec 10, 2022, 5:10 AM Langlais115 ***@***.***> wrote:
It works great on Ubuntu 22.04
I just got a *conflict* with *brltty*:
Here was the log from my /var/log/syslog:
------------------------------
*Dec 10 11:15:42 user-ThinkPad-W520 brltty[10394]: USB configuration set
error 16: Device or resource busy Dec 10 11:15:42 user-ThinkPad-W520
brltty[10394]: brltty: USB configuration set error 16: Device or resource
busy Dec 10 11:15:42 user-ThinkPad-W520 kernel: [ 2242.930333] usb 3-2:
usbfs: interface 0 claimed by ch341 while 'brltty' sets config #1
<#1> Dec 10 11:15:42
user-ThinkPad-W520 brltty[10394]: USB interface in use: 0 (ch341) Dec 10
11:15:42 user-ThinkPad-W520 kernel: [ 2242.937587] ch341-uart ttyUSB0:
ch341-uart converter now disconnected from ttyUSB0 Dec 10 11:15:42
user-ThinkPad-W520 kernel: [ 2242.937635] ch341 3-2:1.0: device
disconnected Dec 10 11:15:42 user-ThinkPad-W520 brltty[10394]: brltty: USB
interface in use: 0 (ch341)*
------------------------------
I just have to remove the package *brltty* which was creating a conflict.
sudo apt remove brltty
After that, everything works fine.
—
Reply to this email directly, view it on GitHub
<#1764 (reply in thread)>,
or unsubscribe
<https://github.com/notifications/unsubscribe-auth/AD6CBIFJWWORB4CJ7EZD6Y3WMRQKDANCNFSM5QEE7V6Q>
.
You are receiving this because you commented.Message ID:
***@***.***>
|
Beta Was this translation helpful? Give feedback.
-
The above tutorials were super helpful to me as a new wine user. I feel like I'm really close, but I got to the last steps (wine install.exe) and I consistently get:
I've tried with sudo. I even tried xbuild to build it myself (though I imagine there are settings I'd need to change that I'm not aware of for my platform). I also tried running the install on a local machine, zipping the result, and running I'm running on Anyone know what might be going wrong? I'm guessing it's that the install.exe wasn't compiled to work with armv7l, but I'm not sure how to work around that. |
Beta Was this translation helpful? Give feedback.
-
It's almost certainly related to the architecture. Wine can't make a program compiled for Intel run on ARM. If you can get it to compile on the Pi though, you should get an ARM executable. You probably won't be able to compile for Linux though, since LaserGRBL has a lot of Windows specific stuff going on . I've only ever tried to compile one thing designed for Intel on ARM, and that was the Android native C build tools, which failed horribly to compile (despite being designed for Linux). My suggestion would be to try to compile on the Pi, and when that fails, open an issue to ask about/work through things. I'm not sure I can be much help in that, but others here might be able to. There are two things I can tell you that might help though: You will probably need the Mono dev package for the .NET stuff, and you will probably also need a Windows cross compiler to compile it (you'll still have to run it in Wine). I'm not 100% sure that second one exists for ARM, but I think it should, given that MS has an ARM Windows port. Just make sure the cross compiler has support for generating ARM executables. If you do manage to pull it off, it would also be cool if you posted here how you did it! Raspberry Pis make awesome controller interfaces for things like this, and LaserGRBL on a Pi would be really nice. |
Beta Was this translation helpful? Give feedback.
-
Thanks so much for the thoughtful reply! I'll give compiling a go. I'm
familiar with c# development, just new to mono dev (outside of game dev).
The other direction I was considering is getting full blown windows on the
pi, but I've got the 1gb version so I doubt that'll fly.
There's also a LinuxCNC alternative I may consider.
Appreciate the leads! I'll definitely update if I figure anything useful
out.
…On Thu, Jan 5, 2023, 7:21 PM Ben Williams ***@***.***> wrote:
It's almost certainly related to the architecture. Wine can't make a
program compiled for Intel run on ARM.
If you can get it to compile on the Pi though, you *should* get an ARM
executable. You probably won't be able to compile for *Linux* though,
since LaserGRBL has a lot of Windows specific stuff going on . I've only
ever tried to compile one thing designed for Intel on ARM, and that was the
Android native C build tools, which failed horribly to compile (despite
being designed for Linux).
My suggestion would be to try to compile on the Pi, and when that fails,
open an issue to ask about/work through things. I'm not sure I can be much
help in that, but others here might be able to. There are two things I can
tell you that might help though: You will probably need the Mono dev
package for the .NET stuff, and you will probably also need a Windows cross
compiler to compile it (you'll still have to run it in Wine). I'm not 100%
sure that second one exists for ARM, but I *think* it should, given that
MS has an ARM Windows port. Just make sure the cross compiler has support
for generating ARM executables.
If you do manage to pull it off, it would also be cool if you posted here
how you did it! Raspberry Pis make awesome controller interfaces for things
like this, and LaserGRBL on a Pi would be really nice.
—
Reply to this email directly, view it on GitHub
<#1764 (comment)>,
or unsubscribe
<https://github.com/notifications/unsubscribe-auth/AACJQN4TH4AUILW6QOLMHZTWQ5XSVANCNFSM5QEE7V6Q>
.
You are receiving this because you commented.Message ID:
***@***.***>
|
Beta Was this translation helpful? Give feedback.
-
First of all Wine doen't emulate Linux calls, it translates the windows calls to linux gui calls. Second, the raspberry pi graphics driver changed last year, so wine is not going to work unless unless you use the testing branch of wine, which may not habe been fully portrd any way. But, laser GRBL has other issues with wine relating to buffers that cause bigger problems. The display of images does not translate properly and the memory management does work either. Sadly laserGRBL is in desperate need of a rewrite and it is not going to be an easy task. It needs to be rewritten to be cross platform and it is doubtful the current authors are going to put time into the effort because they aren't experienced enough to do it. And given that Windows 11 is the last version of Windows, it isn't likely anyone eould do much given how much .NET internals have and continue to change. Find another product thst is fesigned to run on Linux. |
Beta Was this translation helpful? Give feedback.
-
Update for anyone who is curious. Given the price of raspberry pi 4 these
days, I gave up on getting it to work there and bought a 99 dollar mini pc
with windows pre installed. Installed VNC on it, added a camera to watch
the laser, and installed windows lasergrbl on it. Same price as the other
solution I had in mind but only took 30 min to get all set up. 10/10 would
recommend.
…On Thu, Jan 5, 2023, 9:58 PM Ben Williams ***@***.***> wrote:
No problem, and good luck!
If you don't have any luck with LaserGRBL, another option is LaserWeb.
LaserGRBL + Wine doesn't play nice with my window manager under Linux,
sometimes resulting in hangs when I switch between virtual desktops. I
honestly prefer LaserGBRL, as it is simpler and just easier to use.
LaserWeb is pretty advanced and has a steep learning curve with poor
documentation (and can be a pain to get setup initially). It can do some
pretty cool stuff (like if you want to cut and engrave in the same run),
but it's kind of a pain. It does work though. (I haven't tried it with
Raspberry Pi... According to the website, the server for LaserWeb will run
on Raspberry Pi but the frontend won't. So you would have to access it from
its web interface through a browser. I personally prefer that anyway, but
it's a limitation to keep in mind. Obviously this means LaserGRBL would be
more straightforward to use on the Pi as well, if you can get it working.)
For most things though, I really do prefer LaserGRBL. One of the things I
*really* dislike about LaserWeb is that it doesn't display where the
laser is when cutting (I don't think it even tries to read real-time status
information on GRBL machines...). It might seem like a small thing, but in
practice, it's a bigger deal than it sounds like it should be.
—
Reply to this email directly, view it on GitHub
<#1764 (reply in thread)>,
or unsubscribe
<https://github.com/notifications/unsubscribe-auth/AACJQNYNPW2UGZRBOIUY4NLWQ6J5VANCNFSM5QEE7V6Q>
.
You are receiving this because you commented.Message ID:
***@***.***>
|
Beta Was this translation helpful? Give feedback.
-
Just for fun I decided to port this nice application to the |
Beta Was this translation helpful? Give feedback.
-
It does successfully update on the Pi 4. It updates on the 5 but no longer
starts after the update.
HAVE FUN!!
…On Tue, Aug 20, 2024 at 12:24 PM hovercraft-github ***@***.***> wrote:
@oliverhbailey <https://github.com/oliverhbailey> Thanks for the report
about wine/RPi, and I'm not surprised !
In contrast, the proposed solution with mono I expect should be more
stable just because we will have more control of what's under hood.
—
Reply to this email directly, view it on GitHub
<#1764 (reply in thread)>,
or unsubscribe
<https://github.com/notifications/unsubscribe-auth/AD6CBIFYQ7GH7GGSBUCH6ADZSN3UBAVCNFSM5QEE7V62U5DIOJSWCZC7NNSXTOSENFZWG5LTONUW63SDN5WW2ZLOOQ5TCMBTHE4DMNBV>
.
You are receiving this because you were mentioned.Message ID:
***@***.***>
|
Beta Was this translation helpful? Give feedback.
-
Can I run LaserGRBL on Linux? Raspberry Pi 3. my computer is too powerful (i7 ram 16GB) to use it in workshop. or better to buy a cheap old computer for it.
Beta Was this translation helpful? Give feedback.
All reactions