Q: How do I set the printer that my print jobs should go to?

As of Dec. 1, 2005, if you do not set the printer your printouts should go to, it will be thrown away. The method to set your printer is different for Windows and Unix (Linux or Solaris).

For Windows

  1. Setting a printer for an individual print job

    Most Windows applications will allow you to choose the printer from a menu when you try to print something. Choose the appropriate printer.

  2. Setting a printer for a session

    To set a default printer for a login session (i.e. this setting will be forgotten once you log out), you can go to the printer settings control panel:

    Start -> Settings -> Printers

    then bring up the printer menu by placing the mouse over the printer's icon you want to print to and right-click, then select

    Select As Default Printer

    A check mark should appear over the printer icon of your choice.

  3. Setting a permanent default printer for a workstation

    To set a permanent default printer (for the workstation you are using: you'll have to repeat it for another workstation), go to

    Start Menu -> Run ...

    Then, type the following into the text input window:

    \samba\win-share\SetDefaultPrinter

    Then double-click the appropriate printer batch file. From then on, that will be your default printer for this particular workstation.

For Unix

  1. Setting a printer for an individual print job

    Some application (like firefox) will allow you to choose the printer. Most printing is done from the command line via lpr. You can tell lpr where to send the output to via the -P switch:

    lpr -Pname file ...

  2. Setting a printer for a login session

    To set a default printer for a login session (i.e. this setting will be forgotten once you log out), you can set the environment variable PRINTER. In tcsh (the default shell), you can enter

    setenv PRINTER name

  3. Setting a permanent default printer for your MathNet Unix account

    To permanently set a default printer for your Unix sessions, you can enter the above command to set your PRINTER environment variable in your startup script, found in your home directory:

    ~/.login

Q: How do I check printing status?

SYNTAX

     lpq -Pprinter

EXAMPLE

     lpq -Php5

Q: How do I use 'enscript' to print a non-text or non-ps file?

PDF FILES

First use acroread to open the file. Then use acroread's "print" menu.

JPG AND GIF FILES

First use Firefox to open the file. Then use Firefox's "print" menu.

For text files, you can first convert them to ps files before you print them. You can use Unix command "enscript" to do this. Enscript converts text files to PostScript and spools gen- erated PostScript output to the specified printer or leaves it to file. If no input files are given, enscript processes standard input. Enscript can be extended to handle dif- ferent output media and it has many options which can be used to customize printouts (Use command "man enscript" to find more information).

SYNTAX:

enscript [options] filename

OPTION EXAMPLES:

         -1, -2, --columns=num
                 Specify how many columns each page have.  With  long
                 option  --columns=num  you  can  specify more than 2
                 columns per page.

         -a pages, --pages=pages
                 Specify which pages are printed.  Page specification
                 pages can be given in following formats:

                 start-end
                         print pages from start to end

                 -end    print pages from 0 to end

                 start-  print pages from start to end

                 page    print page page

                 odd     print odd pages

                 even    print even pages

         -A align, --file-align=align
                 Align separate input files to even align page count.
                 This  is  handy  for  two-side  and  2-up  printings
                 (--file-align=2).

         -b header, --header=header

EXAMPLE

          enscript foo.txt
                  Print file foo.txt to the default printer.

          enscript -2 foo.txt
                  Print file foo.txt to two columns.

          enscript -2r foo.txt
                  Print file to  two  columns  and  rotate  output  90
                  degrees (landscape).

          enscript -G2rE -U2 foo.c
                  gaudy header,  two columns,  landscape,  
                  code highlighting, 2-up printing.
Q: Where does/did my printout go?

Windows

To find which printer is the default printer using Windows, go to the printer control panel:

Start -> Settings -> Printers

The default printer will have a check mark over the icon.

Unix (Linux, Solaris)

Under Unix, the default printer can be found by looking at the output of

lpq

For example, the output may look like

   Printer: pulp@viol  'Lexmark Optra Se3455, Rm209 (1-sided)'    Queue: no printable jobs in queue       Status: job 'smith@viol+232' removed at 20:15:34.286          Filter_status: done at 20:15:34.271    

The default printer is named "pulp" and it's located in Rm209. The last printout was sent by user "smith" at 20:15:34. To send it to a particular printer, you can supply the "-P" flag to the print command:

lpr -Ppulp file ...

If you have a missing printout, first make sure that the printer you intended to print to to was actually the printer used (Unix: use the lpq command to see that your username was the last finished job and that the room location is what you expect). If the printout is still missing, it could be that

  • You sent it to the wrong printer. Don't just keep resending your printout without finding out what happended to it.

  • Somebody mistakenly took your output.

  • You have not set the printer that your print job should go to and sent it to the default 'null' printer. See note at top of this page.

  • The file has Postscript errors and can't be printed. Try viewing the file with Ghostscript to see if it is well formed. Also, try printing from within the same room as the printer so that you can observe the printer. If you suspect it is a Postscript error, contact the IT staff.

  • You are trying to print something other than letter size (8.5x11.0inch) paper. This is especially common with European print-ready files formatted for A4 size appear which is not commonly used in North America. You'll may have to reformat the paper in this case. Check the LCD window to see if it complains about not being able to supply the correct size paper.

  • The printer is jammed or is out of paper - the output of "lpq" will have pending jobs to be printed (and your is last in line) and the LCD window on the printer has an error condition. In this case, contact the IT staff. Unless you know what you are doing, don't try to repair it yourself.

  • You tried to print a file the printer does not understand. You ought to get a shingle sheet stating that it could not print your file format. In this case you'll need to convert the file format to something the printer can understand (like Postscript).

  • Configuration screw up: if you cannot explain why a print job disappeared, contact the IT staff. We can't fix it if we don't know about it.
Q: How do I make the printer print single-sided?

Most printers will print on both sides of the paper by default -- to make the print-out single-sided, try adding s at the end of the printer's name. 

Q: How do I add StatNet printers to my personal laptop/ desktop?

Update Mar 2018
Please use TCP/IP printing method

Do not use CUPS method below until further notice

Printers Info:

NOTES: Must be using wired to connect to local StatNet internal network in order to use our printers. 
You can not print from UBC wireless.
Alternate how to add printer usingTCP/IP HPJetdirect Socket printing.

Print server: cups.stat.ubc.ca
http://cups.stat.ubc.ca:631/printers

I) Windows Setup
Step1:
Find out which printer you want to add here:
http://cups.stat.ubc.ca:631/printers
Look at "Description" for the printer Model.
Download  PCL6 or PCL5 or Postscript driver from the Vendor site.
If your printer's Vendor doesn't have one, Windows/MacOSX/Linux operating systems comes with print drivers
installed.  You should choose one of these drivers that is as close as possible to the name of the printer.
Some "Generic Postscript" driver would work but you might lose some special functionality such as Duplex, Booklet.

Do not use "Universal driver"
Install the driver and notice where you install it "c:\....)

Step2:Click on Start -- Setting -- Printer and Faxes
    1.  Select add a printer
    2. Select add a network printer
Click on "Connect to a printer on Internet or home or office network.
    3. Put in for the URL :
       http://cups.stat.ubc.ca:631/printers/Printer_name
       Substitute the name of the printer for Printer_name.
Click Next
    4. For the print driver select correct driver which you have just
   installed.
Click "Have Disk" -- Browse --
Find location of your new printer driver, Select it and OK

II) Mac Leopard / Linux /Unix:
1) Add one printer: ( Mac OSX only)
Open "Systems Preferences" -- Print & Fax
Click on "+" to open 'Add Printer' window
Click "IP" icon then enter:
   Protocol: Select Internet Printing Protocol - IPP
   Address: cups.stat.ubc.ca
   (* "Printer_name" is the name of StatNet printer )
   Queue: printers/Printer_name     [ e.g. printers/hp5      ]
   Name: Printer_name                     [ e.g. hp5, Duplex       ]
   Location:                                           [ e.g. ESB mail room ]
   Print Using: Select Printer Softwares  (ie.  HP Laserjet Enterprise M605 with Duplex option)
                         Check:  Duplex Unit
Click Add

Repeat for each new printer.

2) If you want to have ALL StatNet public servers
WARNING Mac OSX: it will remove ALL your old printers and the removal of the previous printers is not undoable.
Add the following line to /etc/cups/client.conf as root:
     ServerName cups.stat.ubc.ca

Q: How do I bogofilter out spam?

Bogofiltler needs train/retrain often to make it works 100%
See this URL for how it works
http://www.bogofilter.org/

We use the term "ham "for email you want, "spam" for email you don't want.  We also assume you save your ham/spam and others email in mail/ folder.  See Notes below of you only have Mail (uppercase) folder.

  1. Login to  SUN Unix server only.
  2. ssh your_login@stat.ubc.ca  (Be.stat.ubc.ca)

I have have a copy of spam folder for you to start training bogofilter manually.

First step, you need to save lot of spam email to train bogofilter. 

          bogofilter -sM < /usr/local/data/etc/bogofilter/spam
 

Second step, you need "ham" email to train bogofilter. 
You can use any saved email (good known emails) as ham.
          bogofilter -nM <  mail/ham  
or 
          bogofilter -nM < mail/tha

NOTES: If you only see Mail (Uppercase) folder, do this 
          ln -s Mail mail
        
Bogofiler will store your database in your home dir ~/.bogofilter/wordlist.db

Edit your .procmail file using vi or emacs or pico by typing 
         vi ~/.procmailrc

  1. Add to content below:
    :0fw

    | /usr/local/bin/bogofilter -u -e -p

    :0e

    { EXITCODE=75 HOST }

    :0:

    * ^X-Bogosity: Spam, tests=bogofilter

    mail/Bspam

    :0:

    * ^X-Bogosity: Unsure, tests=bogofilter

    mail/Bunsure

    # Used during vacation: forwards to vacation, then makes a cc for # myself

    # Unhash 2 lines below to turn on your vacation

    #:0 c

    #|/usr/bin/vacation -t1d $LOGNAME

    Notes:  "Bunsure" and  "Bspam" are two "spam" and "not sure" spam files that bogofilter saved for you in the mail folder.  You need to check them often to make sure you don't have false positive or false negative. You need to sort  "Bunsure" and  "Bspam" into real "ham" and "spam" and "re-train "your filter to update your bogofitler database (wordlist.db)
                         

To enable the filter type

           vi ~/.forward

and add this line (Note: include the double quotes " ")

"|exec /usr/local/bin/procmail"
When you need to turn on vacation, do not use the "vacation" command to turn your vacation command. Instead add this line to your .procmailrc
# Used during vacation: forwards to vacation, then makes a cc for myself

:0 c

|/usr/bin/vacation -t1d $USER

Automation:
If you setup your as describe above, you can setup a cronjob to update your wordlist.db hourly
   crontab -e     (crontab editor = vi mode.  You can changes by edit your shell environment EDITOR=emacs)
               0 * * * * /usr/local/bin/bgupdate > /dev/null 2>&1

Manual update:
  After saving your new spam/ham form Bspam and Bunsure, run this
         bgupdate

You may need to run it twice the first time.

Advance option: Personalize your bogofilter:
If you want personal configuration for bogofilter, just copy this file /nfs/packages/bogofilter/etc/bogofilter.cf.example to your bogofilter directory.

cp /nfs/packages/bogofilter/etc/bogofilter.cf.example ~/.bogofilter/bogofilter.cf
Q: My email did not arrive or I did not receive the email, where did it go?

Reasons

There are many reasons that would prevent an Email from getting to its destination (whether that be your mailbox or someone else's). Here are some common reasons:

  1. Wrong Email address: either the username portion or the domain portion may be wrong. A common mistake is to include specific hostname to an Email address, such as "user@host.mail.domain" when the correct Email address is "user@mail.domain". You ought to get a notice of this ("bounce message").

  2. Mail too large: most places have restrictions on the size of a single piece of Email they will accept. Exceeding that limit will result in the mail being rejected. You ought to get a notification when this happens.

  3. Mailbox is full: our site enforce storage quotas. If your mailbox size exceeds your allotted limit, no Email can be delivered until you make more space available (i.e. delete some Email). See elsewhere in our FAQ to see how to check quotas.
  4. Mail server is busy or not operational: a mail server (either sending or receiving) may not always be available to immediately deliver mail. In these cases, mail will be queued and delivery retried at periodic intervals until the receiving mail server is available. If the mail server does not respond in a reasonable amount of time, the mail will be deemed non-deliverable, and a bounce message will be sent back to the sender.

    The retry interval and the total retry time policy is set by the sending Email server: at our site, mail will be retried every 4 hours for a maximum of 24 hours.

  5. Blacklisting or spam/virus filtering: some sites use blacklisting, or spam or virus filtering to try to detect unwanted mail and reject them. Depending on the mail policy at the offending site, the sender may or may not be given notice that mail has been filtered.

    At our site, we do employ blacklists and do virus filtering. The sender always gets a notice stating the reasons why their Email was rejected, but some Email users are not techically savvy enough to understand what's going on. If you suspect that Email being sent to you is being blocked, contact the IT staff (see below about reporting mail problems) and they may be able to suggests workarounds or remedial actions.

  6. Mail being forwarded incorrectly or mail loops being formed.

  7. The user has set lax permissions on their home directory. Our mail server, for example, will refuse to deliver mail to a user with a home directory that is world writable.

Most of these problems are apparent when an error message occurs (either from your mail reader or from a Email rejection notice).

How to report problems

When reporting mail problems, it is important to give as much detailed and accurate information as possible. Sometimes the only way to diagnose these problems (especially when the problem is days or weeks old) is by looking through the mail logs, and precise time/sender/recipient details are required to track the problem down. Email headers (envelope information) from Email (if available) is usually useful, and should also be included when reporting problems.

Q: Why is the practice of emailing large attachments to many receipients discouraged?

Sending large attachments via Email is an inefficient and wasteful way of disseminating information to a large group of people, as one copy is made for each recipient. It taxes the network, mail servers, disk storage of both the sender and especially the recipients, and sometimes the recipient's patience if they use a dial-up modem for their internet connection.

The typical scenario is that someone will broadcast information (and sometimes committing the double sin of formatting it in a proprietary format) to a mailing list that may contain hundreds, or even thousands, of recipients. A copy is then made for each individual recipient. So, for example, if 4 megabyte attachment is sent to a department mailing list with 250 people, an aggregate of 1 gigabyte of mail storage is used by this one message.

Some Email accounts (e.g. Hotmail, Yahoo) have size quotas, and sending large attachments to them will either fill up or severely reduce the available space for new mail.

It is also typical that not all of the recipients need or want the attachment, yet these recipients have already expended the considerable computing overhead to receive, scan or filter for spam and viruses, and store the large attachment.

A far better strategy is to post the information or file onto a web site (or FTP site if you have access to one), then Email out a short message that describes the contents and refers interested parties to the URL. This will allow people who want the data to pull the data off the web site at their leisure, and those who don't can delete the message without having incurred the overhead of receiving all the data in the first place.

Using this method with the above scenario, a 1K blurb instead of a 4Mb attachment will mean a three-orders of magnitude (1/4000th) reduction in computing resources.

Q: What is phish and why you should never divulge private information over email?

Pages