Coder Social home page Coder Social logo

Comments (12)

tassaron avatar tassaron commented on June 16, 2024 1

The easiest solution for a beginner would be to install Ubuntu and follow the installation instructions normally. Either install Ubuntu Desktop on an extra computer (replacing Windows) and use the Terminal app, or buy a headless (non-graphical) Ubuntu Server (virtual server, VPS) for a monthly price (should be a similar price to Minecraft Realms) and learn how to connect to Ubuntu using SSH (ssh stands for secure shell and a shell is basically another word for terminal).

Once connected to a clean Ubuntu installation, the install instructions in the readme should work if you copy-paste them.

from mcscripts.

TapeWerm avatar TapeWerm commented on June 16, 2024

Terminal is Ubuntu Terminal. From Description in README.md:
"Compatible with Ubuntu, Ubuntu on Windows 10 does not support systemd (Ubuntu Server 18.04 Setup)."
So you can use the scripts in Windows if you install Ubuntu for Windows 10 (I also recommend Microsoft Terminal from the Windows Store.) However the systemd timer units won't work which makes the backup and update scripts less useful. I've considered using PowerShell timers to invoke the scripts but MCstop.sh would get cutoff on logout. I may come back to that after finals. Regardless Command Prompt is no use to you, I recommend just using Ubuntu (not Windows Subsystem for Linux). BDS is slower on Ubuntu than Windows but it's way easier to administrate a server on it.

tmux is a terminal multiplexer for Linux, you can background terminals and split them like Windows snap. You install it with apt, Ubuntu's package manager. git clone is the git command line tool. I'm using it in Ubuntu. I recommend learning the command line in PowerShell or Ubuntu (Bash) but I admit the command line is not a welcoming place.

from mcscripts.

TapeWerm avatar TapeWerm commented on June 16, 2024

I have edited the description to put more emphasis on this being for Ubuntu, so if you look back and think "How did I miss that?" it's because I changed it.

from mcscripts.

stiw91 avatar stiw91 commented on June 16, 2024

Thanks

from mcscripts.

stiw91 avatar stiw91 commented on June 16, 2024

I'm sorry to come back, but I just can't wrap my head around the instructions and still don't know where to start or how to set it up in the first place. The farthest I got is downloading the MCscripts folder. I just have no experience with stuff like this.

from mcscripts.

TapeWerm avatar TapeWerm commented on June 16, 2024

Are you trying to install it on Windows or Ubuntu?

from mcscripts.

stiw91 avatar stiw91 commented on June 16, 2024

Windows

from mcscripts.

TapeWerm avatar TapeWerm commented on June 16, 2024

MCscripts does not support Windows, though it does partially work on Ubuntu for Windows. The instructions do not make sense because they are for Ubuntu Linux. If you want to use MCscripts setup Ubuntu Server 18.04 on your computer because I have no experience writing Windows services for Ubuntu for Windows, and it's harder to write them for Windows due to less organized documentation.

Edit: MCscripts may fully support Ubuntu for Windows in 2020, but for now it's on the backburner because there are other projects that give me more relevant work experience and are higher priority, and I also want time for family, errands, and gaming.

from mcscripts.

TapeWerm avatar TapeWerm commented on June 16, 2024

Out of my candidates for Windows services, I ran into the same problem with Windows Task Scheduler I ran into before: Windows does not wait for the server to finish shutting down when Windows shuts down. This happened both on user disconnects and the more applicable event 1074, AKA shutdown. Group Policy allegedly works with this, but that's only on Windows 10 Pro. Considering that Windows 10 Pro costs money, I'm not going to use it. People will open issues complaining if I use it. I tried winsw earlier this year and it crashed when I called bash.exe, even through PowerShell. I'll look at it again later but I doubt they fixed it. Other tools I could use are NSSM and AutoHotkey, but I'm not sure NSSM is maintained anymore and I don't know AutoHotKey. I could also just write a native Windows service program but that seems harder than it sounds. Given Windows being hard to work with and term starting tomorrow, I will probably leave this for now. If anyone wants to make a branch for this themselves that is always an option.

from mcscripts.

TapeWerm avatar TapeWerm commented on June 16, 2024

Was taking a last look and found a possible lead. https://docs.microsoft.com/en-us/archive/msdn-magazine/2016/may/windows-powershell-writing-windows-services-in-powershell
Edit: After reading that it just makes me think writing a C# service is better, that's just a wrapper around compiling C# and invoking PowerShell like I'd invoke Bash.

from mcscripts.

TapeWerm avatar TapeWerm commented on June 16, 2024

My finding is Windows services don't work with bash.exe. That's why WinSW didn't work, Windows services in general don't work with bash.exe. I wonder if opening PowerShell as the local system user could start the WSL setup for it. That may well be the key. Then I could find some godawful heretic way to bundle a whole Visual Studio SLN in this repo with the compiled EXEs and you'd have Windows. That is assuming my theory is correct, if not I'm giving up. And I'd still have to reimplement the systemd service ordering behavior in C# if it did.
Edit: WSL's rootfs is in your user's %APPDATA% folder, and local system's appdata is in System32. So I could try being an extremist heretic and copy my WSL rootfs there.
Edit 2 Boogaloo: Maybe try cygwin and windows services?

from mcscripts.

TapeWerm avatar TapeWerm commented on June 16, 2024

Latest update to my scripts now use systemd sockets as another user requested. While it was a pain to move to systemd sockets it would not be hard to readd support for tmux. For now since I know no easy way to support WSL I will close this issue as WSL cannot be supported without tmux. If WSL2 works with PowerShell Task Scheduler I will readd tmux support.
Edit 4/20/20: There's a GitHub repo for systemd on WSL2 that is started by PowerShell Task Scheduler. It could get cut short by shutdown so shutdown warnings would not be supported and the update timer might have to be scheduled around Windows active hours, but it is possible.

from mcscripts.

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.