Published on 2020-06-10
Edited on 2020-12-18
Categories:
tech
Tags:
Linux
coding
tools
vm
100DaysToOffload
Part 3 of the series How I use Linux desktop at work
Just to recap, this series is describing how I leverage vagrant and VirtualBox to provision development VM on my work PCs. I’m also taking the opportunity to build them from scratch with the tools I use at home.
Previous posts:
In the post, I’ll cover:
The end result will make the X guest screen resize to the host window size.
Steps 1-4 are describing the manual process while step 5 describe how I automated this in the Vagrantfile.
Note: You can find the sources created during this post in my github devbox-arch repository.
During part 2, I spent most of my time trying to get X guest screen to resize automatically. I tried many things like, installing the dkms package, downgrading my virtualBox to the exact version of guest additions available in arch. All of this time without positive results.
Let me know if you know how to solve it without building guest additions.
guest additions needs which, gcc, perl, linux-headers packages in order to be compiled.
you can do so by running these commands.
|
|
From the devices menu, select the “insert guest additions CD…” which is the equivalent of inserting the CD in the virtualdrive
Now mount this ISO to the /mnt mount point
|
|
Now you just need to go to the /mnt path and run the installer:
|
|
Accept the installation.
Then reboot and voila!
Now, we do not want to do this manually every time, lets automate this.
This comes in two parts:
Now automating binding of the ISO is fairly easy with vagrant. You just have to use the modifyvm to create a CD drive and tell to “put” the ISO file in the drive:
|
|
Like I described in part 2, we will update the “2-core.sh” script to build the guest additions.
|
|
I use the vagrant-reload plugin to reboot while provisioning.
Once installed, you can reboot the VM with:
|
|
At this stage, with just a single vagrant up command, I can automatically provision a Linux VM with X configured and a basic window manager.
This will serve as a foundation to my work/home dev boxes.
Some topics for the near future:
This may just be one post, we’ll see.
I hope this series is of some use to others and inspire people to use tools that suits their needs.
This is day 5 of my #100DaysToOffload. You can read more about the challenge here: https://100daystooffload.com.
For comments, use email or Mastodon
Don't forget to subscribe to my RSS feed!