In the previous part, we have downloaded a virtualization software and an Image file containing Ubuntu operative system, we than installed the Virtualization software and on it an instance of Ubuntu.
In this part, we will be installing software onto ubuntu.
Now then. If you have logged into Ubuntu, the first time, you should see a slide show, skip it.
Then the following window will appear in about a minute.
This window is asking if you want to update, but we don't want to update. We don't need anything it has to offer.
If you haven't automatically accepted the download already, click on settings... the following window will appear.
Select the automatically check for updates combo box and select never, provide your password then click close. The settings should be automatically saved.
If you accepted the download already, click the button with the nine squares on it, found in the bottom left corner of the window, then type into the search bar update, the first option should be 'Software updates' Click it, this should bring up the same window, now follow the above instructions to disable auto updates,
Note: If you have already updated, this could be a source of errors later on. If you have already updated Ubuntu, for now follow these instructions. If later on you find unexplained errors, reinstall Ubuntu and make sure to disable updates.
Now then, lets make sure we can copy in between the host and guess operative systems.
The exchanging of file and the exchanging of text(clipboard) requires two separate implementations.
First, make sure NOT to enable 'Devices->Shared Clip Board' and 'Devices->Drag and Drop'.
These two are supposed to be in the disabled state.
Now, press ctrl+alt+t at the same time, your window should look something like this.
We opened the Terminal.
The terminal predates any modern understanding of an operative system.
The terminal originates from when graphics where not a thing in operative systems yet.
People had to type commands to do anything.
The terminal is a more powerful tool than the Graphical User Interface.
Now then. Type the following into the terminal:
apt-get install make gcc linux-headers-$(uname -r)
you should see the following error message:
E: Unable to acquire the dpkg frontend lock (...), are you root?
Good. You typed the command correctly.
Now then, we need this command to run. It currently doesn't run because you haven't provided it with the permission needed to run. Some commands only have permission to run if the command 'sudo' precedes it.
Type 'sudo', then space, then the above command, now it should prompt you for your password.
Note that this prompt recognizes not just English characters as part of the password, but also arrows and other keyboard characters not typically visible, so make sure you only press the characters associated with your password.
Press enter. You should see the following.
You are asked a yes or no question, do you want to install gcc.
Type 'y' then press enter.
In a few minutes the installation should finish. Mine looked like this.
Now close the terminal.
Click on Devices in the Menu tab then click on 'insert guest additions cd image'.
A popup window should appear. Click Run.
Your password will be requested, provide it, then a command line will appear, which will install clipboard capability.
A terminal window will appear, let it install clipboard capability.
You will know it has finished when the last line reads 'Press return to close this window...'.
Now close the virtual box. When prompted, select 'Power off the machine.'
Start the virtual machine again.
In the menu tab, select devices.
Hover over shared clipboard
Now lets test this feature.
On the host machine, open a text file, type a sentence, select it then copy it.
Now open the virtual machine. Click on the nine box application at the bottom left side of the screen.
Type text, select text editor.
Now paste the copied text.
For me, the above instructions worked.
No troubleshooting is provided for this. I ask you read through the above sections to make sure you followed it.
We installed the clipboard for text, but not file sharing. File sharing needs to be separately installed.
First,create a new folder in a location where you know it won't be moved.
This folder will be made aware to the virtual machine.
Navigate to 'Devices->Shared Folders->Shared Folders Settings...' click it.
There is a small, blue and green button close to the top right corner of the window called, 'Add share'
Navigate to a folder you want to share.
Click select folder.
Back on the 'Add share' window, tick 'Auto-mount' and 'Make permanent' then click OK.
On the 'Java - Settings' window click OK.
Now, open a new Terminal window.
Type the following command.
replace &USER with $(your user name)
sudo adduser $USER vboxsf
The above code may fail. That is allright.
Now type the following code.
replace USER with (your user name)
sudo usermod -a -G vboxsf USER
This one should not fail.
Now restart the virtual machine.
Click on the 'files' application on the left side of the screen.
On the left side of the window, there should be a button with the name 'sf_your_folder's_name'.
This should open that folder, proving you can share files in-between the host and the guest.
Note: you cannot edit/save files directly into this folder. You must copy a file, from this shared folder to the guest's Desktop.
Note: no troubleshooting is available for sharing the folder.
Now then, lets readjust the V.O.S.'s size.
The shortcuts right-ctrl +L,F and C allows you to switch between them without the menu tab.
In the Virtual box window select View and select scaled mode.
Now, maximize the Virtual Box window, it should look like this.
The resolution of the operative system is lackluster.
Right click on the Desktop and select display settings.
Then click on the combo-box of Resolution and select the resolution of your monitor (or just anything larger then what is currently displayed).
Here is the end result
Now then, lets enable clipboard cooperation.
The following file is a bash file.
Place it into the Virtual Machine's Desktop.
Right click on it and select 'open with another application'
Select text editor.
Now you should see the following.
Each line is a command for the Terminal.
Close this window and right click the Desktop.
Select 'Open in Terminal'
Now a terminal window will appear.
Type the following then press enter.
Each line of code in the file will execute, one by one.
most lines prompt the user for a y/n to install a specific program.
When a prompt appears, press 'y'.
The first two lines add the option of right clicking 'Open a terminal here.' This version of the operatives system already does that, so these are irrelevant.
jre stands for 'java runtime environment', It allows you to run java applications.
jdk stands for 'java development kit', It allows you to compile java code into java application.
build-essential among other things allows the two above functions to be installed for the C language.
vim is a terminal based text editor, we won't be using it much, but you may need to use it in your career.
In the terminal, type the following, then press enter.
You should get a version number for java runtime environment.
Now repeat with the following
My screen looks like this.
Those two keyword, java and javac will be used regularly during our programming practice.
Well done. The Ubuntu environment setup is complete.