School of Mathematical and Computer Sciences
MACS IT Frequently Asked Questions

Last updated: 2017-09-11

Acceptable Use Policy

See here for Heriot-Watt University's Acceptable Use Policy

QUESTIONS

GENERAL QUESTIONS

QUERIES & PROBLEMS

EMAIL, INTERNET & REMOTE ACCESS

PRINTERS, SCANNERS AND OTHER HARDWARE

DATABASES

DISK SPACE

LINUX QUESTIONS

GENERAL LINUX QUESTIONS

C & PROGRAMMING

MICROSOFT WINDOWS QUESTIONS

MACS WINDOWS SERVICE (MAXP)

VIRUSES

ANSWERS

How do I contact the Help Desk?
Via email to help@macs.hw.ac.uk, or by phone on extension 3419, or in person to room EMB 1.33.
What's the correct procedure for reporting problems?
First check this FAQ in case the problem is already a well known one. If it's not then you should contact the Help Desk.
All the folk in my class keep asking 'how do you do xyz' or 'what is the option to the pqr command to do abc?' - why isn't this in the FAQ?
We don't know that it's a frequently asked question, so tell us - contact the Help Desk and suggest it be included in the next version of this FAQ!
Who do I contact if there is a problem with `non-computing' hardware e.g., "the light in the loo is faulty"?
Email maintenance@macs.hw.ac.uk, describing the fault and its location.
How do I set up my own web page?

Staff & Ph.D. students: You need a directory called "www" as a subdirectory of your Unix home directory or H: drive under Windows. If your login name is xyz then a file called file.html would then be accessed via a web browser using the URL "http://www.macs.hw.ac.uk/~xyz/file.html"

Students: Students use the student/development web server www2.macs.hw.ac.uk. You need a directory called "public_html" as a subdirectory of your Unix home directory or H: drive under Windows. If your login name is xyz then a file called file.html would then be accessed via a web browser using the URL "http://www2.macs.hw.ac.uk/~xyz/file.html"

This directory should already exist as it is created automatically when a new user account is set up. If it is not there then you will need to create it.

(Note that this directory and all its contents must be world readable and that some file operations under Microsoft Windows applications may change the permissions so that this is no longer the case.)

Create files in HTML format within that directory, using names such as file.html (See for example w3schools.com for tutorials on HTML.)

You will find some additional documentation on using the web servers on www2.macs.hw.ac.uk

How do I password protect my web pages?
In the directory you want to protect, create a file .htaccess. Here is an example using user imcc :-
     AuthUserFile /home/imcc/.htpasswd
     #AuthGroupFile /home/imcc/.htgroup -- optional entry
     AuthBasicProvider file
     AuthType Basic
     AuthName "Access to this directory is restricted."
     Require user imcc
     

Use the command htpasswd to set a passwd for those allowed to get access to the web pages within the directory, like this:
/usr/bin/htpasswd -bc .htpasswd login_name passwd_you_wish_to_use

Points to remember :-

When specifying the AuthUserFile use the full path for the file, not `~`.

Make sure all html and .ht* files have permissions 644.

IMPORTANT: Note that this only protects your pages from remote users accessing the files via the web. It does not protect them from local users who can access them via the file system.

What are the settings for accessing my Office365 mailbox using an IMAP mail client (such as Thunderbird or alpine)?

Settings for Office365 in Thunderbird, for example user abc1
Incoming
Server Nameoutlook.office365.com
Port993
User Nameabc1@hw.ac.uk
Connection securitySSL/TLS
Authentication methodNormal Password
Outgoing
SMTP serversmtp.office365.com
Port587
Connection securitySTARTTLS (TLS - Mobile Device Option)
Authentication methodNormal Password
User Nameabc1@hw.ac.uk

Settings for Office365 in .pinerc for alpine, for example user abc1
#User-Id
user-id=abc1@hw.ac.uk
# Name/path of inbox. (Folder path name or "{host}inbox" for remote IMAP inbox)
inbox-path={outlook.office365.com:993/ssl/novalidate-cert/user=abc1@hw.ac.uk}inbox
# Name of SMTP server for sending mail. If blank, sendmail will be used
# Exchange SMTP Setup
smtp-server=outlook.office365.com:587/user=abc1@hw.ac.uk/novalidate-cert
# Folder Collection
folder-collections=imap {outlook.office365.com/ssl/novalidate-cert/user=abc1@hw.ac.uk}[]
How do I access a MACS linux session from a University windows desktop or from outside the University or from a laptop on Eduroam?
Use x2go. The client for Windows, Mac or Linux can be downloaded from x2go.org, and it is already installed on all MACS desktops and the University Desktop Service.

Once installed, start the x2go client. To configure a new session, choose Session->New Session from the menu. Give the session a name (e.g. "jove mate"), put in the hostname (e.g. "jove.macs.hw.ac.uk") and your username. Choose the Session Type at the bottom (e.g. "MATE"). DO NOT choose Gnome, as Gnome 3 cannot be used with x2go. Other settings you may want to change are your connection speed under the Connection tab, and window size under the Settings tab. It's also advisable to turn off Sound support under the Media tab, as this can cause some applications to freeze in a session. Then click OK and start the new session, putting in your MACS Linux password at the prompt.

The first time you connect to a host you will be asked to confirm that you trust the new host key, answer Yes.

When you first run x2go on Windows you might see warnings from the Windows firewall, you can safely Cancel these as x2go does not need access through the firewall.

You may connect to the following hosts:

AllStaff only
jove.macs.hw.ac.ukmull.macs.hw.ac.uk
osiris.macs.hw.ac.uk
amaterasu.macs.hw.ac.uk
linux01.macs.hw.ac.uk

Note that x2go sessions can be resumed if you lose the connection for any reason, making it ideal for connections from devices on Eduroam or other WiFi services.

MacOS users will need Xquartz (Xquartz.dmg) X windowing installed, get it from Here

Tip: Make sure your Linux startup files (.profile, .bashrc, .cshrc) work properly and don't give errors.

How do I send email to a specific group of users taking a specific programme or course?
Use the Virtual Mailing List Manager (staff only.)
How do I get access from outside HW to protected internal web pages?
From Linux or MacOS or any other OS which includes ssh, use the command
ssh -D 8080 user@ssh.macs.hw.ac.uk

From Windows download plink.exe from the PuTTY suite, and use the command
plink.exe -D 8080 user@ssh.macs.hw.ac.uk
where user is your MACS login name

Then in your browser set the `SOCKS Proxy` option to `localhost` on port 8080.

What printers are available in the School?
Public Printers
Location Printer type Printer name
EM G.46HP Color Laserjet 4025DN cps1g46
EM G.47HP Color Laserjet 4025DN cps1g47
EM 2.45HP Color Laserjet 4025DN cps1245
EM 2.50HP Color Laserjet 4525DN cps1250
EM 2.50HP Color Laserjet 4025DN cps2250
Shared Staff/Project Printers (not available for undergraduate use)
Location Printer type Printer name
CM F.18HP Color LaserJet 4025DNcps1cm118
CM F.18HP Color LaserJet 4025DNcps2cm118
CM F.18Xerox ColorQube MFDxf18
EM G.53 HP Laserjet 2550N colourcps1g53
EM G.59HP Color LaserJet CP3525dn cps1g59
EM 1.24HP Laserjet 3000nps1124
EM 1.24Xerox MFD (Monochrome ONLY)x124
EM 1.25HP Colour Laserjet 2250ps1125
EM 1.50HP Laserjet 4100 ps1150
EM 1.52HP Colour Laserjet CP3525 cps1152
EM 1.53HP Laserjet P2055dn ps1153
EM 1.54HP Colour Laserjet 4700DTNcps1154
EM 1.56HP LaserJet 4100ps1156
EM 1.61HP Colour Laserjet 3000dncps1161
EM 1.63HP Colour Laserjet 3000dncps1163
EM 1.65HP Colour Laserjet 3000dncps1165
EM 1.69HP Laserjet P2055dnps1169
EM 1.72Xerox 7556 MFDx172
What scanners are available?
There is a scanner available for general use in the Multimedia lab EMG.46 connected to win7240.
Who do I see about changing the toner or getting more paper?
Contact the Help Desk.
How much MACS print quota do I have left?
My Print Quota
How do I setup my MAC to print to the local MACS Printers?
MAC Printing Setup
What other hardware is available for borrowing in the School?
List of lendable equipment which can normally be borrowed by arrangement for projects. Email help@macs.hw.ac.uk.
How do I access the MySQL Database Server?
The MACS MySQL server is mysql-server-1.macs.hw.ac.uk.

You need to request an account from the help desk before you can use it. You will be told the password when the account is created.

To access MySQL use the Linux command
mysql -u username -D username -h mysql-server-1 -p
where username is your HW/MACS username, default_passwd is abcusername354.
or go to
phpMyAdmin for a web front-end.

The first thing you should do is change your MySQL password.

How do I access the Mongo DB Server?
The MACS Mongo DB Server is mongo-server-1.macs.hw.ac.uk

To access this use
mongo --host mongo-server-1 -u username -p default_passwd --authenticationDatabase username
where username is your HW/MACS username, default_passwd is abcusername354.

How much disk space am I allowed and how do I check this?
Your disk space is set according to what year you are in. Currently we are using the following limits:
1st-3rd year:4GB
4th year: 9GB
M.Sc.: 9GB

You can check how much disk space you are using by logging into a Linux machine and typing this in your home directory:
du -sm .
This will tell you your disk usage in MB. To check which directories are using most space, run this command:
du -sm * .??* | sort -n
which will list all the directories and files, sorted by disk usage.

If you are trying to clear space and are not sure if you should remove a file, best to leave it alone, or email help@macs.hw.ac.uk and ask.

Checking your disk usage this way assumes you do not own files anywhere else on the file system, and also that no other users own files under your home directory. du -sm . shows the disk usage under the current directory, whether owned by you or not; it does not show files owned by you located somewhere else on that file system.

To see how much space the system thinks you are using run quota whilst logged into a Linux workstation. This may be different from the result of du because of the reasons above.

If you need more disk space for work purposes you can submit a request by emailing help@macs.hw.ac.uk. People who make such requests must be able to show that their current file usage is all course related and explain their need for more.

On every Linux workstation there is a /scratch partition, and on every Windows workstation there is a D: drive. These range in size from a few GB to over 200GB and are freely writable by everybody with no quotas. They are, however, not backed up and not accessible from other machines. They are particularly useful for large or temporary files, for example data files being processed or written by a single application.

When I log into Linux I still see the login screen in the background, how do I fix it?

Simply right-click on the background and choose "Change Desktop Background" and set your background to a picture or solid colour.

Why don't we use Ubuntu? Why CentOS?

We need a stable computing environment with long term support for security and other updates. We have found that more "bleeding edge" Linux distributions like Ubuntu or Fedora cause problems with incompatibilties in constantly updated software. The last thing you want with a deadline coming up is an update that stops you working.

CentOS 7 is our stable distribution of choice.

Having said that, many key packages are kept up to date, ahead of what's available in stock CentOS. Examples include LibreOffice, Firefox, Google Chrome, Eclipse, TeX Live, Java & Netbeans IDE.

What desktop environments are available in CentOS 7?
You choose your desktop enviroment when you are logging in, after you enter your username. There are several desktop environments available and which one you choose is largely down to personal preference.

MATE is a fork of Gnome 2 (as used in previous years) and is the default, and that is the one we would recommend to new users.

TDE (Trinity Desktop Environment) is the current version of KDE 3. If you used KDE on CentOS 5 this is very similar.

KDE is the newer KDE version 4.

XFCE is a fairly simple and lightweight, though fully featured, environment.

Gnome is Gnome 3, which has the disadvantage that it can't be used over x2g0, although it can be used locally in the Linux lab.

Cinnamon is a more lightweight fork of Gnome 3, which can be used with x2go.

How do I get package X upgraded?
Ask the Help Desk.
How do I find out more about a particular command myself rather than just by contacting the Help Desk?
Type man command where command is the command in which you are interested.

For example, to find out about the 'man' command itself, type man man.

Many programs also have documentation in GNU Info format, type info command.

You will also find various forms of documentation on system packages in /usr/share/doc/package-name-version.

What do I do if I accidentally remove a file from my directory?
Don't panic!

All user files are backed up on a nightly basis.

If you spot it quickly enough we can get it back from the online backup of the previous day's copy.

Otherwise we will have to retrieve it from tape which may take longer.

Contact the Help Desk with a clear description where the file was located in your home directory e.g.

        /home/iain/dir1/subdir1/file_1
 
and also when you last changed it.
How do I change my password?
In Linux use the command passwd and you will be prompted to enter your old password then give a new one. The system then makes a few simple checks on your proposed password and if it is o.k. you will be prompted to re-enter your new password so that you & the system agree on what you typed!

To change your password on a Windows system, once you have logged in with the old password, type Ctrl-Alt-Del and choose "Change Password". It is recommended you change the passwd to the SAME as you changed your linux one to, although not necessary.

Choose a password that contains a mixture of letters and digits, upper and lower case, no keyboard patterns, and no dictionary words or it may be rejected.

How do I change my login shell?
Use the command ypchsh and follow the prompts but remember that you must give the full pathname of the shell you want e.g. for tcsh give /bin/tcsh.
How do I change my full name as shown by, for example, "ypmatch"?
This facility is not available. You can get in touch with the help desk if your details are wrong.
How do I install Servlets or Java Server Pages (JSP)?
To run a Servlet from the MACS development web server (ANUBIS) www2.macs.hw.ac.uk:

Place your servlet class into the directory /var/lib/tomcat/webapps/$USER/WEB-INF/classes on the development web server (www2.macs.hw.ac.uk), where $USER is your username.

You must contact help@macs.hw.ac.uk to create this directory for you if it doesn't already exist.

If your intended servlet isn't compiled, say a java source file, you will need to compile the source using the command javac file.java.

The URL required to view your servlet is http://www2.macs.hw.ac.uk:8080/$USER/file, where file is the file.class located in the `WEB-INF/classes` directory above.

You need to create a /var/lib/tomcat/webapps/$USER/WEB-INF/web.xml file which holds the names of all your servlets. You can create this file and add new servlet names to it by running perl /var/lib/tomcat/bin/make-web-xml.pl, This perl will create the initial web.xml file if it does not exist. If the file exists, it will prompt for the new servlet you've created and add it at the end of the web.xml file in your WEB-INF directory.

Here is an example web.xml:

<?xml version="1.0" encoding="ISO-8859-1"?>

<!DOCTYPE web-app
    PUBLIC "-//Sun Microsystems, Inc.//DTD Web Application 2.3//EN"
    "http://java.sun.com/dtd/web-app_2_3.dtd">

<web-app>

    <description>
      imcc's application
    </description>
    <display-name>imcc's application</display-name>

<servlet>
        <servlet-name>imcc</servlet-name>
        <servlet-class>imcc</servlet-class>
</servlet>

<servlet-mapping>
        <servlet-name>imcc</servlet-name>
        <url-pattern>/imcc</url-pattern>
</servlet-mapping>

</web-app>

To run a Java Server Page (JSP) File from the MACS development web server www2.macs.hw.ac.uk:

Place your JSP File into the directory /var/lib/tomcat/webapps/$USER/ on www2.macs.hw.ac.uk. The help desk may need to create the $USER directory for you, as for the servlets above.

The URL to browse your JSP File running is http://www2.macs.hw.ac.uk:8080/$USER/file.jsp, where $USER is the same name as the directory given above.

How do I convert a Microsoft Office document to a PDF File?
(Windows 7) File, Save as, choose PDF in the file types.
How do I access my files from outside the School?
You can transfer files to/from your MACS account from anywhere else on the internet using the scp/sftp or rsync protocols.

Using any of these you access host ssh.macs.hw.ac.uk using your MACS Linux username and password.

In Windows a suitable freeware client is WinSCP which gives you a Windows Explorer like window which allows you to just drag and drop files back and forth between the local and remote computers.

In Linux there are several options. You can use rsync (see man rsync), or several file managers such as konqueror have the sftp protocol built in so you can access a URL of the form sftp://username@ssh.macs.hw.ac.uk to get at your files.

How do I make sure I don't go over my disk space quota limit — what can I safely remove?
If you go over your quota limit, here are some examples of areas to tidy up files, i.e. delete them.

Any cache directories for web browsers e.g. below ~/.mozilla/firefox

Other caches e.g. ~/.java/deployment/cache/*

If you have done so, and still have a genuine course-related reason for requiring further space, please contact the helpdesk and explain your needs.

How do I get screen shots saved from my Linux Desktop into a MS Word Document?
To take screen shots from Linux you can use the command display. Right click in the Image Magick window which will appear to get the menu options, then click `Open...` to grab a screen section or window from your desktop. To save your selection right click in the Image Magick window, then click on `Save...`, click on `Format` for which format (jpg, bmp, tif, etc) you wish the image to be in. Input the file name you want to save the image to, possibly your $HOME directory if you are going use it in an MS Word document.

You can load the saved image into a MS Word document, by clicking on `Insert, Picture, From File ...` within Word, then selecting the file you saved in Linux.

How do I use svn?
Look at this SubVersion cheat sheet.

This gives the simple commands that the user is likely to need for keeping an svn repository current.

Where can I get a HW MACS PhD Thesis Latex Template?
You can try option 1 or option 2.
I have compiled my program test.c (cc -o test test.c) It ought to give lots of screen output but when I try to run it, it just exits and the shell prompt appears again. Why doesn't my program work?
'test' is a shell reserved word - to run your program try ./test if it's in the current directory or else give the full pathname.
Which public computers in the School run Windows?
There are three labs of Windows 7 machines. These are the general lab in EMB 2.45 and the MultiMedia labs in EMB G.46 & G.47.
How do I change my Windows password?
Press CTRL-ALT-DEL and then click the "Change Password" button.
How do I add additional printers, or change my default printer?

To add a printer double-click the Add printers icon on your desktop (or if this is missing go to I:\Add printers) and double-click on the printer you want to add. This will subsequently be remembered in your profile.

To set your default printer, go to Start->Devices and Printers, right-click on the printer and choose Set as default printer.

Why does Microsoft Outlook keep telling me it cannot find my folders?
Outlook does not use roaming profiles properly. It stores user folders in a part of the user profile which is deleted automatically on logging out. We have developed a work-around. Contact the Help Desk to have this applied for you.
How do I create/edit Environment Variables in Windows?
To create/edit your own Environment Variables, right click Computer, click Properties, click Advanced (top menu option), then click Environment Variables near the bottom of the box.

The first list is the User variables, the second list is the System default setup environment variables, which you can't change.

In the User variables, click New to set up a new Environment Variable, a box will appear, put the name of the variable, e.g. CLASSPATH, in the first option, and in the second option put the path of the required classes/jar files e.g.:

c:\program files\java\jdk1.5.0\jre\lib\ext\j3dcore.jar;c:\program files\java\jdk1.5.0\jre\lib\ext\j3dutils.jar;c:\program files\java\jdk1.5.0\jre\lib\ext\j3daudio.jar;c:\program files\java\jdk1.5.0\jre\lib\ext\vecmath.jar;.;%CLASSPATH%
and then click OK to save the new Environment Variable.
Where can I find my HW Email?
Heriot-Watt University uses Microsoft Office365.
How do I setup my first AppInventor Project?
Refer to :-
AppInventor Project Setup
I saw a message about an email virus. What should I do?
Most of these messages are hoaxes. It is not actually possible to activate a virus simply be reading an email message. What is possible is that a mail message may contain an attachment, such as a program, or a Word document, which could contain a virus. However just reading the mail would not be enough, you would have to run the program or start Word, etc., in order to activate it. Common hoaxes include the following. "Microsoft Update", "Good Times", "Deeyenda Maddick", "Irina", "Join the Crew", "Penpal Greetings", "Returned Mail" & "WIN A HOLIDAY". Just ignore any message you get about these.
The PC says I have a virus on my disk, what do I do?
All the MACS Windows PCs run two different virus checking programs, McAfee VirusScan Enterprise and Microsoft ForeFront, which continuously check files whenever they are accessed. Either or both of these programs will normally disinfect or delete infected files. If they fail to do so then contact the help desk.

You will normally see icons for these two programs in your taskbar, a red shield and a green shield respectively. Right-clicking on these icons allows you to bring up the properties or start a complete or partial virus scan.