Take This Poll! Which OS and GC/WC Do You Use?

@JWoody18 This is what is being referred to when we say Windows based WedControl. You seem to have a lot of experience with VMs. Could you make one for us, for WebControl?

they can run a browser to work with WebControl :slight_smile:

not just for heavier users, but potentially for all future users. The only good
reason I see to run webcontrol on anything other than a pi is to provide a path
forward for existing users without having to force them to buy a pi to upgrade
to the next release.

webcontrol has pretty trivial dependencies compared to ground control (no kivy
for example), and it’s pretty strightforward to compile a python program into a
.exe (google for “convert python to exe” finds lots of examples and videos).

So I wonder if it’s harder to go the container route than to just convert the
python into a single binary and let people run that.

I know containers are the current fad, but it doesn’t mean they are the right
answer for everything :slight_smile:

David Lang

That is something I can certainly take a look at. Busy with family stuff this month but I’ll look at it. Shouldn’t be too difficult as long as it is reasonable that the only thing the VM is used for is to run WGC. The VM -should- I believe, be portable between Windows and MacOS machines as well, now that I think of it. So we should only need one image for both.

-Jeff

4 Likes

What software would you use? Are you thinking an actual “virtual machine” (VM) or a docker image? I guess to me, a VM is a very different animal (dare I say antiquated) compared to a docker-like solution. If you use something like VMWare or VirtualBox, you have to have an OS. Looking at the above poll, and seeing how many people use Windows, you can’t just load an image of Windows and distribute it. Curious what your thoughts are on the details of creating a “Windows based WebControl”.

VirtualBox.org

The VM Host is your reglaur desktop. Can be windows Mac or Linux. VirtualBox runs as a program and allows you to spawn one or more virtual guests systems. To Windows it’s a program and you can alt tab switch back and forth. The host emulates a bios and hardware and can share peripherals in various ways with the guest. The guest believes it is on real hardware.

So windows users run Windows but can have Linux guests. MacOS users the same thing. Linux can even be a host to Windows if Linux is your primary desktop. It’s a bit of a mind twist. Imagine the guest machine as a physical pc tower of hardware bits. It’s just being emulated inside your main PC.

I haven’t confirmed but I believe guests are portable across all three potential hosts which is why I said I think a single image will suffice for all.

Now within the guest image, which in this case is a “full” Linux system will be a regular operating system like Debian Linux and then whatever you load. Including docker and the docker container running web GC.

Modern PCs have so much latent firepower and memory and storage that you can easily run multiple guests for typical end user applications all simultaneously. It’s pretty wild.

Moreover you can pass through chosen USB devices like the Arduino so it appears as if directly wired to the Guest.

Best of all VirtualBox is very good and free for non commercial use. It’s it the only virtualization platform but it’s the one accessible to us.

If you want to get even fancier you can run a Windows host and a Linux guest and merge them visually so you have two tool bars. One is Windows and one is Linux and you can work seamlessly between apps. There are even shared clipboards and shared directories to make moving info easier.

Jeff

One more mind bending concept.

I had my main work desktop lose the c drive a few years ago. Rather than rebuild it all on a new HDD I walked in to staples and bought whatever they had so I could get back to work then I installed Windows inside Windows and did all my installs of apps and docs there. Backing up my machine literally meant backing up a handful of virtual machine files and it backed up everything. Done in conjunction with most files on Dropbox I could be back up and running in a half an hour on any modern hardware with all my apps and customizations and docs.

I even started playing with moving the image to a laptop for when I went on the road by it takes some messing around as Windows doesn’t like the underlying hardware id stuff to change or it starts carping about licensing at some point when it notices the host isn’t the same as before. Linux does not have this issue which is what makes it so easy to distribute Linux based guest images anyone can run.

Jeff

Thanks. I’ve used VirtualBox and VMWare Desktop, Player and Fusion (I managed VMs for our team since ~2010-ish?).

So you would use VirtualBox but at the end of the day, a Windows user would need to learn Linux, if they used your VM?

assuming we are still talking about webcontrol here, they would not have to
learn linux unless they are fiddling with the packages inside the container/vm.
normally they would just run it and access it via a browser, without caring that
it’s a VM vs some binary program

You could also just make a Windows docker and run it from there.

yes.

I get VMs, I’ve just never used Linux, only Windows and Mac. At the end of the day, if you make a Linux guest VM, you still have to interact with Linux to run the browser, unless I suppose you make it automatically start the browser (WebControl homepage) when the OS starts…

But I guess it won’t run on Windows Home since it needs Hyper-V installed.

1 Like

I gathered you had some tech chops from other posts, I was more leaving breadcrumbs for other readers to understand the concepts when they read the thread.

I think it there is already so much to learn with CNC that adding Linux to the mix as a required skill should be avoided if possible. But, that depends on the software guys. I don’t think you can assume a high level of tech knowledge with woodworkers. Some are very savvy some are moderate and some are not.

I would think an ideal goal for this part of the project would be to lay out a simple scripted menu post boot that allows you to pick what to do if we need separate options. But actually I don’t think they should need to do anything but open a browser and use the web UI.

All that may be required is to start the VM and have it determine it’s local IP address and report the on the virtual console with instructions to go there and access WGC.

Perhaps we are a bit ahead of ourselves here. What is the objective? My understanding is that it is to have WGC up and running from scratch with as few clicks and as little technical knowledge as possible.

If that is the objective then one way to achieve that is with a light weight Linux virtual machine that comes with all the dependencies installed and WGC operational at the moment of “first config”. How you config WGC etc after that is ok the WGC development side of things.

The other goal I see would be to have some call home update scripts that either run regularly to check and report on update availability or just a button to do a manual check for updates for the Linux host. However that come what complicates things over time.

Instead I would suggest a goal of making the VM conceptually a black box for WGC and it isn’t expected to update itself. Instead a move to a new WGC or package updates to the OS under the hood would be achieved by grabbing a new VM that had those rolled in. This means the VM almost becomes a versioned piece if firmware in it’s own right. I like that more. Avoids users having various different package versions etc despite running a particular VM. Which makes it hard to help them.

However in order to make the WGC engine image generic and handle versioning and updates at the VM level the WGC config files need to be easily bundled in to a zip or other format and downloaded in one pass from the web interface. Likewise there needs to be an equivalent upload function to put them back in the same or a different version if WGC.

This has the added benefit of allowing you to test various WGC versions and easily revert by simply spawning the older machine and loading your files of necessary. A new user who starts on say 1.27 could even roll back to a version they never used by grabbing the 1.26 VM and loading their config.

This assumes efforts are made to define and extensible config file format and track when a config is backwards compatible and warm if it isn’t due to an important change.

At that point the maintenance if the VM should be very easy and is probably best left in the hands of someone on the WGC test team. Really the OS component should be stable for long periods. It ignores the need for security considerations related to os updates but if running on a private IP behind firewalls in home networks with a limited Debian OS the risk is very low.

I suggest Debian as the host OS as it is the base of some of the largest and best supported distros including Raspbian and it has a great utility called Deboostrap that helps you rapidly build a very slim OS with just the bits you need and nothing else. Helps keep things simple and small. If this is headless it can be text only and under 100MB. Yet if you need something you can always ssh on and apt-Get install it. It just won’t be in the next release but you can re-add stuff if you tinker under the hood.

But I digress. I started talking about objectives and goals and constraints and tools and a plan. I understand that isn’t the style of open source used here so I’m not sure this approach makes sense.

Jeff

no, you run the browser in your main OS, it’s a webserver that runs in the VM,
and that starts automatically

besides, firefox on linux and firefox on windows are the same, but we aren’t
talking about running a browser in the VM

David Lang

this is already up and running on the Pi image, I don’t see why it wouldn’t work
on a VM image.

David Lang
k

1 Like

And some they are both Debian base I suspect all of the Maslow specific scripts could be easily made portable so basically the VM becomes a virtual Pi.

Jeff

1 Like

If you are running Windows 10 , you can also try WSL (Windows Linux Subsystem), Go to the Microsoft Apt store. Search for WSL pick your distro (Ubuntu, Debian, Suse, . When I tested WebControl earlier in the year, I was able to install it fairly easily and even brought up the web app on my phone, I think the only fussy part that I remember was enabling USB, but USB passthough is supported now,
Don’t like it, uninstall it from the Control panel, try a different distro.

BTW, WSL2 is out as a Windows insider preview and will be released later this year, WSL2 will use Hyper-V virtualization and will run on Windows 10 home. THis should allow docker to run on Windows 10 home pc.

1 Like

Linux has around 2% of the desktop market, the fruity OS around 10, and the M$ buggy spyware megolith essentially all the rest (poor BeOS and Plan9). Requiring beginning CNC users to add yet another learning curve isn’t a winning strategy. That, alas, includes WSL2 (been in the insider program since XP).

Lest you think I’m a WinDoze bigot I’ve used *nix varients since the early 80s, as both a developer and admin, and ran EMC2/LinuxCNC back before the rodent and fish firmwares.

Has anybody looked at starting with cncjs? OS independent (supposedly, haven’t tried it). Sure it has the javas*t issues of which browser supports what functions (shades of 1995) but it does lead to an easier user path than trying to run boatdocked containerized web servers.

OK, off the soapbox

2 Likes

The diversity we have and knowledge in this community is inspiring and awesome!

I doubt it. Is that something you can look into for us (the community)?

who do you think is suggeting this? I see a lot of people opposing the idea of
forcing people to learn linux, but nobody suggesting that we should force people
to learn linux.

people won’t have to learn linux any more than they have to learn C or Python
just because the firmware is in C and GC is in Python, that’s an implementation
detail that doesn’t matter.

the fact that WebControl would be running in a Linux docker container or VM
doesn’t matter to the normal users, they aren’t expected to change anything
there (except possibly set wifi parameters so it can connect to your network)

David Lang