Git Product home page Git Product logo

Comments (48)

arkypita avatar arkypita commented on May 24, 2024 4

I gave up developing a Linux version for too many implications and issue with Mono framework.

from lasergrbl.

Jakeler avatar Jakeler commented on May 24, 2024 1

I don't think it is going to happen.
If you are still searching for a solution, i am using cncjs now, which works nicely on Linux with GRBL. It provides a server and webinterface for machine control and preview. It has no path generation feature to import image/vector graphics though, so you need to do it manually, i use Inkscape with the J Tech Photonics Laser plugin to do this.

from lasergrbl.

heltonritter avatar heltonritter commented on May 24, 2024 1

Hey guys, ahhh are those changes related to run on Linux/Mono already merged to master right?

I read some other issues and seems that still some work to be done. I'm willing to take a look and see where I can help.

from lasergrbl.

bcabral avatar bcabral commented on May 24, 2024 1

Hello. Thanks for answering

I was able to install and run on my linux using the following procedure

$ sudo apt purge wine\* mono\*
$ sudo snap install wine-platform-5-stable
$ sudo apt install libmpg123-0:i386
$ export PATH=$PATH:/snap/wine-platform-5-stable/current/opt/wine-stable/bin/
$ rm -rf ~/.wine
$ export WINEARCH=win32
$ winecfg (choose windows 7 and exit)

Download latest winetricks from https://raw.githubusercontent.com/Winetricks/winetricks/master/src/winetricks
$ chmod a+x winetricks
$ ./winetricks gdiplus msxml3
to free space after install gdiplus you can $ rm -rf ~/.cache/winetricks/win7sp1
Download mono from http://dl.winehq.org/wine/wine-mono/4.9.4/wine-mono-4.9.4.msi and install with:
$ wine msiexec /i wine-mono-4.9.4.msi

Add a string entry under HKEY_LOCAL_MACHINE\Software\Wine\Ports with a key of COM10 and a value of /dev/ttyUSB0 (or /dev/ttyACM0 if it is the case) to access the arduino USB port from wine and then create the symlink for it. The former is saved in .wine/system.reg
$ wine regedit
$ rm ~/.wine/dosdevices/com10
$ ln -s /dev/ttyUSB0 ~/.wine/dosdevices/com10

Add yourself to dialout group so you can access the USB port (if you're not already)
$ sudo usermod -a -G dialout $USER

Download latest LaserGRBL (tested with https://github.com/arkypita/LaserGRBL/releases/download/v4.4.1/install.exe) and install with:
$ wine install.exe
$ wine "C:Program Files/LaserGRBL/laserGRBL.exe"

ubuntu 18.04

from lasergrbl.

bcabral avatar bcabral commented on May 24, 2024 1

from lasergrbl.

arkypita avatar arkypita commented on May 24, 2024 1

Another penguin using lasergrbl, I'm happy!

from lasergrbl.

Rybec avatar Rybec commented on May 24, 2024 1

I guess I should report my success with Play on Linux: I've replaced the fried motor controller, and it works perfectly fine now. I do sometimes get some serious lag issues when running LaserGRBL through Play on Linux, but I think it is a Wine issue, not an issue with LaserGRBL.

from lasergrbl.

oliverhbailey avatar oliverhbailey commented on May 24, 2024 1

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.
Latency can be caused by several factors. LaserGRBL is a 32 bit windows application. Under Wine, the Dll's have access to half as much memory than under a Windows environment. A 32 bit application normally has access to 4 gigs of RAM. But under Wine 32, only the lower 2 gigabytes is actually available. There are other factors as well, type of machine, type of processor, speed, cores, and total ram, that also have an impact on performance of a Windows app.
The best solution is to move LaserGRBL to 64 bit Wine and mono. That eliminates memory and CPU restrictions of Wine 32 and should done anyway as 32 bit Windows support is deprecated. I'm retired and ported LaserGRBL to 64 bit Mono swveral yrars ago successfully. But in the past two years Microsoft has stopped promising cross platform support for Winforms on Linux only. And at that time and continuing to the present, there are build errors that remain unresolved on Linux relating to Winform 32 bit only applications.
There are ways to bump up the application process priority but this can cause other performance issues. If the latency is in the UI, its most likely memory starved. However, if it is in data buffering to the laser, you could increase the buffer size to keep data flowing smoothly. Just don't increase the buffer until you have other performance problems.
Wine is useful, but trying to solve Windows shortcomings is getting to be a bigger burden. Memory sensistivity is even caused by the order of Dll loading these days on 32 bit applications.
You've done a great job of getting LaserGRBL working. I hope this information can help.

from lasergrbl.

Styne13 avatar Styne13 commented on May 24, 2024 1

I created a pull request with a setup script now:
#1666
Feel free to comment!

from lasergrbl.

arkypita avatar arkypita commented on May 24, 2024

All the code of LaserGRBL is C# so I think it could be compiled for Linux in Mono, using MonoDevelop.
I have never done it before, and I have no linux machine at the moment, so I can't help you with this task. If you have skill you can tray yourself. In case, let me know if works

from lasergrbl.

Jakeler avatar Jakeler commented on May 24, 2024

It compiles fine on Arch Linux (xbuild) with latest mono 5.0.0. But when trying to run with mono LaserGRBL.exe i always get:

Unhandled Exception:
System.TypeInitializationException: The type initializer for 'Tools.TimingBase' threw an exception. ---> System.TypeInitializationException: The type initializer for 'Tools.HiResTimer' threw an exception. ---> System.EntryPointNotFoundException: QueryPerformanceFrequency
  at (wrapper managed-to-native) Tools.HiResTimer:QueryPerformanceFrequency (long&)
  at Tools.HiResTimer..cctor () [0x00025] in <4bb2d302ea56443d9efd6d6ed57ceec3>:0 
   --- End of inner exception stack trace ---
  at Tools.TimingBase..cctor () [0x00000] in <4bb2d302ea56443d9efd6d6ed57ceec3>:0 
   --- End of inner exception stack trace ---
  at LaserGRBL.Program.Main (System.String[] args) [0x00000] in <4bb2d302ea56443d9efd6d6ed57ceec3>:0 
[ERROR] FATAL UNHANDLED EXCEPTION: System.TypeInitializationException: The type initializer for 'Tools.TimingBase' threw an exception. ---> System.TypeInitializationException: The type initializer for 'Tools.HiResTimer' threw an exception. ---> System.EntryPointNotFoundException: QueryPerformanceFrequency
  at (wrapper managed-to-native) Tools.HiResTimer:QueryPerformanceFrequency (long&)
  at Tools.HiResTimer..cctor () [0x00025] in <4bb2d302ea56443d9efd6d6ed57ceec3>:0 
   --- End of inner exception stack trace ---
  at Tools.TimingBase..cctor () [0x00000] in <4bb2d302ea56443d9efd6d6ed57ceec3>:0 
   --- End of inner exception stack trace ---
  at LaserGRBL.Program.Main (System.String[] args) [0x00000] in <4bb2d302ea56443d9efd6d6ed57ceec3>:0

Can this be solved?

from lasergrbl.

arkypita avatar arkypita commented on May 24, 2024

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
QueryPerformanceFrequency and QueryPerformanceCounter windows API and I suppose that those API are OS specific function and they are not available on mono. Fortunately it is not too difficult to replace them with something similar.

You can try to replace the whole HiResTimer class with this code:

	public static class HiResTimer
	{
		private const long NANO_IN_MILLI = 1000 * 1000;
		private static Stopwatch watch = new Stopwatch(); 

		static HiResTimer() //costruttore static, viene chiamato prima del primo utilizzo della classe
		{watch.Start();}

		public static long TotalMilliseconds
		{ get { return TotalNano / NANO_IN_MILLI; } }

		public static long TotalNano
		{
			get
			{
				return (long)((double)watch.ElapsedTicks / (double)Stopwatch.Frequency * 1000000000.0);
			}
		}

	}

from lasergrbl.

Jakeler avatar Jakeler commented on May 24, 2024

Thank you for the fast reply. That works!

Then i got this:

System.DllNotFoundException: ntdll.dll
  at (wrapper managed-to-native) Tools.TaskScheduler:NtSetTimerResolution (uint,bool,uint&)
  at Tools.TaskScheduler.SetClockResolution (System.Int32 msec) [0x0000d] in <a1ec3de5fed24c81a1d181c135352908>:0 
  at LaserGRBL.Program.Main (System.String[] args) [0x00051] in <a1ec3de5fed24c81a1d181c135352908>:0 
[ERROR] FATAL UNHANDLED EXCEPTION: System.DllNotFoundException: ntdll.dll
  at (wrapper managed-to-native) Tools.TaskScheduler:NtSetTimerResolution (uint,bool,uint&)
  at Tools.TaskScheduler.SetClockResolution (System.Int32 msec) [0x0000d] in <a1ec3de5fed24c81a1d181c135352908>:0 
  at LaserGRBL.Program.Main (System.String[] args) [0x00051] in <a1ec3de5fed24c81a1d181c135352908>:0 

So i simply commented it out, like this:

public class TaskScheduler
	{

		//[System.Runtime.InteropServices.DllImport("ntdll.dll", EntryPoint = "NtSetTimerResolution")]
		private static extern void NtSetTimerResolution(uint DesiredResolution, bool SetResolution, ref uint CurrentResolution);

		public static void SetClockResolution(int msec) //volendo potrebbe gestire anche 0.5 msec ma a noi basta 1-15 msec, quindi usiamo int
		{
			uint DesiredResolution = (uint)msec * 10000;
			bool SetResolution = true;
			uint CurrentResolution = 0;
			//NtSetTimerResolution(DesiredResolution, SetResolution, ref CurrentResolution);
		}

	}

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! :)

from lasergrbl.

arkypita avatar arkypita commented on May 24, 2024

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

from lasergrbl.

Jakeler avatar Jakeler commented on May 24, 2024

Okay good, that makes sense.

Test results:

  • Connection to GRBL 1.1 controller: works!
  • Loading gcode file and sending to controller: works!
  • "Type gcode here" field: fail/crash at any input:
System.NullReferenceException: Object reference not set to an instance of an object
  at LaserGRBL.UserControls.PlaceholderTextBox.waterMarkContainer_Paint (System.Object sender, System.Windows.Forms.PaintEventArgs e) [0x0000e] in <eb1043efb68f4c3593b70ed0451be259>:0 
  at System.Windows.Forms.Control.OnPaint (System.Windows.Forms.PaintEventArgs e) [0x00019] in <a98ec586cd3441aeb3d7919d9ad41ff2>:0 
  at System.Windows.Forms.Control.WmPaint (System.Windows.Forms.Message& m) [0x0007b] in <a98ec586cd3441aeb3d7919d9ad41ff2>:0 
  at System.Windows.Forms.Control.WndProc (System.Windows.Forms.Message& m) [0x001a4] in <a98ec586cd3441aeb3d7919d9ad41ff2>:0 
  at System.Windows.Forms.ScrollableControl.WndProc (System.Windows.Forms.Message& m) [0x00000] in <a98ec586cd3441aeb3d7919d9ad41ff2>:0 
  at System.Windows.Forms.Control+ControlWindowTarget.OnMessage (System.Windows.Forms.Message& m) [0x00000] in <a98ec586cd3441aeb3d7919d9ad41ff2>:0 
  at System.Windows.Forms.Control+ControlNativeWindow.WndProc (System.Windows.Forms.Message& m) [0x0000b] in <a98ec586cd3441aeb3d7919d9ad41ff2>:0 
  at System.Windows.Forms.NativeWindow.WndProc (System.IntPtr hWnd, System.Windows.Forms.Msg msg, System.IntPtr wParam, System.IntPtr lParam) [0x00085] in <a98ec586cd3441aeb3d7919d9ad41ff2>:0 
  • Machine control (move): works!
  • Reset+Lock Button: works!
  • Create custom button and send the gcode: works!

from lasergrbl.

arkypita avatar arkypita commented on May 24, 2024

Great job @Jakeler

Comment DrawWaterMark in PlaceholderTextBox class.

protected override void OnPaint(PaintEventArgs e)
{
base.OnPaint(e);
//Draw the watermark even in design time
DrawWaterMark();
}

from lasergrbl.

Jakeler avatar Jakeler commented on May 24, 2024

Had to comment it in ThisHasFocus() and ThisTextChanged() to avoid the error. It causes no problem in OnPaint() and Initialize(). I have the changes now in a fork: Jakeler@1cea400

So i was able to successfully engrave something with LaserGRBL now. More test results:

  • Settings, gbrl config, hotkeys: works
  • Loading a raster image (png): Does nothing, no new window, no error...
  • Speed, Power override popup: extremely small (unusable)
  • UI Screenshot:
    linux
  • Color schemes: background change works, but fonts stay grey, not readable in dark/hacker option

from lasergrbl.

arkypita avatar arkypita commented on May 24, 2024

Hi @Jakeler
I am very happy with your progress & results with mono. When I do my first experiments with an older version of LaserGRBL I could not go much further. My biggest problems were that the version of mono I was using was very old (3.2.8) and suffers several bugs that prevent winform program to function properly. I had done these tests on a raspberry, because I do not have a real linux PC available.

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.

from lasergrbl.

arkypita avatar arkypita commented on May 24, 2024

I should have an old laptop that I can sacrifice to a linux installation. I would be happy to help you with this job.

from lasergrbl.

Jakeler avatar Jakeler commented on May 24, 2024

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.
I can help you though with setting up Linux for development, testing and other related questions. When the software is working i could do proper packaging for Linux distributions, so that everone can install and update it easily.

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)

from lasergrbl.

arkypita avatar arkypita commented on May 24, 2024

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.

  • What distro exactly you use? Could you provide me a link to an installable ISO?
  • Is the mono compiler or IDE already present in distro or you have to install later? What step to install?

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?

from lasergrbl.

arkypita avatar arkypita commented on May 24, 2024

Update; i have installed Linux Mint with mono v5.4.16 and monodevelop 7.1. Both are the latest version.
I am stuck on a problem with resgen.exe as you can see in picture. Any hint?

With xbuild it compile

cattura

from lasergrbl.

arkypita avatar arkypita commented on May 24, 2024

Update: solved (switching to .net 4.5)

from lasergrbl.

Jakeler avatar Jakeler commented on May 24, 2024

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. ;)

from lasergrbl.

arkypita avatar arkypita commented on May 24, 2024

You can find my result on https://github.com/arkypita/LaserGRBL under Linux branch
https://github.com/arkypita/LaserGRBL/tree/Linux

All the problem that I have found the last time I tried to do a linux version still persist. Biggest issue is on tablelayout panel, that is not well supported. This broke all my layout. Also some problem with image manipulation functions.

Now raster image form opens, but due to layout problem is unusable.
I cannot waste too much time on linux version.

from lasergrbl.

arkypita avatar arkypita commented on May 24, 2024

I read this on internet about T2Laser under Linux.
T2Laser is a .NET executable like LaserGRBL is.

T2Laser full working on linux.
i uploaded firmware and connect fine.

steps.

uninstall wine and ppa

sudo apt install ppa-purge
sudo ppa-purge ppa:ubuntu-wine/ppa

sudo apt-get update

install wine Development branch
https://wiki.winehq.org/Ubuntu

open terminal and write(change USER for your user linux folder
rm -fr ~/.wine export WINEARCH=win32 export WINEPREFIX="/home/USER/.wine" winecfg

select windows 7 emulation.

create folder for winetricks(example mkdir winetricks)
download winetricks last version on here type this
wget -r -c -N https://raw.githubusercontent.com/Winetricks/winetricks/master/src/winetricks

cd /Winetricks/winetricks/master/src/
sudo chmod +x winetricks

launch winetricks

navigate to the default wineprefix -> Installation of Windows DLL or component, find dotnet45 and mark it for installation. 4. Installer will install all .NET Frameworks including 4.5 version

system is fine for t2laser

now on terminal type winefile

search setup.exe (t2laser install app)

and enjoy.

Maybe someone wanna try the procedure with LaserGRBL?

from lasergrbl.

Jakeler avatar Jakeler commented on May 24, 2024

I have already tried it with Wine. dotnet does not properly install with latest winetricks (20171222) and wine (3.0rc6). You can use the open source wine-mono again, but then LaserGRBL does not even start, showing some NotImplemented errors...
Usually the "native" mono is the way to go for .NET on Linux, i don’t have much good experience with wine.

from lasergrbl.

MiguelAngelLV avatar MiguelAngelLV commented on May 24, 2024

Any news about LaserGRBL in Linux?

from lasergrbl.

Langlais115 avatar Langlais115 commented on May 24, 2024

I'm a little bit sad to here that. But I understand.
@arkypita
Thank you for all your hard work.
Keep it that way ;-)

from lasergrbl.

DanielMazurkiewicz avatar DanielMazurkiewicz commented on May 24, 2024

Hey guys, ahhh are those changes related to run on Linux/Mono already merged to master right?

Nope, just checked it, they are not

from lasergrbl.

bcabral avatar bcabral commented on May 24, 2024

Hi there. I am facing the same issues after download the latest version and tried on wine-5 and mono-6.12. Also could not find https://github.com/arkypita/LaserGRBL/tree/Linux
Is there a place where I can download this compiled mono-capable-version of lasergrbl ?
Thanks

from lasergrbl.

arkypita avatar arkypita commented on May 24, 2024

Hi there. I am facing the same issues after download the latest version and tried on wine-5 and mono-6.12. Also could not find https://github.com/arkypita/LaserGRBL/tree/Linux

This branch was deleted because give no working results.

Is there a place where I can download this compiled mono-capable-version of lasergrbl ?

No, this version doesn't exist.

It was reported by some user that LaserGRBL executable run good on Linux with wine 5.0 and wine mono 4.9.4 (wineprefix 32-bit) and windowsdll gdiplus.

image

from lasergrbl.

arkypita avatar arkypita commented on May 24, 2024

Thanks a lot, I believe that could be useful for other linux users. I will link your procedure on https://lasergrbl.com/faq

from lasergrbl.

bcabral avatar bcabral commented on May 24, 2024

from lasergrbl.

dandifon avatar dandifon commented on May 24, 2024

Hi. I'm a newbie in these matters. I have not been able to run laserGRBL using wine on linux peppermint. Wine development, winetricks, etc are already installed. When I try to run laserGRBL, I keep getting the message that wine mono is not installed. I have followed several procedures on the Internet to get around this to no avail. Before trying the above steps which look wonderful, I just got an idea or question. Is it not a good idea to compile a stand-alone version of laserGRBL? I suspect it might run better on wine.

from lasergrbl.

Langlais115 avatar Langlais115 commented on May 24, 2024

Hi. I'm a newbie in these matters. I have not been able to run laserGRBL using wine on linux peppermint. Wine development, winetricks, etc are already installed. When I try to run laserGRBL, I keep getting the message that wine mono is not installed. I have followed several procedures on the Internet to get around this to no avail. Before trying the above steps which look wonderful, I just got an idea or question. Is it not a good idea to compile a stand-alone version of laserGRBL? I suspect it might run better on wine.

The default installation should work fine on Linux.
If you follow the installation procedure which is 2 post before yours, then try to start laserGRBL using sudo.
sudo wine "/home/${USER}/.wine/drive_c/Program Files (x86)/LaserGRBL/LaserGRBL.exe"

Although this is not a perfect solution, this might solve some permissions issue.

from lasergrbl.

bcabral avatar bcabral commented on May 24, 2024

from lasergrbl.

dandifon avatar dandifon commented on May 24, 2024

The procedure of bcabral works for me up to
$ export WINEARCH=win32.
winecfg returns 'Command not found'

from lasergrbl.

dandifon avatar dandifon commented on May 24, 2024

Thanks !3runo for being patient with me. winecfg works fine now.
This link 'https://raw.githubusercontent.com/Winetricks/winetricks/master/src/winetricks' however gives but the source code of winetricks. I'm stuck there.
If I do 'sudo apt install winetricks' what gets installed is winetricks 20180207. I suppose that's old as the next command 'chmod a+x winetricks' yields 'No such file or directory' even though winetricks runs well on the same command line.
Please, what's the way forward?
Dan.

from lasergrbl.

bcabral avatar bcabral commented on May 24, 2024

from lasergrbl.

dandifon avatar dandifon commented on May 24, 2024

WONDERFUL! !3runo, THANKS A THOUSAND. laserGRBL now runs on Linux Peppermint on my computer.
Hahahahahahahahaha. It's exciting!
Thanks man.
To arkypita, !3runo and Langlais115, I say THANK YOU GENTLEMEN.
Dan

from lasergrbl.

Rybec avatar Rybec commented on May 24, 2024

Just in case anyone is interested:

I've gotten LaserGRBL running under PlayOnLinux, in Debian. (And it might be possible for someone to write a PlayOnLinux script that automates all of this, based on my instructions.)

Using #5 (comment) as reference, I took the following steps:

(This might seem really complicated. The advantage with this is that PlayOnLinux can manage multiple versions of Wine at the same time. If you are using more than one thing that needs Wine, this can avoid compatibility problems where one program needs one version of Wine and one needs another. Also, this can be automated, so maybe someone can add this to POL as a supported application that shows up in its installation list.)

First I installed the latest version of Wine 5 in PlayOnLinux (32 bit version, it was 5.22, not the staging version), under Tools > Manage Wine Versions. It also asked if I wanted to install Mono, and I said yes. (I also tried to install libmpg123-0:i386 using apt-get, which turned out to already be installed. If you don't already have it, you might also need to install it.)

Second, I clicked "Install", selected "Install a non-listed program" and then checked the boxes for "Use another version of Wine", "Configure Wine", and "Install some libraries", once I got to that part.

Third, I picked the 5.x version of Wine I had installed in the first step (5.22, in my case).

Fourth, it asked whether I wanted 32 or 64 bit. I picked 32 bit.

Fifth, I made sure Wine was configured with Windows 7, when the Wine configuration box came up, and clicked "Ok".

Sixth, when it displayed the list of libraries I could select to install, I checked the boxes to install gdiplus and msxml3. (These were listed as POL_Install_gdiplus and POL_Install_msxml3. You shouldn't need to install Mono or .net from here, as Mono was installed with Wine 5.) Note that when it tried to install the two libraries, it had some errors, mostly saying the download didn't match the hash. I kept telling it to retry until it was successful and moved to the next step.

Seventh, I told it to install using the latest LaserGRBL installer, which I had already downloaded. Note that once the installer is done, it will give you the option to launch LaserGRBL, with the box already checked. Uncheck the box before continuing. Earlier in the process PlayOnLinux displayed a warning saying not to let the application start from the installer. I don't know what happens if you forget to do this, but it is probably best to make sure you uncheck that box.

Eighth, once the installation is complete, it will ask which file to use the start the application, and it will present a list. Pick LaserGRBL.exe. Once you've finished this, it will ask again, but LaserGRBL.exe won't be on the list anymore. Click "Cancel" at this point. (I think it just keeps going until it runs out of executables or you cancel, just in case the application has multiple exes that you need to run.) Now LaserGRBL should show up on the application list for PlayOnLinux, and it should run without any issues. It won't see your laser cutter yet though.

To make LaserGRBL see your laser cutter, you have to add a registry string and a symbolic link. To add the registry string, select LaserGRBL in PlayOnLinux, and on the left panel click "Configure". In the window that opens, click the Wine tab and then the icon for Registry Editor. Find HKEY_LOCAL_MACHINE\Software\Wine\Ports, and add a string named COM10. The value should be the mount point of your laser cutter in /dev, typically something like /dev/ttyUSB0 or /dev/ttyACM0. (If you aren't sure which it is, unplug the USB from your computer and run 'ls' in /dev, then plug it back in and run 'ls' again, then look for the new device that appeared after you plugged in the USB.)

To add the symbolic link, select LaserGRBL in PlayOnLinux, and then click "Open the directory" on the left panel. This will open a file manager that will show you where LaserGRBL is installed. The directory you want is the one inside wineprefix/, then the dosdevices/ directory under that. (Mine is ~/.PlayOnLinux/wineprefix/lasergrbl/dosdevices) In a terminal, go to that directory. If there is already a file named 'com10' in there, delete it (or choose a different COM number and use that instead of COM10 from here on out). Now run 'ln -s /dev/ttyUSB0 ./com10', where /dev/ttyUSB0 is the mount point of your laser cutter.

You may also need to add yourself to the dialout group, by running 'sudo usermod -a -G dialout $USER' in a terminal.

Once this is all done, you should be able to run LaserGRBL from PlayOnLinux, and you should be able to connect to your laser cutter on COM10.

Note that if you have multiple laser cutters connected at the same time, you will end up with /dev/ttyUSB0, /dev/ttyUSB1, and so on. If you want them to all be accessible, you should add a COM entry to the registry for each one, along with the associated symbolic link. I'm not sure what the highest COM number you can have is, but just increment it for each new one, and you should be fine so long as you don't have an absurd number of laser cutters connected at the same time. Of course, in this case, they won't always connect on the same numbers every time (it depends mainly on the order you connect them in, and when rebooting with them connected there is no guarantee they will always connect in the same order), so it will be up to you to figure out which is which. Honestly, it's probably easier to just connect one at a time, but I don't know your use case, so I'm not going to judge.

Sadly, one of my motor controllers just burned out, so I won't be able to test this more extensively right now, but I was able to connect to my laser cutter successfully!

from lasergrbl.

ptorrezao avatar ptorrezao commented on May 24, 2024

Hello. Thanks for answering

I was able to install and run on my linux using the following procedure

$ sudo apt purge wine* mono* $ sudo snap install wine-platform-5-stable $ sudo apt install libmpg123-0:i386 $ export PATH=$PATH:/snap/wine-platform-5-stable/current/opt/wine-stable/bin/ $ rm -rf ~/.wine $ export WINEARCH=win32 $ winecfg (choose windows 7 and exit)

Download latest winetricks from https://raw.githubusercontent.com/Winetricks/winetricks/master/src/winetricks $ chmod a+x winetricks $ ./winetricks gdiplus msxml3 to free space after install gdiplus you can $ rm -rf ~/.cache/winetricks/win7sp1 Download mono from http://dl.winehq.org/wine/wine-mono/4.9.4/wine-mono-4.9.4.msi and install with: $ wine msiexec /i wine-mono-4.9.4.msi

Add a string entry under HKEY_LOCAL_MACHINE\Software\Wine\Ports with a key of COM10 and a value of /dev/ttyUSB0 (or /dev/ttyACM0 if it is the case) to access the arduino USB port from wine and then create the symlink for it. The former is saved in .wine/system.reg $ wine regedit $ rm ~/.wine/dosdevices/com10 $ ln -s /dev/ttyUSB0 ~/.wine/dosdevices/com10

Add yourself to dialout group so you can access the USB port (if you're not already) $ sudo usermod -a -G dialout $USER

Download latest LaserGRBL (tested with https://github.com/arkypita/LaserGRBL/releases/download/v4.4.1/install.exe) and install with: $ wine install.exe $ wine "C:Program Files/LaserGRBL/laserGRBL.exe"

ubuntu 18.04

Thanks for the effort!! Working on 4.6.2!!!

from lasergrbl.

bcabral avatar bcabral commented on May 24, 2024

from lasergrbl.

Styne13 avatar Styne13 commented on May 24, 2024

@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?

from lasergrbl.

Rybec avatar Rybec commented on May 24, 2024

Thank you so much! I was hoping someone could use my process to do this.

from lasergrbl.

arkypita avatar arkypita commented on May 24, 2024

Hi @Styne13
I see that there is something similar to PlayOnLinux but for MAC https://www.playonmac.com/en/
Do you think it is possible to do something similar to your script but for MAC?

from lasergrbl.

Styne13 avatar Styne13 commented on May 24, 2024

Hi @arkypita
think that shall also be possible. As far as I know the interface between wine and playonlinux and playonmac is identical. Executing installation scripts is also possible.

It might depend on the version 5.22 with mono available in macOS.
Gave it a quick try with my 1201n hackintosh running Yosemite was not successful, because I could not install the appropriate version 5.22 with mono.
Maybe someone else running a newer version of macOS can give it a try.
Can support as possible and also give it another try installing mono manually...

from lasergrbl.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.