Top Banner
Setting Up Linux for CSE775 - DO Jim Fawcett CSE775 – Distributed Objects Spring 2019
36

Setting Up Linux for CSE775 - DO

Feb 06, 2022

Download

Documents

dariahiddleston
Welcome message from author
This document is posted to help you gain knowledge. Please leave a comment to let me know what you think about it! Share it to your friends and learn new things together.
Transcript
Page 1: Setting Up Linux for CSE775 - DO

Setting Up Linuxfor

CSE775 - DO

Jim Fawcett

CSE775 – Distributed Objects

Spring 2019

Page 2: Setting Up Linux for CSE775 - DO

Tasks:

• Install VirtualBox• VMware Player would probably work as well

• Download: https://www.virtualbox.org/wiki/Downloads

• Install a Debian Linux• I’ll use Ubuntu 18.04

• Install “build essentials” tools

• Install Visual Studio Code (VS Code)• Setup build and launch tasks

• Optional Installs

Page 3: Setting Up Linux for CSE775 - DO

Task #1 – Install Virtualbox

Page 4: Setting Up Linux for CSE775 - DO

Installing Virtual Box

• I started by uninstalling Java and an old version of Virtualbox.

• Download and installation took about 2 minutes.

• https://www.virtualbox.org/wiki/Downloads

• Download Virtualbox extension pack and install

Page 5: Setting Up Linux for CSE775 - DO

Setting VM Guest Properties

Need more RAM than recommended

Page 6: Setting Up Linux for CSE775 - DO

Setup Virtual Disk and install Ubuntu

You will need a lot more disk space than the default setting

Here’s where you select the Ubuntu iso file after downloading.

Page 7: Setting Up Linux for CSE775 - DO

Task #2 – Install Ubuntu

Page 8: Setting Up Linux for CSE775 - DO

Download Ubuntu Desktop - 18.04.1 LTS

• Download Ubuntu (1.8GB)• https://www.ubuntu.com/downlo

ad/desktop

• Takes about 4 minutes

• You get an iso image you install in Virtualbox.

• Install in Virtualbox

Page 9: Setting Up Linux for CSE775 - DO

Select Ubuntu from Downloads folder

Page 10: Setting Up Linux for CSE775 - DO

Installing Ubuntu

Page 11: Setting Up Linux for CSE775 - DO

Installing Ubuntu (continued)

This erases Virtual Drive, not your host’s drive

You probably want the third-party option

Page 12: Setting Up Linux for CSE775 - DO

A few minutes later

Page 13: Setting Up Linux for CSE775 - DO

Restarting

You will get these errors on every boot – not unusual.

Page 14: Setting Up Linux for CSE775 - DO

Now it’s time to configure

We need to change scaling

Page 15: Setting Up Linux for CSE775 - DO

Setting Scaling

Page 16: Setting Up Linux for CSE775 - DO

Here’s Scaled View

• The view is configured with the VM host, VirtualBox.

• Set menu bar icon sizes with settings > dock in Ubuntu

Page 17: Setting Up Linux for CSE775 - DO

What do you know - It Works!

Page 18: Setting Up Linux for CSE775 - DO

Update Ubuntu Installation using apt pkgmgr

Page 19: Setting Up Linux for CSE775 - DO

Accessing usb Devices

Page 20: Setting Up Linux for CSE775 - DO

Using usb devices

• A bug in Virtualboxcauses other devices, e.g., Bluetooth mouse, to fail.

• Restarting the VMresolves thatproblem.

• Large drives will probably fail to connect.

Page 21: Setting Up Linux for CSE775 - DO

Task #3 – Install build-essential

gcc toolchain configured by Ubuntu team to build Ubuntu

• gcc (c/c++ compiler and linker)

• Make

• Many other tools

Page 22: Setting Up Linux for CSE775 - DO

Install “build essential” gcc tool chain

Press tab

Page 23: Setting Up Linux for CSE775 - DO

Task #4 – Install VS Code

Page 24: Setting Up Linux for CSE775 - DO

Download and Install Visual Studio Code

Follow directions on this page. You can’t just apt-get install.

Page 25: Setting Up Linux for CSE775 - DO

Adding C++ Plugin

• Click on plugin icon• Bottom of left pane

• Select C/C++

• This configures json setting files (partially)

• You must already have a C++ tool chain installed

Page 26: Setting Up Linux for CSE775 - DO

VS Code – Building C++

gcc buildgdb

execution

Page 27: Setting Up Linux for CSE775 - DO

Tasks.json and Launch.json

Debugger LaunchBuild Task

Page 28: Setting Up Linux for CSE775 - DO

Makefile Example

Page 29: Setting Up Linux for CSE775 - DO

Running make

• Terminal > Run Task >make

• Builds application as specified by makefile

Page 30: Setting Up Linux for CSE775 - DO

Debugging hello: Debug > Start Debugging

• Note breakpoint

• F10 => single step

• F5 => go to next breakpoint

• Note call stack

• Note Terminal

Page 31: Setting Up Linux for CSE775 - DO

Build and Launch JSON

gcc build

make build

Launch gdbdegugger

Page 32: Setting Up Linux for CSE775 - DO

Task #5 – Optional Installs

Page 33: Setting Up Linux for CSE775 - DO

Download Asp.Net Core 2.2 (optional)

https://dotnet.microsoft.com/download/linux-package-manager/ubuntu18-04/sdk-2.2.102Several detailed command line invocations are needed.

Page 34: Setting Up Linux for CSE775 - DO

Gman – man page helper

• Install gman• Sudo apt install gman

Page 35: Setting Up Linux for CSE775 - DO

gedit – installed with Ubuntu

Page 36: Setting Up Linux for CSE775 - DO

That’s All Folks!