Feature request Windows 10 support

I was wondering if the samba fix could be added to the stock image or optional install for Windows users. If the samba "hack" was added Windows users won't have to add any additional programs to access by http://octopi/ and putty now works with octopi.local. Would have saved me some frustration if octopi.local worked from the start following the guides. (I don't use bonjour service, I used putty for OpenWRT)

taken from https://github.com/OutsourcedGuru/octoprint-name-resolution-hacks#better-solution

Better Solution

The proper way to do something like this is to get the Raspberry Pi 3 (or similar hosting computer) to broadcast its NETBIOS name, making Windows computers happier.

Samba is a royalty-free Linux package that allows computers to behave like Microsoft servers.

# It's important to run this next command before any attempt to update using apt-get later
$ sudo apt-get update
# Save a copy of your existing configuration file; you can always revert without ill effect
$ sudo cp /etc/samba/smb.conf /etc/samba/smb.conf.save
$ sudo apt-get install samba samba-common-bin

Now it will be necessary to edit the Samba configuration file, find the [global] section and add these lines.

$ sudo nano /etc/samba/smb.conf

[global]
  workgroup = WORKGROUP
  wins support = yes
  netbios name=octopi
  server string=OctoPrint on Raspbian

Having saved the file and exited (Ctrl-O, Enter, Ctrl-X), now parse it to verify that SMB likes what you did.

$ sudo testparm /etc/samba/smb.conf

Assuming that it's happy, now reboot to load those changes.

$ sudo reboot

You might want to ask for this in the octopi repository maintained by @guysoft, not here. This is for octoprint only and what your requesting is specific to the raspberry pi image.

I'm the author of that github repository ("hacks") and can reasonably vouch for the NETBIOS name resolution aspect.

I don't think I would promote the other uses of Samba (folder sharing) in a typical Octopi-imaged installation, though.

1 Like

We could add a script in OctoPi that lets you enable that feature, then have a plugin that lets you enable it. I'd go for that.

If you search the forum, there are perhaps thirty times when I've directly linked that repository for Windows-based users. There are more than 400 visits to that (but I've just stopped counting).

Note that I no longer have any Microsoft Windows computers which I own. So I couldn't honestly participate in testing but could provide guidance.

Perhaps four years ago I did implement an Ubuntu/Samba server into a Microsoft Windows production network of fifty computers and it behaved nicely after configuration. It's a little fussy but if configured correctly, it works as expected.