From f551cfb6c54f2ec77043efcd92d28369210a99e9 Mon Sep 17 00:00:00 2001 From: Oliver Kopp Date: Wed, 7 Aug 2024 15:09:50 +0200 Subject: [PATCH] Initial Linux Mint Cinnamon VM (#11594) --- scripts/vms/README.md | 11 +++---- scripts/vms/linux-mint-cinnamon/README.md | 23 ++++++++++++++ scripts/vms/linux-mint-cinnamon/Vagrantfile | 33 +++++++++++++++++++++ scripts/vms/ubuntu/Vagrantfile | 23 +++++++------- 4 files changed, 74 insertions(+), 16 deletions(-) create mode 100644 scripts/vms/linux-mint-cinnamon/README.md create mode 100644 scripts/vms/linux-mint-cinnamon/Vagrantfile diff --git a/scripts/vms/README.md b/scripts/vms/README.md index e0444ee0046..2430ec20872 100644 --- a/scripts/vms/README.md +++ b/scripts/vms/README.md @@ -31,11 +31,12 @@ Then, everything is removed. ## Available VMs -| VM | JabRef | Browser | LibreOffice | -|-----------------------|--------|---------|-------------| -| [`fedora`](fedora/) | source | -- | -- | -| [`ubuntu`](ubuntu/) | snap | Firefox | yes | -| [`windows`](windows/) | source | Firefox | yes | +| VM | JabRef | Browser | LibreOffice | +|-------------------------------------------------|---------|---------|-------------| +| [`fedora`](fedora/) | source | -- | -- | +| [`Linux Mint (Cinnamon)`](linux-mint-cinnamon/) | source | Firefox | yes | +| [`ubuntu`](ubuntu/) | snap | Firefox | yes | +| [`windows`](windows/) | source | Firefox | yes | ## Troubleshooting diff --git a/scripts/vms/linux-mint-cinnamon/README.md b/scripts/vms/linux-mint-cinnamon/README.md new file mode 100644 index 00000000000..83302b6f110 --- /dev/null +++ b/scripts/vms/linux-mint-cinnamon/README.md @@ -0,0 +1,23 @@ +# Linux Mint Cinnamon VM + +[Linux Mint](https://linuxmint.com/) with JabRef snap and libreoffice-connection pre-installed. + +Uses . + +Start JabRef by following steps: + +- 1. Open termminal +- 2. `cd jabref` +- 3. `./gradlew run` + +## Alternative + +We could have build our own image. +First creating an image using packer with . +Then, building a `Vagrantfile` on top of it. +Seemed to be too much issues for the users. + +1. Install packer +2. `packer plugins install github.com/hashicorp/virtualbox` +3. `packer plugins install github.com/hashicorp/vagrant` +4. `packer build -var-file=mint-cinnamon-22.json core_template.json` diff --git a/scripts/vms/linux-mint-cinnamon/Vagrantfile b/scripts/vms/linux-mint-cinnamon/Vagrantfile new file mode 100644 index 00000000000..64883fb8081 --- /dev/null +++ b/scripts/vms/linux-mint-cinnamon/Vagrantfile @@ -0,0 +1,33 @@ +# -*- mode: ruby -*- +# vi: set ft=ruby : + +Vagrant.configure("2") do |config| + + # https://portal.cloud.hashicorp.com/vagrant/discover/aaronvonawesome/linux-mint-21-cinnamon + config.vm.box = "aaronvonawesome/linux-mint-21-cinnamon" + config.vm.box_version = "4.0.1" + + config.vm.network :forwarded_port, guest: 80, host: 8080, auto_correct: true + + config.vm.provider "virtualbox" do |v| + v.name = "jabref-linux-mint-cinnamon" + v.gui = true + v.customize ["modifyvm", :id, "--memory", "2048", "--cpus", "2"] + end + + config.vm.provision "shell", inline: <<-SHELL + sudo apt-get install -y git + SHELL + + config.vm.provision "shell", privileged: false, inline: <<-SHELL + curl -s "https://get.sdkman.io" | bash + source "$HOME/.sdkman/bin/sdkman-init.sh" + sdk install java 21.0.4-tem < /dev/null + git clone --recurse-submodules https://github.com/JabRef/jabref.git + cd jabref + sdk use java 21.0.4-tem + ./gradlew jar + SHELL + + config.ssh.forward_x11 = true +end diff --git a/scripts/vms/ubuntu/Vagrantfile b/scripts/vms/ubuntu/Vagrantfile index fdbd490868b..18d0644493c 100644 --- a/scripts/vms/ubuntu/Vagrantfile +++ b/scripts/vms/ubuntu/Vagrantfile @@ -28,17 +28,18 @@ Vagrant.configure("2") do |config| v.customize ["modifyvm", :id, "--memory", "2048", "--cpus", "2"] end - # Update package index - config.vm.provision "shell", inline: "sudo apt-get update" - config.vm.provision "shell", inline: "sudo apt-get upgrade -y" - - # Install latest development build of JabRef - config.vm.provision "shell", inline: "sudo snap install --edge jabref" - - # Enable LibreOffice connection - config.vm.provision "shell", inline: "sudo apt-get install -y libreoffice-java-common" - config.vm.provision "shell", inline: "sudo mkdir -p /usr/lib/mozilla/native-messaging-hosts" - config.vm.provision "shell", inline: "snap connect jabref:hostfs-mozilla-native-messaging-jabref" + config.vm.provision "shell", inline: <<-SHELL + # Update package index + sudo apt-get update + sudo apt-get upgrade -y + + # Install latest development build of JabRef + sudo snap install --edge jabref + + sudo apt-get install -y libreoffice-java-common + sudo mkdir -p /usr/lib/mozilla/native-messaging-hosts + snap connect jabref:hostfs-mozilla-native-messaging-jabref + SHELL config.ssh.forward_x11 = true end