Ubuntu Desktop

From Pmgwiki

Jump to: navigation, search

The directions for installing Ubuntu on a Desktop with the PMG bits is approximately the same as installing Ubuntu Server. Follow the directions in the Farm guide. There are also some notes on Evan's web page.


Differences from Farm Process

  1. You don't need to install ntp if you don't care about super precise time. Ubuntu will use ntpdate to occasionally synchronize the time.
  2. You might want to remove network-manager and network-manager-gnome since they aren't needed for a machine with a static IP.
  3. I also removed all the bluetooth stuff, since my machine doesn't have bluetooth: dpkg --purge bluez bluez-util bluetooth

Installing PMG Accounts

  1. Install stuff needed by the PMG scripts: apt-get install am-utils tcsh m4 curl
  2. Disable shadow passwords: pwunconv
  3. Prepare local user accounts: cp /etc/passwd /etc/passwd.base. Edit this file to remove local user accounts. You can also any local stuff to /etc/passwd.local.
  4. Tell the PMG scripts where to put the aliases: echo "temp" > /etc/aliases
  5. Install the PMG scripts: cd /; curl http://pmg.csail.mit.edu/internal/new-pmg.tar.gz | tar xzf -
  6. Run the update script: /usr/local/adm/bin/updatemachine

After this, you will have all the local PMG accounts and configuration.


PMG machines are backed up to other machines using the dump program:

  • Ensure the backup scripts are in /home/admin/backup
  • Install tools used by the scripts: apt-get install heirloom-mailx dump nullmailer
  • Configure nullmailer to use outgoing.csail.mit.edu when it asks.
  • Edit /home/admin/backup to ensure it points to the correct host, and is backing up the correct directories.
  • Edit the script to use mail instead of /bin/mail
  • Install the entries in root's crontab. The settings to use are listed in the comments in the backup script. crontab -e

Configuring Dual Displays

This worked on my machine (algoza) which has an ATI card.

  1. Back up your existing X configuration: cp /etc/X11/xorg.conf ~
  2. Install the proprietary driver: System > Administration > Hardware Drivers. Enable the ATI/AMD Proprietary Driver (fglrx)
  3. Reboot. Ideally your display will still work, just with one monitor.
  4. As root, run: aticonfig --initial=dual-head --screen-layout=right
  5. Restart X. Ideally, you will now have two monitors working.

Sadly, I can't run compiz and get the fancy visual effects because my screen resolution is too big for the hardware. If you are trying to debug this, there is a compiz-check script that does a good job of detecting if you are going to be able to run compiz.

Useful Desktop Packages

  • Flash: flashplugin-nonfree
  • Java browser plug-in: sun-java6-plugin
  • Latex plus lots of extra "contributed" packages and fonts: texlive-latex-extra texlive-fonts-recommended
  • Gnuplot for graphs: gnuplot-x11
  • Wireshark for debugging network protocols: wireshark
  • Print to PDF from any application: cups-pdf

Using Kerberos Authentication

To log in to either CSAIL machines (such as login.csail.mit.edu) or Athena machines (such as linerva.mit.edu) without prompting for a password, you need to obtain and forward Kerberos tickets. This will allow you to do things like use Subversion repositories hosted on CSAIL's AFS space.

  1. Install the Kerberos user package: sudo apt-get install krb5-user.
  2. Configure SSH to use Kerberos tickets for authentication, and to forward them. Edit ~/.ssh/config to contain the following:
Host *.csail.mit.edu linerva.mit.edu
    #Not needed on Ubuntu. Needed only on Mac OS X?
    #GSSAPIAuthentication yes
    #GSSAPIKeyExchange yes
    GSSAPIDelegateCredentials yes

You can customize the Host line to include/exclude the machines that you want. To use Kerberos authentication:

  • To obtain CSAIL tickets: kinit username@CSAIL.MIT.EDU
  • To obtain Athena tickets: kinit -54 username@ATHENA.MIT.EDU

Visual Bell in gnome-terminal

By default, gnome-terminal will beep the system speaker. To get the visual bell:

  1. Be sure gnome-terminal has the bell enabled (Edit > Profile Preferences > Terminal Bell).
  2. Turn on window flashing. Set (System > Preferences > Sound > Visual alert) to "Flash window".
  3. Disable the audiable bell. In the same panel, uncheck the "Play alert sound" box.

Now, gnome-terminal's menu bar will flash when it beeps.

NX (Remote Display Protocol)

NX is an X protocol variant that is very good over WAN or low bandwidth links. I use it to run X applications on my desktop from my laptop, and it works over wireless connections or if I'm in New York

  1. Download the packages from NoMachine.
  2. Install all three: dpkg -i nx*.deb
  3. Copy the nx user definition from /etc/passwd into /etc/passwd.local so it doesn't get blown away in the future.

Change the Default Editor

  • To change the default editor systemwide: sudo update-alternatives --config editor
  • To change the editor for your user account: select-editor (note: this only sort of works ... I'm investigating)
  • To change the editor for your account, add EDITOR=[program] to ~/.bashrc
Personal tools