martinandersson / box-ubuntu-budgie-17-x64

A Vagrant box with Ubuntu Budgie 17.
https://app.vagrantup.com/pristine/boxes/ubuntu-budgie-17-x64
The Unlicense
0 stars 0 forks source link
vagrant vagrant-boxes

A Vagrant box with Ubuntu Budgie 17 (x64)

The artifact of this project is a manually packaged .box file with Ubuntu Budgie 17 installed1.

Actually, the box is already packaged for you and distributed on Vagrant's website.

This GitHub project is used as an issue tracker as well as a notepad on how exactly the box was prepared.

I've added stuff like Oracle's Guest Additions and the vagrant user account (password vagrant). I've also taken the liberty to change the appearance of the distribution as to more closely resemble Solus 3; the original Budgie distribution. For example, the space-stealing Plank dock has been removed and the app icons are put back where they belong, in the taskbar.

Only software packages necessary to get the VM running has been installed, i.e., no bloat. You will get a VM that is pritty much a bare Ubuntu Budgie 17 as originally intended, except it will look a hell of a lot better.

The Budgie Desktop

1 The semantical concept captured here is elsewhere described as a "minimal" and/or "base" box. I refrain from using either term since 1.67 GB with a full office suite installed et cetera is hardly "minimal" nor am I convinced that all use-cases of this box are to derive yet another box as implied by the word "base". We are building a box. Period.

Using the box

Make sure you have Vagrant installed, VirtualBox installed together with the Extension Pack, then, in theory, all you should have to do in order to get a Virtual Machine up and running with Ubuntu Budgie 17 is:

vagrant init pristine/ubuntu-budgie-17-x64
vagrant up

Be warned: A few noteworthy issues exist with products in the ecosystem we depend on.

For starters, Vagrant < 2.0.2 can't configure a hostname and network on Ubuntu 17.10 (see this issue). net-tools and ifupdown have been added to the box for backward compatibility with older Vagrant versions.

The added packages do not fully solve the problem. The first vagrant up call does not crash and Internet will work during the first user session, but the VM will not be accessible using the new hostname or static IP until after a VM restart. Plus, what normally is a Wi-Fi icon in the bottom right corner of the screen will be switched to a spinning circular icon. The icon will reset to normal after a few minutes.

Another issue is that VirtualBox's 3D acceleration is like broken and if enabled, will probably make the machine so slow it's not going to be usable anymore. Don't enable it. See this issue.

Steps to reproduce the distributed box

  1. Create the Virtual Machine
  2. Install OS
  3. Upgrade the system
  4. Theming and customization
  5. Package the box
  6. Test the box
  7. Publish the box

Create the Virtual Machine

Create a new VM instance. Name it ubuntu-budgie-17. Select type Linux, version Ubuntu (64-bit). Set memory size to 4096 MiB.

Create VM

Smack in a dynamically allocated disk with max size 40 GB, type VMDK.

Notes:

Create VMDK disk

Open settings. Enable a bidirectional clipboard.

Bidirectional clipboard

Floppy disk?? There's nothing to be discussed here. Get rid of that shit.

Disable boot-from floppy

Use two CPUs (no particular reason). Click "OK" to save the new settings and close the dialog.

Do not go into "Display" and enable 2D- or 3D acceleration. 2D acceleration is for Windows guests only [source] and 3D acceleration is broken [GitHub issue].

Use two CPUs

Using the terminal on your host machine, bump the video memory to 256 MiB:

VBoxManage modifyvm ubuntu-budgie-17 --vram 256

Notes:

Install OS

Mount the OS installation's ISO file (grab it here). Click on the little CD icon to the right in the next picture. Then select "Choose Virtual Optical Disk File...".

The file I mounted was named: ubuntu-budgie-17.10.1-desktop-amd64.iso.

Mount the Ubuntu ISO

Start the VM and follow suit.

Welcome

Preparing to install Ubuntu Budgie

Installation type

Installation type

Region

On this particular screen, I had to drag the window to the left in order to reveal the "Continue" button lol.

Keyboard layout

Password = vagrant.

Setup user

Installing

Once the installation is done, the happy path would be to make a clean restart and boot into a fresh OS. Alas, after numerous hackathons, I must conclude that this is impossible without ultra weird disk read failures and hangs. So, KISS: power off the machine using VirtualBox and then unmount the installation medium.

Power off

Upgrade the system

Boot up the VM and open a terminal (Tilix), run:

sudo apt update
sudo apt full-upgrade -y

If the upgrade crash because a lock file is being in use, then it's probably cuz unattended-upgrades is running in the background. It's possible to circumvent this obstacle by manually deleting lock files /var/lib/dpkg/lock and /var/cache/apt/archives/lock. I could never cheat the system, however. Deleting the lock files never made me able to fully complete the upgrade without additional problems. My advice is to wait a few minutes (actually, more like 5-10 minutes) and then try again (more info).

After the upgrade completes, restart. If you don't restart, there will be a lot of problems lol. Especially so if the kernel was upgraded.

Next, run:

wget https://github.com/martinanderssondotcom/box-ubuntu-budgie-17-x64/raw/master/prepare1.sh
sudo sh prepare1.sh

One of the things this script does is to install Oracle's Guest Additions. This software stack will not - reportedly - install successfully. Something like this will be visible somewhere in the output of the script:

VirtualBox Guest Additions: modprobe vboxsf failed

According to this message, the Linux kernel module vboxsf failed to install and this guy is sort of responsible for shit related to "shared folders". Luckily, this message appears to be a false flag. lsmod would, after a fresh reboot, list vboxsf. Plus, as will become evident later, Vagrant's shared folder feature does work. So, I'd say it's safe to ignore the message.

Theming and customization

The setup script we executed (one of two parts/scripts in total) removed the dock app "Plank". This dock is still visible because we haven't restarted the machine after running the script. Either, 1) restart or 2) manually quit the dock (Ctrl + right mouse button to bring up the menu). I chose number 2.

If we did restart, and then opened the Chromium web browser, it would also become evident that Chromium insists on asking the user for a password to unlock a "keyring".

Chromium asking for keyring password

Turns out that when our OS user logs in automagically, the "login" keyring is not automagically unlocked and Chromium, who uses this keyring to store passwords and what not, will simply harass the user for the user password. Once for each OS session; which kind of annihilate any utility we got out from the autologin feature in the first place. Big annoyance!

One of all involved parties has from a security point-of-view, fuct up. A rule of thumb when it comes to security design is to not piss in the user's face. When productivity is hindered by security, the user will simply find his way to disable the security and be at an even greater risk than what was first intended. Of course, that is exactly what we shall do by removing the password.

Open the "Passwords and Keys" GUI app. Change the login keyring's password from vagrant to blank. [source]

Change keyring password

Open "Budgie Desktop Settings".

In the Style page, set the following:

Style

In the Desktop page, enable the Trash desktop icon.

In the Fonts page, set the following:

Fonts

In the Autostart page, remove Caffeine Indicator.

In the Top Panel page, Settings tab, set the following:

Same page, Applets tab.. rearrange the taskbar nightmare into something more soothing.

Notes:

Rearrangement

Unpin the LibreOffice Writer app launcher icon and pin Tilix (terminal).

Taskbar

At this point, the desktop looks almost like the finished product. The script we ran a bit earlier did make the taskbar just a tiny bit transparent which is not noticeable before a restart. Similarly, the tremendously nonsensical and bloated Caffeine Indicator is still visible in the taskbar before a restart.

But, we don't need to restart for the benefit of this box setup.

Increase audio volume to max.

Open the "Budgie Welcome" app and check "Show this dialog on startup".

Package the box

Open a terminal and run:

wget https://github.com/martinanderssondotcom/box-ubuntu-budgie-17-x64/raw/master/prepare2.sh
sudo sh prepare2.sh
rm prepare?.sh
history -c

Shut down the machine (or let Vagrant do that automagically when running the next command).

On the host machine, download this Vagrantfile and put it in the working directory. Then run:

vagrant package --base ubuntu-budgie-17 --output ubuntu-budgie-17.box --vagrantfile Vagrantfile

Test the box

mkdir test-vm
cd test-vm
vagrant init ../ubuntu-budgie-17.box

Add a customized hostname to the generated Vagrantfile and also some random network settings. For example:

config.vm.hostname = 'xxx'
config.vm.network 'private_network', ip: '192.168.66.66'

Run:

vagrant up

Make sure:

Run (you might wanna run the commands in the next section first!):

vagrant destroy -f
vagrant box remove ../ubuntu-budgie-17.box
cd..
rm test-vm -r

Publish the box

Go to this page and upload the box file.

Here's a few commands needed for the description(s):