01 January 2022

673. "Better Minecraft [Forge]" server for version 1.16.5

In post 672 I showed how to set up a better minecraft server for version 1.18. As it turns out, if you want to play Better Minecraft you'll want version 1.16.5, since most of the mods aren't yet available for minecraft 1.18.



The instructions here are adopted and adapted from  https://minecraft.fandom.com/wiki/Tutorials/Setting_up_a_Minecraft_Forge_server

1. Download the following files and put them in an appropriate folder:

https://files.minecraftforge.net/net/minecraftforge/forge/index_1.16.5.html

https://www.curseforge.com/minecraft/modpacks/better-minecraft-modpack/files/3585404

2. Next, do the following

First install the server by running this in the terminal

java -jar forge-1.16.5-36.2.20-installer.jar --installServer

It should give output similar to this:
JVM info: Debian - 17-ea - 17-ea+19-Debian-1
java.net.preferIPv4Stack=true
Found java version 17-ea
Target Directory: .
Data kindly mirrored by CreeperHost at https://www.creeperhost.net/
Extracting main jar:
  Extracted successfully
Considering minecraft server jar
...

The server installed successfully
You can delete this installer file now if you wish

Next do this to unpack and generate the eula.txt file:
java -jar minecraft_server.1.16.5.jar
[07:39:16] [main/ERROR]: Failed to load properties from file: server.properties
[07:39:16] [main/WARN]: Failed to load eula.txt
[07:39:16] [main/INFO]: You need to agree to the EULA in order to run the server. Go to eula.txt for more info.
Edit eula.txt and change eula to true:
 eula=true
3. Launch the server
On debian 11.1 the server crashed with openjdk 11 and 17. However, it worked with openjdk 8.

Instead I launched the server with
/usr/lib/jvm/java-8-openjdk-amd64/bin/java -Xmx10G -jar forge-1.16.5-36.2.20.jar



Note that I'm dedicating 10Gb of RAM to the server (I have 32 GB). You might want/need less.



Enjoy!

22 December 2021

672. Modded minecraft server on linux (Better Minecraft [FABRIC])

My son is now of the age where he's interested in playing computer games, and minecraft is popular among his friends. But it can't just be minecraft, it has to be Better Minecraft.

Client

Since curseforge doesn't have a linux-installer, we're using GDLauncher (as an AppImage) to run the minecraft client. Once GDLauncher is running you can install an instance of Better Minecraft by clicking on the "+" in the lower left corner, and clicking onthe CurseForrge tab, and searching for Better. We're using the [FABRIC] version.



You might have to adjust the amount of RAM afforded to minecraft.

The Server:

This was a bit trickier, until I found this: https://fabricmc.net/wiki/install

Follow the instructions under 'Server (simple method)' i.e.

1. Download jar from https://fabricmc.net/use/server/ to a folder where you want your server to reside, e.g. ~/.minecraft_server

(or use
curl -OJ https://meta.fabricmc.net/v2/versions/loader/1.18.1/0.12.12/0.10.2/server/jar )

2. Run
java -Xmx2G -jar fabric-server-mc.1.18.1-loader.0.12.12-launcher.0.10.2.jar nogui

It'll fail, with a message about the EULA.

Edit eula.txt and change false to true.

3. Download Fabric API from https://www.curseforge.com/minecraft/mc-mods/fabric-api and put it in the mods folder (e.g. ~/.minecraft_server/mods)

4. Download the Better Minecraft [FABRIC] Server Pack from https://www.curseforge.com/minecraft/modpacks/better-minecraft-fabric/files/3574082

5. Move the files from the server pack to the server directory i.e. replace the mods folder, and add the config folder + the images. The instructions are otherwise in the README.txt

6. Launch the server 
java -Xmx2G -jar fabric-server-mc.1.18.1-loader.0.12.12-launcher.0.10.2.jar

7. Using GDLauncher to launch your client, then go to Multiplayer, add a server (e.g. localhost, 127.0.0.1), and hopefully it'll show up:



I think this server will be a 'normal' one with default settings i.e. NOT creative mode.

To change to creative mode follow this

a) in the server window, type /op YourName to make yourself an operator

b) then in the minecraft client, type /gamemode 1


-----------------------

The GDLauncher instance mod files are kept in ~/.local/share/gdlauncher_carbon/data/instances/Better Minecraft [FABRIC] v1/instance/mods

Sometimes you have to copy the mod files between the client and the server to make sure that all the versions are identical.

25 March 2021

671. External tools to make up for shortcomings in Canvas LMS

Not a fan of Canvas LMS at all. There are too many things missing, too many things that don't work well, and ultimately I feel it does not work well for me as a teacher.

In contrast, I felt that on the whole Moodle offered the tools that I needed: a well-functioning quiz tool, a good forum, and  good tools for making exams.

The forum in canvas is confusing to the students, and is hard to organize. 

The quiz function is very limited in scope, and does not offered a good overview of responses. From what I understand you can de-anonymize reponses as well. It's not a good tool for course evaluations for these reasons. It also doesn't work well for getting responses from discussions as part of a flipped classroom.

Also, you can't attach more than one document to a question when answering. Even worse, attached documents that are uploaded by students end up in THEIR accounts, so that they can e.g. delete them after they've taken an exam. Anything to do with exams/quizzes should be immutable.

I don't have a solution to that last issue, but here's what I've done with the rest:

Course evaluation: 

mentimeter.com. We have a license. The course evaluations look great and are easy to interpret.

Otherwise I'd use google forms.

Feedback during flipped classroom discussions: 

Google Forms. It works well, and gives an easy overview of responses in real time. If we didn't have mentimeter.com I'd use this for the course eval as well.

Forum:

ProBoards. I also looked att making a Google Group, but that worked about the same as the Canvas forum. ProBoards looks and works like a real forum, and you can let students self-register. You can also create custom names/URLs for your forum(s) -- mychemforums.proboards.com.


[Examination: For now we use moodle for this, although we've been told to phase this out. Instead we're going to be using Inspera, which at a glance if anything seems less suitable for chemistry exams than moodle. Time, and testing, will tell.]


09 March 2021

670. Issues with the RSC latex template -- text shifted on debian buster

Using the RSC latex template -- last updated 2016 -- works fine on debian stretch. However, on debian buster the text is screwed up on all pages except for the first one: the header is way too big, and the text runs off the page at the bottom.

After having spent a lot of time looking at log files, comparing installed packages on different machines, and generally not making any progress, I finally found this:

https://tex.stackexchange.com/questions/495662/rsc-template-fancyhdr-doesnt-respond-well

which links to 

https://tex.stackexchange.com/questions/491859/what-has-changed-in-latex-that-means-the-rsc-template-no-longer-works#comment1242180_491859

Since links die occasionally I'll summarize it here (I DID NOT COME UP WITH THIS SOLUTION):

Fancyhdr has been updated between stretch and buster, and while the maintainers at Overleaf have fixed the RSC template and notified RSC of the changes necessary, the current (8/3/2021) version of the template is still faulty.

To fix you can either 

1) edit the .tex file template itself

a) Comment out 

\fancyhead[C]{\includegraphics[width=18.5cm]{head_foot/header_bar}}
\fancyhead[L]{\hspace{0cm}\vspace{1.5cm}\includegraphics[height=30pt]{head_foot/PCCP}}
\fancyhead[R]{\hspace{0cm}\vspace{1.7cm}\includegraphics[height=55pt]{head_foot/RSC_LOGO_CMYK}}

b) find vspace{3cm} after \twocolumn[..] and add

{\includegraphics[height=30pt]{head_foot/journal_name}\hfill%
 \raisebox{0pt}[0pt][0pt]{\includegraphics[height=55pt]{head_foot/RSC_LOGO_CMYK}}%
 \\[1ex]%
 \includegraphics[width=18.5cm]{head_foot/header_bar}}\par

right before it.

Then change \vspace{3cm} to \vspace{1em}

or 

2) add some extra .sty files to the folder with your .tex file. Those files are:
balancy.sty, caption.sty, caption3.sty, fancyhdr.sty, mchem.sty and secsty.sty

They can be had from https://github.com/bardsoftware/template-RSC/tree/master/Paper

07 December 2020

669. Checking how many students attended a zoom lecture, afterwards

 This is an easy one, but you need to know that 1) the option is there and 2) where to look.

Go to the web-interface to zoom at your institution, and click on log in:


Now that you're in, go to to Reports:


Then go to Usage:



Now, search for the time period that you're interested in:


And click on the number of attendees. Note that if someone gets disconnected, and then reconnect, they're counted twice, so this is not the value you want to use:



Instead, make sure to click "Show unique users" to see how many students actually attended. You can also export it as a csv file which is probably a good idea since you'll need to count by hand otherwise:



That's it.



30 October 2020

668. Controlling the fan speed of an Nvidia card when you're using the nouveau driver and no xorg.conf

 My old GT210 has served me well, but I've had a few odd freezes recently, coupled with weird graphics behaviour. It's a pity, since it's a nice, silent fan-less graphics card from way back when: https://www.gigabyte.com/Graphics-Card/GV-N210SL-1GI#ov

Although some of it may be due to switching back and forth between VGA and HDMI output (between an old HP 19'' and my new fancy xp pen display) I ripped it out and replaced it with an almost as ancient GT 520 (https://www.gigabyte.com/Graphics-Card/GV-N520OC-1GI#ov)

The fan isn't loud, but it's there, and it's distracting since I'm working in a home environment (Corona!).

Looking online I found these posts:
http://floppym.blogspot.com/2013/07/fan-control-with-nouveau.html
https://forums.opensuse.org/showthread.php/501517-OS-13-1-Driver-quot-nouveau-quot-Unable-to-command-fan-speed-Nvidia-6800-GS
https://www.kernel.org/doc/Documentation/thermal/nouveau_thermal

So, first to check if fan control is possible:

me@indium:~$ find /sys -name pwm1_enable
find: ‘/sys/kernel/debug’: Permission denied
/sys/devices/platform/it87.2624/hwmon/hwmon2/pwm1_enable
/sys/devices/platform/it87.2656/hwmon/hwmon3/pwm1_enable
/sys/devices/pci0000:00/0000:00:03.0/0000:05:00.0/hwmon/hwmon0/pwm1_enable
me@indium:~$ readlink /sys/devices/pci0000:00/0000:00:03.0/0000:05:00.0/driver
../../../../bus/pci/drivers/nouveau

Good, and we got the hwmon number -- 0. 

I then created a script called gpufan.sh:

sudo sh -c "echo 1 > /sys/class/hwmon/hwmon0/pwm1_enable"
sudo sh -c "echo 35 > /sys/class/hwmon/hwmon0/pwm1_min"
sudo sh -c "echo 45 > /sys/class/hwmon/hwmon0/pwm1"

I set the min% to 35 -- it used to be 65. And I tested my way to 45% as a good compromise between noise and temperature. By default the fan speed was >4,000 rpm. Output from sensors now:

nouveau-pci-0500
Adapter: PCI adapter
GPU core:     +0.90 V  (min =  +0.90 V, max =  +1.11 V)
fan1:        2790 RPM
temp1:        +34.0°C  (high = +95.0°C, hyst =  +3.0°C)
                       (crit = +105.0°C, hyst =  +5.0°C)
                       (emerg = +135.0°C, hyst =  +5.0°C)