EGR 103 Startup

From PrattWiki
Revision as of 11:50, 21 August 2016 by DukeEgr93 (talk | contribs)
Jump to: navigation, search

This page will be a guide to how to get working on things for EGR 103. It has been updated for Fall 2016.


The main resources for EGR 103 are listed on the bottom of that page. There is also Pratt Pundit's Category:EGR 103, which collects page of special interest to EGR 103 students.

Working from Home / Other Computers

Depending on what operating system you use, you will need to have a particular piece of (free!) software on that machine to properly connect to and work with the UNIX systems.

Mac Users

Mac users will need X11 or XQuartz. X11 is generally installed with OS 10.5 through 10.7; 10.4 users will need to install it. 10.6 and above users will want to install XQuartz. Information on each is at the X11 page.

Windows Users

Windows users will need MobaXterm to connect. This program contains both the terminal program and the X-Windows protocol in one free package. Note that at present Duke's public machines most likely do not have MobaXterm installed -- people wishing to use Duke's public machines to do work on Linux systems are thus advised to log in using the Mac boot and run X11 as noted above.

All Users

If you are working from a machine that is connected to the internet, but not on the Duke internet, you will need to use a VPN connection to validate your existence. See more information on that at Connecting by Virtual Private Network. Information on installing MATLAB on a personal computer can be found here. In general, software can be accessed through Duke's OIT page.


For Mac users only - the very first time you open the terminal window, you need to type xhost + to tell your computer to allow incoming graphical windows. Windows users will not need to perform this step.

To connect to the virtual Linux machines, simply open your terminal window and type

ssh -XY

where NetID is your NetID.

One-time-only activities

There are a couple things you will do during the in-lab time part of lab 1 that you (should) only have to do once. They are:

  • Setting up your UNIX account - this will be done in lab.
  • Setting up permissions for your directories - this process is described at User:DukeEgr93/WindowsPermission and will also be completed during lab.

Other activities

To work on the lab from your own computer, follow these steps:

  • If on Windows, start MobaXterm
  • If on Mac, start the Terminal program in the XQuartz package. Use it to connect to the login-teer machines.
  • Test the graphics connection by typing xterm &
    • If the xterm window comes up - great! If not, note the following:
      • For Macs, you need to type xhost + in a terminal window once -- this generally stays in place for the rest of the time you own that computer...
  • Once connected to a terminal and testing the graphics, change into your lab 1 directory with:
cd EGR103
cd lab1

Note: the EGR103 directory will be created during Lab 1.

  • Edit your lab report with emacs using
emacs lab1.tex &
Don't forget the &!
  • After saving the file with emacs, process the LaTeX file with
latex lab1.tex
Make sure LaTeX compiles! If not, check what kind of error there is:
    • If LaTeX can't see lab1.tex or sits there with two asterisks, hit CTRL-D and figure out where the file is.
    • If it is some other error, hit CTRL-D and identify the error. Fix the problem in emacs and run again.
  • Once LaTeX succeeds, run dvipdf with:
dvipdf lab1.dvi

to create a PostScript file.

  • Finally, use evince to view the pdf file:
evince lab1.pdf &
Don't forget the &! There may be a bunch of little warnings and errors that pop up.
  • To print, use the print command in evince and select the "lp0" printer. If your documents are not showing up in your ePrint queue when you swipe your card, see the ePrint page for troubleshooting info.

As you are editing your document, you should add a little to the .tex file in the emacs window, save the .tex file, and process it with LaTeX. If that works, then run the dvipdf command -- if evince is open and viewing the PDF file, it will detect a change in the PDF file and automatically load the latest version.


Blank Document


emacs lab1.tex & 

command brings up a blank document! You probably forgot to get into your lab1 directory. Be sure to type both parts of

cd EGR103
cd lab1

Windows Don't Show Up


emacs lab1.tex &

command doesn't seem to do anything. You probably do not have graphics set correctly. To check, type


without an ampersand. If you get an error message about the display not being set or localhost not working or something like that, you need to re-do your session to accept graphics. For both MobaXterm and XQuartz, make sure you have the -XY part of the line of code you are typing in to connect to a Teer machine.

The File is Locked

If you try to open a file in emacs and at the bottom of the window you get a message:

 ".../EGR103/lab1/lab1.tex locked by NetID@login-t... (pid nnnn): (s, q, p, ?)?" 

This usually happens if your connection closed unexpectedly while editing the document. Navigate to the folder and type:


If there is a file similar to the one you are editing but surrounded by hashtags, that is what is causing the problem. The easiest solution is, in that little emacs window with the message above, type "s"


Post your questions by editing the discussion page of this article. Edit the page, then scroll to the bottom and add a question by putting in the characters *{{Q}}, followed by your question and finally your signature (with four tildes, i.e. ~~~~). Using the {{Q}} will automatically put the page in the category of pages with questions - other editors hoping to help out can then go to that category page to see where the questions are. See the page for Template:Q for details and examples.

External Links