4/5/2020 Install on a VM or WSL Ubuntu 18.04, Focal 20.04, Linux Mint LMDE 4, Debian Mate 10.2, Zorin 15.2 Lite Unified If working from WSL BASH goto 'If working from WSL BASH coninue here'. Guest entry in VM add shared folder as host C:\linux client as /linux and automount Guest entry in VM under USB enter USB 1.1 and USB device as HP Deskjet 4620 Install FULL from ISO Host set view Virtual Screen 1 to 125% Uncheck the box install updates while installing. Create user account. Let install finish. Host set view Virtual Screen 1 to 100% Reboot & Login. # On VM choose restart not shutdown. At Remove Installation Media question. Press Enter. When it comes up login, then wait a few minutes for things to finish before continuing. Insert Guest additions. # On VM bar choose Devices and Insert Guest Additions # Corrects screen display (size) and mouse copy/paste between VM and HOST. When VBOX comes up choose execute (run) and wait for press enter. ==> If you see a folder instead see notes below <== Start Shell # On the desktop right click and select open-in-terminal. # Debian (Applications, System Tools, Mate Terminal) When prompted for sudo password use password for user you created. Note you may need to sudo apt install gcc make perl sudo adduser $USER vboxsf # To allow $USER (you) to access share (& Copy/Paste). Right Click Open Terminal. exit shell Restart # Right click on desktop choose open-in-terminal then type in sudo shutdown -r 0 # Debian Choose System menu, shutdown, reboot # Then login after system restarts. ** If working from WSL BASH continue here. Remember Set /default in Poweshell. To see loaded distros type in to Powershell: wsl.exe --list --all Set default if not set then run BASH. Example: Start powershell from the search window then: wslconfig.exe /setdefault Ubuntu-18.04 then run BASH for WSL. Shares under BASH for WSL are /mnt/c to access C: drive. Share under VM is /linux to access c:\linux not the entire drive. Copy/Paste and shared folders should work and lpr to print. Test ls -al | lpr Not for WSL BASH. Start Terminal Session # Right click on desktop and select open terminal. # Debian (Applications, System Tools, Mate Terminal) # Some tests to do under VM only. ifconfig # Shows virtual interfaces pwd # Should show /home and your user name I.E. /home/ken systemctl | grep vbox Two processes running, good, if not see reference below. Linux Lite needs this. Reference sudo systemctl start vboxadd-service.service Reference sudo systemctl enable vboxadd-service.service Retry systemctl | grep vbox If it's not starting automatically something is wrong. If it's not working stop and fix it. ls /linux If permission denied 'adduser' not setup. Stop. Go back to "Insert Guest additions". gsettings set org.gnome.desktop.screensaver lock-enabled false # Disable screen lock. Older verions gsettings set org.gnome.desktop.screensaver lock-delay 240 # 4 hours gsettings set org.gnome.desktop.session idle-delay 240 # 4 Hours # End VM only cd /home/{username} # Be sure you are in the correct place. If on a VM cp /linux/current/* . If on WSL cp /mnt/c/linux/current/* . If on some machine in neverland mount USB stick then cp /* . Please execute in the order listed. This is automatic but takes awhile. username ALL=NOPASSWD: ALL # Add to the end of /etc/sudoers Stops repeated password questions. * If running Linux Lite 4.X fiddle with .bashrc and change Linux to linux & loadaps change pathVM to pathLL ./loadssh Installs and enables secure shell and UFW Firewall on port 22 so sftp & putty & xshell 6 work. ./loadaps Installs applications, png files, bin files, Desktop files, modifies .bashrc ./loaddev Loads developtment packages ./loadbwbasic Add sample files in bwbasic & compile. ./loadfocal Add sample files in focal & compile. ./loadfortran Add sample files in fortran. ? ./loadgnucobol Builds GNU Cobol version 2.2. If running 3.1 cp -r /linux/gc31/* . Then ./gc31install.sh ./loadcsc Biulds and sets up CSC applications Fire up firefox and add extensions. From command line type in firefox and press enter Ghostery is at: https://addons.mozilla.org/en-US/firefox/addon/ghostery/ [Detailed view] No Script is at: https://addons.mozilla.org/en-US/firefox/addon/noscript/ HTTPS Everywhere is at: https://addons.mozilla.org/en-US/firefox/addon/https-everywhere/ Swift Search is at: https://addons.mozilla.org/en-US/firefox/addon/swift-selection-search/ Singlefile is at: https://addons.mozilla.org/en-US/firefox/addon/single-file/ NO don't do: Clear History is at: https://addons.mozilla.org/en-US/firefox/addon/history-cleaner/ [7 days] If all went OK do ./loadcleanup You only get ONE shot at this! # All done ============================================================================================ # Notes and tips and possibly good stuff. # To Resize VHD for VM to 20GB. " are important. Quotes matter. VM should be stopped! cd “C:\Program Files\Oracle\VirtualBox" VBoxManage modifymedium disk "C:\Users\YOU\VirtualBox VMs\Ubuntu-mate-20.04-desktop-amd64\Ubuntu-mate-20.04-desktop-amd64.vhd" --resize 20480 VBoxManage modifymedium disk "C:\Users\ken\VirtualBox VMs\Windows-10-Home64\Windows-10-Home64.vhd" --resize 25480 Another example Then add ISO in the startup storage G-Parted Start VM Using G-Parted expand (resize) storage from G-Parted to use entire VHD. Shutdown VM Remove G-Parted ISO from storage Start VM The following is not required for Ubuntu but is for Linux Mint: To make things 'execute' open file manager click on desktop. Single click on one entry. Click on edit and choose preference under general check don't ask questions on launch. And change under advanced, programs terminal from x-terminal-emulator to lxterminal An explanation of .desktop files (launchers) is at: https://specifications.freedesktop.org/desktop-entry-spec/desktop-entry-spec-latest.html See also; https://wiki.archlinux.org/index.php/desktop_entries and https://developer.gnome.org/integration-guide/stable/desktop-files.html.en Desktop validator desktop-file-validate gmail.desktop Desktop install desktop-file-install --dir=~/.local/share/applications ~/app.desktop Desktop update-desktop-database ~/.local/share/applications Ubuntu PC File Manager menu://applications/ Mint PC File Manager /usr/share/applications # Adding an additional user under WSL for BASH After everything appears to be working OK. As the first user do sudo adduser bob and follow the prompts. To give bob sudo privledges sudo vim /etc/sudoers Add an entry after root. To save changes :w! then :q The ! is required. (carefull) To change to that user do su bob and put in bob's password. Then type cd and press enter to be in bob's directory.. You are now in bob's environment. Then do /mnc/c/linux/current/* . Then do ./loadaps Then do ./loadcsc Then do ./loadfocal Then do ./loadfortran Then do ./loadbwbasic Then do ./loadcleanup Then you can then run the X terminal do ./x and follow prompts. Nice for experminting. To return to the original user do su and use their password or exit BASH and reopen. To kill off that user do sudo deluser bob then sudo rm -r /home/bob If you get an open proccess message do sudo kill -9 then do sudo deluser -f bob Then sudo vim /etc/sudoers Move the cursor to the entry for bob and press dd followed by :w! then :q # Linux Mint XFCE 19.2 perhaps others also. If guest additions do not start automatically. Do the following assuming the folder did show up. References to {username} mean user you loged in with. Start a terminal session (right click on desktop and select open terminal) then cd /media/{username} ls -l to see version. cd /media/{username}/VBox_GAs_6.1.0 (Or version displayed with ls) sudo ./VBoxLinuxAdditions.run Enter password for {username} when requested It should proceed compiling and wait for the press enter prompt. Takes some time... Reboot using shutdown -r 0 # 0 means immediate reboot Log in and open terminal session then sudo adduser {username} vboxsf exit Go back to Restart # Debian 10.2.0 Mate If guest additions do not start automaticallly do the following. Open Mate Terminal (Applications, System Tools, Mate Terminal) If desired click on edit and Profile Preferences su root Use the password you assigned cd /etc vi sudoers Add {username} under root yy p Now root appears twice. Change second one to your user name :w! :q exit Exit root mode # returning to your user $ cd /media/cdrom0 sudo sh autorun.sh Use the password you assigned Wait for completion and message telling you to reboot to activate changes exit Exit Terminal returning to desktop Choose System menu, shutdown, reboot Sign on as you Open Mate Terminal (Applications, System Tools, Mate Terminal) sudo adduser {username} vboxsf exit Exit Terminal returning to desktop Choose System menu, shutdown, reboot Go back to Restart