Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Update Linux Mint docs #11656

Merged
merged 14 commits into from
Aug 20, 2024
33 changes: 32 additions & 1 deletion scripts/vms/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -10,12 +10,16 @@ This folder contains directories making use of [Vagrant](https://www.vagrantup.c
- Windows: `winget install -e --id Oracle.VirtualBox`
2. [Install Vagrant](https://developer.hashicorp.com/vagrant/install?product_intent=vagrant)
- Windows: `winget install -e --id Hashicorp.Vagrant`
3. [Install Vagrant Virtual Box Guest Additions Plugin](https://subscription.packtpub.com/book/cloud-and-networking/9781786464910/1/ch01lvl1sec12/enabling-virtualbox-guest-additions-in-vagrant).
This helps ensururing that the guest additions of each box are automatically updated.
- `vagrant plugin install vagrant-vbguest`

### Setup VM

1. `cd` into `{vmdir}`, e..g, `cd ubuntu`
2. Start the vm `vagrant up`
3. Linux machines: Store ssh configuration: `vagrant ssh-config > default`
3. Restart the vm
4. Linux virtual machines: Store ssh configuration: `vagrant ssh-config > vagrant-ssh`

### Use VM

Expand All @@ -24,6 +28,20 @@ On Linux, you can also do `ssh -Y -F vagrant-ssh default` to SSH into the machin

If asked for a password, this is `vagrant`.

#### Multiple Screens

One can configure mulitple screen as the virtual machine settings of Virtual Box:
Navigate to "Display" (1), set "Video Memory" to the maximum value (2), and then adjust the number of displays (3).

![Virtual Box settings for multiple screens at VM settings](virtualbox-multiple-screens-1.png)

In case you want to have a fixed resoltuion, one can pin the screen resolution as follows:
During running of Virutal Box,
(1) unselect "Auto-size Guest Display" and
(2) adjust the screen resolution to full HD

![Virtual Box settings for multiple screens at running VM](virtualbox-multiple-screens-1.png)

### Remove VM

Execute `vagrant destroy`.
Expand All @@ -48,3 +66,16 @@ Solution: Delete folder `C:\Users\$username\VirtualBox VMs\jabref-ubuntu`

Solution: `snap refresh --edge jabref` (or `--stable`, ...).
More info on snaps is available at <https://snapcraft.io/docs/quickstart-tour>.

> `An error occurred during installation of VirtualBox Guest Additions 7.0.20. Some functionality may not work as intended.`

Install the guest additions manually by "Devices" > "Install Virtual Box Gueat Additions".

> I get a strange installation error.

Look at <https://stackoverflow.com/a/78040474/873282>.

> How can I update the guest additions?

They should be automatically updated during a reboot.
A manual update can be triggered by `vagrant vbguest --do install`.
15 changes: 13 additions & 2 deletions scripts/vms/linux-mint-cinnamon/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,15 +2,26 @@

[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>.
Uses <https://app.vagrantup.com/archman/boxes/linuxmint/versions/22>.

Start JabRef by following steps:

- 1. Open termminal
- 2. `cd jabref`
- 3. `./gradlew run`

## Alternative
## Alternatives

### Using `archman/linuxmint`

This image does not work with multiple monitors.

Issues

- [VirtualBox: Mouse pointer offset](https://forums.linuxmint.com/viewtopic.php?t=427855)
- [VirtualBox 3D acceleration: blank screen](https://forums.linuxmint.com/viewtopic.php?t=427853)

### Building an own image

We could have build our own image.
First creating an image using packer with <https://github.com/rmoesbergen/packer-linuxmint>.
Expand Down
13 changes: 12 additions & 1 deletion scripts/vms/linux-mint-cinnamon/Vagrantfile
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ 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.box = "archman/linuxmint" # v22

config.vm.network :forwarded_port, guest: 80, host: 8080, auto_correct: true

Expand All @@ -16,9 +16,20 @@ Vagrant.configure("2") do |config|
end

config.vm.provision "shell", inline: <<-SHELL
sudo apt-get update
sudo apt-get -y upgrade

# enable building of the virtual box guest addons
# hint from https://forums.virtualbox.org/viewtopic.php?p=508680&sid=fe86fb0f6c03c7443f1fba9a5c29a861#p508680
sudo apt install -y build-essential dkms

# switch kernel - hint by https://askubuntu.com/a/1521872/196423
sudo apt install -y linux-oem-22.04 linux-tools-oem-22.04

sudo apt-get install -y git
SHELL

# Install JDK, clone JabRef's source code, and do an initial build
config.vm.provision "shell", privileged: false, inline: <<-SHELL
curl -s "https://get.sdkman.io" | bash
source "$HOME/.sdkman/bin/sdkman-init.sh"
Expand Down
Binary file added scripts/vms/virtualbox-multiple-screens-1.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added scripts/vms/virtualbox-multiple-screens-2.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading