Important Information on Account Access, Printing and Java Version
- In order to access your computer account outside of lab time, you may use the labs in EN-1049 or 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) may be open outside of regular lab times as well (check the schedule posted on the door of the lab).
- In order to add money to your printing account from your student ID card, you can use the print accounting machine in the EN-2036 lab, the lab in CS-1019, 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, 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 printer in the EN-1049 lab you would use
lpr -Pcsaljet
or for the printer in the EN-2036 lab you would use lpr -Plinuxlj
(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.
-
In order to print a regular text file (e.g., .java files and typescript files) from the Linux Shell prompt (e.g., jay $ ), 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.
-Pcsaljet indicates to print to the printer in EN-1049; other printer names may be substituted for csaljet.
So a complete command to print a file to the printer called csaljet in EN-1049 (see below for a list of other printer names) using a2ps, with syntax highlighting on letter paper, could be:
a2ps -M letter -1 -E -Pcsaljet filename (for one page per sheet)
or
a2ps -M letter -2 -E -Pcsaljet 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, CS-1019, 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 |
EN-1049 | csaljet |
EN-2036 | linuxlj |
CS-1019 | labljet1, labljet2 |
CP-2004 | labljet3, labljet4 |
Commons (in the Library) | icomprt1, icomprt2 |
- Note: Version 1.6 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.6 then to change versions, first run the command java-config -L to see a list of available versions. Identify the line containing version 1.6 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.6 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) Sun JDK 1.6.0.03 [sun-jdk-1.6]
You would issue the following command to switch to version 1.6:
java-config -s sun-jdk-1.6
You should also 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 will need to go through this process again if your Java version is incorrect for that lab.