Physics 210 Linux Lab 1

Contents

Preliminaries

  1. TA Introductions.
  2. Those who don't have accounts should self-register IMMEDIATELY in either the lab (room 205) or room 203 using the computers with the REGISTER HERE signs on them.
  3. Find a workstation and login. Ask for help immediately if you have any issues logging in.

The KDE / Plasma Desktop Manager

Notes
  1. RM / LM / MM = Right / Left / Middle Mouse (roller) click respectively.
  2. What action is tied to which mouse button (by default) generally depends on what precisely is being done (and can be customized in most cases). If you are used to a Mac, this may be a little annoying! E.g.
  3. Desktop and many applications are very configurable, so you may want to spend a little time to customize things the way you want / like.
  4. Learn to take advantage of having multiple applications (windows) open and visible concurrently; e.g. browser, text editor window, file browser, terminal (shell) window, Maple, etc. May have to organize real estate a bit, but will ultimately pay off since you will be able to see what is going in the different apps at the same time.

Notation

In the following

Key Components

Standard window operations

Use 3 buttons at upper right of any window to

Mouse select, copy and paste features (redux)

  1. Hold LM down and sweep: highlights and copies (automatically) selected text
  2. Click MM: paste selected text.
  3. Double click LM: selects/copies word.
  4. Triple click LM: selects/copies line.
These features often work in other Linux/Unix applications and can often be used to transfer text from one app to another.

Can also use Copy/Paste a la Windows/Mac OS from pull down menus.

Note: Many apps use the Ctrl-c (copy) and Ctrl-v (paste) convention for copy and paste operations. Within a terminal use Shift-Ctrl-c and Shift-Ctrl-v (or the mouse operations described above), since as discussed in the Unix/Linux notes, Ctrl-c and Ctrl-v have special meanings to the shell.

Desktop configuration

There are various desktop configuration mechanisms available, including:
  1. In desktop background: RM -> Folder Settings

    Close panel: Click OK, saving changes (or not) if you are prompted.

  2. System settings app: LM click on crossed tools icon on panel

    Close app by navigating back to main view and clicking Quit, or via the generic kill button at the upper right of window.

  3. Add application to desktop from application menu launcher.

Panel Configuration

Web Browsers and Web Browsing

There are icons on the panel for the following browsers: With luck you will have used Firefox and/or Chrome (a.k.a. chromium) before, if not, will assume that you'll be able to master one or the other or both quickly.

Notes:

Extremely important notes: apply to all course activities

File Browser (dolphin)

Similar to icon-based file browsing in Windows / Mac OS. Will be intuitive to use for most if not all of you.

Double LM Click on Home icon in upper left of desktop.

Opens dolphin with view of your home folder/directory (will discuss the notion of home directory in Unix/Linux notes.

Some features to note

Be able to use dolphin to navigate to Note that in many cases it will be easiest to navigate to a file by starting at Root.

Important note

For now, ignore the devices section on the left panel of dolphin.

In particular, do not click on /home/phys210 on 142.103.234.164 when completing Exercise 2.

End note

Terminal Application / Shell Window / Bash Window (konsole)

May seem ugly, clumsy, archaic, arcane, useless (your pejorative(s) here) ..., but learning to use it (i.e. the command-line, i.e. bash) effectively is good for you (just like vegetables, exercise, ... well perhaps not just like that), and does wonders for your nerd quotient.

PLEASE attempt to develop facility with the command-line. Open a terminal window by clicking (black rectangular icon on the panel), type the following commands.

IMPORTANT: Here and in the following, do not type the %: it represents the actual prompt you will see every time you enter a command (something like phys210d@cord ~])

% pwd
% ls 
% ls -a
% date
% touch me
% ls
% ls -l me
% cat me 
% file me
Note the shell's response to each command that you type; we will discuss these and other commands in future labs/lectures.

Mouse select, copy and paste features (redux)

  1. Hold LM down and sweep: highlights and copies (automatically) selected text
  2. Click MM: paste selected text.
  3. Double click LM: selects/copies word.
  4. Triple click LM: selects/copies line.

Exercise 1: MANDATORY!!

  1. Type the following command precisely: note that the first character is a tilde (upper left of keyboard, shifted character).
  2. % ~phys210/bin/setup
    
    Note that you can use copy and paste to copy the command from the browser window to the shell window, thus ensuring that the incantation entered is typo-free.
  3. You should see output like this

  4. -rw-r--r-- 1 phys210d public 0 Aug 29  2013 /phys210/Accounts/phys210d
    
    but where 'phys210d' has been replaced with your user name.
If you don't see the expected output, please ask for help!!

End exercise

We will not continue with until everyone has successfully completed the exercise!

Customization

Special characters

Become familiar with the location of the special characters on your keyboard (i.e. everything other than alphanumeric), in particular the following, which are not much used in day to day typing, but are when interacting with the shell:

History mechanism & command-line editing

Become familiar with the use of the following keys:

On the command line, characters are always inserted to right of cursor.

Leave the terminal window open for the time being (or iconify it if you want to de-clutter your screen).

Text Editor (kate)

Reasonably straightforward to use, especially for Millennials :-)

Let's give it a whirl.

  1. Start app by clicking on the kate icon in the panel (pand and pencil).
  2. Type your name into the new document.
  3. Click the Save icon on the top panel of the app.
  4. Double click the Home icon on the left of the file browser panel that appears so that the file will be saved in your home directory/folder.
  5. Type myname (literally) into the Name field.
  6. Click the Save button.
  7. Quit the kate application: File -> Quit or Ctrl-q

Now, change focus to the terminal window, opening a new one as necessary, and type

% cd
% ls
The newly created file myname should appear in the listing: if it doesn't, ask for help!

Become familiar with kate's:

Essential operations Some features to note

Other Applications

Course related software

Will study/explore/use in weeks to come. Feel free to get an early start should you wish.

LibreOffice (Office suite, derived from Open Office)

Components will generally work with Microsoft formats (.doc, docx, .xls, ppt.)

Exercise 2:

  1. Using the file browser (dolphin), and starting from the (red) Root folder, locate the file ...
    /home/phys210/templates/README-EXERCISE2
    
    ... and copy it to your home directory. Ask for help if you have problems doing this.

    Note that when you click on certain folder icons, such as home within Root, it will take some time for the browser to display the contents of the folder (i.e. to return the view), since there can be many files/folder to process. So you will need to be a little patient at times.

  2. Carefully follow the instructions HERE to complete the exercise. Note that the link is to a copy of the file README-EXERCISE2, so you can also read the instructions in-place once you have started editing your copy with kate.
Fame and fortune (i.e. a prize) will be bestowed upon the first student in each lab section who successfully finishes the exercise.

Note:

If you're experiencing difficulty copying README-EXERCISE2 to your home directory, type the following commands in a terminal window:

% cd
% cp ~phys210/templates/README-EXERCISE2 .
Observe that there is period (.) at the end of the second command.

Then open your home directory with the file browser (double click the Home icon on the desktop) and you should see an icon for README-EXERCISE2. Double click on it to edit it with kate.

Take-Home Exercise:

Windows users:

Mac OS users: