Important Information on Account Access, Printing and Java Version
- In order to access your computer account outside of lab time, you may use the lab in EN-2036 (in the Computer Science Dept. in the Engineering building), the computers in CP-2004 (in the Chemistry-Physics building) or in the Commons area of the Library. CS-1019 (in the Computing Services building) will not be open outside of regular lab times.
- In order to add money to your printing account from your student ID card, you can use the print accounting machine in the CS-1019 lab, the lab in EN-2036, the lab in CP-2004 or the Commons area of the Library. In order to check to see how much money is on your account, type acinfo in a Shell window.
- In order to print a lab or assignment from Mozilla Firefox, go to the File menu and select the Print... option. If you wish to print to a printer other than the default printer you can click on the Properties... button and change the print command to lpr -Pprintername where printername is the name of the printer to which you wish to print. For the printers in the CS-1019 lab you would use
lpr -Plabljet1 or lpr -Plabljet2. (See below for a list of other printers.) Click the the OK button and then the Print button in the Print window to send your print job to the printer. You may wish to print from the Mozilla web browser rather than from Mozilla Firefox. (Mozilla can be found under the Internet menu as well or by typing mozilla at the shell prompt.) The resulting printout from Firefox seems to have bolder text than printouts from Mozilla. The printing instructions are the same for both.
-
In order to print a regular text file (e.g., .java files and typescript files) from the Linux Shell prompt (e.g., ace $ ), you may use the a2ps command. This command formats the page with borders and includes some pertinent information about the file and user. The a2ps command has a number of options as follows:
-M letter converts the paper size to letter rather than the default A4.
-1 indicates to put one page of information to one sheet of paper, displayed in portrait mode.
-2 indicates to put two pages of information to one sheet of paper, displayed in landscape mode with a smaller font.
-E indicates to highlight the syntax of java programs, etc.
-Plabljet1 indicates to print to one of the printers in CS-1019; other printer names may be substituted for labljet1.
So a complete command to print a file to the printer called labljet1 in CS-1019 (see below for a list of other printer names) using a2ps, with syntax highlighting on letter paper, could be:
a2ps -M letter -1 -E -Plabljet1 filename (for one page per sheet)
or
a2ps -M letter -2 -E -Plabljet1 filename (for two pages per sheet)
Note: You must be in the directory which contains the file in order to print this way; otherwise you must specify the pathname for the file. Also if you are printing a typescript file, you may need to make sure that you type all commands/input in the script session perfectly so that there are no backspace characters in the file. If you use the backspace key during a script session, the typescript file may not print and you may have to run the script session again.
You can get more help on the a2ps command with a2ps --help.
When printing in a different lab (i.e., EN-2036, CP-2004, Commons), you may replace the name of the printer in the printing command (after the -P option) with one of the following printer names:
| Room No. | Printer Names |
| CS-1019 | labljet1, labljet2 |
| EN-2036 | linuxlj |
| CP-2004 | labljet3, labljet4 |
| Commons (in the Library) | icomprt1, icomprt2 |
- Note: Version 1.5 of Java is to be used in this course. In order to check to see which version you are currently using, give the following command at the shell window prompt: java -version. If you are not currently using version 1.5, then to change versions, first run the command java-config -L to see a list of available versions. Identify the line containing version 1.5 and run the command: java-config -s version_specification where version_specification is the specification listed in square brackets [] on the same line, next to the listed 1.5 version.
For example, if java-config -L gives the following list:
The following VMs are available for generation-2:
*) Blackdown JDK 1.4.2.03 [blackdown-jdk-1.4.2]
2) Blackdown JRE 1.4.2.03 [blackdown-jre-1.4.2]
3) Sun JDK 1.5.0.08 [sun-jdk-1.5]
you would issue the following command to switch to version 1.5:
java-config -s sun-jdk-1.5
Check your version of Java again after running the java-config command. If the version has not changed, you may also need to logout and log back in for the change to take effect. If you are using a machine in a different lab (e.g., CP-2004, EN-2036, etc.) you may need to go through this process again if your Java version is incorrect for that lab.