Skip to content

Commit

Permalink
Initial Linux Mint Cinnamon VM (#11594)
Browse files Browse the repository at this point in the history
  • Loading branch information
koppor committed Aug 7, 2024
1 parent 1d31ed5 commit f551cfb
Show file tree
Hide file tree
Showing 4 changed files with 74 additions and 16 deletions.
11 changes: 6 additions & 5 deletions scripts/vms/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -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

Expand Down
23 changes: 23 additions & 0 deletions scripts/vms/linux-mint-cinnamon/README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
# Linux Mint Cinnamon VM

[Linux Mint](https://linuxmint.com/) with JabRef snap and libreoffice-connection pre-installed.

Uses <https://portal.cloud.hashicorp.com/vagrant/discover/aaronvonawesome/linux-mint-21-cinnamon>.

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 <https://github.com/rmoesbergen/packer-linuxmint>.
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`
33 changes: 33 additions & 0 deletions scripts/vms/linux-mint-cinnamon/Vagrantfile
Original file line number Diff line number Diff line change
@@ -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
23 changes: 12 additions & 11 deletions scripts/vms/ubuntu/Vagrantfile
Original file line number Diff line number Diff line change
Expand Up @@ -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

0 comments on commit f551cfb

Please sign in to comment.