# Department of Engineering

## IT Services

Here are some answers to computer-related questions commonly asked at CUED. If you can think of questions that should be added here, mail tl136. Also useful is the Operators Top Tips page and the University Computing Service's Frequently Asked Questions.

## Information

1. Who do I get computing help from? - Try the online help system, or mail helpdesk@eng.cam.ac.uk. The Computer Operators in the DPO Computer Room provide a useful point of contact.
2. How do I find out about the courses and people here? - Go to the CUED Local Web Page
3. How do I find out what's recently been added to the WWW at CUED? - Go to the What's New Page
4. What I am allowed to do on the system - See the Rules.
5. When a person or an answer here says " just type ... " or "open a Terminal window and type ..." where do I type it? - Click on the Applications button (top-left) and use the icon to start a new window and type in there.

1. Quotas
• How much disc space do I have left? - just type quota
• How do get more quota?
• How do I find out which files I can get rid of?
• When I compile/latex a file the resulting file is empty. Why?
Answers to all these questions are available from the quota page. Don't forget to empty your Trash - until you do, all the files there take up disc space.
2. I've got a giant .xsession-errors file in my home folder. What shall I do? - If a program without a window tries to display text, the output's diverted into ~/.xsession-errors. Because of the way we've set things up, some text is added to this file each time users log in at a graphics terminal. That's harmless, but if users accidentally write a program that endlessly prints numbers out or asks for input, and they start the program by clicking on its icon (rather than typing its name on the command line), the output will go into ~/.xsession-errors until there's no space left.
The solution? Remove the file (don't put it in the Trash - use "rm ~/.xsession-errors" from the command line), log out, and log in again. Check to see if .xsession-errors or .xsession-errors_old exist. Remove them if they do. Type "quota -v" from the command line. It can take a few minutes for the output of "quota" to match the current computer usage, but once "quota" shows that you're under 100% it's safe to continue working.
3. I've accidentally removed a file. Can I get it back? - If you've been editing the file (called foo, say) using emacs then a backup of the previous version (called foo~) should exist. Also some backups of Teaching System files are made overnight. Mail the operators with a list of files you need recovered for more details. Backups are kept for at least 3 months.
4. What are all these strange files doing in my directory? - There are many useful files whose names begin with a '.' in your home directory. Even if you remove these files, they'll be recreated each time you use the corresponding applications. Other files (like .Xdefaults and .profile) may have been created by you to customize your set-up. If you remove those they won't be recreated.
5. I don't know what format a file of mine's in - Click on its icon with the right mouse button and select Properties
6. How do I find a file of mine? - Try the "search ...." menu-item on the File Browser window. Alternatively, if you think you have a file somewhere called prog.p, try typing 'locate prog.p'. If that fails, try 'find ~ -name prog.p'. If all you know is that the filename has rog in it, do 'find ~ -name "*rog*"'.
7. How can I let other people read files of mine? - By default only you can read and change your files. You can change permissions on individual files and directories by using the menu you get when clicking with the right mouse-button on the icon, or by using chmod from the command line. Take care - you don't want to let people change your files. Note: to make a file accessible to others you may need to change the permissions on the directories leading to the file, as well as on the file itself.
8. I've copied a PC text file to the Teaching System. How do I remove the funny characters at the end of each line? - Use the dos2unix command.
9. How do I compress files on the Teaching System? - use the in the Utilities section of the Applications panel, or gzip from the command line

1. When I log in remotely I can't use Matlab, LaTeX or compilers. Why? - gate (the machine visible from outside CUED) doesn't have those programs, but from gate you can log in (using slogin) to one of our Linux Servers, which are fully equipped.
2. I'm having Pro/E trouble. What should I do? - Look at the Pro/ENGINEER (Wildfire) and Pro/E - symptoms and solutions pages.
3. My text window has frozen -
• Make sure the mouse cursor is in the window.
• You may accidentally have typed Ctrl S, which freezes the window. Try holding the Ctrl key and typing Q
4. Why is my machine so slow? - Maybe some big programs are running. Try typing top to get an ordered list of processes.
5. How do I run long jobs? - See the Running Long Programs page
6. What engineering packages are available on the system? - There a few large commercial packages and several smaller ones which have been often obtained free from the network. See the programs page for details.
7. What statistical packages are available? - Matlab has some support, and lots of source code is available. See the statistics section of our maths page for alternatives.
8. How can I run graphics programs remotely? - See the Offsite Access page or (if you're within CUED) the Linux Servers page.
9. How do I kill a program? - If the program has a window associated with it, but the Quit/Exit button doesn't work, try clicking on the 'X' at the top-right of the window. Failing that, try clicking on the corresponding item in the task-bar along the bottom of the screen
You can kill the current program started from the command line by holding down the Ctrl key while pressing "C". For other non-graphics programs you first need to find their PID (Process ID) by using "top" or "ps -fade", then type "kill -HUP PID". If it survives that, use the more drastic "kill -KILL PID".
10. When I use a text editor it starts overwrites what's there. What's gone wrong? - emacs, gedit and geany have an overwrite mode which is toggled by pressing the Insert button or the keypad's 0 button. If you accidentally press one of these buttons, just press the button again.

1. How do I log out? - Use the icon at the bottom of the screen.
3. I've forgotten my password for the Engineering system or it's expired: how to I get a new one? - You need to visit the CUED operators in person with photographic evidence of identify, and they will allow you to set a new password. It may take up to half an hour after the reset for the new password to reach all machines, so allow plenty of time. If you really cannot go to the operators in person, email the operators, but be warned that the procedure for setting passwords remotely can take several days.
4. How can I change my Teaching System password? - Use the passwd command, or the Change Password option in the "Control Center" panel of the desktop.
5. How do I get wireless access? - See the Connecting to the Department's Wireless Network page
6. The DPO is full. Where can I log in? - The EIE lab in the Baker building often has spare terminals, the same type of terminals as in the DPO.
7. How do I access the Departmental System from home/college? - The Working from offsite page offers help. For more secure access to remote machines, use ssh (secure shell). There is also some advice for College Computer Officers on providing access to the Department's systems; this also contains some information which may be useful to end users.

Note that most of our machines are not visible from outside Cambridge University and many aren't visible even from other parts of the University. See the Machines and Access list for current Teaching System details.
8. When am I allowed to use the system? - Generally the rule is that you can use the system at any time except when there are timetabled teaching sessions which take priority.
9. When I try to access past papers and cribs I receive a message saying that I am not authorised to access those pages. What do I do? - Contact the Teaching Office (teaching-office).
10. Can I use the system for recreational purposes? - Yes, provided that this doesn't interfere with academic use of the system. For example: someone needing a terminal for academic use would take priority; things which cause poor performance for others by imposing a heavy load on the CPU or network should be avoided; and of course nothing should be done which contravenes University rules
11. Can I attach my own machine to the Department's network? - Yes, possibly but only if you are a member of staff or a research student and only subject to certain rules. All systems attached to the network must be registered with ip-register. Follow instructions on the Connection to the Department Network page.

1. How do I forward my email to somewhere or someone else - See the forwarding mail page.
2. I'm going on holiday. How do I set up a vacation message? - See the vacation page.
3. How can I find someone's e-mail address if they don't belong to Cambridge University? - There's no reliable way to find the e-mail address of anyone in the world but you could try The Internet Address Finder, Four11 Directory Services, and Bigfoot.
4. What can I do about junk e-mail? - Very little. See the junk mail page before doing anything.

1. Where are the printers? What are they called? How do I print in colour? - Read the Printing page!
2. The program I'm using (gEDA, acroread, etc) requires me to type a command in order to print. What do I type? - lp -duniflow followed by any extra options.
3. I've sent output to the printer, but nothing's happening - if you're using the Evince program (which is the default) to display PDFs, printing may fail. The solution is to: put the document on the desktop; right-click; select "open with"; choose adobe; print from that.
4. How much does printing cost? - See the Printing/Photocopying Prices page.
5. When I print from emacs the toner's low - if you choose emacs' print option it will try to print some types of files in colour, so much of the text will be grey. If you don't want that you can print using one of Emacs' (B+W) (Black and White) print options or (for C++ files) xcc's Print button.
6. My encapsulated postscript files displays on screen but just produces a blank page when I try to print it out. - Proper encapsulated postscript files are likely to produce a blank page when sent to a printer. Either produce a non-encapsulated postscript file instead or try adding showpage to the end of your file.
7. Is there a scanner on the system? - Yes. See the Scanning page for details.
8. How can I do screendumps? - use the Accessories/Take Screenshot option available from the taskbar's Applications menu or import from the command line. For example, typing import pix.jpg will create a jpeg file called pix.jpg (you can also create postscript files pix.ps, pix.eps, etc). After starting the command, clicking with the left mouse-button on a window will dump the whole window. If instead you use the middle mouse-button you can select a rectangle by dragging.
9. How do I print posters? - See the operators. Information on acceptable file types, costs and time scales is given on the advanced printing page. Also the print room (next to the DPO) can print and laminate up to A0 size posters.
10. I've got strange defaults for printing (Rough paper, no title page, etc) that I didn't set up - When you change printer settings in some programs (e.g. xpdf) you're invited to make your settings the default. These defaults will apply for all your printing. To remove all these personal printing options, type "rm -f ~/.lpoptions" at the unix command line.
11. How can I do A3 printing? - It might not be easy. First you have to make the program produce A3 output, then you have to tell the printer to use A3 paper. Problems arise because of differences between programs and differences between printers. In general, if a program displays a Print dialog panel, then you should be ok. If you have a misbehaving Postscript (*.ps) file, you could try using ps2pdf to convert it to PDF, then click on the icon of the PDF to view the PDF file and get a Print dialog panel.
If that doesn't work, use the command line options mentioned on the Printing Commands page. If "lp -o media=A3 ..." doesn't work, try "lp -oa3 ..." or "lp -oA3 ...". If those don't work, type "rm -f ~/.lpoptions" then have another go.
The postscript file you're trying to print out might override your print options. Our Postscript Document Structuring Conventions page has some examples

1. I'm getting an error message when saving files, something like "unable to save, there may be problems with your disk space or file permissions". What's wrong? - If you can successfully click on "Save", then you have enough disc space. Your problem may be that you're using "Save all" with a drawing that's using some "library parts". If you haven't copied those library part to your own space, Creo will try to write back to the original library directory - which you don't have permission to write to. A solution is to copy the library part(s) into your own area. (CAS)

1. How do I get single-column figures in a multicol environment? - See the multicol hints
2. I get a 'Too many unprocessed floats' message or I have lots of white space on some of my graphics pages - See the float hints
3. How do I get a degree symbol? - Use \newcommand{\grad}{\ensuremath{^{\circ}}} before \begin{document} then you can do things like 45\grad
4. How do I get a euro symbol? - Use \usepackage{textcomp} and \texteuro or \usepackage{marvosym} and \EUR.
5. Can I include graphics files? - Yes. EPS files can be included directly - see the examples. For GIF and JPEG files you need a preliminary step - see the examples. If you use pdflatex rather than latex you can use JPEG, PDF and PNG files directly and produce PDF output.
6. When I use fancyhdr I get many 'Overfull \vbox' messages - This is because the default space allowed for the heading (1 line of text) is too small to contain the fancy-heading (1 line of text + 1 rule). You have to put in your preamble \addtolength{\headheight}{2.5pt}
7. When I use fancyhdr, the left and right headings overlap - The sectioning commands (\section etc) have an optional argument to specify a shortened version of the title to be used in the header and table of contents, so you can do something like "\section[short version]{very long version indeed}".
8. Only the first letter of titles in my BIBTeX entries is capitalised - This is the default behaviour. To regain control, put the title in double quotes then put anything that you want printed verbatim in curly brackets.
9. Where's a University Coat of Arms? - Try looking in /usr/local/share/texmf.local/university_identifiers. Details and more choices are on the University's house style site.
10. psfrag produces broken postscript with files produced by xfig - Given any XFig figure converted to Encapsulated PostScript, look for the "/PATfill" command. Inside this subroutine, replace "show" with "oldshow" (there is only one occurrence).
11. Is there help for writing IIB project reports? - /export/Examples/LaTeX/IIBproject.tex is an unofficial template. See also IIBconf.tex and IIBconf_2column.tex in the same directory, and the notes on report writing. The class file is at /mount/apps/teTeX/share/texmf/tex/local/IIBproject.cls on the DPO terminals and at /usr/local/share/texmf/tex/local/IIBproject.cls on the Linux servers (but NOT on gate).
12. The title of my IIB project report doesn't fit the hole in the cover - Add some vertical space using something like "\title{\vspace*{1cm} Your Title Here}". Note that \vspace* (and \hspace*) can take negative arguments.
13. My document won't compile any more. It gives up right at the start - Each time a document is LaTeXed the corresponding *.aux file (created by a previous run) is loaded in. If this file contains a bug you'll have problems. Remove it and recompile.

1. Can I use the Departmental license server to run MATLAB in my computer (a) in college and (b) in private (non-college) residence? - Yes, if you belong to CUED. See Offsite access to CUED MATLAB License Server (Mac OS and Linux Computers) or Offsite access to CUED MATLAB License Server (Windows XP/Vista)
2. I'm told I need to renew the stand-alone matlab licenses every year. How do I do that?
• For MS Windows PC
• Open matlab
• Select help pull down menu
• For Macs:
• Open a Finder window and Locate the MATLAB.app icon in the users Applications folder (the file name will refer to the version as well as it being MATLAB - eg MATLAB_R2013a.app).
• Open the MATLAB folder by hitting CTRL+Click (or right-click) and select "Show Package Contents".
• Double-click on "Activate" in the MATLAB folder to start the activation client.
3. How do I get the print-out to be the same size as the screen picture? - resize the picure on the screen the way you want it, then type set(gcf,'PaperPositionMode','auto') on the matlab command line, before printing. If the result is wrong by a few percent, use trial-and-error! To restore the default behaviour, type set(gcf,'PaperPositionMode','manual')
4. How do I find if a matrix is contained within another matrix? - I downloaded findmat, which lets you do things like
     a=[ 0 1 0 ; 7 6 5 ; 8 0 9 ; 0 0 0 ; 1 1 1 ];
b=[0 0 0];
a(findmat(a, b),:)=[]

to remove rows of zeroes from a matrix.
5. How can I print in colour from Matlab? - In newer matlab's there's a bug in the print dialog panel which makes output come out in monochrome by default. Safest is to use matlab's print command - to print directly to the color printer you can do "print -Pcljmrn -dpsc".
6. How can I print onto A3 paper from Matlab? - It's best to do this in 2 stages. First produce a file (called output.ps, say) using the usual dialog box, remembering to choose Paper type A3, and remembering to check the "Page Setup" options. Preview the file using evince to check that the media size and the graphics are right. Then make the printer use A3 paper by using "lp -o media=A3 output.ps" from the Unix command line.
7. How can I print in colour onto A3 paper from Matlab? - To select both A3 and colour you need to bypass some bugs. First, type set(gcf,'PaperType','A3') in Matlab to make Matlab produce A3 output. Then produce a colour output file by typing print -dpsc outputA3color.ps in Matlab (in this example the resulting file's called "outputA3color.ps" but you can choose another name). Preview the file using evince, then print to a colour printer remembering to ask for A3 paper. You could try lp -o media=A3 -d cljmrn outputA3color.ps
8. I've some experimental data. How can I find a best-fit function? - See the short articles on Experimental data with Matlab and curve fitting.
9. How can I get spreadsheet files in an out of matlab? - Have a look at the Matlab and spreadsheets page
10. With matlab on linux I cannot input anything using the keyboard, but operations can be done by mouse - Try turning NUM LOCK off
11. How can I put a variable's value into the title? - try something like "title(sprintf('The value of x is %g',x))"
12. I'm running Windows and I'm running out of memory with Matlab. What can I do? - Mathworks' Avoiding Out of Memory Errors page has many tips. Four that have proven useful here are
• Changing the boot.ini file (if you have a 32 bit operating system)
• Reducing the amount of memory used by the graphics card
• Not using the Java Virtual Machine (done by using "matlab -nojvm ..." on the command line)
• Using single precision (though performance might suffer - you may need to convert to double precision in places)

1. When I type in emacs it overwrites what's there. What's gone wrong? - emacs has an overwrite mode (Ovwrt appears at the bottom of the window) which is toggled by pressing the Insert button or the keypad's 0 button. If you accidentally press one of these buttons, just press the button again.
2. How do I delete text using the mouse? - Click at one end of the text with the left button, then double-click with the right button at the other end of the text.
3. Whenever I run emacs half of the window is filled with help information. How to I get rid of it? - at the bottom of the help window there are options to dismiss it permanently or just this once.
4. How do I stop text being colored according to syntax? - See the Using the .emacs file section of the Emacs handout.
5. Why, when I spellcheck a document, do I get a ISPELL misalignment ... message? - Your document contains some very long lines. Put some carriage returns in.

1. How can I run graphics programs remotely? - See the Offsite Access page or (if you're within CUED) the Linux Servers page.
2. How can I do screendumps? - use the Accessories/Take Screenshot option available from the taskbar's Applications menu or import from the command line.
3. my hgraph application isn't working - Some versions of the hgraph graphics library have various problems
• if the screen goes blank when run on a Windows terminal using Xwin32, turn on Xwin32's 'PseudoColor Mode'.
• if you save-to-file and the resulting file doesn't print out, add the following on a line by itself at the top of the file: %!PS-Adobe. Note that hardcopy output is black and white.

1. When I type my PIN in, the fields go blank and nothing happens - Try removing your CUED cookies. In Firefox you do that by selecting the Preferences option at the foot of the Edit menu, then selecting the Privacy panel and pressing the remove individual cookies option. Find the eng.cam.ac.uk folder and remove the CuedWaInfo and (if you have one) CuedWaId cookies.
2. When I start Firefox it says that someone's already using it. What do I do?
When Firefox is first run it creates a 'lock file'. When you exit normally from Firefox the lock file is removed. If, when Firefox starts, it finds a lock file it thinks that you're still running Firefox elsewhere, but in fact the lock file might be left over from a Firefox that crashed. To fix this, type unblockfirefox in a Terminal window before starting Firefox again.
3. I typed unblockfirefox. Now I've lost my bookmarks etc. How do I get them back?

By selecting the Organise Bookmarks option in the Bookmarks menu you can reach a panel that lets you load bookmark files. Using the Restore or Import commands, look for the most recent bookmark files under your home folder in

• .mozilla/firefox/*default/bookmarkbackups/
• .mozilla/firefox/*default/oldbookmarkbackups/
• .snapshot/ (which contains various backups of your files)
4. How can I avoid having to use unblockfirefox? - If you exit from Firefox using Quit on the File menu, and remember to log out, you'll have few if any problems.
5. When I try to access past papers and cribs I receive a message saying that I am not authorised to access those pages. What do I do? - Contact the Teaching Office (teaching-office).
6. How can I put files on the WWW? - How to put files on the Web has information for general users and the Publishing section of the WWW index has information for official pages. Note also the Worldwide Web - Departmental Guidelines
7. How can I get Firefox to display japanese characters? - just set the encoding fonts in "View" and in "Preferences" as "Japanese"

1. The coursework uses a command called %time, which is on Jupyter. What can I use elsewhere? - You can try something like
import time
start_time = time.time()
print("hello")
end_time = time.time()
print("Time taken=",end_time - start_time, " seconds")


2. When a notebook cell says In[*] what does it mean? - it means that the code in that cell is still running. In practise, that usually means that there's an infinite loop in your code, though it might mean that the server's busy. There are various things to try
• Check your code! Do a dry-run through it, checking that the code that has to be repeatedly run is inside the loop rather than outside it. Print out variable values to see if they're changing in the way you expect
• Change your code so that the looping ends after the 100th interation even if the root hasn't been found. This won't make your program work correctly, but at least your code won't run forever.
• Use the "Kernel" menu to 'Restart and Run All' the code cells.
• Shut the browser down and start again
• If you're in the DPO use Chrome rather than Firefox - it's in the "Applications/Internet" menu
• If you're in the DPO, use the "Applications/CUED other start scripts/Start Python" option to start a program that runs locally, letting you write and run Python files that are saved in your CUED filespace
• Mail your code to the Forum

All our C++ information is available from our C++ page. There's a list of CUED Frequently Asked C++ Questions which you're welcome to add to!

1. What Fortran compilers are on the Teaching System? - gfortran (supports f95, f2003, f2008) and ifort.

1. When I list files in a terminal window, some file-names are in green and I can't see then clearly. What shall I do? - If you type "unalias ls" in a terminal window, then future file listings using the "ls" command in that window will produce only black text. You can put this line into a start-up file if you want the effect to be permanent.
2. Something's not working the way I expected it to - See the list of Known bugs/features on the DPO Terminals
3. I seem to have configured myself strangely. How do I "reset factory defaults"? - remove those folders in your home folder - .gconf, .gconfd, .cache, .gnome, .gnome2, .nautilus, .config, .local,
4. Is there a quick way to copy/paste text? - Yes. Drag over the text with the left-button to copy it, then click on the middle mouse button (in a different window if you wish) to paste it.
5. I've lost my Applications menu. How do I get it back? - Start a terminal window by clicking on the Terminal icon in your Activities menu. In it, type gnome-tweak-tool. This will open a window in which you can switch the applications menu on again.

1. How can I access my "Windows" files when I'm logged into Linux? - Open a terminal window and type ls /winhome/abc123 (replacing "abc123" by your CRSID). You should then see the contents of your Windows home folder. You can then navigate using the usual Linux desktop navigation to access the files
2. My profile isn't being picked up when I log in to the DPO PCs What shall I do? - First try removing ~/.ntprofile/TEACHING-SYSTEM/Application/twext.exe. If that doesn't work then to try moving the whole ~/.ntprofile folder (you can do these operations on the other - Linux - terminals)
3. Why is the floppy drive disabled on Intel PCs? - To reduce virus problems.
4. Why don't bookmarks work on the Intel PCs' netscape? - the installed netscape can't deal with per-user bookmark files, so we've disabled bookmarks completely.
5. My status in the Dept. has changed and I can no longer use the Intel PCs - Log into TS and type "rm -Rf ~/.ntprofile/TEACHING-SYSTEM". This will reset your user profile next time you login.

1. How do I get started? - First-time 2nd year users need to click on "Add New Candidate Set", enter a name which is meaningful to you (such as 'Aero choices' or 'My first try') and then click on "Create Selection Set". This should get you to the main editing screen.
2. How do I find out more? - There's a FAQ (list of Frequently Asked Questions) linked from the top of the index page which explains more.