26
7/22/12 CS50 Appliance 2.3 - CS50 Manual 1/26 https://manual.cs50.net/CS50_Appliance_2.3 CS50 Appliance 2.3 Select Language This HOWTO is for version 2.3 of the CS50 Appliance. If following Fall 2011 (https://www.cs50.net/) of CS50, you should use this version of the appliance. If following Fall 2010 (http://cs50.tv/2010/fall/) of CS50, you should use version 2.1 of the appliance. If following Fall 2009 (http://cs50.tv/2009/fall/) of CS50, you should use version 1.4 instead. The CS50 Appliance is a virtual machine (http://en.wikipedia.org/wiki/Virtual_machine) (VM) that lets you "take" CS50, even if you're not a student at Harvard. It's based on Fedora (http://en.wikipedia.org/wiki/Fedora_(operating_system)) , a Linux (http://en.wikipedia.org/wiki/Linux) -based operating system (http://en.wikipedia.org/wiki/Operating_system) . It's an appliance (http://en.wikipedia.org/wiki/Computer_appliance) in the sense that we've preconfigured this VM for a specific purpose: CS50! In other words, even if you're not a student in CS50, you can still play along at home. The CS50 Appliance will let you compile source code from lectures (https://www.cs50.net/lectures/) and implement problem sets (https://www.cs50.net/psets/) without having to figure out how to configure GCC (http://en.wikipedia.org/wiki/GNU_Compiler_Collection) , etc. yourself. Moreover, the CS50 Appliance lets you run Linux inside of a window on your own computer, even if you're already running (some other version of) Linux, Mac OS, Solaris, or Windows! Incidentally, the appliance is always work in progress, so please forgive any bugs! We'll document known issues down below. Contents 1 Cheatsheet 2 Instructions 2.1 How to Install Appliance 2.1.1 VirtualBox 2.2 How to Update Appliance 2.3 How to Use Appliance 2.3.1 How to Change Name 2.3.2 How to Change Password 2.3.3 How to Change Language

CS50 Appliance 2

Embed Size (px)

Citation preview

Page 1: CS50 Appliance 2

7/22/12 CS50 Appliance 2.3 - CS50 Manual

1/26https://manual.cs50.net/CS50_Appliance_2.3

CS50 Appliance 2.3

Select Language ▼

This HOWTO is for version 2.3 of the CS50 Appliance.

If following Fall 2011 (https://www.cs50.net/) of CS50, you should use

this version of the appliance.If following Fall 2010 (http://cs50.tv/2010/fall/) of CS50, you should use

version 2.1 of the appliance.If following Fall 2009 (http://cs50.tv/2009/fall/) of CS50, you should use

version 1.4 instead.

The CS50 Appliance is a virtual machine(http://en.wikipedia.org/wiki/Virtual_machine) (VM) that lets you "take" CS50, even if you're not a student atHarvard.

It's based on Fedora (http://en.wikipedia.org/wiki/Fedora_(operating_system)) , a Linux(http://en.wikipedia.org/wiki/Linux) -based operating system (http://en.wikipedia.org/wiki/Operating_system) . It'san appliance (http://en.wikipedia.org/wiki/Computer_appliance) in the sense that we've preconfigured this VM for aspecific purpose: CS50!

In other words, even if you're not a student in CS50, you can still play along at home. The CS50 Appliance will letyou compile source code from lectures (https://www.cs50.net/lectures/) and implement problem sets(https://www.cs50.net/psets/) without having to figure out how to configure GCC(http://en.wikipedia.org/wiki/GNU_Compiler_Collection) , etc. yourself. Moreover, the CS50 Appliance lets yourun Linux inside of a window on your own computer, even if you're already running (some other version of) Linux,Mac OS, Solaris, or Windows!

Incidentally, the appliance is always work in progress, so please forgive any bugs! We'll document known issuesdown below.

Contents

1 Cheatsheet

2 Instructions

2.1 How to Install Appliance

2.1.1 VirtualBox

2.2 How to Update Appliance2.3 How to Use Appliance

2.3.1 How to Change Name

2.3.2 How to Change Password

2.3.3 How to Change Language

Page 2: CS50 Appliance 2

7/22/12 CS50 Appliance 2.3 - CS50 Manual

2/26https://manual.cs50.net/CS50_Appliance_2.3

2.3.4 How to Change Keyboard Layout

2.3.5 How to Change Time Zone

2.3.6 How to Open a Terminal

2.3.7 How to SSH to Appliance

2.3.8 How to Release Keyboard and Mouse

2.3.9 How to Change Host Key2.3.10 How to Install Guest Additions

2.3.11 How to Change Resolution

2.3.12 How to Change Volume

2.3.13 How to Enter/Exit Fullscreen Mode

2.3.14 How to Enter/Exit Seamless Mode

2.3.15 How to Use phpMyAdmin

2.3.16 How to Restore Snapshots

2.3.17 How to Synchronize Files with Dropbox

2.3.18 How to Transfer Files between Appliance and Your Computer

2.3.18.1 Windows

2.3.18.2 Mac OS2.3.18.3 Linux

2.3.18.3.1 GNOME2.3.18.3.2 KDE

2.3.18.3.3 Xfce2.3.19 How to Access Appliance from Another Computer2.3.20 How to Take a Screenshot

2.3.21 How to Share Control of Your Screen2.3.22 How to Disable Automatic Login

2.3.23 How to Log Out of Appliance2.3.24 How to Restart Appliance

2.3.25 How to Shut Down Appliance2.3.26 How to Configure Appliance for a Proxy Server

2.4 How to Run Programs from Lectures2.5 How to Do Problem Sets

3 Accessibility4 Implementation Details

4.1 VMware

5 Troubleshooting6 Forget a password?

6.1 I forgot John Harvard's password6.2 I forgot the root password

6.3 I forgot John Harvard's (or root's) MySQL password7 Known Issues

8 Changelog9 Future Work

10 References11 Acknowledgements

Page 3: CS50 Appliance 2

7/22/12 CS50 Appliance 2.3 - CS50 Manual

3/26https://manual.cs50.net/CS50_Appliance_2.3

Cheatsheet

See instructions for much more detail.

Your Name John Harvard

Your Username jharvard

Your Password crimson

Superuser's Username root

Superuser's Password crimson

Appliance's IP Address 192.168.56.50

Your Computer's IP Address 192.168.56.1

Your MySQL Server (DB_SERVER) localhost

Your MySQL Username (DB_USER) jharvard

Your MySQL Password (DB_PASS) crimson

Superuser's MySQL Username root

Superuser's MySQL Password crimson

Your Homepage

once you create public_html, etc.

http://192.168.56.50/~jharvard/

phpMyAdmin http://192.168.56.50/phpMyAdmin/

Usermin http://192.168.56.50:20000/

Webmin http://192.168.56.50:10000/

VirtualBox's Host Key left-Command on a Mac; right-Control on any other OS

Instructions

How to Install Appliance

In order to install the appliance, you first need to install a program called a hypervisor(http://en.wikipedia.org/wiki/Hypervisor) that will let you run virtual machines(http://en.wikipedia.org/wiki/Virtual_machine) on your own computer, whether you run Linux, Mac OS, Solaris, orWindows. Unless you already own a hypervisor (e.g., Parallels, VMware Fusion, or VMware Workstation), CS50recommends that you download and install VirtualBox because it's free and cross-platform.

Once installed, it's not uncommon for the appliance to take 1 – 2 minutes to boot. But if, once at JohnHarvard's desktop, the appliance still feels unbearably slow, you might need to enable hardwarevirtualization on your computer if it's a PC running Windows or Linux. (Hardware virtualization should be

Page 4: CS50 Appliance 2

7/22/12 CS50 Appliance 2.3 - CS50 Manual

4/26https://manual.cs50.net/CS50_Appliance_2.3

enabled by default on any Intel-based Mac manufactured in the past few years.) Even with hardwarevirtualization enabled, though, virtual machines might still feel slow if your computer is a few years old,has a CPU that's only 1GHz or so, or has only 1GB or so of RAM.

VirtualBox

Here's how to install the appliance using VirtualBox.

1. Install VirtualBox per these instructions.2. Download the latest appliance at http://mirror.cs50.net/appliance/2.3/cs50-appliance-2.3-14-ovf.zip. Then

unzip it. Do not double-click the files within.

3. Launch VirtualBox (as by single- or double-clicking its icon, wherever you installed it).

4. Select Import Appliance... from VirtualBox's File menu. Click Choose. Navigate your way to thatunzipped cs50-appliance-2.3-14-ovf folder, highlight the cs50-appliance-2.3.ovf file within, and click

Open. Then click Next. You should see a summary of the appliance's settings. Click Import. You'll then be

prompted to agree to the appliance's license (http://creativecommons.org/licenses/by-nc-sa/3.0/) . If youclick Agree, you'll see CS50 Appliance 2.3 in VirtualBox's left-hand menu after a few seconds or minutes.

Click CS50 Appliance 2.3 to highlight it, then click Start.

That's it! To learn how to use the appliance, see further instructions down below!

How to Update Appliance

The latest release of version 2.3 of the CS50 Appliance is 2.3-14. To check which version you have, open aterminal and execute:

rpmquery cs50-appliance

You should see output like the below, which indicates (between cs50-appliance- and .i386) the release that

you have installed:

cs50-appliance-2.3-14.i386

You can update the appliance to the latest release in either of two ways:

Select Menu > Administration > Software Update, then click Install Updates if any updates are

available.Open a terminal and execute:

sudo yum clean all ; sudo yum -y update

Input crimson if prompted for a password.

Don't worry if you see

Page 5: CS50 Appliance 2

7/22/12 CS50 Appliance 2.3 - CS50 Manual

5/26https://manual.cs50.net/CS50_Appliance_2.3

Updating : cs50-appliance-2.3-14.i386

or similar on the screen for a minute or more; it takes a while to restart each of the appliance's services.

How to Use Appliance

The first thing you should see when the appliance boots up is John Harvard's desktop. (Oh, henceforth, you areJohn Harvard (http://en.wikipedia.org/wiki/John_Harvard_(clergyman)) . Your initial password is crimson. Andhere's what you look like (http://en.wikipedia.org/wiki/File:BostonTrip-91.jpg) .) Even though you might think ofLinux as having only a command-line interface (http://en.wikipedia.org/wiki/Command-line_interface) , graphicaluser interfaces (http://en.wikipedia.org/wiki/Graphical_user_interface) do exist. We've installed Xfce(http://en.wikipedia.org/wiki/Xfce) , one of the most popular, for you. However, we installed as few programs aspossible to keep the appliance small. You're welcome to install additional programs via Menu > Administration >Add/Remove Applications.

How to Change Name

As much as you might not like being called John, do not try to change John Harvard's name or username. Lifewill be simpler as John.

With that said, if you'd really like to be yourself (or someone else altogether), you're welcome to create a newaccount. Open a terminal and execute

sudo adduser --comment "Jane Harvard" --gid students --groups wheel janeh

echo crimson | sudo passwd --stdin janeh

echo -e "crimson\ncrimson" | sudo smbpasswd -a -s janeh

where Jane Harvard is your desired name, crimson is your desired password, and janeh is your desired

username. Be sure not to overlook the \n in the second command.

If you'd also like to start logging into the appliance automatically under your new identity (instead of JohnHarvard's), execute

sudo nano /etc/gdm/custom.conf

and change jharvard to your own username. Then hit ctrl-x, then y, then Enter to save and quit.

How to Change Password

You can change your password in any of these ways:

Select Menu > Preferences > Password and follow the on-screen prompts.

Log into Usermin at http://192.168.56.50:20000/, select Login > Change Password at top-left, and follow

the on-screen instructions.

Open a terminal and execute:

Page 6: CS50 Appliance 2

7/22/12 CS50 Appliance 2.3 - CS50 Manual

6/26https://manual.cs50.net/CS50_Appliance_2.3

passwd

With that said, allow us to suggest that you not change John Harvard's password if your own computer is alreadypassword-protected. (Life will be simpler with crimson.) The appliance has been configured in such a way thatonly someone with access to your computer (e.g., you) can access the appliance. Even though the appliance canconnect to the Internet, the Internet cannot connect to the appliance.

How to Change Language

This feature may require Internet access.

If English is not your native language, you may want to change the appliance's default language. Some things willremain in English, but you might find yourself more at home nonetheless. Select Menu > Administration >Language, inputting your password if prompted. Select your preferred language from the list that appears, thenclick OK. If prompted, click Import key. You may need to wait for a bit as the language is installed. Then restartthe appliance and log back in.

How to Change Keyboard Layout

If you have a non-U.S. (or non-standard) keyboard, you may want (or need!) to change your keyboard's layout.Select Menu > Administration > Keyboard. (To be clear, select Administration, not Preferences.) Selectyour preferred keyboard, then click OK.

How to Change Time Zone

If you don't live in Cambridge, Massachusetts, USA, you may want to change the appliance's timezone. SelectMenu > Administration > Date & Time. Click the Time Zone tab, select the nearest city in your time zone,then click OK, leaving System clock uses UTC checked.

How to Open a Terminal

You can open a terminal in any of these ways:

Select Menu > Programming > Terminal or Menu > Accessories > Terminal. You'll find yourself in

your home directory (~).

Click Terminal's icon (a black square) in the appliance's bottom-left corner. You'll find yourself in your homedirectory (~).

Right-click anywhere on your desktop and select Open Terminal Here. You'll find yourself in

~/Desktop/.

Select Menu > Programming > gedit or Menu > Accessories > gedit. You'll find yourself in your home

directory (~) in gedit's bottom panel.

No matter the approach you take, it's in the terminal window that you'll be able to type commands like cd, gcc, ls,

etc.

How to SSH to Appliance

Page 7: CS50 Appliance 2

7/22/12 CS50 Appliance 2.3 - CS50 Manual

7/26https://manual.cs50.net/CS50_Appliance_2.3

If you'd like to SSH to the appliance from your own computer (as with Terminal on Mac OS or with PuTTY onWindows), you can SSH from your computer to 192.168.56.50, which is the appliance's static IP address. (Theappliance actually has another IP address, obtained via DHCP, but it uses that IP to access the Internet.)

If you'd instead like to SSH from the appliance to your computer (assuming your computer is running an SSHserver), you can SSH from the appliance to 192.168.56.1, which is the static IP address that VirtualBox hassecretly assigned to your computer.

Note that, for security's sake, you can SSH to the appliance as jharvard but not as root.

How to Release Keyboard and Mouse

Once you click inside of the appliance, it "captures" your keyboard's keystrokes and your mouse's movements(unless you've installed guest additions and haven't selected Machine > Disable Mouse Integration. To releaseyour keyboard and mouse from the appliance's clutches, hit VirtualBox's "host key": on a Mac, VirtualBox's hostkey is your keyboard's left-Command key; on any other OS, VirtualBox's host key is your keyboard's right-Control key. Once you hit that key, should be able to move your mouse anywhere on your screen.

How to Change Host Key

VirtualBox's "host key" allows you to release your keyboard and mouse from the appliance if they've been"captured," which happens when you click somewhere inside of the appliance's window (unless you have guestadditions installed).

On a Mac, VirtualBox's host key is your keyboard's left-Command key; to change it, select VirtualBox >Preferences... > Input. On any other OS, VirtualBox's host key is your keyboard's right-Control key; to changeit, select File > Preferences > Input. In either case, be sure that VirtualBox's main window (where you can selectthe CS50 Appliance from a list) is in the foreground, not the appliance's own window, else the Preferences...and/or File menu might not appear.

How to Install Guest Additions

These instructions assume that you're using VirtualBox as your hypervisor. For VMware Fusion andVMware Workstation, you'll instead want to install "VMware Tools."

"Guest Additions" are device drivers and system applications that come with VirtualBox that can improve theperformance and usability of the CS50 Appliance. Those additions allow you to change the appliance's resolution,enter/exit fullscreen mode, enter/exit seamless mode, and share folders between the appliance and your owncomputer. They may also eliminate the need to release your keyboard and mouse via VirtualBox's "host key."

To install them, select Install Guest Additions... from VirtualBox's Devices menu while the appliance is running.(This menu is outside of the appliance, not inside of it. You may need to release your keyboard and mouse first.)An icon of a CD may then appear on your desktop, but no need to double-click it. Instead, open a terminal andexecute the commands below. Input your password if prompted. (For security, you will not see your password asyou type it.)

sudo mount /dev/sr0 /media/

sudo /media/VBoxLinuxAdditions.run

Page 8: CS50 Appliance 2

7/22/12 CS50 Appliance 2.3 - CS50 Manual

8/26https://manual.cs50.net/CS50_Appliance_2.3

Once the software has been installed, execute the command below:

sudo umount /media/

Then select CD/DVD Devices > Remove disk from virtual drive from VirtualBox's Devices menu. (Thismenu is outside of the appliance, not inside of it. You may need to release your keyboard and mouse first.) Thenrestart the appliance and log back in.

How to Change Resolution

By default, the appliance's resolution for John Harvard is 800x600 (so that his desktop fits on most any computer'sscreen). To lower the resolution to 640x480 or increase the resolution to 1024x768, select Menu > Preferences> Display, select a new value to the right of Resolution, then click Close.

To increase the appliance's resolution beyond 1024x768 and to enable auto-resize (whereby dragging VirtualBox'sbottom-left corner will alter the appliance's resolution), you'll need to install install guest additions, if you haven'talready.

How to Change Volume

1. Select Menu > Sound & Video > Mixer.

2. Select Playback: Internal Audio Analog Stereo (PulseAudio Mixer) next to Sound card.

3. Click Select Controls...".4. Check Master then click Close.

5. Drag the sliders upward to increase the audio's volume.

6. Click Quit.

7. Visit http://webhamster.com/ in Firefox to test!

How to Enter/Exit Fullscreen Mode

For fullscreen mode to work, you'll first need to install guest additions if you haven't already.

Thereafter, you can enter fullscreen mode in either of these ways:

Select Switch to Fullscreen from VirtualBox's Machine menu while the appliance is running. (This menu is

outside of the appliance, not inside of it.)

Hit VirtualBox's "host key" and F together. (On a Mac, VirtualBox's host key is your keyboard's left-

Command key; on any other OS, VirtualBox's host key is your keyboard's right-Control key.)

You can exit fullscreen mode in either of these ways:

Move your cursor to the middle of the bottom of your screen, at which point a menu should appear. Click

the second icon from the right (which resembles two squares).

Hit VirtualBox's "host key" and F together. (On a Mac, VirtualBox's host key is your keyboard's left-

Command key; on any other OS, VirtualBox's host key is your keyboard's right-Control key.)

How to Enter/Exit Seamless Mode

Page 9: CS50 Appliance 2

7/22/12 CS50 Appliance 2.3 - CS50 Manual

9/26https://manual.cs50.net/CS50_Appliance_2.3

Seamless mode lets you "extract" windows (e.g., a Terminal window) from the CS50 Appliance and position themright alongside your computer's own windows; in seamless mode, the appliance's windows are no longer confinedto the appliance's own rectangular window.

For seamless mode to work, you'll first need to install guest additions if you haven't already.

Thereafter, you can enter seamless mode in either of these ways:

Select Switch to Seamless Mode from VirtualBox's Machine menu while the appliance is running. (This

menu is outside of the appliance, not inside of it.)

Hit VirtualBox's "host key" and L together. (On a Mac, VirtualBox's host key is your keyboard's left-

Command key; on any other OS, VirtualBox's host key is your keyboard's right-Control key.)

You can exit seamless mode by hitting VirtualBox's "host key" and L together. (On a Mac, VirtualBox's host key isyour keyboard's left-Command key; on any other OS, VirtualBox's host key is your keyboard's right-Control key.)

How to Use phpMyAdmin

You can access phpMyAdmin in either of these ways:

Visit http://localhost/phpMyAdmin/ or http://192.168.56.50/phpMyAdmin/ using Firefox within the

appliance.Visit http://192.168.56.50/phpMyAdmin/ using your own computer's browser.

No matter the approach you take, log in as jharvard (or, if necessary, root) with a password of crimson ifprompted.

How to Restore Snapshots

Every 10 minutes, the appliance take "snapshots" of source code in /home just in case you accidentally delete

something. (You can also mitigate accidental deletions by synchronizing with Dropbox.)

Suppose that you just deleted ~/pset1/hello.c. Odds are you'll find it in the minutely.0 or minutely.1

snapshot, depending on the current time, in which case you can recover it with

cp /.snapshots/minutely.0/home/jharvard/pset1/hello.c ~/pset1

or with

cp /.snapshots/minutely.1/home/jharvard/pset1/hello.c ~/pset1

in a terminal. If you need to recover an earlier version, you can go further back in time via minutely.2,

minutely.3, or minutely.4. If you'd instead like to go back an hour or so, you can start with hourly.0,

followed by hourly.1, hourly.2, and so on. Below are all of the intervals you can try. Realize that the times only

estimates, since the intervals' definitions depend on the current time.

Page 10: CS50 Appliance 2

7/22/12 CS50 Appliance 2.3 - CS50 Manual

10/26https://manual.cs50.net/CS50_Appliance_2.3

minutely.0 10 minutes ago

minutely.1 20 minutes ago

minutely.2 30 minutes ago

minutely.3 40 minutes ago

minutely.4 50 minutes ago

hourly.0 1 hour ago

hourly.1 2 hours ago

... ...

hourly.22 23 hours ago

daily.0 yesterday

daily.1 2 days ago

... ...

daily.5 6 days ago

weekly.0 1 week ago

weekly.1 2 weeks ago

... ...

weekly.51 51 weeks ago

To see which intervals are actually available to you, execute:

ls /.snapshots/

How to Synchronize Files with Dropbox

This feature requires Internet access.

To make it easier to back up files within the appliance automatically as well as share them with your owncomputer(s), you can synchronize a directory in John Harvard's account with Dropbox(http://www.dropbox.com/features) . If officially enrolled in a course at Harvard, just take care to respectthe course's policies on academic honesty.

Here's how to configure the appliance for Dropbox.

1. Open a terminal.

2. Execute:

dropbox start -i

3. You should be prompted to "download the proprietary daemon" (i.e., software); click OK. The software

Page 11: CS50 Appliance 2

7/22/12 CS50 Appliance 2.3 - CS50 Manual

11/26https://manual.cs50.net/CS50_Appliance_2.3

should proceed to download and unpack.

4. You should then be prompted to set up Dropbox.

If you don't already have a Dropbox account, leave I don't have a Dropbox account checked, then

click Next. Create your Dropbox as prompted.

If you already have an Dropbox account, check I already have a Dropbox account, then click OK.

Log in as prompted.

5. If prompted to upgrade your Dropbox, simply leave 2 GB checked (which is free) then click Next, unless

you want to upgrade to a paid account.6. If prompted to Choose setup type, leave Typical checked, then click Install.

7. If prompted to take a 5-step tour, click Skip Tour; its screenshots won't match what you'll see in the

appliance.

8. When informed That's it!, uncheck Open my Dropbox folder now, then click Finish.

9. If prompted for your admin password, input crimson (unless you changed your root password to something

else). Don't worry if you then see an error about "wrong password."

If you then execute

dropbox status

you should see:

Idle

If you then execute

cd ~/Dropbox/

ls

you should your dropbox's files. If you just created an account, among them will be Getting Started.pdf, Photos,and Public. You can browse those same files (and any others you create) at https://www.dropbox.com/login. Youcan even undelete files.

Only those files and folders that you save in ~/Dropbox/ will be synchronized with your Dropbox

account.

How to Transfer Files between Appliance and Your Computer

If you'd like to SFTP (http://en.wikipedia.org/wiki/SSH_file_transfer_protocol) to the appliance from your owncomputer (as with Cyberduck (http://cyberduck.ch/) on Mac OS or with WinSCP(http://winscp.net/eng/download.php) on Windows), you can SFTP from your computer to 192.168.56.50, whichis the appliance's static IP address. (The appliance actually has a second IP address, obtained via DHCP, but ituses that IP to access the Internet.)

Alternatively, you can "mount" John Harvard's home directory (via a protocol called SMB(http://en.wikipedia.org/wiki/Server_Message_Block) , otherwise known as CIFS(http://en.wikipedia.org/wiki/CIFS) ) in a window on your own desktop, to and from which you can drag and drop

Page 12: CS50 Appliance 2

7/22/12 CS50 Appliance 2.3 - CS50 Manual

12/26https://manual.cs50.net/CS50_Appliance_2.3

files. Here's how, whether you run Linux, Mac OS, or Windows.

Windows

1. Open any folder on your hard drive.

2. Click the address bar atop the folder's window and input \\192.168.56.50\jharvard, then click Enter.

3. If prompted for your name and password:1. Input jharvard for User name.

2. Input crimson for Password.3. Check Remember my credentials if you'd like.

4. Click Connect.

John Harvard's home directory should then open in a new window.

Mac OS

1. Select Connect to Server... from the Finder's Go menu.2. Under Server Address:, input smb://192.168.56.50. (Click the + icon if you'd like to add the appliance to

your Favorite Servers.) Then click Connect.3. If prompted for your name and password:

1. Select Registered User.2. Input jharvard for Name.3. Input crimson for Password.

4. Click Connect.

John Harvard's home directory should then open in a new window.

Linux

GNOME

1. Select Connect to Server... from the Places menu.2. Input 192.168.56.50 for Server.

3. Select Windows share for Type.4. Input jharvard for Share.

5. Input / for Folder.6. Input CS50 for Domain name.7. Input jharvard for User name.

8. Input crimson for Password.9. Check Remember this password if you'd like.

10. Click Connect.

John Harvard's home directory should then open in a new window.

KDE

Page 13: CS50 Appliance 2

7/22/12 CS50 Appliance 2.3 - CS50 Manual

13/26https://manual.cs50.net/CS50_Appliance_2.3

1. Open Dolphin (as via Computer > Network).2. Select Network.

3. Click Add Network Folder.4. Select Microsoft® Windows® network drive, then click Next.5. Input appliance for Name.

6. Input 192.168.56.50 for Server.7. Input jharvard for Folder.

8. Check Create an icon for this remote folder if you'd like.9. Click Finish.

10. Input jharvard for Username.11. Input crimson for Password.12. Check Remember password if you'd like.

13. Click OK.

John Harvard's home directory should then open in a new window.

Xfce

1. Install gvfs-smb as root (as via sudo) if not installed already, as with

yum -y install gvfs-smb

if running CentOS, Fedora, or RedHat or with

apt-get install gvfs-backends

if running Debian or Ubuntu.

2. Launch Thunar (as via Applications Menu > System > Thunar File Manager).3. Select Open Location... from the Go menu.

4. Input smb://192.168.56.50/jharvard/ for Location then click Open.5. Input jharvard for Username.

6. Input CS50 for Domain.7. Input crimson for Password.8. Check Remember forever if you'd like.

9. Click Connect.

How to Access Appliance from Another Computer

By default, you can access the appliance from your own computer via the appliance's static IP address, which is192.168.56.50, because VirtualBox assigns your own computer a static IP address of 192.168.56.1, which is onthe same "subnet." Those IP addresses only exist within VirtualBox, though, so, by default, it's not possible toaccess the appliance from other computers on your LAN (i.e., home network).

However, the appliance also comes with a "bridged" network interface (eth2) that you can activate manually. So

long as your LAN supports DHCP (http://en.wikipedia.org/wiki/Dynamic_Host_Configuration_Protocol) (whichmost home networks do), that interface will acquire an IP address on your LAN, at which point you can access theappliance via HTTP or SSH via that IP from any computer on your LAN.

Page 14: CS50 Appliance 2

7/22/12 CS50 Appliance 2.3 - CS50 Manual

14/26https://manual.cs50.net/CS50_Appliance_2.3

However, for security's sake, you will not be able (from any computer besides your own, on which the appliance isrunning) to:

access phpMyAdmin, at http://192.168.56.50/phpMyAdmin/access Usermin, at http://192.168.56.50:20000/

access Webmin, at http://192.168.56.50:10000/mount John Harvard's home directory in a window on your desktop

You will be able to:

access John Harvard's homepage at http://192.168.56.50/~jharvard/SSH to the appliance at 192.168.56.50

Unfortunately, odds are eth2 will not work on Harvard's campus because of Harvard's firewall.

Before activating eth2, you should first change John Harvard's password to something only you know

for security's sake.

To enable eth2 temporarily, open a terminal and execute:

sudo ifup eth2

If your LAN indeed supports DHCP, you should see:

Determining IP information for eth2... done.

To find out which IP address was assigned by your LAN to the appliance, execute

ifconfig eth2

and look to the right of inet addr (not inet6 addr). That's the address via which you can accessible the appliancefrom another computer on your LAN. Odds are it will start with 192.168.0 or 192.168.1 or 10.0.1, though otherprefixes are possible.

If you would like to enable eth2 permanently:

1. Select Menu > Administration > Network.

2. Highlight eth2 in the window that appears, then click Edit.3. Check Activate device when computer starts, then click OK.4. Select File > Save, then click OK.

5. Select File > Quit.6. Restart the appliance.

Just realize that each time the appliance starts, it may be assigned a different IP address on your LAN via DCHP,so you might need to re-run

Page 15: CS50 Appliance 2

7/22/12 CS50 Appliance 2.3 - CS50 Manual

15/26https://manual.cs50.net/CS50_Appliance_2.3

ifconfig eth2

each time to find out the current address. If your home router supports "DHCP reservations," know that you canfind out the MAC (i.e., Ethernet) address of eth2 by running

ifconfig eth2

as well. Look to the right of HWaddr for the address. Alternatively, if you think it's safe to assign the appliance astatic IP address on your LAN without your home router even knowing, select Menu > Administration >Network, highlight eth2 in the window that appears, click Edit, select Statically set IP addresses, and configurethe interface as you see fit.

How to Take a Screenshot

It's sometimes helpful to take a screenshot of the appliance so that you can remember or share something you seeon your screen. If officially enrolled in a course at Harvard, just take care to respect the course's policieson academic honesty.

To take a screenshot inside of the appliance:

1. Select Menu > Accessories > Screenshot.2. Check a Region to capture.

3. Leave Capture the mouse pointer checked unless you'd like to hide it.4. Leave Delay before capturing at 1, unless you need more time.5. Click OK.

6. You should then be prompted to decide on an Action. Leave Save checked and then click OK if you'd liketo save the screenshot as a file; decide on a destination as prompted. You can then share that screenshot

with someone if necessary, as by opening Gmail in Firefox and sending it as an attachment.

You can also share control of your screen if you need someone else to see more than a screenshot.

How to Share Control of Your Screen

This feature requires Internet access.

So that you can help (and be helped by!) fellow learners on the Internet, the appliance comes with TeamViewer(http://www.teamviewer.com/) , which lets you share (control of) your screen with someone else (a "partner") onthe Internet (and vice versa). If officially enrolled in a course at Harvard, just take care to respect thecourse's policies on academic honesty.

To share your screen with some else:

1. Select Menu > Share Screen. A window should appear.

2. Tell your partner the ID and Password that you see. Once your partner inputs those values, your screenshould be shared. Though if your own computer has a firewall, you might first be prompted to "allow

incoming connections" or the like.

Page 16: CS50 Appliance 2

7/22/12 CS50 Appliance 2.3 - CS50 Manual

16/26https://manual.cs50.net/CS50_Appliance_2.3

To see someone else's screen:

1. Ask your partner for an ID and Password.

2. Select Menu > Share Screen. A window should appear.3. Input the ID into that window, then click Connect to partner.

4. When prompted, input the Password, at which point you should see your partner's screen.

If you would like to connect to someone else's appliance from your own computer (rather than from your ownappliance) or from a mobile device, you can download TeamViewer for free for Android, iOS, Linux, Mac OS, orWindows from http://www.teamviewer.com/en/download/index.aspx.

How to Disable Automatic Login

By default, the appliance logs you in as John Harvard. To disable automatic login, open a terminal and execute:

sudo rm -f /etc/gdm/custom.conf

Then restart the appliance. You should now see a login prompt instead of John Harvard's desktop.

How to Log Out of Appliance

To log out of the appliance, click in the appliance's bottom-right corner, then click Log Out.

How to Restart Appliance

You can restart the appliance in either of these ways:

Click in the appliance's bottom-right corner, then click Restart.

Open a terminal and execute the below, inputting your password if prompted:

sudo restart

How to Shut Down Appliance

You can shut down the appliance in either of these ways:

Click in the appliance's bottom-right corner, then click Shut Down.Open a terminal and execute the below, inputting your password if prompted:

sudo shutdown

How to Configure Appliance for a Proxy Server

If your own computer sits behind an HTTP proxy server, you might need to configure the appliance to route HTTP

Page 17: CS50 Appliance 2

7/22/12 CS50 Appliance 2.3 - CS50 Manual

17/26https://manual.cs50.net/CS50_Appliance_2.3

traffic through that proxy as well. Here's how.

1. Open a terminal and execute the below, inputting your password if prompted:

sudo nano /etc/profile.d/proxy.sh

2. Add the following line to that (otherwise empty) file, where example.com is the address of your proxy

server and 80 is its port number:

export http_proxy=http://example.com:80/

3. Save and quit Nano by hitting ctrl-X, then y, then Enter.4. Execute:

sudo chmod 644 /etc/profile.d/proxy.sh

5. Restart the appliance.

How to Run Programs from Lectures

See Fall 2011's HOWTO.

How to Do Problem Sets

See Fall 2011's HOWTO.

Accessibility

The CS50 Appliance comes pre-configured with Orca (http://live.gnome.org/Orca) , a screen reader. To enableOrca, select Menu > Accessories > Orca.

Note that Orca does work with:

Eclipse

Firefoxgedit (but not its built-in terminal window)

Xfce's menu (in the appliance's bottom-left corner)Xfce's panel (along the bottom of the appliance's screen)

But Orca does not work with:

gedit's built-in terminal windowTerminal

Thunar, the appliance's file manager (via which you can open the Home and File System icons on theappliance's desktop)

Page 18: CS50 Appliance 2

7/22/12 CS50 Appliance 2.3 - CS50 Manual

18/26https://manual.cs50.net/CS50_Appliance_2.3

However, if you have a screen reader installed on your own computer, you needn't rely on Orca alone. Instead,you can leverage your own screen reader for navigation by SSHing to the appliance from your computer and bymounting John Harvard's home directory on your own computer.

If you have suggestions on how to improve the appliance's accessibility, please let [email protected](mailto:[email protected]) know!

Implementation Details

Below are details on how we implemented the CS50 Appliance in case you're curious or would like to reproducethese steps yourself. You do NOT need to follow these directions to if you simply want to use the CS50Appliance: you only need to follow the instructions above.

We built the appliance using a combination of Kickstart (http://fedoraproject.org/wiki/Anaconda/Kickstart) andrpmbuild (http://fedoraproject.org/wiki/How_to_create_an_RPM_package) . It took us a while to figure everythingout, but now that we (and you) know what we're doing, it only takes about 20 minutes to build the appliance (andmost of that time is spent waiting for Kickstart to run).

The CS50 Appliance's kickstart file can be found at http://mirror.cs50.net/appliance/2.3/cs50-appliance-2.3.ks.And the CS50 Appliance's spec file can be found at http://mirror.cs50.net/appliance/2.3/cs50-appliance-2.3.spec.

The directions below assume familiarity with Fedora (http://en.wikipedia.org/wiki/Fedora_(operating_system)) andinstallation thereof as well as with VirtualBox (http://en.wikipedia.org/wiki/VirtualBox) . If you have questions, youmay want to join CS50's Google Group at cs50.tv (http://cs50.tv/2010/fall/#l=psets&r=group) .

1. Download and install (on any OS) the latest version of VirtualBox from

http://www.virtualbox.org/wiki/Downloads.2. Download an ISO of the 32-bit Fedora 15 DVD from

http://download.fedoraproject.org/pub/fedora/linux/releases/15/Fedora/i386/iso/Fedora-15-i386-DVD.iso

(which is linked at http://fedoraproject.org/en/get-fedora-options#formats).3. Launch VirtualBox and click New.

4. On the screen entitled Welcome to the New Virtual Machine Wizard!, click Continue.5. On the screen entitled VM Name and OS Type, input a value below Name (e.g., CS50 Appliance),

select Linux next to Operating System, select Fedora (not Fedora (64 bit)) next to Version, then clickContinue.

6. On the screen entitled Memory, input 768 MB, if not already present, then click Continue.

7. On the screen entitled Virtual Hard Disk, check Start-up Disk (if not checked already), select Createnew hard disk (if not selected already), then click Continue.

8. On the screen entitled Welcome to the Create New Virtual Disk Wizard!, select VDI (VirtualBoxDisk Image) (if not selected already), then click Continue.

9. On the screen entitled Virtual disk storage details, select Dynamically allocated (if not selectedalready), then click Continue.

10. On the screen entitled Virtual disk file location and size, leave the value under Location unchanged

(assuming it's identical to the name you inputted earlier), input 32.0 GB under Size, then click Continue.11. On the screen entitled Summary, click Create.

12. On the screen also entitled Summary, click Create.

Page 19: CS50 Appliance 2

7/22/12 CS50 Appliance 2.3 - CS50 Manual

19/26https://manual.cs50.net/CS50_Appliance_2.3

13. In VirtualBox's lefthand list of VMs, single-click the VM you just created to highlight it, then click Settings.14. Click Network.

15. Under Adapter 1, ensure that Enable Network Adapter is checked, that NAT is selected next toAttached to, and that (under Advanced), PCnet-PCI II (Am79C970A) is selected next to AdapterType.

16. Click Adapter 2. Check Enable Network Adapter and select Host-only Adapter next to Attached to.Ensure that (under Advanced) PCnet-PCI II (Am79C970A) is selected next to Adapter Type.

17. Click Adapter 3. Check Enable Network Adapter and select Bridged Adapter next to Attached to.Ensure that (under Advanced) PCnet-PCI II (Am79C970A) is selected next to Adapter Type.

18. Click OK.19. In VirtualBox's lefthand list of VMs, single-click the VM to highlight it, if not highlighted already, then click

Start.

20. On the screen entitled Welcome to the First Run Wizard!, click Continue.21. On the screen entitled Select Installation Media, click the folder icon under Media Source, navigate your

way to the ISO you downloaded earlier (i.e., Fedora-15-i386-DVD.iso), click it once to highlight it, thenclick OK. You should then see Fedora-15-i386-DVD.iso under Media Source. Click Continue.

22. On the screen entitled Summary, click Done.23. Immediately click inside of the VM's window (so that your cursor disappears). As soon as you see the

screen entitled Welcome to Fedora 15!, hit Esc. You should then see a boot: prompt.

24. At the boot: prompt, type

linux biosdevname=0 ks=http://mirror.cs50.net/appliance/2.3/cs50-appliance-2.3.ks ksdevice=et

h0 selinux=0

then hit Enter. Kickstart will proceed to install Fedora 15 and CS50's own RPMs. Some number of minuteslater (depending on the speed of your computer and Internet connection), the VM will power itself off.

25. In VirtualBox's lefthand list of VMs, click the VM to highlight it, if not highlighted already, then clickSettings.

26. Click Storage.27. Under IDE Controller, single-click Fedora-15-i386-DVD.iso to highlight it. Then click the CD icon to the

right of CD/DVD Drive and select Remove disk from virtual drive. Then click OK.

28. In VirtualBox's lefthand list of VMs, single-click the VM to highlight it, if not highlighted already, then selectExport Appliance... from VirtualBox's Devices menu.

29. On the screen entitled Welcome to the Appliance Export Wizard!, single-click the VM once to highlightit, if not highlighted already, then click Continue.

30. On the screen entitled Appliance Export Settings, click Choose... and navigate your way to a folder inwhich you'd like to save the exported appliance. Select Open Virtualization Format (*.ovf) next to Filesof type, then input a filename (that ends in .ovf) for the appliance next to Save As (e.g., cs50-appliance-

2.3.ovf). Then click Save.31. Back on the screen entitled Appliance Export Settings, leave Write legacy OVF 0.9 and Write

Manifest file unchecked, then click Continue.32. On the next screen also entitled Appliance Export Settings, input values for Name, Product, Product-

URL, Vendor, Vendor-URL, Version, Description, and License. Then click Done. An inaccuratenumber of seconds later, you should find two files in the folder you created: cs50-appliance-2.3.ovf (whichcontain's the VM's configuration) and cs50-appliance-2.3.disk1.vmdk (which is the VM's hard disk).

33. Open cs50-appliance-2.3.ovf with a text editor and delete:

Page 20: CS50 Appliance 2

7/22/12 CS50 Appliance 2.3 - CS50 Manual

20/26https://manual.cs50.net/CS50_Appliance_2.3

the vbox:uuid attribute in the Disk element's tag;

the entire Item element for ideController1 (i.e., everything between that IDE Controller's <Item>and </Item> tags);the entire vbox:Machine element (i.e., everything between <vbox:Machine ...> and

</vbox:Machine>).34. Add elements like the below as children of (i.e., inside) VirtualSystem:

<ProductSection>

<Info>Meta-information about the installed software</Info>

<Product>CS50 Appliance 2.3</Product>

<Vendor>CS50</Vendor>

<Version>2.3</Version>

<ProductUrl>https://manual.cs50.net/CS50_Appliance_2.3</ProductUrl>

<VendorUrl>http://cs50.tv/</VendorUrl>

</ProductSection>

<EulaSection>

<Info>License agreement for the virtual system</Info>

<License>http://creativecommons.org/licenses/by-nc-sa/3.0/</License>

</EulaSection>

35. Create a folder called cs50-appliance-2.3-14-ovf and then move cs50-appliance-2.3.ovf and cs50-appliance-2.3-disk1.vmdk into that folder.

36. Create a ZIP of that folder called cs50-appliance-2.3-14-ovf.zip, as with:

zip -r -n .vmdk cs50-appliance-2.3-14-ovf.zip cs50-appliance-2.3-14-ovf/

This use of -n tells zip not to compress cs50-appliance-2.3-disk1.vmdk (since it's alreadycompressed).

37. Distribute cs50-appliance-2.3-14-ovf.zip!

VMware

VirtualBox exports VMDK files in a "streamOptimized" (i.e., compressed) format that VMware's products do notsupport. However, it's possible to convert cs50-appliance-2.3-disk1.vmdk to a "monolithicSparse" format

that VMware's products do understand, as with:

mkdir cs50-appliance-2.3-vmx

vmware-vdiskmanager -r /path/to/cs50-appliance-2.3-14-ovf/cs50-appliance-2.3-disk1.vmdk -t 0 cs50-

appliance-2.3-14-vmx/cs50-appliance-2.3-disk1.vmdk

vmware-vdiskmanager comes with VMware Fusion (in /Application/VMware

Fusion.app/Contents/Library/) and VMware Workstation (in C:\Program Files\VMware\VMware

Workstation or C:\Program Files (x86)\VMware\VMware Workstation\).

You'll then want to create a text file called cs50-appliance-2.3.vmx in cs50-appliance-2.3-14-vmx/ with

these contents:

Page 21: CS50 Appliance 2

7/22/12 CS50 Appliance 2.3 - CS50 Manual

21/26https://manual.cs50.net/CS50_Appliance_2.3

#!/usr/bin/vmware

config.version = "8"

displayName = "CS50 Appliance 2.3"

ethernet0.connectionType = "nat"

ethernet0.present = "TRUE"

ethernet1.connectionType = "hostonly"

ethernet1.present = "TRUE"

ethernet2.connectionType = "bridged"

ethernet2.present = "TRUE"

floppy0.present = "FALSE"

guestinfo.vmware.product.class = "virtual machine"

guestinfo.vmware.product.long = "CS50 Appliance 2.3"

guestinfo.vmware.product.url = "https://manual.cs50.net/CS50_Appliance_2.3"

guestOS = "fedora"

ide1:0.autodetect = "TRUE"

ide1:0.deviceType = "cdrom-raw"

ide1:0.fileName = "auto detect"

ide1:0.present = "TRUE"

ide1:0.startConnected = "TRUE"

memsize = "768"

powerType.powerOff = "soft"

powerType.powerOn = "soft"

powerType.reset = "soft"

powerType.suspend = "soft"

priority.grabbed = "normal"

priority.ungrabbed = "normal"

scsi0:0.deviceType = "disk"

scsi0:0.fileName = "cs50-appliance-2.3-disk1.vmdk"

scsi0:0.mode = "persistent"

scsi0:0.present = "TRUE"

scsi0:0.startConnected = "TRUE"

scsi0:0.writeThrough = "TRUE"

scsi0.present = "TRUE"

scsi0.virtualDev = "lsilogic"

sound.present = "TRUE"

sound.virtualdev = "sb16"

tools.syncTime = "TRUE"

tools.upgrade.policy = "upgradeAtPowerCycle"

usb.generic.autoconnect = "TRUE"

usb.present = "TRUE"

virtualHW.version = "7"

You can then create a ZIP of that folder called cs50-appliance-2.3-vmx.zip, as with:

zip -r cs50-appliance-2.3-14-vmx.zip cs50-appliance-2.3-14-vmx/

Note the absence of -n this time, as the VMware-compatible VMDK is not itself compressed and thus should be

by zip.

You can then distribute cs50-appliance-2.3-vmx.zip as well!

Troubleshooting

If having trouble with VirtualBox or the CS50 Appliance, see VirtualBox and FAQs.

Forget a password?

I forgot John Harvard's password

John Harvard's password is crimson by default. But if you changed it to something you do not remember, you canchange it to something you know as follows:

1. Log out of the appliance if already logged in.

2. Log in as root with password crimson (unless you changed the superuser's password too).3. Open a terminal, execute

passwd jharvard

and input a new password for John Harvard (e.g., crimson) twice as prompted.

Page 22: CS50 Appliance 2

7/22/12 CS50 Appliance 2.3 - CS50 Manual

22/26https://manual.cs50.net/CS50_Appliance_2.3

4. Log out of the appliance.

You should then be able to log in as John Harvard again.

I forgot the root password

The superuser's password is crimson by default. But if you changed it to something you do not remember, you canchange it to something you know as follows:

1. Shut down the appliance if it's already running.2. Start the appliance, immediately click once inside of its window (so that your cursor disappears), and

immediately hold Shift. Within a few seconds, you should see a GNU GRUB screen with Generichighlighted in white. If not, start over and try again.

3. Hit e, and you should see a screen with at least three options: root, kernel, and initrd. Highlight kernel andhit e again. You should then see a line of text that ends with quiet. Hit the space bar and add the wordsingle to the end of that line. Then hit Enter. You should find yourself back at the previous screen, with

kernel highlighted in white.4. Hit b to boot into the appliance in "single-user mode. You should soon see a terminal prompt.

5. Execute

passwd

and input a new password twice (e.g., crimson) as prompted.6. Execute

reboot

to restart the appliance.

I forgot John Harvard's (or root's) MySQL password

John Harvard's password for MySQL is crimson by default, as is the superuser's. But if you changed either tosomething you do not remember, you can change both back to crimson by opening a terminal and executing thebelow:

sudo yum -y reinstall cs50-appliance

That command will restore the appliance to "factory defaults." It will not delete any code that you've written.

Known Issues

2.3-11

ncurses' FG_YELLOW and BG_YELLOW constants do not display as yellow.

Page 23: CS50 Appliance 2

7/22/12 CS50 Appliance 2.3 - CS50 Manual

23/26https://manual.cs50.net/CS50_Appliance_2.3

Changelog

1.42.0

2.12.22.3-1

Corrected cs50.repo to point to 2.3's repository instead of 2.1's.Fixed NFS-mounting of snapshots.

Increased upload_max_filesize from 2M to 50M in php.ini.Increased post_max_size from 8M to 50M in php.ini.

Configured browscap in php.ini to use http://browsers.garykeith.com/stream.asp?PHP_BrowsCapINI.Added lynx.Added php-PHPMailer.

Added traceroute.Added python explicitly, even though it was already a dependency.Enabled fedora-debug and fedora-updates-debug repos.Installed debuginfo for glibc.

Installed submit50.2.3-3

Installed Orca for accessibility.2.3-4

Removed outdated Fedora Accessibility Guide.

2.3-5Added debuginfo for cs50-library-c, libncurses, and libcrypt.

2.3-6Fixed problem whereby Trash icon wasn't appearing on desktop (by touching files in/etc/skel/.config/xfce4/ in cs50-appliance RPM).

2.3-7Preconfigured appliance to use gedit as default editor for several datatypes.

2.3-8Added bc.

Added evince for PDFs.RPM now removes /home/jharvard/.cache/sessions/* and /root/.cache/sessions/* tofix xfwm crashes.Renamed Menu > Share Screen to Menu > TeamViewer.

2.3-9

RPM no longer removes /home/jharvard/.cache/sessions/* and/root/.cache/sessions/* to fix xfwm4 crashes.John Harvard et al. now autostart these commands:

xfvm4 --replace, to fix frameless windows (seemingly the result of an xfce4-sessions bugwhereby ~/.cache/sessions/ results in xfwm4 dying)

xfdesktop --reload, to ensure Trash icon appears (on login) and panel is properly drawn

Page 24: CS50 Appliance 2

7/22/12 CS50 Appliance 2.3 - CS50 Manual

24/26https://manual.cs50.net/CS50_Appliance_2.3

(after RPM update)Appliance no longer allows /etc/udev/rules.d/70-persistent-net.rules to be created (andremoves existing one), to avoid problems whereby virtual NICs' MAC addresses might be changed

(by users).Firefox now automatically opens PDFs in Document Viewer without prompting.2.3-10

Set timestamp_timeout=1 in /etc/sudoers.d/cs50 for John Harvard to eliminate password

timeout.Added tunnel50.

2.3-11Fixed bug whereby lock files (that protect files that would otherwise be overwritten by the cs50-appliance RPM) were not being honored.

Added support for .foo.lock in addition to foo.lock (which was introduced but broken in -10).Fixed bug whereby John Harvard's and superuser's panels are properly redrawn if~/.config/xfce4/panel/*/* gets updated for either.Wrapped gedit with /usr/local/bin/gedit to force backgrounding (with -b) and to hide Gtk

errors if run at command line.Altered /usr/share/applications/gedit.desktop to invoke gedit -b %F; seems to ensurethat gedit launches visibly when double-clicked. (Previously, 4 clicks were sometimes necessary, asthe first 2 only spawned gedit in the background.)Altered /usr/share/applications/gedit.desktop to have StartupNotify=false to

eliminate spinning cursor, based on http://ubuntuforums.org/showthread.php?t=1454332 andhttp://developer.gnome.org/integration-guide/stable/startup-notification.html.en.Added /usr/local/{sbin,bin} to John Harvard's secure_path for sudo.

2.3-12Added .config/Terminal/terminalrc to /etc/skel to ensure ncurses' FG_YELLOW and

BG_YELLOW constants display as yellow.Updated Firebug, Live HTTP Headers, and Web Developer plugins for Firefox 7.Enabled persistent cookies for lynx.Added CS50 Check.

2.3-13Changed hostname from appliance to appliance.localdomain.Imposed 4GB filesize limit on John Harvard.Imposed 16GB disk quota on John Harvard.Imposed 1M inode quota on John Harvard.

Added snapshots of John Harvard's MySQL databases.Configured phpMyAdmin to hide MySQL's test database.Configured phpMyAdmin to no longer default to a specific database if only one exists.Cleaned up /etc/phpMyAdmin/config.inc.php.Added /etc/skel/.config/xfce4/helpers.rc (so that Menu > Run Program... would launch

Thunar for sftp:// inputs).Changed Exec=gedit -b %f to Exec=gedit -b %U in/etc/skel/.local/share/applications/gedit.desktop (so that files on SFTP mountswould open in gedit when double-clicked).

2.3-14 [not yet released]

Page 25: CS50 Appliance 2

7/22/12 CS50 Appliance 2.3 - CS50 Manual

25/26https://manual.cs50.net/CS50_Appliance_2.3

Added php-tidy.Enabled all Options and Overrides for /var/www/html in /etc/httpd/conf/httpd.conf.Added /etc/dhcp/dhclient-eth0.conf so that DHCP lease (and thus DNS servers) for eth0renews every 300 seconds to ensure appliance detects change of networks within 300 seconds.

Removed tunnel50 because hamachi-logmein's dependency on redhat-lsb impedes kickstart.Replaced /etc/skel/.config/autostart/{xfwm4,xfdesktop}.desktop with justcs50.desktop, which also restarts xfce4-panel (to avoid an apparent Xfce bug whereby panel issometimes empty).

Future Work

Below are features that may be included in some future version of the appliance.

Configure gdm to boot at 800x600 resolution.

References

User Manual (http://www.virtualbox.org/manual/UserManual.html) for VirtualBox

Acknowledgements

Many thanks to everyone who's helped us improve the CS50 Appliance, including, but not limited to:

AmirDarrin RagsdaleDottyFederico LernerJames Lankford

Kartikeya SrivastavaMatthew PolegaMatthew RoknichMauro Braunstein

Nobu KikuchiPhilip DurbinRod RuggieroRolando CruzRory O'Reilly

Sergio PradoShaun Gibson

Retrieved from "https://manual.cs50.net/CS50_Appliance_2.3"Category: HOWTO

Page 26: CS50 Appliance 2

7/22/12 CS50 Appliance 2.3 - CS50 Manual

26/26https://manual.cs50.net/CS50_Appliance_2.3