Carl Mason
carlm@demog.berkeley.edu
Summer 2008 version 3.12
focus behavior refers to the condition that determines which window recieves input from the keyboard. The standard rule is ``click to focus'' which means that the window on which you last clicked holds the focus until you click somewhere else.
It will save litterally minutes (over a your life time) if you select instead what is called sloppy of focus follows mouse under which behavior, the window in which the mouse currently resides gets the focus.
This allows you type into partially obscured windows and generally works better with X-style select and past functions.
Under Gnome, the focus behavior is set via the
[System]
[Preferences]
[Windows] menu.
[System]
[Preferences]
[Keyboard shortcuts]
is for doing this. Click on the function of interest and then, when prompted, type a keyboard combination to asign to that function.
The ``aplets'' that live on your various ``panels'' can be easily
created and accidently destroyed. The two most useful applets are the
Workspace Switcher applet which shows your ``virtual
desktops'' and allows you to switch between them;
and the
window list applet which shows your running applications.
To (re)create these or other panel applets,
on the panel to which you wish to add an applet. Then scroll to
select the applet of interest. Window List and Workplace
Switcher are near the bottom. Click the
to add the applet.
There are lots and
lots of gizmos and gimcracks besides Workspace Switcher and
window list that you can add this way.
If the application in question is in a menu, you can simply drag and
drop the thing from the menu to a panel. Just select the item in the
menu; click and hold
; then drag it to the panel wherein it
belongs.
If the item is not in a menu - or if you just like doing things the
hard way, you can add a ``launcher'' by clicking
over the panel to
which you wish to add the launcher and selecting
[Panel
Add to panel
launcher].
The resulting dialog box allows you to specify the command that launches the program and whether or not it should be run in a terminal window.
If the title bar is not obscured then just click and hold
the
over the title bar. If the title bar is obscured then of course you
cannot do the this. In this case your best option is to make sure that
the window you wish to move has the focus, then hit
+
. Click the
to release the window in a new location.
You can also move a window by clicking and dragging the
+
on its representation in the virtual desktop and dragging it.
The desktop in the current release of Fedora has a panel at the top of
the screen. If you need to recreate it
click the
on an existing panel, then select [New
Panel
menu panel]. The new panel might appear along a side
instead of the top, if it does, then click
and select
[properties] to change its ``orientation'' to something to your liking.
If the file is ASCII, PostScript, or pdf, you can simply type
@:
The -g flag causes a fancy border to be drawn around each page the -2 flag indicates that 2 pages per sheet is sufficient
For those who cannot be bothered with typing commands, there is also a GUI alternative, see 2.2.
kprinter is your best option. kprinter offers you menus and buttons that allow you to change the printer features. For example you can print n-up, or choose toner saving modes and perhaps do other morally virtuous printer related things.
To launch type:
@:
You can use either ap2ps (See 2.1) or kprinter (see 2.2) from within any application. The trick is to find ``lpr'' and replace it. Virtually all Unix applications, somewhere inside, use ``lpr'' to print. In the case of acroread, it's right under the print menu..right at the top in the box labeled: ``Printer Command''. Just change /usr/bin/lpr to kprinter.
Add paper - there boxes of reams in the Xerox room. Why not bring as many reams as you can carry without endangering your health and save other's the trouble.
Install a new toner cartridge - or if you're too chicken at least tell a grown up that something is wrong. Toner cartridges live in the Xerox room. They should be labeled as to which printers the will work in - if not check with Monique. Either way send Monique email informing her that you have used a toner cartridge so that another can be ordered.
To print from your portable windows machine on the Demog network see 7.8.
To print from your Mac one the Demog network see 7.8.2.
Several data file formats can be imported directly in to R via the foreign library. If the sort of data you want to import is not on the list below, then there is still a good chance that you will be able to use stat-transfer to convert it to one that is recognized by R.
Stat-transfer can convert just about any kind of file into a SAS transport format file or an ASCII delimited file, either of which can be read by R. Some information - such as SAS informats and labels - will be lost in this process, as there are no equivalent structures in R.
To read ASCII delimited files, the easiest method is read.table()
To read data from a tab delimitted ASCII file called 'truth.csv' with the first row of the file containing variable names the following should suffice:
;
Note the following gotchas with read.table():
To read and write non-ASCII types of files, use the foreign library. To access it you must enter:
To see how it works type:
Currently, the the foreign library supports the following file types
S3 read functions Read an S3 Binary File
read.dta Read Stata binary files
read.epiinfo Read Epi Info data files
read.mtp Read a Minitab Portable Worksheet
read.spss Read an SPSS data file
read.ssd obtain a data frame from a SAS permanent
dataset, via read.xport
read.xport Read a SAS XPORT format library
write.dta Write files in Stata binary format
All of these functions expect to be passed a file parameter as in:
Like Stata, R insists on holding all objects in core memory, this makes it a poor choice for data sets that are larger than 500 MB. Since tapinos has 10GB of RAM, large datasets can be processed in R and Stata, but you will surely want to do such things in batch mode.
@:
Import your SAS transport-format file into R:
objectname will be a dataframe.
Some files can be imported directly using methods contained in the foreign library, these include SPSS, Stata, Epiinfo and minitab (see the help pages on packageforeign for details). For other types, you may need to convert the file into a SAS transport or other convenient type. Stat-transfer (See Section 4.4.2) is great for this. Once your file is in say SAS transport format (See Section 3.1.1 for instructions on importing it).
Below is a chunk of R code that will draw a pretty nice population pyramid, please adapt it and improve it.
########################################################################
## Sat Mar 9 20:21:19 PST 2002
## Carlm's pretty good population pyramid function.
########################################################################
poppyr<-function(age.male,age.female,agecats=c(0,1,4,seq(5,100,5))){
##age.male is a vector of ages of males, age.females is a vector of the
## mean batting averages of the New York Yankees, agecats is a
## vector of break points of ages -- defaults to a pretty standard
## one
##
## Will draw a pretty good but not quite perfect population pyramid
male.ac<-table(cut(age.male,breaks=agecats))
female.ac<-table(cut(age.female,breaks=agecats))
## 5/13/04 Megan Heller reports that some alternative 'figs'
## values can improve the appearance of the population pyramid
## by eliminating the space between the sexes. Here are
## Megan's suggested values:
# ##this one looks best in terminal
# split.screen(figs=rbind(c(0,.58,0,1),c(.43,1,0,1)))
## this one looks best in png (png files are the easiest to
# import into MSWord -- not that you'd ever want to do that.
# split.screen(figs=rbind(c(0,.58,0,1),c(.38,1,0,1)))
split.screen(figs=rbind(c(0,.57,0,1),c(.45,1,0,1)))
screen(1)
barplot(female.ac,horiz=T,names=paste(agecats[-length(agecats)]),
xlim=c(max(female.ac)*1.1,0),col="#FF9900")
title("Female")
screen(2)
barplot(male.ac,horiz=T,axisnames=F,
xlim=c(0,max(male.ac)*1.1),col="#0000FF")
title("Male")
close.screen(all=T)
}
age.male<-rnorm(10000)*50
age.female<-rnorm(10000)*50
poppyr(age.male,age.female)
mtext(side=3,line=3,text="Population Pyramid",cex=1.5)
You might want to do this if you have two vectors of data which have very different scales but which are both thought to be related to a third vector. In other words, you have two y-vectors which you would like to plot against a single x-vector.
The trick is to use the par(new=T) command, which tells R not to reinitialize the plotting device with subsequent high level commands (such as plot() which would ordinarily cause this to happen. Instead, R will superimpose subsequent plots on top of what is already displayed on the current device.
You will most likely also want to use axes=F argument to one of the plot() commands. This argument supresses the drawing of axes.
##################################################
## this will create a scatter plot displaying
## two sets of points, one corresponding to the
## y axis on the left and one to the y axis on the
## right
##################################################
dev.off() ## start with a new graphics device
# X11() or postscript()
plot(x<-rnorm(100),y<-rnorm(100))
z<-rnorm(100)*250
par(new=T) ## Tell R not to reinitialize graphic device
## for subsequent plots
plot(x,z,col='blue',axes=F)
axis(side=4,col.axis='blue')
par(new=F)
(Thanks to tmiller) There should be an easy way. Meanwhile, here is a hard way that works:
# Set margins on yaxis side large enough (10.1?) to accomodate ``foo'' par(mar=c(5.1,10.1,4.1,2.1)) par(las=1) # print axis numbers horizontally # Don't print y-axis text label plot (x,y, ylab=" ) # Print y-axis text label horizontally mtext(``foo'',side=2,line=4)
Load the library:
Create an object of type ``xtable''.
Print the object to a file:
Inside your latex file add:
\input{table42}
The xtable() function has special tricks for several objects that it knows about. For example:
To see a list of objects that xtable() knows about type:
See Section 3.3.1 for a description of how to make latex tables from R objects. the xtable() function can be instructed to create HTML instead of latex. Also see Section 8.0.5 for a description of how to translate latex into very nice HTML.
Files such as jpeg, gif, bmp, pnm, png, tiff, ppm and lots of others. What distinguishes these file formats from say PostScript, is that the information they contain is where to put a bunch of dots. PostScript, WMF, CGM and others are ``Vector'' formats. They contain information on lines and shapes which the computer then converts into points when rendering it on the screen.
@:
@:
Each of the above commands produces a file called filename.pdf. NOTE: if your postscript file is the output of dvips it will look much better if dvips was given the -Pcms option.
On a linux machine, this should work:
@:
@:
@:
@:
Both gimp and ImageMagic can be used to edit and convert among graphic types also.
Generally this is useful for including a postscript file in MSWord.
Use epstool:
@:
Then in Word: [Insert]
[Picture]
[From File].
The low resolution .tiff preview will appear when editing in Word, the
high resolution postscript file will appear in the printout.
@:
where filename is the .tex version of the file.
The documentation can be found at http://netpbm.sourceforge.net/docVersion 10-6 is installed for the linux workstations.
Note that netpbm does not have a graphic user interface. These are utility programs that work from the command line. If you want to edit graphics files see 4.3.2
There are lots of choices for editing graphics files. The most comprehensive and therefore complicated is ``gnome image manipulation program'' or gimp. Gimp can edit just about any file format including postscript and it can do just about anything to it. It is not easy to use but it is very cool.
To launch gimp either find it in the menu or type
@:Lots of documentation is available at http://www.gimp.org/tutorials.html.
A somewhat simpler graphics editing program is ImageMagic to launch it type
@:
documentation is available at http://www.imagemagick.org.
The hexbin program (on linux) will convert macintosh files to something readable. Use the -3 flag and look for the some-file-name.data.
@:
NOTE: some-file-name need bear no relation whatsoever to filename. hexbin -3 will give its decoded file(s) names which are encoded in the binhex file itself. The binhex file can be named anything. You probably got it as an email attachment and saved it under some arbitrary name. For this reason it might be smart to unpack your binhex files in a nearly empty directory.
To launch stat-transfer type:
@:
then from the stat-transfer prompt (
) you can generally convert
files using the cp as
where ext1 and ext2 represent the more or less standard file suffixes. See http://www.demog.berkeley.edu/Refs/stat-trans.unixman.pdffor more detailed instructions.
NOTE if you happen to need to convert files that are over 2GB in size, st will probably fail. A special version of st, called stl exists on our system. It is not a production version, so it probably will fail in ways that st will not, but for large files it's worth a try.
@:
@:
Browse to https://calmail.berkeley.edu and rather than just login in as you generally do - look in the left column and click on ``manage My account''. Login with your calmail userid and password and the resulting screen will present you with a link called Manage mail forwrading and automatic (``vacation'') responses. It's pretty obvious from there.
Here are the two steps:
famousprof@highstatusdept.wellknownschool.edu
@:
Simply erase the .forward file when you wish to discontinue forwarding.
A .forward gotcha:
\userid'' instead as
in
\peon, famousprof@highstatusdept.wellknownschool.edu
If your stay at Berkeley is over and you just want to keep getting demog mail for a few more years, let us know. We can close your account and still forward mail indefinitely. For security reasons, it is unwise to have a lot inactive accounts on the system.
@:
(the leading ``.'' matters).
This will divert about 52 percent of your spam into a ``folder'' called DivertedSpam5.1
You can modify certain aspects of Spamassassin's behavior, by editing
the file
.spamassassin/user_prefs. The most useful features
are ``white'' (``black'') listing of specific email address that you
always (never) want to hear from.
The ``required_hits'' parameter might also be worth experimenting with. Spamassassin works by assigning points based on an email messages content and a large set of rules. When the ``required_hits'' threshold is reached, the email is considered spam. If you really want to make Spamassassin effective, you will want to read Section 5.3.2.
Every night a program will digest your SPAM file (``folder'') and create a spam filter based on it. The documentation insists that it is equally important to save false positives - that is email messages which Spamassassin falsely categorized as spam - into a file (``folder'') called HAM. Experience seems to indicate that this is difficult to do because very few legitimate messages ever turn up in DivertedSpam and not necessary, for pretty much the same reason. However everyone's spam is a little different so this might work for you.
All the workstations in the department are setup to use pine. So if all you want to do is read and write email, pine is the faster-cheaper-better way to go. If, however, you prefer a more pointy clicky application and you are looking for something to distract you from studying for prelims, you can have a go at configuring thunderbird or (on your home machine) some other IMAP aware email processing program. See 5.6 for directions on configuring thunderbird.
We also operate a web based email system called ``Squirrel Mail'' (it's the same one that calmail operates). It requires no configuration - you simply point your web browser at https://www.demog.berkeley.edu/sqmail - NOTE it's https rather than http. For details see 5.9
From the desktop look for it in the [Applications]
Internet menu.
From home you can use any of the methods outlined for reading email from the department. That is: pine, some other email agent, or Squirrel mail. If you have a Linux machine at home, pine is probably already installed. If you run some other OS, you may need to install it. It's free from http://www.washington.edu/pine.
Any email agent will work so long as it is capable of:
Most modern email agents can do these things. Referring to 5.6 might be helpful in figuring out how to configure your particular email agent.
Squirrel Mail is also an option. See 5.9 for details.
Pine needs to know where your inbox is stored. Telling pine the name of the IMAP server inside curly brackets and the encryption method is sufficient. The ``novalidate-cert'' directive - used here and elsewhere suppresses a complicated but harmless warning screen that notifies you that our certificate is homemade and should not be trusted. If you leave out novalidate-cert you will have to hit and extra keystroke (Y) to ``continue'' when you see it. The tls directive indicates that we must use ``Transport Layer Security''.
Folder-collections refers to the place that stored email is kept. On our system this must be mail directory. Pine requires the name of the server in curly brackets followed by ``[]''.
(where
youruserid
is your userid at the Demography Dept).
The SMTP server is the only configuration directive that does not use
the name of the IMAP server - it requires instead the name of the
SMTP server (surprise). These are entirely distinct operations
(see 5.14 for tedious details). The key difference for
configuring pine is that the SMTP server in not enclosed in
those curly brackets. The ``:2525'' specifies the use of a nonstandard
port for SMTP connections. This is not always necessary - but many
ISP's now block traffic on the default port, 25.
If you already have a pine addressbook (at the department) on which your life depends, you will want to make sure that you can access and modify it from home as well as from the department. In that case read on. If, on the other hand, you are just fine having one addressbook at home and one at the department then skip this step.
Pine keeps addressbooks in one of two formats. If the addressbook is specified as local file then pine stores it as a plain comma delimited ASCII file. If the addressbook specification includes the name of an IMAP server, then pine maintains it in complicated ASCII format that looks like a mail folder.
So, if your goal is to have one single addressbook that you can use with pine from home as well as at the department, you need to do two things: (1) get all of your address information into a remote format addressbook file; and (2) configure pine at work and at home to consult that file via IMAP.
To convert a plain ordinary .addressbook file into one suitably formatted for remote access over IMAP, you can invoke pine with some fancy arguments:
@:
You will be prompted for your userid and password and the usual certificate warning will appear.
NOTE:
NOTE that you can (and maybe should) change your pine configuration at the department to use this new remote-format addressbook.
NOTE again: there is no standard addressbook format whatever email agent you use will have it's own idea of what addressbooks should be so making your addressbook remotely accessible via pine will not do you any good with say MS outlook.
These directions are for setting up thunderbird for use at the department. The same configuration arguments should work for you from home. Thunderbird is free and open source and available for mac and windows as well as Linux at www.mozilla.org. If you do not use Linux at home (yet) then there may be some minor differences these directions should be of some help. Hopefully, other browser based email agents will be configured simillarly.
First launch the application:
@:
If it is the first time you have launched it, a dialog box will appear to get you started. In most cases the defaults are fine. Below are some places where the defaults are faulty. After the wizard is done with you, you will need to configure the Transport Layer Security options. The procedure for that is also described below.
After completing the wizard dance, you will be prompted for
passwords. Just hit
. You'll have to configure the
Transport Layer Security features before this will work.
Both SMTP and IMAP use encryption and require configuration. See 5.13 and 5.14 for a general description of what these are.
In the dialog box that now appears, you should be able to select ``Outgoing Server SMTP'' and by selecting that link, you should be presented with a set of radio buttons, one of which will enable TLS. Do that. NOTE: The default port for SMTP is 25 BUT many ISPs block that port in a futile attempt to thwart spammers. Our SMTP server will also answer on port 2525 - so you might wish to specify that as an alternative to 25.
Close the dialog box now and you should be able to click on the ``inbox'' icon on the left side and be prompted for your password.
During the authentication process, you will at various times receive some dire, yet not immediately comprehensible messages regarding ``self signed certificates''. Because real certificates cost money, we are indeed using home made ones. For our purposes, this is secure enough. Click ``UK'' or ``continue'' or whatever you need to to make mailserverit go away. If you click properly, you will be allowed to access your email.
If you really must do this, good luck. We do not support this because it is a bad thing, but presumably you are a grown up now, so here are some clues. These are provided by an anonymous user - no one here will admit to actually having tried this:
Here are notes for using Outlook Express (and presumably Outlook) with
our IMAP setup.
--------------------------------------------------------------------
1. Create a new account for your demography connection
Tools/Accounts/Mail/Add
2. Use your user@demog.berkeley.edu email address
Incoming is IMAP server
Incoming server: imap.demog.berkeley.edu
Outgoing SMTP server: smtp.demog.berkeley.edu
Account name: your login id
Password: leave blank
SPA: unchecked
3. Before exiting Internet Accounts, edit the Properties of the newly
created account.
Advanced tab: Under Incoming mail(IMAP) check 'This server requires
a secure connection (SSL). The port number should change from 143 to
993. For Outgoing (SMTP), also check secure. The port should read 25.
When you are on the road and do not feel like installing and configuring anything - perhaps you only have access to a computer in an internet cafe or a public rest room - your best option is Squirrel Mail
Squirrel Mail, is the the department's web based email processing facility. You can find it at https://www.demog.berkeley.edu/sqmail,or from the department's main website. See 5.9 for more details.
Squirrel Mail is pretty easy to use, but if you get more than a few messages a day, you will find it impractically slow and clumsy. It's main use is for when you are on the road and don't feel like installing software on your mother in law's apple 2e in order to read your email.
Procmail is a general purpose email filter. You can use it to automatically put email in folders (instead of your default inbox); delete certain kinds of email before you see it; forward certain email to your mom; or run an arbitrary program. Procmail works by checking each email message against regular expressions, so you can select which email should get which treatment according to the presence of any text string anywhere in the message - header or body.
Procmail was once practical way to filter out Spam, but the world has moved on and that job has become far too complicated. For a more effective and far lower effort Spam filtering tool, see Section 5.3.
Simple. Just create a file called .vaction_msg in your home directory and put your outgoing message in it. Use any editor your like (MS Word is not and editor). While that file exists, any email message that is not busted for spam or virus content, will be delivered as usual to your inbox. But in addition, the sender will receive a message constructed from whatever is in your .vacation_msg file. The message should probably indicate when you will return, but whatever.
To disable the autoresponder simply delete the .vacation_msg file.
NOTE that the ``.'' in .vacation_msg is significant.
By storing your mail on the server, you can access all of your new and old messages from any machine in 2232 or 2224 Piedmont as well as from your machine at home - or from a machine somewhere else in the world. If you lose your laptop computer, or your house burns down - or even if you die, your email will all be in one place conveniently accessible from anywhere in the world.
IMAP compliant email agents (most of them now) will insist on (some of) the following information in order to retrieve and manipulate your email from our IMAP server. See 5.5 for instructions specific for pine.
SMTP servers are entirely independent of IMAP servers. SMTP servers talk to each other and to programs which deliver mail to users' inboxes. IMAP servers let users manipulate their inboxes and their stored mail folders. Since inboxes and stored mail folders are just just plain old ASCII files, SMTP and IMAP servers need know nothing about each other.
Email programs need to know either the name or ipaddress of the SMTP server you wish to use. If you are using an SMTP server provided by your ISP, you might not need to specify anything other than the server's name or address. If you are using the demography department's server from outside of the department, more information will be required.
In order to slow down the spammers, our SMTP server required encryption and authentication. By refusing to relay messages for anyone who cannot provide a valid userid and password, we deny SMTP service to spammers - unless of course you are a spammer.
Our SMTP server uses the same userid, password and encryption scheme as our IMAP server. That is Transport Layer Security (aka ``STARTTLS'') and PLAIN authentication (aka ``password'').
There are currently two scanners one is Most likely in the basement lab connected to census the other is probably in the library connected to logit. The scanner in the basement is a ``document'' with a 20 page ``auto document feeder''. The scanner in the attic is a ``flat bed'' scanner. The forer is suitable for scanning one or two sided documents (probably into .pdf format) that latter is useful for scanning images one at a time.
So, once you have a shell on census just type:
@:
where document.pdf is the name of the pdf file that you would like to create from the scanned images. scan2pdf will prompt you as to whether you like 1 or 2 sided scanning.
Before going down this road ask yourself it it is posible to either convert a .pdf into what you want or to use .pdf instead. It's going to be a lot simpler if you can. See Section 4 on file format conversion for more information.
Well if you must scan into something other that .pdf, then you'll need to use the scanadf command. The scanadf command produces a file for each page in your stack of documents. Those files will be in .pnm format, which though seldom used, is easily converted into just about anything via a pnmto-whatever command. See Section 4.3.1 for information on the netpbm pakage, which allows you to convert .pnm files to all sorts of other types.
Note that the ``-y 279'' refers to the length of the page(s) being scanned. 297 conresponds to 11.5 inches. ``-mode 'Lineart''' is good choice for black and white documents. There a lot of options that you can experiment with, all of which are explained in the man page for scanadf.
Once you have located the flatbed scanner (look in the attic) and politely made sure that no one else is using it, you can get started. The scanner makes very little noise when not in use, and has no on/off switch. If logit is on, then the scanner is probably on as well - especially if it is plugged in.
Get a terminal window on logit (either by logging in or ssh'ing from another machine) and type
@:
For tediously detailed instructions, see 6.3.1
The result should be the main xsane dialog window and the preview window shown in shown in figure 6.1
You can determine the format of the image file via the
pull-down menu. The default type .pnm is easily converted
to other types - but if you know what you want, and it's in the
menu well...
@:
The process by which graphic images of written text are transformed into editable text files is called ``optical character recognition'' or OCR. We do not have an OCR program running locally, but don't despair. There is a site on the web that will do this for you and Gene Hammel says it works pretty well.
Here is Gene's description:
Subject: Re: ocr
http://docmorph.nlm.nih.gov/docmorph/
Contains a good deal of information. Basically, a user must register and have a password, then can log in and do all kinds of graphic and text file conversions (except from pdf to anything else). You upload the file to be transformed, you are informed when it is ready to download, and that's it. It all takes place on the WEB page, in interaction with the file browsing abilities of your own OS.
I had scanned 18pp of typed text at 600 dpi. These were *.pnm files. Each was about 1 MB. I read the instructions on the docmorph page, then sent and received each file separately.
First you click on a link to upload a file. You can type in the path or browse for it, then click submit. After it uploads you get a message saying to wait; it takes 12 seconds to process a page. Then a link appears that allows you to download the file, which appears in your WEB browser. I then saved this page as *.txt; the file naming is automatic. Then I clicked the other link, to upload a new file, and went through the process again.
There were no difficulties whatever. The OCR seems to be perfect although I have yet to read through it. The txt files are about 3 KB each. The only problem is tables; these do not preserve their original format, and I need to inquire of their tech support how to do this.
It might have been simpler if I had catenated all the pnm files and uploaded just one file for conversion. But I do not know what happens to a set of pnm files when catenated, and it might be tricky to get them in the right order if one used a regexp in the cat command line so as to avoid a lot of tedious typing. Something like cat file[0001..0055].pnmallfiles.pnm might work.
In short, I do recommend it.
For our present purpose, there are two kinds of ``afar'' :
If case 1 obtains, you will need to get your laptop on the network before worrying about how you should connect to the Demography Lab. See 7.5 or (7.6) to get your wired or (wireless) connection working.
The Demography Lab is accessible only via encrypted connection. Telnet, and rlogin are not encrypted so you cannot use those. If your personal computer runs linux or mac OSX, ssh is probably installed and usable, just open (``Terminal'' on a mac) and shell type
@:
NOTE that this is also the command you would use to connect to a server from within the local network - except instead of demog.berkeley.edu you would type the name of the server e.g. tapinos, or coale.
If you are running Windows, below are two other options.
In order for ssh to work with X11, thereby allowing you to launch application on a Unix server and control them from your mac, ``x11 tunneling'' needs to be turned on and you need to add a -Y flag.
which are:
@:@:
or you can by some other means edit your /etc/sshd_config file and change the default setting of :''#X11Forwarding no'' to the more useful ``X11Forwarding yes''.
After that change, you can run ssh in a mac terminal window:
@:
The -Y is required for mysterious reason, the -l username is required if your username on your mac is something different from your username on the demography system.
Note that in order to use X11 effectively you will need both a functioning X11 server on your local machine and an encrypted login shell such as ssh See 7.1.1.
Once you have installed X11 you just need to:
Currently we have a 802.11G wireless access points on each floor of 2232. In order to communicate through it you must:
Access to the wireless network is controlled by ``mac address'' so until you tell us yours, the access point will not communicate with your device. If you have no clue about mac addresses see 7.9
See 7.10 regarding the security implications of wireless access.
If you have secure shell installed on your home computer, you can use sftp. The sftp program functions somewhat like ftp - which we no longer use as it is not encrypted.
If your home machine runs Linux, you would type:
@:
after logging in, you can move around and find stuff using cd and ls. To move a file to the machine you are sitting in front of, type get filename to move a file to the Demography Lab network, type put filename.
Under MSWindows, the ssh which you can download for free (as long as you affiliated with UCB) see 7.2, has sftp application with a reportedly ``easy to use'' interface.
NOTE: sftp is picky about what it sees on STDOUT. If your .tcshrc file echo's a message, it is possible that sftp will hang after taking your password.
Here's a simple example of how to move all the files from a directory called dissertation in your Demography Lab home directory, to directory called backup/dissertation on your home computer.
Assuming your home computer runs Linux, of course:
@:
If you have a Linux machine see Section 7.8.1. If you have a mac see Section 7.8.2; for windows see Section 7.8.3; for very old windows machines see 7.8.4
If you have managed to connect your machine to the network, and you have at least Mac OS X 10.3 running, then you're done. Just print from your application. You might have to look for [shared printers] in the dialog box. (Macs, being Unix machines also run CUPS).
If sufficiently similar drivers are not already installed on your machine then you will need to acquire them and use the ``have a disk'' option. To acquire the drivers you can either:
After downloading, unzip the file and remember where you put it.
The next step is to
select
instead of an installed driver, and navigate
either to the the ``network drive'' that you mapped above, or
to the place where you unpacked the drivers that you already
downloaded.
If your windows machine is very old (but not so old that MS no longer publishes security updates - in which case please do not connect it to the network), then the following procedure, thoughtfully supplied by Peter Brownell might work for you. Peter successfully used this for a Windows 2000 machine, things might be a little different for whatever old clunker you have.
Peter Brownell's Unoffical How to for connecting to the Demog network to print under windows 2000 (and use other useful utilities). Written 5/5/06 The Owners Manual says to ``Browse to Population.'' I found some more detailed advice (for a different network) at: http://www.its.caltech.edu/win/cwin2k.html Here's what I did: Before beginning, I had registered my MAC address with Carl (required) and also installed Netswitcher from software.berkeley.edu (recommended). I also turned off my firewall software, since it kept asking me if various things could connect and I sometimes got ``not found'' errors if I didn't click OK fast enough. Plus, the network is already behind a hardware firewall. 1) Change your ``Workgroup'' to ``Demography.'' You can do this in Netswitcher, under the ``General'' tab OR right-click on ``My Computer,'' click the ``Network ID'' tab, click ``Properties,'' and edit the Workgroup setting. 2) Physically connect to the network and confirm that you can (for example) browse the internet. 3) Click on ``My Network Places,'' then ``Computers Near Me.'' If all is well with your ``Workgroup'' setting, you should see Boserup, Brass, Demog, Demography, Population, and your computer. You should be able to browse into any of the shared directories (you might have to enter your Userid and Password). 4) Go to Start -> Settings -> Printers and click ``Add Printer.'' Choose ``Network Printer,'' hit Next, leave printer Name/URL blank and click Next, I found the printers showed up under Brass (although the Manual seems to imply you would find them on Population). Choose the printer you want to install and click Next. 5) Windows should tell you that you have to install printer drivers on your local machine, click OK. then Choose ``Have Disk,'' then ``Browse'' then browse My Network -> ...-> Demography -> Population ->printdrivers and look for the the folder for the printer you picked. Pick the driver - I'd suggest the postscript (PS) rather than PCL. You probably don't want to make this your default printer when Windows asks, unless you mostly print here. Finish the installation. 6) Test by printing a page. Yea!
The ``mac address'' also goes by the names ``ethernet address'', ``hardware address'', ``station address'', ``ethernet id'' and ``physical address'' and perhaps there are others. It is a 12 digit hexadecimal number generally shown with a ``:'' separating each pair of digits. Since it's hexadecimal, digits include the letters A-F. For example: ``00:0C:76:00:4A:FA''.
In most cases the mac address will be printed somewhere on you network card. If not, your computer can tell you. Under Linux the command is /sbin/ifconfig. The numbers you want will be labeled ``HWaddress''.
Under Windows, if you can find a ``command prompt'', you can type: ipconfig /all. The answer will be reported as ``physical address''. NOTE that there may be more than one such physical address so make sure you get the one associated with the wireless card. (Thanks to Sarah Staveteig for this)
Here is a helpful site with more instructions on how to find your mac address under various OS's: this http://www-dcn.fnal.gov/DCG-Docs/mac.
Be especially vigilant if you have two or more network devices. Each such device has its own unique mac address. Make sure the mac address you give us is associated with the device that you plan to connect to the LAN with.
Not very secure at all. We restrict access to the network according to mac address, but we do not encrypt connections. Consequently a talented moral defective will be able to read the information that travels to and from your machine unless you make sure that communication is encrypted. Most important/private information such as credit card numbers typed into websites will be encrypted, as will your email if you use Squirelmail(See 5.9). Everything else ... well since you have nothing to hide, maybe you don't care.
A good place to start is with the Not so short guide available at http://www.demog.berkeley.edu/Refs/lshort.pdf. There are also several pretty good books on using LaTeX. Unfortunately the tend to be rather expensive. There should be a few copies of LaTeX: A Document Preparation System by Leslie Lamport lying about the lab.
http://www.demog.berkeley.edu/TeX
Emacs is by far the best way to edit LaTeX documents. By visiting a buffer/file with a .tex suffix, emacs should put you in ``LaTeX'' mode all sorts of good things will follow therefrom. Documentation on Auctex can be found at http://www.demog.berkeley.edu/Refs/auc-tex.ps
yes pdflatex can do this.
@:
But embedded graphics are lost, so if your document is just text this is quick.
If your document has embedded graphics then the two step process below works very well:
@:
The command
{\use{hyperref} is a nice package to include in documents that
are bound for the web.
There are two pretty good choices:
A reasonable approach for making tables in LaTeX is with gnumeric. Gnumeric is nice spreadsheet program which can read .xls files and can save them as .tex files.
It is of course, not as simple as one might wish. Gnumeric uses the longtable package so in order to modify what gnumeric does, you will to come to terms with longtable.
Here is a rough procedure for getting a table into a LaTeX document. If your tables aren't too complicated and you are not too picky, it'll probably work. But if the wheels come off, you'll want to have a look at the documentation - there's lots of LaTeX docs at www/Refs/LaTeX-DOCS.
\caption later.
\usepackage commands that you'll
need to insert in your ``including'' document. That is in the file
that you want the tables to show up in ultimately.
All of the \usepackage and \newlength commands come
between the \documentclass and the begin{document}
command. That is the go in the ``preamble.''
\begin{table}[htbp]
\end{table}
You'll surely want to add a
\caption and a \label to your table. To do so, you need
to edit the file that gnumeric wrote.
Look for the command that looks like:
\begin{longtable}[c]{%
b{\gnumericColA}%
b{\gnumericColB}%
b{\gnumericColC}%
b{\gnumericColD}%
}
and make it look like this:
\begin{longtable}[c]{%
b{\gnumericColA}%
b{\gnumericColB}%
b{\gnumericColC}%
b{\gnumericColD}%
}\caption{Fascinating Table Showing Dramatic Result}\\
\label{tab:fascinating}
NOTE the \\ at the end of the \caption.
\input
directive will act as though the input'ed file is part of the
including document. NOTE that since the input'ed file contains a
table-like float, the table counter will be updated, and the
listoftables directive will recognize it as a table. Also,
since it's a float, the table will
appear where LaTeX thinks it should - which might not be right where
the \inpt directive resides.
The most convenient way to access the stuff on your floppy or CDROM, is to make the contents of the entire disk part of the filesystem9.1 The process of joining a device to the filesystem is known as mounting and can be accomplished manually via the mount command. But generally, the workstation will mount it automatically or nearly automatically and put something on your desktop for you to click on.
So, you stick your CDROM or floppy or USB device into the appropriate slot and then look for evidence of your new device.
On a good day, your workstation will automati