-
Notifications
You must be signed in to change notification settings - Fork 4
Home
You will find below a complete guide to create a completely new Blink virtual machine.
If you are interested in a quick overview of our project, follow this link.
If you are looking for the complete source code, go to the Blink's repository here.
I welcome you humble adventurer. You are here to start your quest to create a completely configured VM from scratch.
You will find here a complete step-by-step guide to recreate Virtual Machines (VMs) for Blink.
Tutorials for Fedora and Ubuntu are available but the guide can be followed for similar Linux distributions.
Do not worry, you will not need the help of a dark sorcerer to understand this guide completely. Everything is explained step-by-step so that you will not miss a thing. And yes, you are allowed to blink during the reading of this guide.
You will find below all the details needed to install VirtualBox and a VM with the complete configuration to make it work with Blink. In several parts of this guide, you will find instructions for both Ubuntu and Fedora. Just choose the right command corresponding to the operating system you have installed.
##Requirements
Before creating a completely new and fresh VM, you need to have VirtualBox installed on your computer.
You can download the latest version HERE for Windows, MacOS and Linux environments.
For Linux users, you can use your package manager to install the latest compatible version with your distribution. For more details, click here.
##Step one: Download of an ISO image
The first step in our quest to create a Blink VM is to download an ISO image of a Linux distribution.
This guide is only covering Ubuntu and Fedora but do not hesitate to download your favorite Linux distribution.
###Fedora You can find the latest version at this link.
###Ubuntu You can find the latest version of Ubuntu at this link
###Notice Our own Blink Fedora VM has been built from Fedora 20 and our Blink Ubuntu VM from Ubuntu 14.04. We do not recommend using versions that are too old since the main core of Blink is built with fairly recent libraries (Python 3) that may not be available for these older versions.
##Step two: Creation and configuration of a new VirtualBox Virtual Machine The second step is the installation and configuration of the newly downloaded operating system. Everything done in this step enables us to have an environment that is ready to welcome Blink.
###Creation of a virtual machine entry in VirtualBox
Open VirtualBox and click on the "New" button. Select the type and the version of the operating system you want to install.
For the name, choose whatever you want but you must include the architecture of the VM in the name (either 32 or 64 bits). For example, we named our 64 bits Ubuntu VM "BlinkUbu64". If you do not put this piece of information in the name of the VM, Blink will not be able to recognize the architecture of the VM and this will result in the copy of incompatible plugins, thus leading to a less diverse fingerprint.
For the memory usage, put a number that suits the OS you want to install. For the virtual hard drive, we recommend to create one with at least a storage capacity of 3GB.
###Installation of the VM operating system
You can now launch the VM, select the ISO you have downloaded in step 1 and follow the instructions.
The only requirement during the installation is that you create a user account with "blink" as a username. You can find below screenshots of the user creation screen for both Fedora and Ubuntu. For Ubuntu, it can be useful to opt to log in automatically for a faster launch.
Ubuntu
Fedora
###Installation of packages and updates
Before proceeding with the rest of the installation and configuration, it is best to update the OS and packages to their latest version to eliminate nasty bugs and the vulnerabilities associated with them.
Ubuntu
sudo apt-get upgrade
sudo apt-get update
Fedora
su
yum update
After the installation of a new Linux kernel on Fedora, the bootloader may need to be updated manually. Just execute the following command to fix any potential problem.
su
grub2-mkconfig -o /boot/grub2/grub.cfg
###Installation of VirtualBox additions
VirtualBox additions are necessary to provide support for shared folders and to enable features that will improve usability.
Before installing them, you need to install some packages on your Linux distribution.
Ubuntu
sudo apt-get install build-essential linux-headers-`u name -r` dkms
Fedora
su
yum install gcc dkms kernel-devel
Then, when the installation of the above packages is finished, go the "Devices" menu and click on "Insert Guest Additions CD image..." or use the "Host+D" key combination. Either follow the on-screen instructions if the autorun is working or use the terminal to access the installation executable.
Ubuntu
sudo /media/blink/VBOXADDITIONS_X.X.X_XXXXX/VBoxLinuxAdditions.run
Fedora
su
/run/media/blink/VBOXADDITIONS_X.X.X_XXXXX/VBoxLinuxAdditions.run
At the end, you should see a screen similar to this one.
If one of the steps in the installation process fails, restart your OS and reinstall the necessary packages before trying again.
###Creation of the main host Blink directory Extract the zip located at the root of the Blink repostiory to create the structure of the main "blink" directory on your hard drive.
###Configuration of the shared folder
You need to configure VirtualBox so that it mounts the Blink shared folder inside each virtual machine. Without it, there is no way Blink can retrieve the user profile and launch a browser with a different and diverse fingerprint for each browsing session.
When the virtual machine is not running, click left and select "Settings". Go into the "Shared Folders" tab and click on the icon with a "+" on a folder to add a shared folder. Through the file explorer, select the "Shared" folder in the main "blink" directory. Check the "auto-mount" option and click "OK".
##Step three: Configuration of the Blink environment
Now that your operating system is up and running, it is time to go through the third and final step.
This step is necessary to configure the newly created virtual machine so that it automatically launches Blink with a completely configured browsing environment.
###Add user Blink to vboxsf group In order to have access to the mounted shared folder, the "blink" user needs to be a part of the "vboxsf" group.
Ubuntu
sudo adduser blink vboxsf
Fedora
sudo usermod -a -G vboxsf blink
Restart the OS so that you can access the shared folder.
###Installation of Chrome native application
To make User-Profile Sync fully operational on Chrome, you need to install the Chrome native application responsible of communicating with the Chrome browser to export the user profile elements.
Ubuntu
sudo bash /media/sf_Shared/Extensions/nativeApp/install_host.sh
Fedora
su
bash /media/sf_Shared/Extensions/nativeApp/install_host.sh
###Installation of Chrome dependencies (libudev)
Sometimes, Chrome wants to access a file that is present in the operating system but with an incorrect version number. The creation of a simple shortcut that redirects Chrome to the right file fixes the problem.
Fedora 32 bits
ln -sf /usr/lib/libudev.so.1 /usr/lib/libudev.so.0
Fedora 64 bits
ln -sf /usr/lib64/libudev.so.1 /usr/lib64/libudev.so.0
Ubuntu 32 bits
sudo ln -sf /lib/i386-linux-gnu/libudev.so.1 /usr/lib/libudev.so.0
Ubuntu 64 bits
sudo ln -sf /lib/x86_64-linux-gnu/libudev.so.1 /usr/lib/libudev.so.0
###Copy and addition of the VM launch script to the startup applications
A bash script is needed to wait for the shared folder to be correctly mounted before executing the main Blink VM script.
Copy the script to the Blink Home folder.
cp /media/sf_Shared/startup-blink.sh /home/blink/
Then, add the script to the startup applications according to your Linux distribution and your desktop environment.
For LXDE, you can either do it with the terminal:
echo "/home/blink/startup-blink.sh" >> /etc/xdg/lxsession/LXDE/autostart
Or with the graphical interface:
Preferences -> Default applications for LXSession -> Autostart -> Add "/home/blink/startup-blink.sh"
###Automatic user login (Optional)
To reduce the launching time of a VM and to provide fast transitions between VMs in the future, it is recommended to make the "blink" user log in automatically.
For the LXDE Desktop environment, edit one of these two files depending on your Linux distribution:
"/etc/lxdm/lxdm.conf" or "/etc/lxdm/default.conf"
Uncomment the following line:
autologin=blink
###Creation of directories
Several folders need to be created so that all the components added by Blink will be recongised by the VM.
Ubuntu/Fedora
mkdir ~/.mozilla
mkdir ~/.fonts
mkdir ~/blink
mkdir ~/blink/fonts
mkdir ~/blink/plugins
###Preload of fonts and plugins
In order to make the Coffee break mode a reality, fonts and plugins need to be preloaded on the VM hard drive.
On the host system, copy all the fonts and plugins in a shared folder so that the VM has access to them. Then, in the VM, copy all these elements to the following folders.
Ubuntu/Fedora
All the fonts to ~/blink/fonts
.
All the plugins to ~/blink/plugins
.
Finally, in order to accelerate the fonts loading process when generating new configurations, the fonts cache needs to be rebuilt with the complete list of fonts. The following list of commands can take several minutes to execute depending on the total number of fonts.
Ubuntu/Fedora
cp -rf ~/blink/fonts/* ~/.fonts
fc-cache -rv
rm -rf ~/.fonts/*
###Creation of shortcuts
With the creation of the following shortcuts, user fonts will be directly loaded in the VM and downloaded files will be accessible on the host operating system.
Ubuntu/Fedora
ln -s /media/sf_Shared/userFonts/ ~/.fonts/sf_UserFonts
rm -r ~/Downloads
ln -s /media/sf_Shared/Downloads/ ~/Downloads
###Installation of plugins dependencies and additional packages
To complete this third step, your last action is to install plugin dependencies so that plugins can be correctly added inside browsers. Run the following commands to install the right packages and have a Blink-compatible virtual machine.
Fedora 32 bits
wget http://dl.google.com/linux/direct/google-talkplugin_current_i386.rpm
yum install google-talkplugin_current_i386.rpm --nogpgcheck
Fedora 64 bits
wget http://dl.google.com/linux/direct/google-talkplugin_current_x86_64.rpm
yum install google-talkplugin_current_x86_64.rpm --nogpgcheck
Fedora (All architecture)
su -c 'yum localinstall --nogpgcheck http://download1.rpmfusion.org/free/fedora/rpmfusion-free-release-$(rpm -E %fedora).noarch.rpm http://download1.rpmfusion.org/nonfree/fedora/rpmfusion-nonfree-release-$(rpm -E %fedora).noarch.rpm'
sudo yum install -y PackageKit-browser-plugin djview4-plugin esteid-browser-plugin freewrl-plugin gnash-plugin gnome-chemistry-utils-mozplugin gnome-shell gxine-mozplugin kopete kpartsplugin lightspark-mozilla-plugin mozplugger npapi-vlc npapi-vlc-gtk nspluginwrapper rhythmbox spice-xpi totem-mozplugin-vegas x2goplugin xine-plugin totem-mozplugin gecko-mediaplayer gnupg2 pinentry-qt4 python3 python3-numpy
Ubuntu 32 bits
wget https://dl.google.com/linux/direct/google-talkplugin_current_i386.deb
dpkg -i google-talkplugin_current_i386.deb
Ubuntu 64 bits
wget https://dl.google.com/linux/direct/google-talkplugin_current_amd64.deb
dpkg -i google-talkplugin_current_amd64.deb
Ubuntu (All architecture)
apt-get install djview-plugin browser-plugin-gnash browser-plugin-libreoffice browser-plugin-lightspark browser-plugin-packagekit browser-plugin-spice browser-plugin-vlc gxineplugin kopete-plugin-thinklight kpartsplugin mozplugger nspluginwrapper rhythmbox-mozilla totem-mozilla x2goplugin xine-plugin gecko-mediaplayer gnupg2 python3 python3-numpy
Then, when all the plugins with their dependencies are correctly installed, you need to change the name of the folder where the actual plugins are stored.
When this is done, if you add a plugin with Blink in a virtual machine, it will correctly be detected by any browsers you launch. Do note that the plugins provided with our database follow the NPAPI architecture. Since Chrome does not support this plugin architecture from version 35, they will not be recognized from this version of Chrome and upwards.
Fedora 32 bits/Ubuntu
mv /usr/lib/mozilla/plugins /usr/lib/mozilla/plugins.originals
Fedora 64 bits
mv /usr/lib64/mozilla/plugins /usr/lib64/mozilla/plugins.originals
Congratulations! Your virtual machine is now fully configured to work with Blink!