UC Davis Computer Science at
Home
This document will
provide you with a way to communicate with the Computer Science Instructional
Facility (CSIF) from home, and a variety of ways to create a UNIX environment
at home.
Remote Access to the CSIF
You will need secure shell (ssh)
and secure file transfer protocol (sftp) software to
communicate with the CSIF. PuTTY is a free ssh
program, and WinSCP3 is a free sftp program with a
GUI. You can download them from your MyUCDavis accounts by selecting UCD Resources->Software->Internet
Tools. Once you have the programs you
will create sessions using a CSIF computer name, e.g. pc13.cs.ucdavis.edu
Unix at
Home
There are four ways
of having a Unix experience at home: 1)
Install a copy of Linux as a virtual machine on top of Windows see http://wwwcsif.cs.ucdavis.edu/~davis/40/homepage.html;
2) installing cygwin in Windows; 3) running Linux
from a Knoppix CD; and 4) installing Linux on one of
your hard drives, and dual booting it with Windows. You will find http://heather.cs.ucdavis.edu/~matloff/Linux/LinuxInstall.pdf
quite helpful for the latter two methods.
Cygwin in
Windows
Cygwin is a free application that emulates a Unix
shell while still running the Windows operating system. With cygwin,
you can develop using gcc, gdb, g++ on your Windows
computer without need of connecting to the CSIF. You download the cygwin
shell as well as Windows ports of Unix software from
cygwin.com. In a web browser, go to
cygwin.com, and click “Install Cygwin now”. Once you start setup.exe, I suggest you
accept all of the default selections until you reach the “Select Packages” screen. When selecting the options for cygwin you should at least install X11, openssh
from the Net heading, and ddd, gcc,
g++, and gdb from the Devel heading. Once cygwin is
installed, you need only click on the cygwin icon to
start a Unix like shell.
If you wish to program in a GUI environment
you will need to use the X Server. First follow the directions at
http://x.cygwin.com/docs/ug/setup-cygwin-x-installing.html to install the X
server. Then follow the following steps:
Start cygwin
Type cd
Type cp /etc/X11/xinit/xinitrc ~/.xinitrc
Edit .bashrc using
vi by typing vi .bashrc
Add the following
line at the end of .bashrc: PATH=$PATH:.:/usr/X11R6/bin
Save .bashrc, exit vi, and exit cygwin.
From now on, to
develop at home: start cygwin and then Type startx
For more information
visit http://x.cygwin.com/docs/ug/using.html
To develop using the
CSIF computers remotely:
start cygwin and then
Type startx
Type ssh -Y -l username remote_hostname,
e.g. ssh –Y –l
After entering your
password, at the shell prompt, type xterm& this will open an X Window on your home
machine that you will now type into!
Knoppix
Before proceeding you must create a copy of a Knoppix CD. You can
download an image of the CD from by downloading its iso from http://www.knoppix.org . When burning the image, make sure you don’t just copy the image file.
Adjust the boot list of your BIOS so that it boots from the CD (before
the hard drive). To access the BIOS
settings you will usually need to hold down the
To have Knoppix remember important settings
permanently, you must store its settings somewhere on your computer. This can either be
your hard disk, or a USB stick. Click
the Penguin icon then choose “Configure/Create a persistent KNOPPIX disk
image”. After clicking the Yes button, select
the partition to use (hda is usually the C: drive in
Windows, sda will usually be your USB stick.) After selecting your destination drive, you
must decide whether you wish to encrypt your information. I chose not to encrypt. The size of the homedir
is up to you. Assume that 100 MB is needed just for Knoppix. Anything larger is room for your own
files. I chose 500 MB. After you select the size, Knoppix will set aside space, format, and copy data to the
specified drive. After it is done, reboot your computer by right clicking on the
Desktop, and selecting “Log Out”, and then “Restart.” Despite what the message says, do not remove Knoppix CD from the computer, and make sure it is in your
computer as it restarts.
Now that you have a permanent location for your Knoppix
configuration you can set up your network and
printers. Click the Penguin icon and
select “Network/Internet/Network card configuration.” Set the IP addresses based on those you
copied from Windows. To set the printer,
again click the Penguin icon, and then select “Configure/Configure
Printer.” In the “Configure – KDE
Control Module” select Add and then select the appropriate brand and
model. If you have troubles with printer
drivers, click the Penguin again and select Root Shell. In the shell, type
foomatic-cleanupdrivers (with no spaces.) Then try
adding the printer again.
After setting up your printer and the network, save your Knoppix configuration by clicking the Penguin icon and
selecting the “Configure/Save KNOPPIX configuration”. You may need to select a different
destination directory than the default.
From now on, whenever you start your computer with the Knoppix CD in the drive you will have to type knoppix myconfig=scan at the
prompt to load your own printer configuration.
Installing Linux on your Hard
Drive
For this option
you will to have a copy of a Linux distribution DVD or CDs. You can download the appropriate images from
http://distrowatch.com. You can read
Professor Matloff’s general guide at http://heather.cs.ucdavis.edu/~matloff/linux.html. If you think you would like some hands on
help, then you can go to an Installfest of the Linux
User Group of